#include "us_dmga_constr.h"
Classes | |
class | Constraint |
Float constraint object with type and range. More... | |
Public Types | |
enum | AttribType { ATYPE_S, ATYPE_FF0, ATYPE_MW, ATYPE_D, ATYPE_F, ATYPE_VBAR, ATYPE_CONC, ATYPE_EXT, ATYPE_KD, ATYPE_KOFF } |
Attribute type codes for component or association floats. More... | |
Public Member Functions | |
US_dmGA_Constraints (US_Model *=NULL) | |
Generic constructor for the US_dmGA_Constraints class. More... | |
~US_dmGA_Constraints () | |
A destructor. More... | |
void | load_base_model (US_Model *) |
A function to load the base model. More... | |
void | load_constraints (US_Model *) |
A function to load a constraints model. More... | |
void | load_constraints (QVector< Constraint > &) |
A function to load a constraints vector and build model. More... | |
int | update_constraints (QVector< Constraint > &) |
A function to update a constraints vector and rebuild model. More... | |
void | init_constraints (void) |
A function to initialize the constraints vector. More... | |
int | add_constraint (AttribType, int, double, double, bool, bool) |
A function to add a constraints vector entry. More... | |
bool | get_base_model (US_Model *) |
A function to get the current base model. More... | |
bool | get_constr_model (US_Model *) |
A function to get the current constraints model. More... | |
bool | get_work_model (US_Model *) |
A function to get the current work model. More... | |
int | comp_constraints (int, QVector< Constraint > *cnsvP, int *) |
A function to get specified component's constraints. More... | |
int | assoc_constraints (int, QVector< Constraint > *cnsvP, int *) |
A function to get specified association's constraints. More... | |
int | float_constraints (QVector< Constraint > *cnsvP) |
A function to get all the current model's float constraints. More... | |
double | fetch_attrib (US_Model::SimulationComponent &, const AttribType) |
A function to fetch a specified component attribute value. More... | |
double | fetch_attrib (US_Model::Association &, const AttribType) |
A function to fetch a specified association attribute value. More... | |
void | store_attrib (US_Model::SimulationComponent &, const AttribType, const double) |
A function to store a specified component attribute value. More... | |
void | store_attrib (US_Model::Association &, const AttribType, const double) |
A function to store a specified association attribute value. More... | |
Private Slots | |
void | constraints_from_model (void) |
void | constraints_from_base (void) |
void | model_from_constraints (void) |
bool | base_from_cmodel (void) |
int | count_comp_constraints (int, int *, int *) |
int | count_asso_constraints (int, int *, int *) |
bool | init_work_model (void) |
Private Attributes | |
US_Model | bmodel |
US_Model | cmodel |
US_Model | wmodel |
QVector< Constraint > | attribs |
AttribType | x_attr |
AttribType | y_attr |
AttribType | z_attr |
int | nfloat |
int | nbcomp |
int | nccomp |
int | nbassoc |
int | ncassoc |
int | nfvari |
int | dbg_level |
double | xfinc |
This class defines a discrete model GA constraints object consisting mainly of a constraints model and a definition of floating attributes within it.
Definition at line 18 of file us_dmga_constr.h.
Attribute type codes for component or association floats.
Definition at line 24 of file us_dmga_constr.h.
US_dmGA_Constraints::US_dmGA_Constraints | ( | US_Model * | imodel = NULL | ) |
Generic constructor for the US_dmGA_Constraints class.
Definition at line 9 of file us_dmga_constr.cpp.
US_dmGA_Constraints::~US_dmGA_Constraints | ( | ) |
A destructor.
Definition at line 37 of file us_dmga_constr.cpp.
int US_dmGA_Constraints::add_constraint | ( | AttribType | atype, |
int | mcompx, | ||
double | low, | ||
double | high, | ||
bool | floats, | ||
bool | logscl | ||
) |
A function to add a constraints vector entry.
atype | Attribute type |
mcompx | Model component/association index |
low | Low attribute value |
high | High attribute value (ignored if fixed) |
floats | Flag if attribute floats |
logscl | Flag if range scale is logarithmic |
Definition at line 163 of file us_dmga_constr.cpp.
int US_dmGA_Constraints::assoc_constraints | ( | int | assox, |
QVector< Constraint > * | cnsvP, | ||
int * | kfltP | ||
) |
A function to get specified association's constraints.
assox | Index of association for which to fetch constraints |
cnsvP | Pointer to which to return association's constraints |
kfltP | Pointer for return of association's floats count |
Definition at line 277 of file us_dmga_constr.cpp.
|
privateslot |
Definition at line 1271 of file us_dmga_constr.cpp.
int US_dmGA_Constraints::comp_constraints | ( | int | compx, |
QVector< Constraint > * | cnsvP, | ||
int * | kfltP | ||
) |
A function to get specified component's constraints.
compx | Index of component for which to fetch constraints |
cnsvP | Pointer to which to return component's constraints |
kfltP | Pointer for return of component's floats count |
Definition at line 241 of file us_dmga_constr.cpp.
|
privateslot |
Definition at line 1011 of file us_dmga_constr.cpp.
|
privateslot |
Definition at line 406 of file us_dmga_constr.cpp.
|
privateslot |
Definition at line 1121 of file us_dmga_constr.cpp.
|
privateslot |
Definition at line 1084 of file us_dmga_constr.cpp.
double US_dmGA_Constraints::fetch_attrib | ( | US_Model::SimulationComponent & | sc, |
const AttribType | atype | ||
) |
A function to fetch a specified component attribute value.
sc | A reference to a component from which to fetch |
atype | The attribute type to fetch |
Definition at line 331 of file us_dmga_constr.cpp.
double US_dmGA_Constraints::fetch_attrib | ( | US_Model::Association & | as, |
const AttribType | atype | ||
) |
A function to fetch a specified association attribute value.
as | A reference to an association from which to fetch |
atype | The attribute type to fetch |
Definition at line 358 of file us_dmga_constr.cpp.
int US_dmGA_Constraints::float_constraints | ( | QVector< Constraint > * | cnsvP | ) |
A function to get all the current model's float constraints.
cnsvP | Pointer to which to return float constraints |
Definition at line 310 of file us_dmga_constr.cpp.
bool US_dmGA_Constraints::get_base_model | ( | US_Model * | bmodelP | ) |
A function to get the current base model.
bmodelP | A pointer to which to return a base model |
Definition at line 182 of file us_dmga_constr.cpp.
bool US_dmGA_Constraints::get_constr_model | ( | US_Model * | cmodelP | ) |
A function to get the current constraints model.
cmodelP | A pointer to which to return a constraints model |
Definition at line 196 of file us_dmga_constr.cpp.
bool US_dmGA_Constraints::get_work_model | ( | US_Model * | wmodelP | ) |
A function to get the current work model.
wmodelP | A pointer to which to return a work model |
Definition at line 216 of file us_dmga_constr.cpp.
void US_dmGA_Constraints::init_constraints | ( | void | ) |
A function to initialize the constraints vector.
Definition at line 156 of file us_dmga_constr.cpp.
|
privateslot |
Definition at line 1156 of file us_dmga_constr.cpp.
void US_dmGA_Constraints::load_base_model | ( | US_Model * | bmodelP | ) |
A function to load the base model.
bmodelP | A pointer to a base model to load |
Definition at line 43 of file us_dmga_constr.cpp.
void US_dmGA_Constraints::load_constraints | ( | US_Model * | cmodelP | ) |
A function to load a constraints model.
cmodelP | A pointer to a constraints model to load |
Definition at line 54 of file us_dmga_constr.cpp.
void US_dmGA_Constraints::load_constraints | ( | QVector< Constraint > & | cnsv | ) |
A function to load a constraints vector and build model.
cnsv | A reference to constraints vector to load |
Definition at line 146 of file us_dmga_constr.cpp.
|
privateslot |
Definition at line 731 of file us_dmga_constr.cpp.
void US_dmGA_Constraints::store_attrib | ( | US_Model::SimulationComponent & | sc, |
const AttribType | atype, | ||
const double | xval | ||
) |
A function to store a specified component attribute value.
sc | A reference to a component to update |
atype | The attribute type to store |
xval | The attribute value to store |
Definition at line 373 of file us_dmga_constr.cpp.
void US_dmGA_Constraints::store_attrib | ( | US_Model::Association & | as, |
const AttribType | atype, | ||
const double | xval | ||
) |
A function to store a specified association attribute value.
as | A reference to an association to update |
atype | The attribute type to store |
xval | The attribute value to store |
Definition at line 395 of file us_dmga_constr.cpp.
int US_dmGA_Constraints::update_constraints | ( | QVector< Constraint > & | cnsv | ) |
A function to update a constraints vector and rebuild model.
cnsv | A reference to constraints vector for updates |
Definition at line 64 of file us_dmga_constr.cpp.
|
private |
Definition at line 150 of file us_dmga_constr.h.
|
private |
Definition at line 146 of file us_dmga_constr.h.
|
private |
Definition at line 147 of file us_dmga_constr.h.
|
private |
Definition at line 162 of file us_dmga_constr.h.
|
private |
Definition at line 159 of file us_dmga_constr.h.
|
private |
Definition at line 157 of file us_dmga_constr.h.
|
private |
Definition at line 160 of file us_dmga_constr.h.
|
private |
Definition at line 158 of file us_dmga_constr.h.
|
private |
Definition at line 156 of file us_dmga_constr.h.
|
private |
Definition at line 161 of file us_dmga_constr.h.
|
private |
Definition at line 148 of file us_dmga_constr.h.
|
private |
Definition at line 152 of file us_dmga_constr.h.
|
private |
Definition at line 164 of file us_dmga_constr.h.
|
private |
Definition at line 153 of file us_dmga_constr.h.
|
private |
Definition at line 154 of file us_dmga_constr.h.