CONOPT
Loading...
Searching...
No Matches
PADD2_ModelData Class Reference

Public Member Functions

void buildModel (int T, const std::vector< double > &xkeep, const std::vector< int > &xstat, const std::vector< int > &estat)
 adds the variables and constraints for the problem
 
int FDEval (const double x[], double *g, double jac[], int rowno, const int jacnum[], int mode, int ignerr, int *errcnt, int numvar, int numjac, int thread) override
 defines the nonlinearities of the model by returning numerical values.
 
int SDLagrVal (const double x[], const double u[], const int hsrw[], const int hscl[], double hsvl[], int *nodrv, int numvar, int numcon, int nhess) override
 Computes and returns the numerical values of the Hessian.
 
- Public Member Functions inherited from ConoptModelData
 ConoptModelData ()
 
virtual ~ConoptModelData ()
 
virtual int readMatrix (double lower[], double curr[], double upper[], int vsta[], int type[], double rhs[], int esta[], int colsta[], int rowno[], double value[], int nlflag[], int numvar, int numcon, int numnz)
 loads the structure of the model into CONOPT.
 
void setProblemDimension (unsigned int numvar, unsigned int numcons, unsigned int numnz, unsigned int numnlnz)
 sets the problem dimension. This is called if the user wants to implement a custom readMatrix() method.
 
int addConstraint (ConoptConstraintType constype, double rhs, int slackstatus=-1)
 adds a constraint to the problem. The non-zero coefficients are added later
 
int addConstraint (ConoptConstraintType constype, double rhs, const std::vector< int > &varindex, const std::vector< double > &value, const std::vector< int > &nlflag, int slackstatus=-1)
 adds a constraint to the problem. The matrix non-zeros are added based on the supplied variables
 
int addVariable (double lower, double upper, double curr=0, int varstatus=-1)
 adds a variable to the model. The non-zero coefficients are added later.
 
int addVariable (double lower, double upper, const std::vector< int > &consindex, const std::vector< double > &value, const std::vector< int > &nlflag, double curr=0, int varstatus=-1)
 adds a variable to the problem. The matrix non-zeros are added based on the supplied constraints.
 
void setObjectiveElement (ConoptObjectiveElement elem, int elemindex)
 sets the index for the objective variable or constraint
 
void setOptimizationSense (ConoptSense sense)
 sets the optimisation direction.
 
void setInitialStatusOption (int inistat)
 the setting to indicate how the initial status of the variables and slack variables will be handled.
 
int numVar () const
 returns the number of variables in the model
 
int numCons () const
 returns the number of constraints in the model
 
int numHessianNonzeros () const
 returns the number of non-zeros in the Hessian
 
const ConoptVariablegetVariable (int index) const
 returns a reference to the variable object
 
ConoptVariablegetVariable (int index)
 returns a reference to the variable object
 
const ConoptConstraintgetConstraint (int index) const
 returns a reference to the constraint object
 
ConoptConstraintgetConstraint (int index)
 returns a reference to the constraint object
 
void setSDEvaluationType (ConoptSDEvaluationType sdevaltype)
 informs CONOPT of the method for evaluating the second derivative
 
void setSDLagrangianStructure (const std::vector< int > &rownum, const std::vector< int > &colnum)
 sets the structure of the second derivatives of the Lagrangian
 
const std::vector< int > & getSDLagrangianRowNumbers () const
 returns the row numbers in the second derivative of the lagrangian structure
 
const std::vector< int > & getSDLagrangianColumnNumbers () const
 returns the column numbers in the second derivative of the lagrangian structure
 
virtual int FDEvalIni (const double x[], const int rowlist[], int mode, int listsize, int numthread, int ignerr, int *errcnt, int numvar)
 an optional function that can be used to improve the efficiency of the function evaulations.
 
virtual int FDEvalEnd (int ignerr, int *errcnt)
 an optional function that will be called at the end of the function evaluation stage.
 
virtual int FDInterval (const double xmin[], const double xmax[], double *gmin, double *gmax, double jmin[], double jamx[], int rowno, const int jacnum[], int mode, double pinf, int numvar, int numjac)
 defines intervals for the nonlinearities of the model, again by returning numerical values.
 
virtual int SDDirLagr (const double x[], const double dx[], const double u[], double d2g[], int newpt, int *nodrv, int numvar, int numcon)
 computes the directional second derivative for the Lagrangian
 
virtual int SDDir (const double x[], const double dx[], double d2g[], int rowno, const int jacnum[], int *nodrv, int numvar, int numjac, int thread)
 computes the directional second derivative for a single constraint
 
virtual int SDDirIni (const double x[], const double dx[], const int rowlist[], int listsize, int numthread, int newpt, int *nodrv, int numvar)
 called by CONOPT before a sequence of 2DDir calls each time either the point or the direction changes.
 
virtual int SDDirEnd (int *nodrv)
 called by CONOPT after a sequence of 2DDir calls each time either the point or the direction changes.
 

Data Fields

int T = 0
 
std::vector< double > demand
 
std::vector< int > vartd
 
std::vector< int > varcs
 
std::vector< int > vars
 
std::vector< int > vard
 
std::vector< int > varr
 
std::vector< int > varp
 
std::vector< int > varrev
 
std::vector< int > consttdeq
 
std::vector< int > constseq
 
std::vector< int > constcseq
 
std::vector< int > constdeq
 
std::vector< int > constreq
 
std::vector< int > constdrev
 
std::map< int, std::pair< int, int > > consmapping
 
std::vector< int > hessianstart
 

Detailed Description

Definition at line 21 of file pinadd2.cpp.

Field Documentation

◆ T

int PADD2_ModelData::T = 0

Definition at line 24 of file pinadd2.cpp.

◆ demand

std::vector<double> PADD2_ModelData::demand

Definition at line 27 of file pinadd2.cpp.

◆ vartd

std::vector<int> PADD2_ModelData::vartd

Definition at line 30 of file pinadd2.cpp.

◆ varcs

std::vector<int> PADD2_ModelData::varcs

Definition at line 31 of file pinadd2.cpp.

◆ vars

std::vector<int> PADD2_ModelData::vars

Definition at line 32 of file pinadd2.cpp.

◆ vard

std::vector<int> PADD2_ModelData::vard

Definition at line 33 of file pinadd2.cpp.

◆ varr

std::vector<int> PADD2_ModelData::varr

Definition at line 34 of file pinadd2.cpp.

◆ varp

std::vector<int> PADD2_ModelData::varp

Definition at line 35 of file pinadd2.cpp.

◆ varrev

std::vector<int> PADD2_ModelData::varrev

Definition at line 36 of file pinadd2.cpp.

◆ consttdeq

std::vector<int> PADD2_ModelData::consttdeq

Definition at line 39 of file pinadd2.cpp.

◆ constseq

std::vector<int> PADD2_ModelData::constseq

Definition at line 40 of file pinadd2.cpp.

◆ constcseq

std::vector<int> PADD2_ModelData::constcseq

Definition at line 41 of file pinadd2.cpp.

◆ constdeq

std::vector<int> PADD2_ModelData::constdeq

Definition at line 42 of file pinadd2.cpp.

◆ constreq

std::vector<int> PADD2_ModelData::constreq

Definition at line 43 of file pinadd2.cpp.

◆ constdrev

std::vector<int> PADD2_ModelData::constdrev

Definition at line 44 of file pinadd2.cpp.

◆ consmapping

std::map<int, std::pair<int, int> > PADD2_ModelData::consmapping

Definition at line 46 of file pinadd2.cpp.

◆ hessianstart

std::vector<int> PADD2_ModelData::hessianstart

Definition at line 48 of file pinadd2.cpp.


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