UltraScan III
List of all members | Classes | Public Types | Public Member Functions | Private Slots | Private Attributes
US_dmGA_Constraints Class Reference

#include "us_dmga_constr.h"

Collaboration diagram for US_dmGA_Constraints:
Collaboration graph
[legend]

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< Constraintattribs
 
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
 

Detailed Description

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.

Member Enumeration Documentation

Attribute type codes for component or association floats.

Enumerator
ATYPE_S 

Sedimentation coefficient.

ATYPE_FF0 

Frictional ratio.

ATYPE_MW 

Molecular weight.

ATYPE_D 

Diffusion coefficient.

ATYPE_F 

Frictional coefficient.

ATYPE_VBAR 

Vbar (specific density)

ATYPE_CONC 

Signal (partial) concentration.

ATYPE_EXT 

Extinction.

ATYPE_KD 

K_disassociation.

ATYPE_KOFF 

K_off rate.

Definition at line 24 of file us_dmga_constr.h.

Constructor & Destructor Documentation

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.

Member Function Documentation

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.

Parameters
atypeAttribute type
mcompxModel component/association index
lowLow attribute value
highHigh attribute value (ignored if fixed)
floatsFlag if attribute floats
logsclFlag if range scale is logarithmic
Returns
Count of updated number of constraints

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.

Parameters
assoxIndex of association for which to fetch constraints
cnsvPPointer to which to return association's constraints
kfltPPointer for return of association's floats count
Returns
Count of constraints for this association

Definition at line 277 of file us_dmga_constr.cpp.

bool US_dmGA_Constraints::base_from_cmodel ( void  )
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.

Parameters
compxIndex of component for which to fetch constraints
cnsvPPointer to which to return component's constraints
kfltPPointer for return of component's floats count
Returns
Count of constraints for this component

Definition at line 241 of file us_dmga_constr.cpp.

void US_dmGA_Constraints::constraints_from_base ( void  )
privateslot

Definition at line 1011 of file us_dmga_constr.cpp.

void US_dmGA_Constraints::constraints_from_model ( void  )
privateslot

Definition at line 406 of file us_dmga_constr.cpp.

int US_dmGA_Constraints::count_asso_constraints ( int  msx,
int *  faxP,
int *  countfP 
)
privateslot

Definition at line 1121 of file us_dmga_constr.cpp.

int US_dmGA_Constraints::count_comp_constraints ( int  mcx,
int *  faxP,
int *  countfP 
)
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.

Parameters
scA reference to a component from which to fetch
atypeThe attribute type to fetch
Returns
The attribute value

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.

Parameters
asA reference to an association from which to fetch
atypeThe attribute type to fetch
Returns
The attribute value

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.

Parameters
cnsvPPointer to which to return float constraints
Returns
Count of float constraints for the current model

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.

Parameters
bmodelPA pointer to which to return a base model
Returns
Flag if a base model exists and was returned

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.

Parameters
cmodelPA pointer to which to return a constraints model
Returns
Flag if a constraints model exists and was returned

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.

Parameters
wmodelPA pointer to which to return a work model
Returns
Flag if a work model exists and was returned

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.

bool US_dmGA_Constraints::init_work_model ( void  )
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.

Parameters
bmodelPA 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.

Parameters
cmodelPA 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.

Parameters
cnsvA reference to constraints vector to load

Definition at line 146 of file us_dmga_constr.cpp.

void US_dmGA_Constraints::model_from_constraints ( void  )
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.

Parameters
scA reference to a component to update
atypeThe attribute type to store
xvalThe 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.

Parameters
asA reference to an association to update
atypeThe attribute type to store
xvalThe 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.

Parameters
cnsvA reference to constraints vector for updates
Returns
Count of updated number of constraints

Definition at line 64 of file us_dmga_constr.cpp.

Member Data Documentation

QVector< Constraint > US_dmGA_Constraints::attribs
private

Definition at line 150 of file us_dmga_constr.h.

US_Model US_dmGA_Constraints::bmodel
private

Definition at line 146 of file us_dmga_constr.h.

US_Model US_dmGA_Constraints::cmodel
private

Definition at line 147 of file us_dmga_constr.h.

int US_dmGA_Constraints::dbg_level
private

Definition at line 162 of file us_dmga_constr.h.

int US_dmGA_Constraints::nbassoc
private

Definition at line 159 of file us_dmga_constr.h.

int US_dmGA_Constraints::nbcomp
private

Definition at line 157 of file us_dmga_constr.h.

int US_dmGA_Constraints::ncassoc
private

Definition at line 160 of file us_dmga_constr.h.

int US_dmGA_Constraints::nccomp
private

Definition at line 158 of file us_dmga_constr.h.

int US_dmGA_Constraints::nfloat
private

Definition at line 156 of file us_dmga_constr.h.

int US_dmGA_Constraints::nfvari
private

Definition at line 161 of file us_dmga_constr.h.

US_Model US_dmGA_Constraints::wmodel
private

Definition at line 148 of file us_dmga_constr.h.

AttribType US_dmGA_Constraints::x_attr
private

Definition at line 152 of file us_dmga_constr.h.

double US_dmGA_Constraints::xfinc
private

Definition at line 164 of file us_dmga_constr.h.

AttribType US_dmGA_Constraints::y_attr
private

Definition at line 153 of file us_dmga_constr.h.

AttribType US_dmGA_Constraints::z_attr
private

Definition at line 154 of file us_dmga_constr.h.


The documentation for this class was generated from the following files: