Optimization Problem¶
-
template<typename
Alloc
>
classBasicProblem
: public ExprFactory, public SuffixManager¶ An optimization problem.
Public Types
Public Functions
-
BasicProblem
()¶ Constructs an empty optimization problem.
-
int
num_vars
() const¶ Returns the number of variables.
-
int
num_objs
() const¶ Returns the number of objectives.
-
int
num_algebraic_cons
() const¶ Returns the number of algebraic constraints.
-
int
num_logical_cons
() const¶ Returns the number of logical constraints.
-
int
num_common_exprs
() const¶ Returns the number of common expressions.
-
VarRange
vars
() const¶ Returns a range representing all variables in this optimization problem. It can be used for iterating over variables:
for (auto var: problem.vars()) { ... }
-
ObjRange
objs
() const¶ Returns a range representing all objectives in this optimization problem. It can be used for iterating over objectives:
for (auto obj: problem.objs()) { ... }
-
AlgebraicConRange
algebraic_cons
() const¶ Returns a range representing all algebraic constraints in this optimization problem. It can be used for iterating over algebraic constraints:
for (auto con: problem.algebraic_cons()) { ... }
-
LogicalConRange
logical_cons
() const¶ Returns a range representing all logical constraints in this optimization problem. It can be used for iterating over logical constraints:
for (auto con: problem.logical_cons()) { ... }
-
template<typename
T
>
classRange
¶ A pair of iterators to problem elements.
Public Functions
-
template<>
iteratorbegin
() const¶ Returns an iterator to the first element in the range.
-
template<>
iteratorend
() const¶ Returns an iterator to the element following the last element in the range.
An attempt to access this element will result in assertion failure if assertions are enabled and undefined behavior otherwise.
-
template<>
-