LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
problem.h File Reference

The optimization problem: a model, the decision variables to search over, an objective, and the constraints a solution must satisfy. More...

#include <string>
#include <utility>
#include <variant>
#include <vector>
#include "line/opt/evaluator.h"
#include "line/opt/objectives.h"
Include dependency graph for problem.h:

Go to the source code of this file.

Classes

struct  line::opt::Scenario
class  line::opt::OptimizationProblem

Namespaces

namespace  line
namespace  line::opt

Typedefs

using line::opt::OptimizationModel = LineEvaluator::Model

Detailed Description

The optimization problem: a model, the decision variables to search over, an objective, and the constraints a solution must satisfy.

Built fluently – add_variable, set_objective, add_constraint, set_fixed_variables, add_scenario each return *this. The model is a std::variant of qn::Network<double> and lqn::LqnModel<double>, so one problem type covers the flat and the layered case and the solver dispatches on the alternative rather than on a flag.

add_scenario attaches further models with weights: the objective is then evaluated on each and aggregated, which is how a design is optimized against a set of load conditions rather than one. validate() returns the reasons the problem cannot be solved, empty when it can.

Definition in file problem.h.