The representation of a a submodel (block) in the expanded model which is passed to the solver to allow it to calculate values. More...
#include <ExpandedModelInterface.h>
Classes | |
class | ancestor_iterator |
Ancestor iterator. More... | |
class | child_iterator |
Depth first iterator. More... | |
Public Member Functions | |
child_iterator | cbegin () |
child_iterator | cend () |
ancestor_iterator | abegin () |
ancestor_iterator | aend () |
virtual int | getNLocalVars () const =0 |
Returns the number of local variables. | |
virtual const std::list < std::string > & | getLocalVarNames () const =0 |
Returns the names of local variables. | |
virtual int | getNLocalCons () const =0 |
Returns the number of local constraints. | |
virtual const std::list < std::string > & | getLocalConNames () const =0 |
Returns the names of local constraints. | |
virtual int | getNzJacobianOfIntersection (ExpandedModelInterface *emcol)=0 |
Returns the nonzeros in the Jacobian of a section of the model. | |
virtual void | getJacobianOfIntersection (ExpandedModelInterface *emcol, int *colbeg, int *collen, int *rownbs, double *el)=0 |
Returns the nonzeros in the Jacobian of a section of the model. | |
virtual void | getRowBounds (double *lower, double *upper) const =0 |
Return the arrays of bounds for the constraints in this model. | |
virtual void | getColLowBounds (double *elts)=0 |
Returns the vector of lower bounds for the local variables in this model. | |
virtual void | getColUpBounds (double *elts)=0 |
Returns the vector of upper bounds for the local variables in this model. | |
virtual void | getObjGradient (double *elts)=0 |
Returns the objective gradient for the local model w.r.t. local vars. | |
virtual void | setPrimalSolColumns (const double *elts)=0 |
Upload the local variable solutions. | |
virtual void | setDualSolColumns (const double *elts)=0 |
Upload the local variable duals (multipliers on bounds). | |
virtual void | setPrimalSolRows (const double *elts)=0 |
Upload the local constraints slacks. | |
virtual void | setDualSolRows (const double *elts)=0 |
Upload the local constraints duals (multipliers on constraints). | |
virtual std::string | getName () const =0 |
Returns the unique name of this block. | |
virtual void | outputSolution (std::ostream &out, int indent=0)=0 |
Outputs the solution to the supplied stream at given indent. | |
virtual | ~ExpandedModelInterface () |
Public Attributes | |
std::vector < ExpandedModelInterface * > | children |
List of child nodes (vector, so that it can be indexed). | |
Protected Member Functions | |
ExpandedModelInterface () | |
Protected Attributes | |
ExpandedModelInterface * | parent |
Parent node. | |
Friends | |
class | AmplModel |
The representation of a a submodel (block) in the expanded model which is passed to the solver to allow it to calculate values.
The class offers two iterators to allow access to all nodes we may interact with:
ExpandedModelInterface::ExpandedModelInterface | ( | ) | [inline, protected] |
virtual ExpandedModelInterface::~ExpandedModelInterface | ( | ) | [inline, virtual] |
ancestor_iterator ExpandedModelInterface::abegin | ( | ) | [inline] |
References parent.
ancestor_iterator ExpandedModelInterface::aend | ( | ) | [inline] |
child_iterator ExpandedModelInterface::cbegin | ( | ) | [inline] |
child_iterator ExpandedModelInterface::cend | ( | ) | [inline] |
virtual void ExpandedModelInterface::getColLowBounds | ( | double * | elts | ) | [pure virtual] |
Returns the vector of lower bounds for the local variables in this model.
Implemented in ExpandedModel.
virtual void ExpandedModelInterface::getColUpBounds | ( | double * | elts | ) | [pure virtual] |
Returns the vector of upper bounds for the local variables in this model.
Implemented in ExpandedModel.
virtual void ExpandedModelInterface::getJacobianOfIntersection | ( | ExpandedModelInterface * | emcol, | |
int * | colbeg, | |||
int * | collen, | |||
int * | rownbs, | |||
double * | el | |||
) | [pure virtual] |
Returns the nonzeros in the Jacobian of a section of the model.
Implemented in ExpandedModel.
virtual const std::list<std::string>& ExpandedModelInterface::getLocalConNames | ( | ) | const [pure virtual] |
Returns the names of local constraints.
Implemented in ExpandedModel.
virtual const std::list<std::string>& ExpandedModelInterface::getLocalVarNames | ( | ) | const [pure virtual] |
Returns the names of local variables.
Implemented in ExpandedModel.
virtual std::string ExpandedModelInterface::getName | ( | ) | const [pure virtual] |
Returns the unique name of this block.
Implemented in ExpandedModel.
Referenced by ExpandedModel::outputSolution().
virtual int ExpandedModelInterface::getNLocalCons | ( | ) | const [pure virtual] |
Returns the number of local constraints.
Implemented in ExpandedModel.
virtual int ExpandedModelInterface::getNLocalVars | ( | ) | const [pure virtual] |
Returns the number of local variables.
Implemented in ExpandedModel.
virtual int ExpandedModelInterface::getNzJacobianOfIntersection | ( | ExpandedModelInterface * | emcol | ) | [pure virtual] |
Returns the nonzeros in the Jacobian of a section of the model.
Implemented in ExpandedModel.
virtual void ExpandedModelInterface::getObjGradient | ( | double * | elts | ) | [pure virtual] |
Returns the objective gradient for the local model w.r.t. local vars.
Implemented in ExpandedModel.
virtual void ExpandedModelInterface::getRowBounds | ( | double * | lower, | |
double * | upper | |||
) | const [pure virtual] |
Return the arrays of bounds for the constraints in this model.
Implemented in ExpandedModel.
virtual void ExpandedModelInterface::outputSolution | ( | std::ostream & | out, | |
int | indent = 0 | |||
) | [pure virtual] |
Outputs the solution to the supplied stream at given indent.
Implemented in ExpandedModel.
virtual void ExpandedModelInterface::setDualSolColumns | ( | const double * | elts | ) | [pure virtual] |
Upload the local variable duals (multipliers on bounds).
Implemented in ExpandedModel.
virtual void ExpandedModelInterface::setDualSolRows | ( | const double * | elts | ) | [pure virtual] |
Upload the local constraints duals (multipliers on constraints).
Implemented in ExpandedModel.
virtual void ExpandedModelInterface::setPrimalSolColumns | ( | const double * | elts | ) | [pure virtual] |
Upload the local variable solutions.
Implemented in ExpandedModel.
virtual void ExpandedModelInterface::setPrimalSolRows | ( | const double * | elts | ) | [pure virtual] |
Upload the local constraints slacks.
Implemented in ExpandedModel.
friend class AmplModel [friend] |
std::vector<ExpandedModelInterface*> ExpandedModelInterface::children |
List of child nodes (vector, so that it can be indexed).
Referenced by ExpandedModelInterface::child_iterator::child_iterator(), AmplModel::createExpandedModel(), ExpandedModelInterface::child_iterator::operator++(), ExpandedModel::outputSolution(), ExpandedModel::print(), and ExpandedModel::~ExpandedModel().
ExpandedModelInterface* ExpandedModelInterface::parent [protected] |
Parent node.
Referenced by abegin(), AmplModel::createExpandedModel(), ExpandedModelInterface::ancestor_iterator::operator++(), ExpandedModel::outputSolution(), and ExpandedModel::~ExpandedModel().