|
| Ctr (Env &t_env, TempCtr &&t_temp_ctr, std::string t_name="") |
|
| Ctr (Env &t_env, const TempCtr &t_temp_ctr, std::string t_name="") |
|
| Ctr (Env &t_env, CtrType t_type, double t_constant, std::string t_name="") |
|
unsigned int | index (const Model &t_index) const |
|
const std::string & | name () const |
|
unsigned int | id () const |
|
bool | is_in (const Model &t_model) const |
|
const ValueT & | get (const Annotation< ValueT > &t_annotation) const |
|
void | set (const Annotation< ValueT > &t_annotation, ArgsT &&...t_args) const |
|
|
template<unsigned int N = 1, unsigned int I = 0> |
static Vector< Ctr, N - I > | make_vector (Env &t_env, const Dim< N > &t_dim, CtrType t_type, double t_constant, const std::string &t_name="") |
|
Definition at line 29 of file Ctr.h.
◆ Ctr() [1/3]
idol::Ctr::Ctr |
( |
Env & |
t_env, |
|
|
TempCtr && |
t_temp_ctr, |
|
|
std::string |
t_name = "" |
|
) |
| |
Constructor.
Creates a new constraint in the optimization environment.
If no name is given, a unique name in the environment is given.
- Parameters
-
t_env | The optimization environment. |
t_temp_ctr | The temporary constraint used to create the default version of the constraint. |
t_name | The given name for the constraint. |
◆ Ctr() [2/3]
idol::Ctr::Ctr |
( |
Env & |
t_env, |
|
|
const TempCtr & |
t_temp_ctr, |
|
|
std::string |
t_name = "" |
|
) |
| |
Constructor.
Creates a new constraint in the optimization environment.
If no name is given, a unique name in the environment is given.
- Parameters
-
t_env | The optimization environment. |
t_temp_ctr | The temporary constraint used to create the default version of the constraint. |
t_name | The given name for the constraint. |
◆ Ctr() [3/3]
idol::Ctr::Ctr |
( |
Env & |
t_env, |
|
|
CtrType |
t_type, |
|
|
double |
t_constant, |
|
|
std::string |
t_name = "" |
|
) |
| |
Constructor.
Creates a new constraint in the optimization environment.
If no name is given, a unique name in the environment is given.
- Parameters
-
t_env | The optimization environment. |
t_type | The type of the constraint in its default version. |
t_constant | The right hand-side of the constraint in its default version. |
t_name | The given name for the constraint. |
◆ create_version()
◆ get()
Returns the value of the given annotation t_annotation
associated to the object.
If no value is found, the default value of the annotation is returned. If no default value was set, an exception is thrown.
- Template Parameters
-
ValueT | The value type of the annotation. |
- Parameters
-
t_annotation | The annotation. |
- Returns
- The value of the annotation.
Definition at line 78 of file Object.h.
◆ id()
Returns the id of the optimization object.
- Returns
- The id of the optimization object.
Definition at line 60 of file Object.h.
◆ is_in()
Returns true if the optimization object is part of the model t_model
, false otherwise.
- Parameters
-
- Returns
- True if the optimization object is part of the model
t_model
, false otherwise.
Definition at line 67 of file Object.h.
◆ make_vector()
template<unsigned int N = 1, unsigned int I = 0>
static Vector< Ctr, N - I > idol::Ctr::make_vector |
( |
Env & |
t_env, |
|
|
const Dim< N > & |
t_dim, |
|
|
CtrType |
t_type, |
|
|
double |
t_constant, |
|
|
const std::string & |
t_name = "" |
|
) |
| |
|
inlinestatic |
Creates a (nested) vector of constraints.
Example:
std::cout << constraint[1][4].name() << std::endl;
static Vector< Ctr, N - I > make_vector(Env &t_env, const Dim< N > &t_dim, CtrType t_type, double t_constant, const std::string &t_name="")
- Template Parameters
-
N | The dimension of the (nested) vector. |
I | Used for recursion. |
- Parameters
-
t_env | The environment to store the constraints. |
t_dim | The number of elements in each dimension. |
t_type | The type of the constraints. |
t_constant | The right hand-side of the constraints. |
t_name | The given name of the constraints. |
- Returns
- A (nested) vector of constraints.
Definition at line 92 of file Ctr.h.
◆ name()
Returns the name of the optimization object.
- Returns
- The name of the optimization object.
Definition at line 54 of file Object.h.
◆ remove_version()
◆ set()
Sets the value of the given annotation t_annotation
associated to the object.
- Template Parameters
-
ValueT | The value type of the annotation. |
ArgsT | The parameter pack types for constructing the value of the annotation. |
- Parameters
-
t_annotation | The annotation. |
t_args | The parameter pack arguments used to construct "in place" the value of the annotation. |
Definition at line 96 of file Object.h.
◆ versions() [1/2]
◆ versions() [2/2]
◆ impl::Env
Definition at line 30 of file Ctr.h.