#include <model.h>
Public Member Functions | |
void | remove_node_ref (unsigned int _n) |
void | remove_var_ref (unsigned int _n) |
void | remove_const_ref (unsigned int _n) |
model_gid (model &__m, model_iddata *__i=NULL) | |
model_gid (model &__m, unsigned int n, model_iddata *__i=NULL) | |
model_gid (model &__mr, const model_gid &__m) | |
~model_gid () | |
Methods for accessing model group information | |
These methods can be used for accessing important information about a model group and its nodes, variables, constraints,... | |
unsigned int | number_of_nodes () const |
unsigned int | number_of_variables () const |
unsigned int | number_of_constraints () const |
void | number_of_nodes (unsigned int _n) |
void | number_of_variables (unsigned int _n) |
void | number_of_constraints (unsigned int _n) |
void | mk_globref (unsigned int n, const model::walker &__w) |
void | mk_gvarref (unsigned int n, const model::walker &__w) |
void | mk_gconstref (unsigned int n, const model::walker &__w) |
void | make_const_back_ref (unsigned int node, unsigned int cnum) |
unsigned int | get_node_id () |
void | remove_node_id (unsigned int n) |
unsigned int | get_var_id () |
void | remove_var_id (unsigned int n) |
unsigned int | get_const_id () |
void | remove_const_id (unsigned int n) |
void | compress_numbers (bool renumber_vars=false, bool renumber_const=false) |
const model::walker & | node (unsigned int i) const |
const model::walker & | variable (unsigned int i) const |
const model::walker & | constraint (unsigned int i) const |
bool | empty (const model::walker &__x) const |
bool | its_me (const model &__m) const |
model::walker | empty_reference () const |
bool | have_glob_ref (unsigned int _nnum) const |
bool | have_gvar_ref (unsigned int _vnum) const |
bool | have_gconst_ref (unsigned int _cnum) const |
Methods for handling modeling information | |
These methods return names of variables and constants and other data which is irrelevant for the solution process but necessary for user interaction. | |
const std::string | model_name () const |
void | model_name (const std::string &n) |
void | model_name (const char *n) |
const std::string | var_name (unsigned int n) const |
void | var_name (unsigned int n, const std::string &vn) |
void | var_name (unsigned int n, const char *vn) |
const std::string | const_name (unsigned int n) const |
void | const_name (unsigned int n, const std::string &vn) |
void | const_name (unsigned int n, const char *vn) |
bool | get_const_num (unsigned int node_num, unsigned int &const_num) |
const std::string | obj_name () const |
void | obj_name (const std::string &vn) |
void | obj_name (const char *vn) |
double | obj_adj () const |
void | obj_adj (double adj) |
double | obj_mult () const |
void | obj_mult (double mult) |
size_t | n_fixed_vars () const |
std::pair< const std::string, double > | fixed_var (unsigned int n) const |
void | fixed_var (const std::string &vn, double val) |
void | fixed_var (const char *vn, double val) |
size_t | n_unused_vars () const |
const std::string & | unused_var (unsigned int n) const |
void | unused_var (const std::string &vn) |
void | unused_var (const char *vn) |
size_t | n_unused_constrs () const |
const std::string & | unused_constr (unsigned int n) const |
void | unused_constr (const std::string &vn) |
void | unused_constr (const char *vn) |
const std::map< int, std::vector< double > > & | trace_points () const |
const std::map< int, std::vector< double > > & | optima () const |
void | add_trace_point (int nr, const std::vector< double > &d) |
void | add_optimum (int nr, const std::vector< double > &d) |
Friends | |
class | model_iddata |
Definition at line 750 of file model.h.
coco::model_gid::model_gid | ( | model & | __m, | |
model_iddata * | __i = NULL | |||
) | [inline] |
Constructor, which also builds a new model_iddata structure, unless __i
is non-NULL. The parameter __m
sets the reference model.
coco::model_gid::model_gid | ( | model & | __m, | |
unsigned int | n, | |||
model_iddata * | __i = NULL | |||
) | [inline] |
Constructor, which also builds a new model_iddata structure, unless __i
is non-NULL. The parameter __m
sets the reference model, while n
presets the number of variables.
coco::model_gid::~model_gid | ( | ) | [inline] |
void coco::model_gid::add_optimum | ( | int | nr, | |
const std::vector< double > & | d | |||
) | [inline] |
void coco::model_gid::add_trace_point | ( | int | nr, | |
const std::vector< double > & | d | |||
) | [inline] |
void coco::model_gid::compress_numbers | ( | bool | renumber_vars = false , |
|
bool | renumber_const = false | |||
) | [inline] |
If this method is called, the nodes, variables, and constraints are renumbered to fill gaps (unused numbers). To keep the model hierarchy consistent, all numbers in all models in the same model_iddata are changed. The parameters renumber_vars
and renumber_const
determine whether the variable and constraint numbers, respectively, are renumbered in addition to the node numbers.
void coco::model_gid::const_name | ( | unsigned int | n, | |
const char * | vn | |||
) | [inline] |
void coco::model_gid::const_name | ( | unsigned int | n, | |
const std::string & | vn | |||
) | [inline] |
const std::string coco::model_gid::const_name | ( | unsigned int | n | ) | const [inline] |
const model::walker& coco::model_gid::constraint | ( | unsigned int | i | ) | const [inline] |
bool coco::model_gid::empty | ( | const model::walker & | __x | ) | const [inline] |
model::walker coco::model_gid::empty_reference | ( | ) | const [inline] |
void coco::model_gid::fixed_var | ( | const char * | vn, | |
double | val | |||
) | [inline] |
void coco::model_gid::fixed_var | ( | const std::string & | vn, | |
double | val | |||
) | [inline] |
std::pair<const std::string, double> coco::model_gid::fixed_var | ( | unsigned int | n | ) | const [inline] |
unsigned int coco::model_gid::get_const_id | ( | ) | [inline] |
bool coco::model_gid::get_const_num | ( | unsigned int | node_num, | |
unsigned int & | const_num | |||
) | [inline] |
unsigned int coco::model_gid::get_node_id | ( | ) | [inline] |
unsigned int coco::model_gid::get_var_id | ( | ) | [inline] |
bool coco::model_gid::have_gconst_ref | ( | unsigned int | _cnum | ) | const [inline] |
bool coco::model_gid::have_glob_ref | ( | unsigned int | _nnum | ) | const [inline] |
bool coco::model_gid::have_gvar_ref | ( | unsigned int | _vnum | ) | const [inline] |
bool coco::model_gid::its_me | ( | const model & | __m | ) | const [inline] |
void coco::model_gid::make_const_back_ref | ( | unsigned int | node, | |
unsigned int | cnum | |||
) | [inline] |
void coco::model_gid::mk_gconstref | ( | unsigned int | n, | |
const model::walker & | __w | |||
) | [inline] |
void coco::model_gid::mk_globref | ( | unsigned int | n, | |
const model::walker & | __w | |||
) | [inline] |
void coco::model_gid::mk_gvarref | ( | unsigned int | n, | |
const model::walker & | __w | |||
) | [inline] |
void coco::model_gid::model_name | ( | const char * | n | ) | [inline] |
void coco::model_gid::model_name | ( | const std::string & | n | ) | [inline] |
const std::string coco::model_gid::model_name | ( | ) | const [inline] |
size_t coco::model_gid::n_fixed_vars | ( | ) | const [inline] |
size_t coco::model_gid::n_unused_constrs | ( | ) | const [inline] |
size_t coco::model_gid::n_unused_vars | ( | ) | const [inline] |
const model::walker& coco::model_gid::node | ( | unsigned int | i | ) | const [inline] |
void coco::model_gid::number_of_constraints | ( | unsigned int | _n | ) | [inline] |
This method sets the number of constraints across all model groups in the same model_iddata.
unsigned int coco::model_gid::number_of_constraints | ( | ) | const [inline] |
The number_of_constraints method returns the number of constraints across all models governed by the same model_iddata.
void coco::model_gid::number_of_nodes | ( | unsigned int | _n | ) | [inline] |
This method sets the number of nodes across all model groups in the same model_iddata.
unsigned int coco::model_gid::number_of_nodes | ( | ) | const [inline] |
The number_of_nodes method returns the number of nodes across all models governed by the same model_iddata.
void coco::model_gid::number_of_variables | ( | unsigned int | _n | ) | [inline] |
This method sets the number of variables across all model groups in the same model_iddata.
unsigned int coco::model_gid::number_of_variables | ( | ) | const [inline] |
The number_of_variables method returns the number of variables across all models governed by the same model_iddata.
void coco::model_gid::obj_adj | ( | double | adj | ) | [inline] |
double coco::model_gid::obj_adj | ( | ) | const [inline] |
void coco::model_gid::obj_mult | ( | double | mult | ) | [inline] |
double coco::model_gid::obj_mult | ( | ) | const [inline] |
void coco::model_gid::obj_name | ( | const char * | vn | ) | [inline] |
void coco::model_gid::obj_name | ( | const std::string & | vn | ) | [inline] |
const std::string coco::model_gid::obj_name | ( | ) | const [inline] |
const std::map< int, std::vector< double > > & coco::model_gid::optima | ( | ) | const [inline] |
void coco::model_gid::remove_const_id | ( | unsigned int | n | ) | [inline] |
void coco::model_gid::remove_const_ref | ( | unsigned int | _n | ) | [inline] |
void coco::model_gid::remove_node_id | ( | unsigned int | n | ) | [inline] |
void coco::model_gid::remove_node_ref | ( | unsigned int | _n | ) | [inline] |
void coco::model_gid::remove_var_id | ( | unsigned int | n | ) | [inline] |
void coco::model_gid::remove_var_ref | ( | unsigned int | _n | ) | [inline] |
const std::map< int, std::vector< double > > & coco::model_gid::trace_points | ( | ) | const [inline] |
void coco::model_gid::unused_constr | ( | const char * | vn | ) | [inline] |
void coco::model_gid::unused_constr | ( | const std::string & | vn | ) | [inline] |
const std::string& coco::model_gid::unused_constr | ( | unsigned int | n | ) | const [inline] |
void coco::model_gid::unused_var | ( | const char * | vn | ) | [inline] |
void coco::model_gid::unused_var | ( | const std::string & | vn | ) | [inline] |
const std::string& coco::model_gid::unused_var | ( | unsigned int | n | ) | const [inline] |
void coco::model_gid::var_name | ( | unsigned int | n, | |
const char * | vn | |||
) | [inline] |
void coco::model_gid::var_name | ( | unsigned int | n, | |
const std::string & | vn | |||
) | [inline] |
const std::string coco::model_gid::var_name | ( | unsigned int | n | ) | const [inline] |
const model::walker& coco::model_gid::variable | ( | unsigned int | i | ) | const [inline] |
friend class model_iddata [friend] |