517 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
594 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
651 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
709 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
775 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
848 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
939 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1031 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1111 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1170 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1231 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1313 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1389 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1455 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1520 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1568 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1896 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
2288 std::string m_sInstanceName;
2292 std::string m_sInstanceSource;
2296 std::string m_sInstanceDescription;
2300 std::string m_sInstanceCreator;
2304 std::string m_sInstanceLicence;
2309 bool m_bProcessVariables;
2314 int m_iVariableNumber;
2319 int m_iNumberOfIntegerVariables;
2324 int m_iNumberOfBinaryVariables;
2329 int m_iNumberOfSemiContinuousVariables;
2334 int m_iNumberOfSemiIntegerVariables;
2339 int m_iNumberOfStringVariables;
2344 int m_iNumberOfQuadraticRowIndexes;
2349 bool m_bQuadraticRowIndexesProcessed;
2354 int *m_miQuadRowIndexes;
2360 int m_iNumberOfNonlinearExpressionTreeIndexes;
2366 bool m_bNonlinearExpressionTreeIndexesProcessed;
2373 int *m_miNonlinearExpressionTreeIndexes;
2380 int m_iNumberOfNonlinearExpressionTreeModIndexes;
2386 bool m_bNonlinearExpressionTreeModIndexesProcessed;
2392 int *m_miNonlinearExpressionTreeModIndexes;
2397 std::string* m_msVariableNames;
2403 char* m_mcVariableTypes;
2408 double* m_mdVariableLowerBounds;
2413 double* m_mdVariableUpperBounds;
2418 bool m_bProcessObjectives;
2423 int m_iObjectiveNumber;
2428 int m_iObjectiveNumberNonlinear;
2433 std::string* m_msObjectiveNames;
2438 std::string* m_msMaxOrMins;
2443 int* m_miNumberOfObjCoef;
2448 double* m_mdObjectiveConstants;
2453 double* m_mdObjectiveWeights;
2464 bool m_bGetDenseObjectives;
2470 double** m_mmdDenseObjectiveCoefficients;
2475 bool m_bProcessConstraints;
2480 int m_iConstraintNumber;
2485 int m_iConstraintNumberNonlinear;
2490 std::string* m_msConstraintNames;
2495 double* m_mdConstraintLowerBounds;
2500 double* m_mdConstraintUpperBounds;
2506 double* m_mdConstraintConstants;
2512 char* m_mcConstraintTypes;
2518 bool m_bProcessLinearConstraintCoefficients;
2524 int m_iLinearConstraintCoefficientNumber;
2530 bool m_bColumnMajor;
2535 bool m_binitForAlgDiff;
2543 SparseMatrix* m_linearConstraintCoefficientsInColumnMajor;
2550 SparseMatrix* m_linearConstraintCoefficientsInRowMajor;
2556 bool m_bProcessQuadraticTerms;
2562 int m_iQuadraticTermNumber;
2568 double *m_mdConstraintFunctionValues;
2574 double *m_mdObjectiveFunctionValues;
2579 int m_iJacValueSize;
2594 double *m_mdJacValue;
2601 int *m_miJacNumConTerms;
2612 int m_iHighestTaylorCoeffOrder;
2622 bool m_bQTermsAdded;
2628 unsigned int m_iNumberOfNonlinearVariables;
2633 bool m_bProcessNonlinearExpressions;
2638 int m_iNonlinearExpressionNumber;
2644 int* m_miNonlinearExpressionIndexes;
2649 bool m_bProcessExpressionTrees;
2654 bool m_bProcessExpressionTreesMod;
2664 std::map<int, ScalarExpressionTree*> m_mapExpressionTrees;
2670 std::map<int, int> m_mapOSADFunRangeIndex;
2681 std::map<int, MatrixExpressionTree*> m_mapMatrixExpressionTrees;
2692 bool m_bLagrangianExpTreeCreated;
2703 bool m_bLagrangianSparseHessianCreated;
2708 std::map<int, int> m_mapAllNonlinearVariablesIndex;
2713 int *m_miNonLinearVarsReverseMap;
2719 bool m_bAllNonlinearVariablesIndex;
2727 std::map<int, ScalarExpressionTree*> m_mapExpressionTreesMod ;
2734 bool m_bOSADFunIsCreated;
2740 bool m_bCppADTapesBuilt;
2746 bool m_bCppADMustReTape;
2751 bool m_bDuplicateExpressionTreesMap;
2756 bool m_bNonLinearStructuresInitialized;
2761 bool m_bSparseJacobianCalculated;
2767 std::map<int, std::vector<OSnLNode*> > m_mapExpressionTreesInPostfix ;
2774 int m_iHighestOrderEvaluated;
2780 double **m_mmdObjGradient;
2787 std::vector<double> m_vdX;
2792 std::vector<double> m_vdYval;
2798 std::vector<bool> m_vbLagHessNonz;
2803 std::vector<double> m_vdYjacval;
2808 std::vector<double> m_vdw;
2813 std::vector<double> m_vdLambda;
2819 std::vector<double> m_vdDomainUnitVec;
2824 std::vector<double> m_vdRangeUnitVec;
2830 bool m_bProcessTimeDomain;
2835 bool m_bProcessTimeStages;
2840 bool m_bProcessTimeInterval;
2845 bool m_bFiniteTimeStages;
2850 int m_iNumberOfTimeStages;
2855 std::string m_sTimeDomainFormat;
2860 std::string* m_msTimeDomainStageNames;
2865 int* m_miTimeDomainStageVariableNumber;
2870 int** m_mmiTimeDomainStageVarList;
2875 int* m_miTimeDomainStageConstraintNumber;
2880 int** m_mmiTimeDomainStageConList;
2885 int* m_miTimeDomainStageObjectiveNumber;
2890 int** m_mmiTimeDomainStageObjList;
2899 bool processVariables();
2907 bool processObjectives();
2916 bool processConstraints();
2925 bool processLinearConstraintCoefficients();
3636 bool addVariable(
int index, std::string name,
double lowerBound,
double upperBound,
char type);
3657 bool setVariables(
int number, std::string* names,
double* lowerBounds,
3658 double* upperBounds,
char* types);
3686 bool addObjective(
int index, std::string name, std::string maxOrMin,
double constant,
double weight,
SparseVector* objectiveCoefficients);
3703 bool setObjectives(
int number, std::string *names, std::string *maxOrMins,
double *constants,
double *weights,
SparseVector **objectitiveCoefficients);
3726 bool addConstraint(
int index, std::string name,
double lowerBound,
double upperBound,
double constant);
3741 bool setConstraints(
int number, std::string* names,
double* lowerBounds,
double* upperBounds,
double* constants);
3762 double* values,
int valuesBegin,
int valuesEnd,
3763 int* indexes,
int indexesBegin,
int indexesEnd,
3764 int* starts,
int startsBegin,
int startsEnd);
3785 double* values,
int valuesBegin,
int valuesEnd,
3786 int* indexes,
int indexesBegin,
int indexesEnd,
3787 int* starts,
int startsBegin,
int startsEnd);
3816 int* rowIndexes,
int* varOneIndexes,
int* varTwoIndexes,
3817 double* coefficients,
int begin,
int end);
3834 int* rowIndexes,
int* varOneIndexes,
int* varTwoIndexes,
double* coefficients);
3877 bool addMatrix(
int index, std::string name,
int numberOfRows,
int numberOfColumns,
3879 unsigned int inumberOfChildren,
MatrixNode **m_mChildren);
3917 std::string name,
int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
3946 std::string name,
int numberOfComponents,
int* components,
3947 int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
3976 std::string name,
int referenceIdx,
int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4004 std::string name, std::string semidefiniteness,
int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4033 std::string name,
int distortionMatrixIdx,
double normFactor,
int axisDirection,
4034 int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4064 std::string name,
int distortionMatrixIdx,
double normFactor,
int firstAxisDirection,
4065 int secondAxisDirection,
int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4094 std::string name,
int distortionMatrixIdx,
double normFactor,
int axisDirection,
double pNorm,
4095 int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4128 std::string name,
int maxDegree,
int numberOfUB,
double* ub,
int numberOfLB,
double* lb,
4129 int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4191 bool new_x,
int highestOrder);
4224 bool new_x,
int highestOrder);
4257 double *conLambda,
bool new_x,
int highestOrder);
4276 int idx,
bool new_x,
int highestOrder);
4308 bool new_x,
int highestOrder);
4326 int objIdx,
bool new_x,
int highestOrder);
4361 bool new_x,
int highestOrder);
4441 CppAD::ADFun<double> *Fad;
4466 std::vector<double>
forwardAD(
int p, std::vector<double> vdX);
4478 std::vector<double>
reverseAD(
int p, std::vector<double> vdlambda);
4514 bool new_x,
int highestOrder);
IntVector * factors
the list of "factors" contributing to the product each factor contains a reference to a previously de...
bool IsEqual(QuadraticTerm *that)
A function to check for the equality of two objects.
int numberOfRows
numberOfRows gives the number of rows of this matrix
QuadraticTerms * getQuadraticTerms()
Get all the quadratic terms in the instance.
int numberOfOtherIndexes
Multidimensional tensors can also form cones (the Kronecker product, for instance, can be thought of as a four-dimensional tensor).
~MatrixVar()
The MatrixVar class destructor.
The in-memory representation of the element.
~RotatedQuadraticCone()
The RotatedQuadraticCone class destructor.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool setLinearConstraintCoefficients(int numberOfValues, bool isColumnMajor, double *values, int valuesBegin, int valuesEnd, int *indexes, int indexesBegin, int indexesEnd, int *starts, int startsBegin, int startsEnd)
set linear constraint coefficients
int ubMatrixIdx
ubMatrixIdx gives an upper bound for this matrixCon
int ubConeIdx
ubConeIdx gives a cone that must contain ubMatrix - matrixVar
The in-memory representation of the objective function element.
int numberOfRows
Every cone has (at least) two dimensions; no distinction is made between vector cones and matrix cone...
TimeDomainStageConstraints * constraints
constraints is a pointer to a TimeDomainConstraints object
bool setInstanceName(std::string name)
set the instance name.
The in-memory representation of the child of the element.
bool setTimeDomainStageVariablesOrdered(int numberOfStages, int *numberOfVariables, int *startIdx)
This sets the variables associated with each time domain stage in temporal order. ...
The NonnegativeCone Class.
std::string name
The cone can have a name for easier identification.
int numberOfMatrixVar
numberOfMatrixVar gives the number of children
bool initForAlgDiff()
This should be called by nonlinear solvers using callback functions.
~OrthantCone()
default destructor.
The in-memory representation of a polar cone.
DoubleVector * value
a pointer to the array of nonzero values being stored
bool bObjectivesModified
bObjectivesModified is true if the objective function data has been modified.
a double vector data structure
std::vector< ExprNode * > getMatrixExpressionTreeInPrefix(int rowIdx)
Get the prefix tokens for a given row index.
IntVector * components
the list of components contributing to the intersection each component contains a reference to a prev...
The in-memory representation of a generic cone Specific cone types are derived from this generic clas...
ScalarExpressionTree * getLagrangianExpTree()
std::string getInstanceName()
Get instance name.
bool bConstraintsModified
bConstraintsModified is true if the constraints data has been modified.
bool deepCopyFrom(Cones *that)
A function to make a deep copy of an instance of this class.
int getNumberOfNonlinearExpressions()
Get number of nonlinear expressions.
~CopositiveMatricesCone()
default destructor.
int idx
cones are referenced by an (automatically created) index
bool initObjGradients()
This should be called by initForAlgDiff()
MatrixVariables()
The MatrixVariables class constructor.
int getNumberOfSemiIntegerVariables()
getNumberOfSemiIntegerVariables
~MatrixObj()
The MatrixVar class destructor.
Used to hold the instance in memory.
bool IsEqual(Variable *that)
A function to check for the equality of two objects.
MatrixVar()
The MatrixVar class constructor.
~TimeDomainStageVariables()
The TimeDomainStageVariables class destructor.
int * getTimeDomainStageNumberOfObjectives()
Get the number of objectives contained in each time stage.
The in-memory representation of the element.
SparseJacobianMatrix * getJacobianSparsityPattern()
~Constraints()
The Constraints class destructor.
Nl ** getNonlinearExpressions()
Get the pointers to the roots of all expression trees.
bool IsEqual(ProductCone *that)
A function to check for the equality of two objects.
virtual std::string getConeInXML()
Write a SemidefiniteCone object in XML format.
TimeDomainStage ** stage
stage is pointer to an array of stage object pointers
~NonlinearExpressions()
The NonlinearExpressions class destructor.
MatrixExpressions * matrixExpressions
a pointer to the matrixExpressions object
~TimeDomainInterval()
The Interval class destructor.
int idx
cones are referenced by an (automatically created) index
~LinearConstraintCoefficients()
The LinearConstraintCoefficients class destructor.
Cones * cones
cones is a pointer to a Cones object
virtual std::string getConeName()
double getTimeDomainIntervalHorizon()
Get the horizon for the time domain interval.
~Cone()
The Cone class destructor.
QuadraticTerm()
The QuadraticTerm class constructor.
bool deepCopyFrom(PolyhedralCone *that)
A function to make a deep copy of an instance of this class.
virtual std::string getConeName()
int ubMatrixIdx
ubMatrixIdx gives an upper bound for this matrixVar
double constant
constant is a value that is added to the constraint
int getNumberOfSemiContinuousVariables()
getNumberOfSemiContinuousVariables
int getObjectiveNumber()
Get number of objectives.
The in-memory representation of the element.
bool IsEqual(PolarCone *that)
A function to check for the equality of two objects.
~TimeDomainStages()
The Stages class destructor.
virtual std::string getConeName()
The in-memory representation of the element.
double * calculateAllConstraintFunctionValues(double *x, double *objLambda, double *conLambda, bool new_x, int highestOrder)
Calculate all of the constraint function values.
bool addCone(int index, int numberOfRows, int numberOfColumns, ENUM_CONE_TYPE coneType, std::string name, int numberOfOtherIndexes=0, int *otherIndexes=NULL)
add a cone.
std::map< int, ScalarExpressionTree * > getAllNonlinearExpressionTreesMod()
~SemidefiniteCone()
The SemidefiniteCone class destructor.
bool isPositiveSemiDefinite
information about semidefiniteness is also tracked in a boolean variable
int * getNonlinearExpressionTreeIndexes()
Get all the nonlinear expression tree indexes, i.e., indexes of rows (objectives or constraints) that...
ScalarExpressionTree * osExpressionTree
osExpressionTree contains the root of the ScalarExpressionTree
bool IsEqual(OrthantCone *that)
A function to check for the equality of two objects.
int getADSparsityHessian()
end revised AD code
CopositiveMatricesCone()
default constructor.
int getVariableNumber()
Get number of variables.
int numberOfOtherIndexes
Multidimensional tensors can also form cones (the Kronecker product, for instance, can be thought of as a four-dimensional tensor).
double constant
constant is the constant term added to the objective function, 0 by default
The in-memory representation of the variable element.
The in-memory representation of the element.
int numberOfVariables
numberOfVariables gives the number of variables contained in this stage
MatrixObjectives()
The MatrixObjectives class constructor.
bool setObjectiveNumber(int number)
set the number of objectives.
~Variable()
The Variable class destructor.
virtual std::string getConeInXML()
Write a RotatedQuadraticCone object in XML format.
~Matrices()
The Matrices class destructor.
Objective()
The Objective class constructor.
int getNumberOfMatrixExpressionTreeIndexes()
Get the number of unique matrix expression tree indexes.
QuadraticCoefficients()
The QuadraticCoefficients class constructor.
std::string name
an optional name to this matrixVar
int numberOfRows
Every cone has (at least) two dimensions; no distinction is made between vector cones and matrix cone...
int templateMatrixIdx
templateMatrixIdx refers to a matrix that describes the locations in this matrixVar that are allowed ...
~Cones()
The Cones class destructor.
int getConstraintNumber()
Get number of constraints.
double * getVariableUpperBounds()
Get variable upper bounds.
Cone()
The Cone class constructor.
std::string name
an optional name to this matrixObj
bool m_bDeleteExpressionTree
m_bDeleteExpressionTree is true, if in garbage collection, we should delete the osExpression tree obj...
int numberOfRows
numberOfRows gives the number of rows of this matrix
The in-memory representation of the element.
SparseMatrix * getLinearConstraintCoefficientsInColumnMajor()
Get linear constraint coefficients in column major.
The in-memory representation of an intersection cone.
int lbConeIdx
lbConeIdx gives a cone that must contain matrixCon - lbMatrix
The in-memory representation of the element.
bool IsEqual(Objective *that)
A function to check for the equality of two objects.
int coneType
The type of the cone (one of the values in ENUM_CONE_TYPE)
ScalarExpressionTree * getNonlinearExpressionTree(int rowIdx)
Get the expression tree for a given row index.
IntersectionCone()
The IntersectionCone class constructor.
std::string name
name is the name of the constraint
SparseJacobianMatrix * calculateAllConstraintFunctionGradients(double *x, double *objLambda, double *conLambda, bool new_x, int highestOrder)
Calculate the gradient of all constraint functions.
~DualCone()
The DualCone class destructor.
int idx
idx holds the row index of the nonlinear expression
SparseHessianMatrix * calculateLagrangianHessian(double *x, double *objLambda, double *conLambda, bool new_x, int highestOrder)
Calculate the Hessian of the Lagrangian Expression Tree This method will build the CppAD expression t...
The in-memory representation of the child of the element.
bool IsEqual(CopositiveMatricesCone *that)
A function to check for the equality of two objects.
bool IsEqual(Matrices *that)
A function to check for the equality of two objects.
NonpositiveCone()
default constructor.
bool setTimeDomainInterval(double start, double horizon)
This sets the start and end of the time interval.
ObjCoef()
The ObjCoef class constructor.
The in-memory representation of a dual cone.
double * getConstraintLowerBounds()
Get constraint lower bounds.
int coneType
The type of the cone (one of the values in ENUM_CONE_TYPE)
int idx
cones are referenced by an (automatically created) index
MatrixCon()
The MatrixCon class constructor.
int idx
cones are referenced by an (automatically created) index
int constantMatrixIdx
constantMatrixIdx gives a constant added to the matrixObj
TimeDomainStageCon()
The TimeDomainStageCon class constructor.
bool addObjective(int index, std::string name, std::string maxOrMin, double constant, double weight, SparseVector *objectiveCoefficients)
add an objective.
~QuadraticTerm()
The QuadraticTerm class destructor.
bool setConstraints(int number, std::string *names, double *lowerBounds, double *upperBounds, double *constants)
set all the constraint related elements.
bool deepCopyFrom(Matrices *that)
A function to make a deep copy of an instance of this class.
int templateMatrixIdx
templateMatrixIdx refers to a matrix that describes the locations in this matrixObj that are allowed ...
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
The in-memory representation of the variables element.
int getNumberOfNonlinearExpressionTreeIndexes()
Get the number of unique nonlinear expression tree indexes.
bool setObjectives(int number, std::string *names, std::string *maxOrMins, double *constants, double *weights, SparseVector **objectitiveCoefficients)
set all the objectives related elements.
virtual std::string getConeInXML()
Write a ProductCone object in XML format.
bool deepCopyFrom(RotatedQuadraticCone *that)
A function to make a deep copy of an instance of this class.
int idx
idx holds the row index of the nonlinear expression
DualCone()
The DualCone class constructor.
int getNumberOfMatrixConstraints()
double * getConstraintConstants()
Get constraint constants.
int numberOfColumns
numberOfColumns gives the number of columns of this matrix
double * calculateObjectiveFunctionGradient(double *x, double *objLambda, double *conLambda, int objIdx, bool new_x, int highestOrder)
Calculate the gradient of the objective function indexed by objIdx.
double calculateFunctionValue(int idx, double *x, bool new_x)
Calculate the function value for function (constraint or objective) indexed by idx.
int * getNonlinearExpressionTreeModIndexes()
Get all the nonlinear expression tree indexes, i.e., indexes of rows (objectives or constraints) that...
MatrixObj()
The MatrixVar class constructor.
TimeDomain * timeDomain
timeDomain is a pointer to a TimeDomain object
virtual std::string getConeName()
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
int axisDirection
The index of the first component can be changed Since there are possibly many dimensions, the index is coded as i0*n1*n2*...
int * getQuadraticRowIndexes()
Get the indexes of rows which have a quadratic term.
bool setNumberOfQuadraticTerms(int nq)
set the number of quadratic terms
std::string name
the name of the objective function
bool deepCopyFrom(PolarCone *that)
A function to make a deep copy of an instance of this class.
std::string getInstanceCreator()
Get instance fileCreator.
bool deepCopyFrom(Cone *that)
A function to make a deep copy of an instance of this class.
MatrixObj ** matrixObj
matrixObj is an array of pointers to the children
std::vector< double > forwardAD(int p, std::vector< double > vdX)
Perform an AD forward sweep.
std::string getInstanceLicence()
Get instance licence.
bool setMatrixNumber(int number)
set the number of matrices
MatrixExpressionTree * matrixExpressionTree
matrixExpressionTree contains the root of the MatrixExpressionTree
OSMatrix ** matrix
matrix is a pointer to an array of OSMatrix object pointers
std::string * getConstraintNames()
Get constraint names.
~TimeDomain()
The TimeDomain class destructor.
TimeDomainStageObjectives()
The TimeDomainStageObjectives class constructor.
SparseHessianMatrix * getLagrangianHessianSparsityPattern()
virtual std::string getConeName()
bool IsEqual(Cones *that)
A function to check for the equality of two objects.
int referenceMatrixIdx
Polyhedral cones use a reference to a previously defined matrix for the extreme rays.
bool setConstraintNumber(int number)
set the number of constraints.
bool IsEqual(Nl *that)
A function to check for the equality of two objects.
std::string getInstanceDescription()
Get instance description.
The in-memory representation of the element.
bool IsEqual(QuadraticCoefficients *that)
A function to check for the equality of two objects.
Matrices * matrices
matrices is a pointer to a Matrices object
int numberOfRows
Every cone has (at least) two dimensions; no distinction is made between vector cones and matrix cone...
Cones()
The Cones class constructor.
double value
value is the value of the objective function coefficient corresponding to the variable with index idx...
std::string name
an optional name to this MatrixCon
int numberOfMatrixCon
numberOfMatrixCon gives the number of children
int * getTimeDomainStageNumberOfVariables()
Get the number of variables contained in each time stage.
~MatrixVariables()
The MatrixVariables class destructor.
int numberOfOtherIndexes
Multidimensional tensors can also form cones (the Kronecker product, for instance, can be thought of as a four-dimensional tensor).
The in-memory representation of the element.
int numberOfMatrixObj
numberOfMatrixObj gives the number of children
bool getLinearConstraintCoefficientMajor()
Get whether the constraint coefficients is in column major (true) or row major (false).
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
double ub
ub corresponds to the optional attribute that holds the variable upper bound.
int idx
cones are referenced by an (automatically created) index
bool IsEqual(QuadraticCone *that)
A function to check for the equality of two objects.
int firstAxisDirection
The indices of the first two component can be changed Since there are possibly many dimensions...
double start
start is the start of the planning period in the element.
~TimeDomainStageObj()
The TimeDomainStageObj class destructor.
int coneType
The type of the cone (one of the values in ENUM_CONE_TYPE)
~PolarCone()
The PolarCone class destructor.
The in-memory representation of a quadratic cone.
~MatrixExpressions()
The MatrixExpressions class destructor.
int numberOfRows
numberOfRows gives the number of rows of this matrix
bool IsEqual(Objectives *that)
A function to check for the equality of two objects.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
MatrixExpression()
The MatrixExpression class constructor.
MatrixConstraints()
The MatrixConstraints class constructor.
The in-memory representation of the element.
NonnegativeCone()
default constructor.
InstanceData()
The InstanceData class constructor.
virtual std::string getConeInXML()
Write a QuadraticCone object in XML format.
bool IsEqual(Cone *that)
A function to check for the equality of two objects.
bool deepCopyFrom(IntersectionCone *that)
A function to make a deep copy of an instance of this class.
std::string getInstanceSource()
Get instance source.
bool addQTermsToExressionTree()
int idxTwo
idxTwo is the index of the second variable in the quadratic term
bool getSparseJacobianFromColumnMajor()
bool getSparseJacobianFromRowMajor()
~MatrixProgramming()
The MatrixProgramming class destructor.
std::map< int, MatrixExpressionTree * > getAllMatrixExpressionTreesMod()
~OSInstance()
The OSInstance class destructor.
~CompletelyPositiveMatricesCone()
default destructor.
MatrixVariables * matrixVariables
a pointer to the matrixVariables object
The in-memory representation of a cone of semidefinite matrices.
TimeDomainInterval * interval
interval is a pointer to an Interval object
int startIdx
startdIdx gives the number of the first variable contained in this stage
TimeDomainStageCon ** con
con is a pointer to an array of TimeDomainStageCon object pointers
The in-memory representation of the element.
bool setTimeDomainStageObjectivesOrdered(int numberOfStages, int *numberOfObjectives, int *startIdx)
This sets the objectives associated with each time domain stage in temporal order.
std::vector< double > reverseAD(int p, std::vector< double > vdlambda)
Perform an AD reverse sweep.
MatrixProgramming()
The MatrixProgramming class constructor.
SparseHessianMatrix * calculateHessian(double *x, int idx, bool new_x)
Calculate the Hessian of a constraint or objective function.
~Objectives()
The Objectives class destructor.
char * getConstraintTypes()
Get constraint types.
The in-memory representation of a SparseHessianMatrix.
double horizon
horizon is the end of the planning period in the element.
a sparse Jacobian matrix data structure
double * getConstraintUpperBounds()
Get constraint upper bounds.
double lb
lb corresponds to the optional attribute that holds the variable lower bound.
Objectives()
The Objectives class constructor.
ENUM_NL_EXPR_SHAPE shape
shape holds the shape of the nonlinear expression (linear/quadratic/convex/general) (see further up i...
The CompletelyPositiveMatricesCone Class.
The in-memory representation of the child of the element.
NonlinearExpressions * nonlinearExpressions
nonlinearExpressions is a pointer to a NonlinearExpressions object
bool copyLinearConstraintCoefficients(int numberOfValues, bool isColumnMajor, double *values, int valuesBegin, int valuesEnd, int *indexes, int indexesBegin, int indexesEnd, int *starts, int startsBegin, int startsEnd)
copy linear constraint coefficients: perform a deep copy of the sparse matrix
Used to hold part of the instance in memory.
~TimeDomainStageVar()
The TimeDomainStageVar class destructor.
int lbMatrixIdx
lbMatrixIdx gives a lower bound for this matrixVar
a data structure for holding quadratic terms
int objReferenceMatrixIdx
objReferenceMatrixIdx allows some or all of the components of this matrixObj to be copied from object...
std::vector< ExprNode * > getNonlinearExpressionTreeInPostfix(int rowIdx)
Get the postfix tokens for a given row index.
int numberOfOtherIndexes
Multidimensional tensors can also form cones (the Kronecker product, for instance, can be thought of as a four-dimensional tensor).
int idx
idx gives the index of this variable
The CopositiveMatricesCone Class.
The in-memory representation of the element.
MatrixExpression ** getMatrixExpressions()
Get the pointers to the roots of all matrix expression trees.
int idx
idx is the index of the row in which the quadratic term appears
bool deepCopyFrom(MatrixProgramming *that)
A function to make a deep copy of an instance of this class.
bool setInstanceCreator(std::string fileCreator)
set the instance creator.
NonlinearExpressions()
The NonlinearExpressions class constructor.
virtual std::string getConeInXML()
Write a PolyhedralCone object in XML format.
a sparse matrix data structure
int referenceConeIdx
Polar cones use a reference to another, previously defined cone.
int numberOfQuadraticTerms
numberOfQuadraticTerms is the number of quadratic terms in the element...
double normScaleFactor
quadratic cones normally are of the form x0 >= x1^2 + x2^2 + ...
bool deepCopyFrom(QuadraticCone *that)
A function to make a deep copy of an instance of this class.
bool IsEqual(NonpositiveCone *that)
A function to check for the equality of two objects.
int ** getTimeDomainStageConList()
Get the list of constraints in each stage.
The in-memory representation of an OSiL instance.
SparseMatrix * getLinearConstraintCoefficientsInRowMajor()
Get linear constraint coefficients in row major.
virtual std::string getConeInXML()
Write an IntersectionCone object in XML format.
~TimeDomainStageConstraints()
The TimeDomainStageConstraints class destructor.
std::string * getObjectiveNames()
Get objective names.
bool IsEqual(RotatedQuadraticCone *that)
A function to check for the equality of two objects.
TimeDomainInterval()
The Interval class constructor.
The in-memory representation of the element, which is like a nonlinear expression, but since it involves matrices, the expression could be linear, so a "shape" attribute is added to distinguish linear and nonlinear expressions.
int numberOfRows
Every cone has (at least) two dimensions; no distinction is made between vector cones and matrix cone...
int idx
cones are referenced by an (automatically created) index
int idx
cones are referenced by an (automatically created) index
virtual std::string getConeName()
bool createOSADFun(std::vector< double > vdX)
Create the a CppAD Function object: this is a function where the domain is the set of variables for t...
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
~MatrixObjectives()
The MatrixObjectives class destructor.
bool IsEqual(LinearConstraintCoefficients *that)
A function to check for the equality of two objects.
The in-memory representation of the element.
Objectives * objectives
objectives is a pointer to a Objectives object
virtual std::string getConeName()
~MatrixCon()
The MatrixCon class destructor.
std::string printModel()
Print the infix representation of the problem.
~NonpositiveCone()
default destructor.
bool IsEqual(PolyhedralCone *that)
A function to check for the equality of two objects.
int getNumberOfQuadraticTerms()
Get the number of specified (usually nonzero) qTerms in the quadratic coefficients.
int coneType
The type of the cone (one of the values in ENUM_CONE_TYPE)
int numberOfColumns
numberOfColumns gives the number of columns of this matrix
MatrixObjectives * matrixObjectives
a pointer to the matrixObjectives object
Variable()
The Variable class constructor.
The in-memory representation of the element.
~IntersectionCone()
The IntersectionCone class destructor.
PolarCone()
The PolarCone class constructor.
bool setQuadraticCoefficients(int number, int *rowIndexes, int *varOneIndexes, int *varTwoIndexes, double *coefficients, int begin, int end)
set quadratic coefficients into the QuadraticCoefficients->qTerm data structure
TimeDomainStageConstraints()
The TimeDomainStageConstraints class constructor.
int getNumberOfNonlinearExpressionTreeModIndexes()
Get the number of unique nonlinear expression tree indexes after modifying the expression tree to con...
bool IsEqual(Constraint *that)
A function to check for the equality of two objects.
int getNumberOfIntegerVariables()
getNumberOfIntegerVariables
std::string getMatrixExpressionTreeInInfix(int rowIdx)
Get the infix representation for a given row (or objective function) index.
int coneType
The type of the cone (one of the values in ENUM_CONE_TYPE)
virtual std::string getConeInXML()=0
Write a Cone object in XML format.
bool IsEqual(NonlinearExpressions *that)
A function to check for the equality of two objects.
IntVector * colIdx
a pointer of column indices if the problem is stored by row
int numberOfOtherIndexes
Cones can also be formed by Multidimensional tensors.
The in-memory representation of a product cone.
QuadraticTerm ** qTerm
qTerm is a pointer to an array of QuadraticTerm object pointers
virtual std::string getConeName()
int numberOfRows
Every cone has (at least) two dimensions; no distinction is made between vector cones and matrix cone...
bool setVariableNumber(int number)
set the number of variables.
int coneType
The type of the cone (one of the values in ENUM_CONE_TYPE)
int * getObjectiveCoefficientNumbers()
Get objective coefficient number.
virtual std::string getConeInXML()
Write a NonpositiveCone object in XML format.
an integer Vector data structure
double * getVariableLowerBounds()
Get variable lower bounds.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
int idx
idx gives the index of this constraint
int * getTimeDomainStageNumberOfConstraints()
Get the number of constraints contained in each time stage.
a generic class from which we derive matrix constructors (BaseMatrix, MatrixElements, MatrixTransformation and MatrixBlocks) as well as matrix types (OSMatrix and MatrixBlock).
CompletelyPositiveMatricesCone()
default constructor.
int getNumberOfMatrixObjectives()
The in-memory representation of the element.
~TimeDomainStage()
The TimeDomainStage class destructor.
int idx
cones are referenced by an (automatically created) index
virtual std::string getConeName()
int numberOfNonlinearExpressions
numberOfNonlinearExpressions is the number of elements in the element...
bool IsEqual(CompletelyPositiveMatricesCone *that)
A function to check for the equality of two objects.
int numberOfRows
Every cone has (at least) two dimensions; no distinction is made between vector cones and matrix cone...
virtual std::string getConeInXML()
Write an OrthantCone object in XML format.
MatrixExpressions()
The MatrixExpressions class constructor.
QuadraticCone()
The QuadraticCone class constructor.
bool deepCopyFrom(OrthantCone *that)
A function to make a deep copy of an instance of this class.
MatrixVar ** matrixVar
matrixVar is an array of pointers to the children
bool deepCopyFrom(CopositiveMatricesCone *that)
A function to make a deep copy of an instance of this class.
TimeDomainStageObj ** obj
obj is a pointer to an array of TimeDomainStageObj object pointers
The in-memory representation of the element.
~ProductCone()
The ProductCone class destructor.
bool IsEqual(MatrixExpressions *that)
A function to check for the equality of two objects.
QuadraticCoefficients * quadraticCoefficients
quadraticCoefficients is a pointer to a QuadraticCoefficients object
bool setInstanceDescription(std::string description)
set the instance description.
int ** getTimeDomainStageVarList()
Get the list of variables in each stage.
Constraint ** con
con is pointer to an array of Constraint object pointers
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
bool IsEqual(ObjCoef *that)
A function to check for the equality of two objects.
The in-memory representation of the element.
int numberOfColumns
numberOfColumns gives the number of columns of this matrix
bool IsEqual(NonnegativeCone *that)
A function to check for the equality of two objects.
InstanceData * instanceData
A pointer to an InstanceData object.
int numberOfCones
numberOfCones is the number of elements in the element.
std::string semidefiniteness
we need to distinguish positive and negative semidefiniteness
bool getIterateResults(double *x, double *objLambda, double *conLambda, bool new_x, int highestOrder)
end revised AD code
TimeDomainStages()
The Stages class constructor.
char type
type corresponds to the attribute that holds the variable type: C (Continuous), B (binary)...
int coneType
The type of the cone (one of the values in ENUM_CONE_TYPE)
bool initializeNonLinearStructures()
Initialize the data structures for the nonlinear API.
int conReferenceMatrixIdx
conReferenceMatrixIdx allows some or all of the components of this matrixCon to be copied from constr...
bool IsEqual(SemidefiniteCone *that)
A function to check for the equality of two objects.
The in-memory representation of the element.
int getNumberOfMatrixVariables()
MatrixExpression ** expr
a pointer to an array of linear and nonlinear expressions that evaluate to matrices ...
The in-memory representation of the element.
virtual std::string getConeInXML()
Write a CopositiveMatricesCone object in XML format.
bool bVariablesModified
bVariablesModified is true if the variables data has been modified.
Constraint()
The Constraint class constructor.
The in-memory representation of the element.
virtual std::string getConeName()
virtual std::string getConeName()
double * getObjectiveConstants()
Get objective constants.
bool setQuadraticTermsInNonlinearExpressions(int number, int *rowIndexes, int *varOneIndexes, int *varTwoIndexes, double *coefficients)
set quadratic terms in nonlinearExpressions
Matrices()
The Matrices class constructor.
double lb
lb is the lower bound on the constraint
OSInstance()
The OSInstance class constructor.
~PolyhedralCone()
The PolyhedralCone class destructor.
ENUM_NL_EXPR_SHAPE shape
shape holds the shape of the nonlinear expression (linear/quadratic/convex/general) (see further up i...
int getNumberOfQuadraticRowIndexes()
Get the number of rows which have a quadratic term.
ObjCoef ** coef
coef is pointer to an array of ObjCoef object pointers
bool addConstraint(int index, std::string name, double lowerBound, double upperBound, double constant)
add a constraint.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
ENUM_MATRIX_TYPE
An enum to track the many different types of values that a matrix can contain Note that these types a...
int getNumberOfBinaryVariables()
getNumberOfBinaryVariables
int varReferenceMatrixIdx
varReferenceMatrixIdx allows some or all of the components of this matrix variable to be copied from ...
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
This file defines the OSnLNode class along with its derived classes.
int getTimeDomainStageNumber()
Get the number of stages that make up the time domain.
bool deepCopyFrom(CompletelyPositiveMatricesCone *that)
A function to make a deep copy of an instance of this class.
~InstanceData()
The InstanceData class destructor.
virtual std::string getConeName()
The in-memory representation of a rotated quadratic cone.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
int numberOfOtherIndexes
Multidimensional tensors can also form cones (the Kronecker product, for instance, can be thought of as a four-dimensional tensor).
bool addMatrix(int index, std::string name, int numberOfRows, int numberOfColumns, ENUM_MATRIX_SYMMETRY symmetry, ENUM_MATRIX_TYPE matrixType, unsigned int inumberOfChildren, MatrixNode **m_mChildren)
add a matrix.
virtual std::string getConeName()
bool getZeroOrderResults(double *x, double *objLambda, double *conLambda)
Calculate function values.
bool m_bDeleteExpressionTree
m_bDeleteExpressionTree is true, if in garbage collection, we should delete the osExpression tree obj...
int numberOfVariables
numberOfVariables is the number of variables in the instance
The NonpositiveCone Class.
double ** calculateAllObjectiveFunctionGradients(double *x, double *objLambda, double *conLambda, bool new_x, int highestOrder)
Calculate the gradient of all objective functions.
bool setNonlinearExpressions(int nexpr, Nl **root)
set nonlinear expressions
a sparse vector data structure
~MatrixExpression()
The MatrixExpression class destructor.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
double * calculateAllObjectiveFunctionValues(double *x, double *objLambda, double *conLambda, bool new_x, int highestOrder)
Calculate all of the objective function values.
ProductCone()
The ProductCone class constructor.
std::vector< ExprNode * > getNonlinearExpressionTreeModInPostfix(int rowIdx)
Get the postfix tokens for a given row index for the modified Expression Tree (quadratic terms added)...
bool IsEqual(MatrixExpression *that)
A function to check for the equality of two objects.
~Variables()
The Variables class destructor.
Constraints * constraints
constraints is a pointer to a Constraints object
The in-memory representation of the element.
TimeDomainStageVariables()
The TimeDomainStageVariables class constructor.
IntVector * start
a pointer to the start of each row or column stored in sparse format
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
SemidefiniteCone()
The SemidefiniteCone class constructor.
The in-memory representation of the element.
GeneralFileHeader * instanceHeader
the instanceHeader is implemented as a general file header object to allow sharing of classes between...
double ** getDenseObjectiveCoefficients()
getDenseObjectiveCoefficients.
std::string maxOrMin
declare the objective function to be a max or a min
int numberOfConstraints
numberOfConstraints is the number of constraints in the instance
LinearConstraintCoefficients()
The LinearConstraintCoefficients class constructor.
int templateMatrixIdx
templateMatrixIdx refers to a matrix that describes the locations in this matrixVar that are allowed ...
int ** getTimeDomainStageObjList()
Get the list of objectives in each stage.
The in-memory representation of the element.
bool deepCopyFrom(SemidefiniteCone *that)
A function to make a deep copy of an instance of this class.
std::string name
name corresponds to the optional attribute that holds the variable name, the default value is empty ...
int numberOfRows
Every cone has (at least) two dimensions; no distinction is made between vector cones and matrix cone...
ENUM_CONE_TYPE coneType
The type of the cone.
~NonnegativeCone()
default destructor.
virtual std::string getConeInXML()
Write a CompletelyPositiveMatricesCone object in XML format.
TimeDomainStages * stages
stages is a pointer to a Stages object
int numberOfObjectives
numberOfObjectives gives the number of objectives contained in this stage
bool IsEqual(IntersectionCone *that)
A function to check for the equality of two objects.
SparseVector * calculateConstraintFunctionGradient(double *x, double *objLambda, double *conLambda, int idx, bool new_x, int highestOrder)
Calculate the gradient of the constraint function indexed by idx.
TimeDomainStageObj()
The TimeDomainStageObj class constructor.
Objective ** obj
coef is pointer to an array of ObjCoef object pointers
bool setInstanceLicence(std::string licence)
set the instance licence.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
std::vector< ExprNode * > getMatrixExpressionTreeModInPostfix(int rowIdx)
Get the postfix tokens for a given row index for the modified Expression Tree (quadratic terms added)...
int getNumberOfNonlinearObjectives()
MatrixConstraints * matrixConstraints
a pointer to the matrixConstraints object
int getNumberOfStringVariables()
getNumberOfStringVariables
char * getVariableTypes()
Get variable initial values.
bool IsEqual(OSInstance *that)
A function to check for the equality of two objects.
bool deepCopyFrom(ProductCone *that)
A function to make a deep copy of an instance of this class.
Variables()
The Variables class constructor.
bool setTimeDomainStageConstraintsOrdered(int numberOfStages, int *numberOfConstraints, int *startIdx)
This sets the constraints associated with each time domain stage in temporal order.
std::map< int, MatrixExpressionTree * > getAllMatrixExpressionTrees()
int numberOfValues
numberOfValues is the number of nonzero elements stored in the element...
Constraints()
The Constraints class constructor.
bool setTimeDomainStages(int number, std::string *names)
This sets the number (and optionally names) of the time stages.
int numberOfConstraints
numberOfConstraints gives the number of constraints contained in this stage
int * getMatrixExpressionTreeIndexes()
Get all the matrix expression tree indexes, i.e.
bool addVariable(int index, std::string name, double lowerBound, double upperBound, char type)
add a variable.
int numberOfOtherIndexes
Multidimensional tensors can also form cones (the Kronecker product, for instance, can be thought of as a four-dimensional tensor).
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
MatrixProgramming * matrixProgramming
matrixProgramming is a pointer to a MatrixProgramming object
~QuadraticCone()
The QuadraticCone class destructor.
double getTimeDomainIntervalStart()
Get the start for the time domain interval.
bool deepCopyFrom(NonpositiveCone *that)
A function to make a deep copy of an instance of this class.
std::string name
name corresponds to the optional attribute that holds the name of the stage; the default value is emp...
~Constraint()
The Constraint class destructor.
bool setTimeDomain(std::string format)
This sets the format of the time domain ("stages"/"interval"/"none")
Variables * variables
variables is a pointer to a Variables object
bool IsEqual(InstanceData *that)
A function to check for the equality of two objects.
bool getSecondOrderResults(double *x, double *objLambda, double *conLambda)
Calculate second derivatives.
std::string * getVariableNames()
Get variable names.
bool bAMatrixModified
bAMatrixModified is true if the A matrix data has been modified.
std::string getNonlinearExpressionTreeInInfix(int rowIdx)
Get the infix representation for a given row (or objective function) index.
a data structure to represent a matrix object (derived from MatrixType)
int numberOfMatrices
numberOfMatrices is the number of elements in the element.
MatrixExpressionTree * getMatrixExpressionTree(int rowIdx)
Get the matrix expression tree for a given row index.
LinearConstraintCoefficients * linearConstraintCoefficients
linearConstraintCoefficients is a pointer to a LinearConstraintCoefficients object ...
int numberOfObjectives
numberOfObjectives is the number of objective functions in the instance
int numberOfOtherIndexes
Multidimensional tensors can also form cones (the Kronecker product, for instance, can be thought of as a four-dimensional tensor).
Cone ** cone
cone is pointer to an array of Cone object pointers
~Objective()
The Objective class destructor.
OrthantCone()
default constructor.
ScalarExpressionTree * getNonlinearExpressionTreeMod(int rowIdx)
Get the expression tree for a given row index for the modified expression trees (quadratic terms adde...
IntVector * rowIdx
a pointer of row indices if the problem is stored by column
int orderConeIdx
orderConeIdx gives a cone that expresses preferences during the optimization x is (weakly) preferred ...
char varType
an optional type for each component of this matrixVar
int idx
cones are referenced by an (automatically created) index
double * getObjectiveWeights()
Get objective weights.
int lbMatrixIdx
lbMatrixIdx gives a lower bound for this matrixCon
void duplicateExpressionTreesMap()
duplicate the map of expression trees.
int numberOfRows
Every cone has (at least) two dimensions; no distinction is made between vector cones and matrix cone...
int getNumberOfNonlinearConstraints()
double * ub
For each dimension of the cone, give the upper and lower bounds The upper bound can be only zero or +...
TimeDomainStageVar ** var
var is a pointer to an array of TimeDomainStageVar object pointers
bool setConeNumber(int number)
set the number of cones
~QuadraticCoefficients()
The QuadraticCoefficients class destructor.
TimeDomain()
The TimeDomain class constructor.
int numberOfStages
numberOfStages is the number of stages in the element.
int numberOfOtherIndexes
Multidimensional tensors can also form cones (the Kronecker product, for instance, can be thought of as a four-dimensional tensor).
TimeDomainStageVariables * variables
variables is a pointer to a TimeDomainVariables object
int getLinearConstraintCoefficientNumber()
Get number of specified (usually nonzero) linear constraint coefficient values.
int idx
idx is the index of the variable corresponding to the coefficient
The in-memory representation of the element.
int idx
idx gives the index of this variable
std::string * getObjectiveMaxOrMins()
Get objective maxOrMins.
bool setTimeDomainStageVariablesUnordered(int numberOfStages, int *numberOfVariables, int **varIndex)
This sets the variables associated with each time domain stage in srbitrary order.
std::map< int, int > getAllNonlinearVariablesIndexMap()
TimeDomainStageObjectives * objectives
objectives is a pointer to a TimeDomainObjectives object
The in-memory representation of the element.
~TimeDomainStageObjectives()
The TimeDomainStageObjectives class destructor.
int numberOfObjCoef
numberOfObjCoef is the number of variables with a nonzero objective function coefficient ...
bool IsEqual(DualCone *that)
A function to check for the equality of two objects.
std::string getTimeDomainFormat()
Get the format of the time domain ("stages"/"interval")
int startIdx
startdIdx gives the number of the first constraint contained in this stage
bool IsEqual(Constraints *that)
A function to check for the equality of two objects.
bool addQTermsToExpressionTree()
This method adds quadratic terms into the array of expression trees.
int numberOfRows
Every cone has (at least) two dimensions; no distinction is made between vector cones and matrix cone...
virtual std::string getConeInXML()
Write a NonnegativeCone object in XML format.
std::vector< ExprNode * > getMatrixExpressionTreeInPostfix(int rowIdx)
Get the postfix tokens for a given row index.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
std::map< int, ScalarExpressionTree * > getAllNonlinearExpressionTrees()
int iNumberOfStartElements
iNumberOfStartElements counts the number of elements in the
section of
bool deepCopyFrom(NonnegativeCone *that)
A function to make a deep copy of an instance of this class.
int coneType
The type of the cone (one of the values in ENUM_CONE_TYPE)
RotatedQuadraticCone()
The RotatedQuadraticCone class constructor.
bool IsEqual(MatrixProgramming *that)
A function to check for the equality of two objects.
double coef
coef is the coefficient of the quadratic term
bool deepCopyFrom(DualCone *that)
A function to make a deep copy of an instance of this class.
TimeDomainStageVar()
The TimeDomainStageVar class constructor.
int idxOne
idxOne is the index of the first variable in the quadratic term
int startIdx
startdIdx gives the number of the first objective contained in this stage
int ubConeIdx
ubConeIdx gives a cone that must contain ubMatrix - matrixCon
Nl ** nl
nl is pointer to an array of Nl object pointers
bool IsEqual(Variables *that)
A function to check for the equality of two objects.
Variable ** var
Here we define a pointer to an array of var pointers.
The in-memory representation of the element.
std::vector< ExprNode * > getNonlinearExpressionTreeInPrefix(int rowIdx)
Get the prefix tokens for a given row index.
double weight
weight is the weight applied to the given objective function, 1.0 by default
bool setVariables(int number, std::string *names, double *lowerBounds, double *upperBounds, char *types)
set all the variable related elements.
~TimeDomainStageCon()
The TimeDomainStageCon class destructor.
std::string * getTimeDomainStageNames()
Get the names of the stages (NULL or empty string ("") if a stage has not been given a name...
int lbConeIdx
lbConeIdx gives a cone that must contain matrixVar - lbMatrix
bool setTimeDomainStageObjectivesUnordered(int numberOfStages, int *numberOfObjectives, int **varIndex)
This sets the objectives associated with each time domain stage in arbitrary order.
virtual std::string getConeName()
~MatrixConstraints()
The MatrixConstraints class destructor.
~ObjCoef()
The ObjCoef class destructor.
SparseVector ** getObjectiveCoefficients()
Get objective coefficients.
int referenceConeIdx
Dual cones use a reference to another, previously defined cone.
int numberOfExpr
numberOfExpr gives the number of expressions
bool setTimeDomainStageConstraintsUnordered(int numberOfStages, int *numberOfConstraints, int **conIndex)
This sets the constraints associated with each time domain stage in srbitrary order.
bool setRandom(double density, bool conformant, int iMin, int iMax)
A function to make a random instance of this class.
The in-memory representation of a polyhedral cone.
TimeDomainStage()
The TimeDomainStage class constructor.
double ub
ub is the upper bound on the constraint
bool bUseExpTreeForFunEval
bUseExpTreeForFunEval is set to true if you wish to use the OS Expression Tree for function evaluatio...
bool setInstanceSource(std::string source)
set the instance source.
double normScaleFactor
rotated quadratic cones normally are of the form x0x1 >= x2^2 + x3^2 + ...
MatrixCon ** matrixCon
matrixCon is an array of pointers to the children
bool getFirstOrderResults(double *x, double *objLambda, double *conLambda)
Calculate first derivatives.
PolyhedralCone()
The PolyhedralCone class constructor.
std::vector< ExprNode * > getNonlinearExpressionTreeModInPrefix(int rowIdx)
Get the prefix tokens for a given row index for the modified Expression Tree (quadratic terms added)...