515 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
567 virtual std::string getConeName();
575 virtual std::string getConeInXML() = 0;
592 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
599 bool deepCopyFrom(
Cone *that);
625 virtual std::string getConeName();
633 virtual std::string getConeInXML();
649 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
683 virtual std::string getConeName();
691 virtual std::string getConeInXML();
707 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
749 virtual std::string getConeName();
757 virtual std::string getConeInXML();
773 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
822 virtual std::string getConeName();
830 virtual std::string getConeInXML();
846 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
913 virtual std::string getConeName();
921 virtual std::string getConeInXML();
937 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1005 virtual std::string getConeName();
1013 virtual std::string getConeInXML();
1029 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1085 virtual std::string getConeName();
1093 virtual std::string getConeInXML();
1109 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1143 virtual std::string getConeName();
1151 virtual std::string getConeInXML();
1167 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1203 virtual std::string getConeName();
1212 virtual std::string getConeInXML();
1228 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1286 virtual std::string getConeName();
1294 virtual std::string getConeInXML();
1310 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1362 virtual std::string getConeName();
1370 virtual std::string getConeInXML();
1386 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1436 virtual std::string getConeName();
1452 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1501 virtual std::string getConeName();
1517 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1564 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
1571 bool deepCopyFrom(
Cones *that);
1918 bool setRandom(
double density,
bool conformant,
int iMin,
int iMax);
2310 std::string m_sInstanceName;
2314 std::string m_sInstanceSource;
2318 std::string m_sInstanceDescription;
2322 std::string m_sInstanceCreator;
2326 std::string m_sInstanceLicence;
2333 bool m_bProcessVariables;
2338 int m_iVariableNumber;
2343 int m_iNumberOfIntegerVariables;
2348 int m_iNumberOfBinaryVariables;
2353 int m_iNumberOfSemiContinuousVariables;
2358 int m_iNumberOfSemiIntegerVariables;
2363 int m_iNumberOfStringVariables;
2368 std::string* m_msVariableNames;
2374 char* m_mcVariableTypes;
2379 double* m_mdVariableLowerBounds;
2384 double* m_mdVariableUpperBounds;
2391 bool m_bProcessObjectives;
2396 int m_iObjectiveNumber;
2401 int m_iObjectiveNumberNonlinear;
2406 std::string* m_msObjectiveNames;
2411 std::string* m_msMaxOrMins;
2416 int* m_miNumberOfObjCoef;
2421 double* m_mdObjectiveConstants;
2426 double* m_mdObjectiveWeights;
2437 bool m_bGetDenseObjectives;
2443 double** m_mmdDenseObjectiveCoefficients;
2450 bool m_bProcessConstraints;
2455 int m_iConstraintNumber;
2460 int m_iConstraintNumberNonlinear;
2465 std::string* m_msConstraintNames;
2470 double* m_mdConstraintLowerBounds;
2475 double* m_mdConstraintUpperBounds;
2481 double* m_mdConstraintConstants;
2487 char* m_mcConstraintTypes;
2495 bool m_bProcessLinearConstraintCoefficients;
2501 int m_iLinearConstraintCoefficientNumber;
2507 bool m_bColumnMajor;
2514 SparseMatrix* m_linearConstraintCoefficientsInColumnMajor;
2521 SparseMatrix* m_linearConstraintCoefficientsInRowMajor;
2528 int m_iNumberOfQuadraticRowIndexes;
2533 bool m_bQuadraticRowIndexesProcessed;
2538 int *m_miQuadRowIndexes;
2543 bool m_bProcessQuadraticTerms;
2549 int m_iQuadraticTermNumber;
2559 bool m_bQTermsAdded;
2567 int m_iNumberOfNonlinearExpressionTreeIndexes;
2573 bool m_bNonlinearExpressionTreeIndexesProcessed;
2580 int *m_miNonlinearExpressionTreeIndexes;
2587 int m_iNumberOfNonlinearExpressionTreeModIndexes;
2593 bool m_bNonlinearExpressionTreeModIndexesProcessed;
2599 int *m_miNonlinearExpressionTreeModIndexes;
2606 bool m_binitForAlgDiff;
2612 unsigned int m_iNumberOfNonlinearVariables;
2617 bool m_bProcessNonlinearExpressions;
2622 int m_iNonlinearExpressionNumber;
2628 int* m_miNonlinearExpressionIndexes;
2633 bool m_bProcessExpressionTrees;
2638 bool m_bProcessExpressionTreesMod;
2644 double *m_mdConstraintFunctionValues;
2650 double *m_mdObjectiveFunctionValues;
2655 int m_iJacValueSize;
2670 double *m_mdJacValue;
2676 int *m_miJacNumConTerms;
2687 int m_iHighestTaylorCoeffOrder;
2697 std::map<int, ScalarExpressionTree*> m_mapExpressionTrees;
2703 std::map<int, int> m_mapOSADFunRangeIndex;
2713 std::map<int, MatrixExpressionTree*> m_mapMatrixExpressionTrees;
2724 bool m_bLagrangianExpTreeCreated;
2735 bool m_bLagrangianSparseHessianCreated;
2740 std::map<int, int> m_mapAllNonlinearVariablesIndex;
2746 int *m_miNonLinearVarsReverseMap;
2752 bool m_bAllNonlinearVariablesIndex;
2761 std::map<int, ScalarExpressionTree*> m_mapExpressionTreesMod ;
2768 bool m_bOSADFunIsCreated;
2774 bool m_bCppADTapesBuilt;
2780 bool m_bCppADMustReTape;
2785 bool m_bDuplicateExpressionTreesMap;
2790 bool m_bNonLinearStructuresInitialized;
2795 bool m_bSparseJacobianCalculated;
2802 std::map<int, std::vector<OSnLNode*> > m_mapExpressionTreesInPostfix ;
2808 int m_iHighestOrderEvaluated;
2814 double **m_mmdObjGradient;
2821 std::vector<double> m_vdX;
2826 std::vector<double> m_vdYval;
2832 std::vector<bool> m_vbLagHessNonz;
2837 std::vector<double> m_vdYjacval;
2842 std::vector<double> m_vdw;
2847 std::vector<double> m_vdLambda;
2852 std::vector<double> m_vdDomainUnitVec;
2857 std::vector<double> m_vdRangeUnitVec;
2864 bool m_bProcessMatrices;
2869 int m_iMatrixNumber;
2886 int* m_miMatrixNumberOfColumns;
2891 int* m_miMatrixNumberOfRows;
2896 std::string* m_msMatrixNames;
2956 int m_iMatrixVarNumber;
2961 int m_iMatrixObjNumber;
2966 int m_iMatrixConNumber;
2971 int m_iMatrixExpressionNumber;
2978 bool m_bProcessTimeDomain;
2983 bool m_bProcessTimeStages;
2988 bool m_bProcessTimeInterval;
2993 bool m_bFiniteTimeStages;
2998 int m_iNumberOfTimeStages;
3003 std::string m_sTimeDomainFormat;
3008 std::string* m_msTimeDomainStageNames;
3016 int* m_miTimeDomainStageVariableNumber;
3021 int** m_mmiTimeDomainStageVarList;
3026 int* m_miTimeDomainStageConstraintNumber;
3031 int** m_mmiTimeDomainStageConList;
3036 int* m_miTimeDomainStageObjectiveNumber;
3041 int** m_mmiTimeDomainStageObjList;
3050 bool processVariables();
3058 bool processObjectives();
3066 bool processConstraints();
3074 bool processLinearConstraintCoefficients();
3082 bool processMatrices();
3090 std::string getInstanceName();
3096 std::string getInstanceSource();
3103 std::string getInstanceDescription();
3109 std::string getInstanceCreator();
3116 std::string getInstanceLicence();
3124 int getVariableNumber();
3132 std::string* getVariableNames();
3163 char* getVariableTypes();
3169 int getNumberOfIntegerVariables();
3175 int getNumberOfBinaryVariables();
3181 int getNumberOfSemiContinuousVariables();
3187 int getNumberOfSemiIntegerVariables();
3193 int getNumberOfStringVariables();
3201 double* getVariableLowerBounds();
3209 double* getVariableUpperBounds();
3216 int getObjectiveNumber();
3225 std::string* getObjectiveNames();
3233 std::string* getObjectiveMaxOrMins();
3244 int* getObjectiveCoefficientNumbers();
3252 double* getObjectiveConstants();
3260 double* getObjectiveWeights();
3280 double** getDenseObjectiveCoefficients();
3287 int getConstraintNumber();
3295 std::string* getConstraintNames();
3303 double* getConstraintLowerBounds();
3311 double *getConstraintUpperBounds();
3319 double *getConstraintConstants();
3334 char* getConstraintTypes();
3341 int getLinearConstraintCoefficientNumber();
3350 bool getLinearConstraintCoefficientMajor();
3359 SparseMatrix* getLinearConstraintCoefficientsInColumnMajor();
3367 SparseMatrix* getLinearConstraintCoefficientsInRowMajor();
3374 int getNumberOfQuadraticTerms();
3393 int* getQuadraticRowIndexes();
3400 int getNumberOfQuadraticRowIndexes();
3417 int getNumberOfNonlinearExpressions();
3424 Nl** getNonlinearExpressions();
3449 std::vector<ExprNode*> getNonlinearExpressionTreeInPostfix(
int rowIdx);
3458 std::vector<ExprNode*> getNonlinearExpressionTreeModInPostfix(
int rowIdx);
3466 std::vector<ExprNode*> getNonlinearExpressionTreeInPrefix(
int rowIdx);
3475 std::string getNonlinearExpressionTreeInInfix(
int rowIdx);
3485 std::vector<ExprNode*> getNonlinearExpressionTreeModInPrefix(
int rowIdx);
3491 int getNumberOfNonlinearObjectives();
3496 int getNumberOfNonlinearConstraints();
3503 std::map<int, ScalarExpressionTree* > getAllNonlinearExpressionTrees();
3508 std::map<int, ScalarExpressionTree* > getAllNonlinearExpressionTreesMod();
3516 int* getNonlinearExpressionTreeIndexes();
3524 int getNumberOfNonlinearExpressionTreeIndexes();
3534 int* getNonlinearExpressionTreeModIndexes();
3542 int getNumberOfNonlinearExpressionTreeModIndexes();
3549 int getMatrixNumber();
3592 int getNumberOfColumnsForMatrix(
int n);
3601 int getNumberOfRowsForMatrix(
int n);
3610 int getNumberOfValuesForMatrix(
int n);
3619 std::string getMatrixName(
int n);
3627 bool matrixHasBase(
int n);
3628 bool matrixHasElements(
int n);
3629 bool matrixHasTransformations(
int n);
3630 bool matrixHasBlocks(
int n);
3631 int getNumberOfElementConstructors(
int n);
3632 int getNumberOfTransformationConstructors(
int n);
3633 int getNumberOfBlocksConstructors(
int n);
3699 int getNumberOfMatrixVariables();
3706 int getNumberOfMatrixObjectives();
3713 int getNumberOfMatrixConstraints();
3720 int getNumberOfMatrixExpressions();
3742 std::vector<ExprNode*> getMatrixExpressionTreeInPostfix(
int rowIdx);
3751 std::vector<ExprNode*> getMatrixExpressionTreeModInPostfix(
int rowIdx);
3759 std::vector<ExprNode*> getMatrixExpressionTreeInPrefix(
int rowIdx);
3768 std::string getMatrixExpressionTreeInInfix(
int rowIdx);
3774 std::map<int, MatrixExpressionTree* > getAllMatrixExpressionTrees();
3780 std::map<int, MatrixExpressionTree* > getAllMatrixExpressionTreesMod();
3788 int* getMatrixExpressionTreeIndexes();
3796 int getNumberOfMatrixExpressionTreeIndexes();
3805 std::string getTimeDomainFormat();
3812 int getTimeDomainStageNumber();
3819 std::string* getTimeDomainStageNames();
3826 int* getTimeDomainStageNumberOfVariables();
3834 int* getTimeDomainStageNumberOfConstraints();
3841 int* getTimeDomainStageNumberOfObjectives();
3848 int** getTimeDomainStageVarList();
3855 int** getTimeDomainStageConList();
3862 int** getTimeDomainStageObjList();
3869 double getTimeDomainIntervalStart();
3876 double getTimeDomainIntervalHorizon();
3889 bool setInstanceName(std::string
name);
3897 bool setInstanceSource(std::string source);
3905 bool setInstanceDescription(std::string description);
3913 bool setInstanceCreator(std::string fileCreator);
3921 bool setInstanceLicence(std::string licence);
3930 bool setVariableNumber(
int number);
3947 bool addVariable(
int index, std::string
name,
double lowerBound,
double upperBound,
char type);
3968 bool setVariables(
int number, std::string* names,
double* lowerBounds,
3969 double* upperBounds,
char* types);
3978 bool setObjectiveNumber(
int number);
3997 bool addObjective(
int index, std::string
name, std::string maxOrMin,
double constant,
double weight,
SparseVector* objectiveCoefficients);
4014 bool setObjectives(
int number, std::string *names, std::string *maxOrMins,
double *constants,
double *weights,
SparseVector **objectitiveCoefficients);
4022 bool setConstraintNumber(
int number);
4037 bool addConstraint(
int index, std::string
name,
double lowerBound,
double upperBound,
double constant);
4052 bool setConstraints(
int number, std::string* names,
double* lowerBounds,
double* upperBounds,
double* constants);
4072 bool setLinearConstraintCoefficients(
int numberOfValues,
bool isColumnMajor,
4073 double* values,
int valuesBegin,
int valuesEnd,
4074 int* indexes,
int indexesBegin,
int indexesEnd,
4075 int* starts,
int startsBegin,
int startsEnd);
4095 bool copyLinearConstraintCoefficients(
int numberOfValues,
bool isColumnMajor,
4096 double* values,
int valuesBegin,
int valuesEnd,
4097 int* indexes,
int indexesBegin,
int indexesEnd,
4098 int* starts,
int startsBegin,
int startsEnd);
4108 bool setNumberOfQuadraticTerms(
int nq);
4126 bool setQuadraticCoefficients(
int number,
4127 int* rowIndexes,
int* varOneIndexes,
int* varTwoIndexes,
4128 double* coefficients,
int begin,
int end);
4144 bool setQuadraticTermsInNonlinearExpressions(
int number,
4145 int* rowIndexes,
int* varOneIndexes,
int* varTwoIndexes,
double* coefficients);
4156 bool setNonlinearExpressions(
int nexpr,
Nl** root);
4164 bool setMatrixNumber(
int number);
4188 bool addMatrix(
int index, std::string
name,
int numberOfRows,
int numberOfColumns,
4190 unsigned int inumberOfChildren,
MatrixNode **m_mChildren);
4199 bool setConeNumber(
int number);
4227 bool addCone(
int index,
int numberOfRows,
int numberOfColumns,
ENUM_CONE_TYPE coneType,
4228 std::string
name,
int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4256 bool addCone(
int index,
int numberOfRows,
int numberOfColumns,
ENUM_CONE_TYPE coneType,
4257 std::string
name,
int numberOfComponents,
int* components,
4258 int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4286 bool addCone(
int index,
int numberOfRows,
int numberOfColumns,
ENUM_CONE_TYPE coneType,
4287 std::string
name,
int referenceIdx,
int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4314 bool addCone(
int index,
int numberOfRows,
int numberOfColumns,
ENUM_CONE_TYPE coneType,
4315 std::string
name, std::string semidefiniteness,
int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4343 bool addCone(
int index,
int numberOfRows,
int numberOfColumns,
ENUM_CONE_TYPE coneType,
4344 std::string
name,
int distortionMatrixIdx,
double normFactor,
int axisDirection,
4345 int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4374 bool addCone(
int index,
int numberOfRows,
int numberOfColumns,
ENUM_CONE_TYPE coneType,
4375 std::string
name,
int distortionMatrixIdx,
double normFactor,
int firstAxisDirection,
4376 int secondAxisDirection,
int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4404 bool addCone(
int index,
int numberOfRows,
int numberOfColumns,
ENUM_CONE_TYPE coneType,
4405 std::string
name,
int distortionMatrixIdx,
double normFactor,
int axisDirection,
double pNorm,
4406 int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4438 bool addCone(
int index,
int numberOfRows,
int numberOfColumns,
ENUM_CONE_TYPE coneType,
4439 std::string
name,
int maxDegree,
int numberOfUB,
double*
ub,
int numberOfLB,
double*
lb,
4440 int numberOfOtherIndexes = 0,
int* otherIndexes = NULL);
4449 std::string printModel( );
4458 std::string printModel(
int rowIdx);
4470 bool initializeNonLinearStructures( );
4485 double calculateFunctionValue(
int idx,
double* x,
bool new_x);
4501 double *calculateAllConstraintFunctionValues(
double* x,
double *objLambda,
double *conLambda,
4502 bool new_x,
int highestOrder);
4517 double *calculateAllConstraintFunctionValues(
double* x,
bool new_x);
4534 double *calculateAllObjectiveFunctionValues(
double* x,
double *objLambda,
double *conLambda,
4535 bool new_x,
int highestOrder);
4550 double *calculateAllObjectiveFunctionValues(
double* x,
bool new_x);
4568 double *conLambda,
bool new_x,
int highestOrder);
4586 SparseVector *calculateConstraintFunctionGradient(
double* x,
double *objLambda,
double *conLambda,
4587 int idx,
bool new_x,
int highestOrder);
4602 SparseVector *calculateConstraintFunctionGradient(
double* x,
int idx,
bool new_x );
4618 double **calculateAllObjectiveFunctionGradients(
double* x,
double *objLambda,
double *conLambda,
4619 bool new_x,
int highestOrder);
4636 double *calculateObjectiveFunctionGradient(
double* x,
double *objLambda,
double *conLambda,
4637 int objIdx,
bool new_x,
int highestOrder);
4652 double *calculateObjectiveFunctionGradient(
double* x,
int objIdx,
bool new_x );
4671 SparseHessianMatrix *calculateLagrangianHessian(
double* x,
double *objLambda,
double *conLambda,
4672 bool new_x,
int highestOrder);
4693 bool getSparseJacobianFromColumnMajor();
4699 bool getSparseJacobianFromRowMajor();
4711 std::map<int, int> getAllNonlinearVariablesIndexMap( );
4725 bool addQTermsToExressionTree();
4733 bool addQTermsToExpressionTree();
4745 void duplicateExpressionTreesMap();
4752 CppAD::ADFun<double> *Fad;
4765 bool createOSADFun(std::vector<double> vdX );
4777 std::vector<double> forwardAD(
int p, std::vector<double> vdX);
4789 std::vector<double> reverseAD(
int p, std::vector<double> vdlambda);
4803 int getADSparsityHessian();
4824 bool getIterateResults(
double *x,
double *objLambda,
double *conLambda,
4825 bool new_x,
int highestOrder);
4841 bool getZeroOrderResults(
double *x,
double *objLambda,
double *conLambda);
4855 bool getFirstOrderResults(
double *x,
double *objLambda,
double *conLambda );
4869 bool getSecondOrderResults(
double *x,
double *objLambda,
double *conLambda );
4881 bool initForAlgDiff();
4892 bool initObjGradients();
4905 bool setTimeDomain(std::string format);
4910 bool setTimeDomainStages(
int number, std::string *names);
4918 bool setTimeDomainStageVariablesOrdered(
int numberOfStages,
int *numberOfVariables,
int *startIdx);
4926 bool setTimeDomainStageVariablesUnordered(
int numberOfStages,
int *numberOfVariables,
int **varIndex);
4933 bool setTimeDomainStageConstraintsOrdered(
int numberOfStages,
int *numberOfConstraints,
int *startIdx);
4940 bool setTimeDomainStageConstraintsUnordered(
int numberOfStages,
int *numberOfConstraints,
int **conIndex);
4947 bool setTimeDomainStageObjectivesOrdered(
int numberOfStages,
int *numberOfObjectives,
int *startIdx);
4954 bool setTimeDomainStageObjectivesUnordered(
int numberOfStages,
int *numberOfObjectives,
int **varIndex);
4959 bool setTimeDomainInterval(
double start,
double horizon);
IntVector * factors
the list of "factors" contributing to the product each factor contains a reference to a previously de...
int numberOfRows
numberOfRows gives the number of rows of this matrix
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 <objectives> element.
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 <coef> 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
The in-memory representation of the <variables> child of the <stage> element.
The NonnegativeCone Class.
std::string name
The cone can have a name for easier identification.
int numberOfMatrixVar
numberOfMatrixVar gives the number of <matrixVar> children
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
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...
bool bConstraintsModified
bConstraintsModified is true if the constraints data has been modified.
int idx
cones are referenced by an (automatically created) index
Used to hold the instance in memory.
bool IsEqual(Variable *that)
A function to check for the equality of two objects.
The in-memory representation of the <constraints> element.
TimeDomainStage ** stage
stage is pointer to an array of stage object pointers
MatrixExpressions * matrixExpressions
a pointer to the matrixExpressions object
int idx
cones are referenced by an (automatically created) index
Cones * cones
cones is a pointer to a Cones object
The OSnLMNode Class for nonlinear expressions involving matrices.
int ubMatrixIdx
ubMatrixIdx gives an upper bound for this matrixVar
double constant
constant is a value that is added to the constraint
The in-memory representation of the <instanceData> element.
The in-memory representation of the <matrixVariables> element.
bool isPositiveSemiDefinite
information about semidefiniteness is also tracked in a boolean variable
ScalarExpressionTree * osExpressionTree
osExpressionTree contains the root of the ScalarExpressionTree
a sparse matrix data structure for matrices that can hold nonconstant values
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 <stage> element.
int numberOfVariables
numberOfVariables gives the number of variables contained in this stage
~Variable()
The Variable class destructor.
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 ...
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 <con> element.
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 <con> element.
int coneType
The type of the cone (one of the values in ENUM_CONE_TYPE)
std::string name
name is the name of the constraint
int idx
idx holds the row index of the nonlinear expression
The in-memory representation of the <objectives> child of the <stage> element.
The in-memory representation of a dual cone.
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
int idx
cones are referenced by an (automatically created) index
int constantMatrixIdx
constantMatrixIdx gives a constant added to the matrixObj
int templateMatrixIdx
templateMatrixIdx refers to a matrix that describes the locations in this matrixObj that are allowed ...
The in-memory representation of the variables element.
int idx
idx holds the row index of the nonlinear expression
int numberOfColumns
numberOfColumns gives the number of columns of this matrix
TimeDomain * timeDomain
timeDomain is a pointer to a TimeDomain object
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*...
std::string name
the name of the objective function
MatrixObj ** matrixObj
matrixObj is an array of pointers to the <matrixObj> children
MatrixExpressionTree * matrixExpressionTree
matrixExpressionTree contains the root of the MatrixExpressionTree
OSMatrix ** matrix
matrix is a pointer to an array of OSMatrix object pointers
int referenceMatrixIdx
Polyhedral cones use a reference to a previously defined matrix for the extreme rays.
The in-memory representation of the <timeDomain> element.
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...
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 <matrixCon> children
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 <nonlinearExpressions> element.
int numberOfMatrixObj
numberOfMatrixObj gives the number of <matrixObj> children
double ub
ub corresponds to the optional attribute that holds the variable upper bound.
int idx
cones are referenced by an (automatically created) index
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 <interval> element.
int coneType
The type of the cone (one of the values in ENUM_CONE_TYPE)
The in-memory representation of a quadratic cone.
int numberOfRows
numberOfRows gives the number of rows of this matrix
The in-memory representation of the <qTerm> element.
int idxTwo
idxTwo is the index of the second variable in the quadratic term
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 <linearConstraintCoefficients> element.
The in-memory representation of a SparseHessianMatrix.
double horizon
horizon is the end of the planning period in the <interval> element.
a sparse Jacobian matrix data structure
double lb
lb corresponds to the optional attribute that holds the variable lower bound.
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 <constraints> child of the <stage> element.
NonlinearExpressions * nonlinearExpressions
nonlinearExpressions is a pointer to a NonlinearExpressions object
Used to hold part of the instance in memory.
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...
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 <matrixProgramming> element.
int idx
idx is the index of the row in which the quadratic term appears
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 <quadraticCoefficients> element...
double normScaleFactor
quadratic cones normally are of the form x0 >= x1^2 + x2^2 + ...
The in-memory representation of an OSiL instance.
The in-memory representation of the <expr> 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
The in-memory representation of the <stages> element.
Objectives * objectives
objectives is a pointer to a Objectives object
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.
int coneType
The type of the cone (one of the values in ENUM_CONE_TYPE)
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
int numberOfRows
Every cone has (at least) two dimensions; no distinction is made between vector cones and matrix cone...
int coneType
The type of the cone (one of the values in ENUM_CONE_TYPE)
an integer Vector data structure
int idx
idx gives the index of this constraint
a generic class from which we derive matrix constructors (BaseMatrix, MatrixElements, MatrixTransformation and MatrixBlocks) as well as matrix types (OSMatrix and MatrixBlock).
The in-memory representation of the <matrixObj> element.
int idx
cones are referenced by an (automatically created) index
int numberOfNonlinearExpressions
numberOfNonlinearExpressions is the number of <nl> elements in the <nonlinearExpressions> element...
int numberOfRows
Every cone has (at least) two dimensions; no distinction is made between vector cones and matrix cone...
MatrixVar ** matrixVar
matrixVar is an array of pointers to the <matrixVar> children
TimeDomainStageObj ** obj
obj is a pointer to an array of TimeDomainStageObj object pointers
The in-memory representation of the <matrixCon> element.
QuadraticCoefficients * quadraticCoefficients
quadraticCoefficients is a pointer to a QuadraticCoefficients object
Constraint ** con
con is pointer to an array of Constraint object pointers
The in-memory representation of the <quadraticCoefficients> element.
int numberOfColumns
numberOfColumns gives the number of columns of this matrix
InstanceData * instanceData
A pointer to an InstanceData object.
int numberOfCones
numberOfCones is the number of <nl> elements in the <cones> element.
std::string semidefiniteness
we need to distinguish positive and negative semidefiniteness
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)
int conReferenceMatrixIdx
conReferenceMatrixIdx allows some or all of the components of this matrixCon to be copied from constr...
The in-memory representation of the <matrices> element.
MatrixExpression ** expr
a pointer to an array of linear and nonlinear expressions that evaluate to matrices ...
The in-memory representation of the <cones> element.
bool bVariablesModified
bVariablesModified is true if the variables data has been modified.
a sparse matrix data structure for matrices that can hold nonconstant values and have block structure...
The in-memory representation of the <matrixObjectives> element.
double lb
lb is the lower bound on the constraint
ENUM_NL_EXPR_SHAPE shape
shape holds the shape of the nonlinear expression (linear/quadratic/convex/general) (see further up i...
ObjCoef ** coef
coef is pointer to an array of ObjCoef object pointers
ENUM_MATRIX_TYPE
An enum to track the many different types of values that a matrix can contain Note that these types a...
int varReferenceMatrixIdx
varReferenceMatrixIdx allows some or all of the components of this matrix variable to be copied from ...
This file defines the OSnLNode class along with its derived classes.
The in-memory representation of a rotated quadratic cone.
int numberOfOtherIndexes
Multidimensional tensors can also form cones (the Kronecker product, for instance, can be thought of as a four-dimensional tensor).
bool m_bDeleteExpressionTree
if m_bDeleteExpressionTree is true during garbage collection, we should delete the osExpression tree ...
int numberOfVariables
numberOfVariables is the number of variables in the instance
The NonpositiveCone Class.
a sparse vector data structure
Constraints * constraints
constraints is a pointer to a Constraints object
The in-memory representation of the <obj> element.
IntVector * start
a pointer to the start of each row or column stored in sparse format
The in-memory representation of the <matrixExpressions> element.
GeneralFileHeader * instanceHeader
the instanceHeader is implemented as a general file header object to allow sharing of classes between...
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
int templateMatrixIdx
templateMatrixIdx refers to a matrix that describes the locations in this matrixVar that are allowed ...
The in-memory representation of the <nl> element.
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.
TimeDomainStages * stages
stages is a pointer to a Stages object
int numberOfObjectives
numberOfObjectives gives the number of objectives contained in this stage
Objective ** obj
coef is pointer to an array of ObjCoef object pointers
MatrixConstraints * matrixConstraints
a pointer to the matrixConstraints object
int numberOfValues
numberOfValues is the number of nonzero elements stored in the <linearConstraintCoefficients> element...
int numberOfConstraints
numberOfConstraints gives the number of constraints contained in this stage
int numberOfOtherIndexes
Multidimensional tensors can also form cones (the Kronecker product, for instance, can be thought of as a four-dimensional tensor).
MatrixProgramming * matrixProgramming
matrixProgramming is a pointer to a MatrixProgramming object
std::string name
name corresponds to the optional attribute that holds the name of the stage; the default value is emp...
Variables * variables
variables is a pointer to a Variables object
bool bAMatrixModified
bAMatrixModified is true if the A matrix data has been modified.
a data structure to represent a matrix object (derived from MatrixType)
int numberOfMatrices
numberOfMatrices is the number of <nl> elements in the <matrices> element.
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
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 variable type (C, B, I, D, J, S).
int idx
cones are referenced by an (automatically created) index
int lbMatrixIdx
lbMatrixIdx gives a lower bound for this matrixCon
int numberOfRows
Every cone has (at least) two dimensions; no distinction is made between vector cones and matrix cone...
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
int numberOfStages
numberOfStages is the number of stages in the <stages> 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 idx
idx is the index of the variable corresponding to the coefficient
The in-memory representation of the <matrixVar> element.
int idx
idx gives the index of this variable
TimeDomainStageObjectives * objectives
objectives is a pointer to a TimeDomainObjectives object
The in-memory representation of the <matrixConstraints> element.
int numberOfObjCoef
numberOfObjCoef is the number of variables with a nonzero objective function coefficient ...
int startIdx
startdIdx gives the number of the first constraint contained in this stage
int numberOfRows
Every cone has (at least) two dimensions; no distinction is made between vector cones and matrix cone...
int iNumberOfStartElements
iNumberOfStartElements counts the number of elements in the <start> section of <linearConstraintCoeff...
int coneType
The type of the cone (one of the values in ENUM_CONE_TYPE)
double coef
coef is the coefficient of the quadratic term
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
Variable ** var
Here we define a pointer to an array of var pointers.
The in-memory representation of the <obj> element.
double weight
weight is the weight applied to the given objective function, 1.0 by default
int lbConeIdx
lbConeIdx gives a cone that must contain matrixVar - lbMatrix
int referenceConeIdx
Dual cones use a reference to another, previously defined cone.
int numberOfExpr
numberOfExpr gives the number of expressions
The in-memory representation of a polyhedral cone.
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...
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 <matrixCon> children