CONOPT
Loading...
Searching...
No Matches
conopt.ConoptModelData Class Reference

The Model Data class. More...

Public Member Functions

 __init__ (self)
 Constructor.
 
 readMatrix (self, lower, curr, upper, vsta, type, rhs, esta, colsta, rowno, value, nlflag, numvar, numcon, numnz)
 loads the structure of the model into CONOPT.
 
 setProblemDimension (self, numvar, numcons, numnz, numnlnz)
 sets the problem dimension.
 
 addConstraint (self, *args)
 Overload 1: adds a constraint to the problem.
 
 addVariable (self, *args)
 Overload 1: adds a variable to the model.
 
 setObjectiveElement (self, elem, elemindex)
 sets the index for the objective variable or constraint
 
 setOptimizationSense (self, sense)
 sets the optimisation direction.
 
 setInitialStatusOption (self, inistat)
 the setting to indicate how the initial status of the variables and slack variables will be handled.
 
 numVar (self)
 returns the number of variables in the model
 
 numCons (self)
 returns the number of constraints in the model
 
 numHessianNonzeros (self)
 returns the number of non-zeros in the Hessian
 
 getVariable (self, *args)
 Overload 1: returns a reference to the variable object
 
 getConstraint (self, *args)
 Overload 1: returns a reference to the constraint object
 
 setSDEvaluationType (self, sdevaltype)
 informs CONOPT of the method for evaluating the second derivative
 
 setSDLagrangianStructure (self, rownum, colnum)
 sets the structure of the second derivatives of the Lagrangian
 
 getSDLagrangianRowNumbers (self)
 returns the row numbers in the second derivative of the lagrangian structure
 
 getSDLagrangianColumnNumbers (self)
 returns the column numbers in the second derivative of the lagrangian structure
 
 __disown__ (self)
 
synchronized void delete ()
 
void swigReleaseOwnership ()
 
void swigTakeOwnership ()
 
 ConoptModelData ()
 
int readMatrix (SWIGTYPE_p_double lower, SWIGTYPE_p_double curr, SWIGTYPE_p_double upper, SWIGTYPE_p_int vsta, SWIGTYPE_p_int type, SWIGTYPE_p_double rhs, SWIGTYPE_p_int esta, SWIGTYPE_p_int colsta, SWIGTYPE_p_int rowno, SWIGTYPE_p_double value, SWIGTYPE_p_int nlflag, int numvar, int numcon, int numnz)
 
void setProblemDimension (long numvar, long numcons, long numnz, long numnlnz)
 
int addConstraint (ConstraintType constype, double rhs, int slackstatus)
 
int addConstraint (ConstraintType constype, double rhs)
 
int addConstraint (ConstraintType constype, double rhs, int[] varindex, double[] value, int[] nlflag, int slackstatus)
 
int addConstraint (ConstraintType constype, double rhs, int[] varindex, double[] value, int[] nlflag)
 
int addVariable (double lower, double upper, double curr, int varstatus)
 
int addVariable (double lower, double upper, double curr)
 
int addVariable (double lower, double upper)
 
int addVariable (double lower, double upper, int[] consindex, double[] value, int[] nlflag, double curr, int varstatus)
 
int addVariable (double lower, double upper, int[] consindex, double[] value, int[] nlflag, double curr)
 
int addVariable (double lower, double upper, int[] consindex, double[] value, int[] nlflag)
 
void setObjectiveElement (ObjectiveElement elem, int elemindex)
 
void setOptimizationSense (Sense sense)
 
void setInitialStatusOption (int inistat)
 
int numVar ()
 
int numCons ()
 
int numHessianNonzeros ()
 
Variable getVariable (int index)
 
Constraint getConstraint (int index)
 
void setSDEvaluationType (SDEvaluationType sdevaltype)
 
void setSDLagrangianStructure (int[] rownum, int[] colnum)
 
int[] getSDLagrangianRowNumbers ()
 
int[] getSDLagrangianColumnNumbers ()
 

Protected Member Functions

 ConoptModelData (long cPtr, boolean cMemoryOwn)
 
void finalize ()
 
void swigDirectorDisconnect ()
 

Static Protected Member Functions

static long getCPtr (ConoptModelData obj)
 
static long swigRelease (ConoptModelData obj)
 

Protected Attributes

transient boolean swigCMemOwn
 

Properties

 thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
 

Detailed Description

The Model Data class.

The Model Data class

Definition at line 1939 of file conopt.py.

Constructor & Destructor Documentation

◆ __init__()

conopt.ConoptModelData.__init__ ( self)

Constructor.

Definition at line 1945 of file conopt.py.

◆ ConoptModelData() [1/2]

conopt.ConoptModelData.ConoptModelData ( long cPtr,
boolean cMemoryOwn )
inlineprotected

Definition at line 19 of file ConoptModelData.java.

◆ ConoptModelData() [2/2]

conopt.ConoptModelData.ConoptModelData ( )
inline

Constructor

Definition at line 74 of file ConoptModelData.java.

Member Function Documentation

◆ readMatrix() [1/2]

conopt.ConoptModelData.readMatrix ( self,
lower,
curr,
upper,
vsta,
type,
rhs,
esta,
colsta,
rowno,
value,
nlflag,
numvar,
numcon,
numnz )

loads the structure of the model into CONOPT.

Using the C++ interface, there are two ways to load the model into CONOPT. The first method follows the process used for the Fortran and C interfaces. This involves:

  1. setting the problem dimension by calling setProblemDimension().
  2. set the objective element (constraint or variable) by calling setObjectiveElement().
  3. set the optimisation sense by calling setOptimizationSense().
  4. implementing a readMatrix() method that loads the model using a column-oriented sparse matrix format. For more details regarding the parameters of the readMatrix() method, please see 'API_DEFINING_THE_MODEL_F90'

The second method makes use of the convenience functions included in the C++ interface. Within the ConoptModelData the methods addConstraint() and addVariable() are provided. As such, to load the model into CONOPT, you must:

  1. write a member function for building the model.
  2. in the build model function, call addVariable() for each variable to be added to the problem.
  3. in the build model function, call addConstraint() for each constraint to be added to the problem. When adding a constraint, you should specify the variables (by index), coefficients and non-linear flags (for all nonlinear terms).
  4. set the objective element (constraint or variable) by calling setObjectiveElement().
  5. set the optimisation sense by calling setOptimizationSense(). When the solve method is called, the default readMatrix() method will be called, which will load the model into CONOPT as specified by the calls to addVariable() and addConstraint().

Definition at line 1954 of file conopt.py.

◆ setProblemDimension() [1/2]

conopt.ConoptModelData.setProblemDimension ( self,
numvar,
numcons,
numnz,
numnlnz )

sets the problem dimension.

This is called if the user wants to implement a custom readMatrix() method.

NOTE: it is not possible to call setProblemDimension() and addConstraint() or addVariable(). The latter functions can only be used if the problem dimension is not set and the default readMatrix() method is used.

Parameters
numvarthe number of variables in the problem
numconsthe number of constraints in the problem
numnzthe number of non-zeros in the constraint matrix
numnlnzthe number of nonlinear non-zeros in the constraint matrix

Reimplemented in conopt.ModelData, and conopt.ModelData.

Definition at line 1983 of file conopt.py.

◆ addConstraint() [1/5]

conopt.ConoptModelData.addConstraint ( self,
* args )

Overload 1: adds a constraint to the problem.

The non-zero coefficients are added later

Parameters
constypethe type of constraint, 0: ==, 1: >=, 2: <=, 3: free
rhsthe right hand side
slackstatusinitial status of the slack variables, see IniStat

|

Overload 2: adds a constraint to the problem. The matrix non-zeros are added based on the supplied variables

Parameters
constypethe type of constraint, 0: ==, 1: >=, 2: <=, 3: free
rhsthe right hand side
varindexthe variables this constraint has non-zero coefficients
valuethe non-zero of the variable
nlflagflag to set whether the variable belongs to a non-linear term
slackstatusinitial status of the slack variables, see IniStat

|

Overload 3: adds a constraint to the problem. The matrix non-zeros are added based on the supplied variables

Parameters
constypethe type of constraint, 0: ==, 1: >=, 2: <=, 3: free
rhsthe right hand side
varindexthe variables this constraint has non-zero coefficients
valuethe non-zero of the variable
nlflagflag to set whether the variable belongs to a non-linear term
slackstatusinitial status of the slack variables, see IniStat

Reimplemented in conopt.ModelData, conopt.ModelData, conopt.ModelData, conopt.ModelData, and conopt.ModelData.

Definition at line 1999 of file conopt.py.

◆ addVariable() [1/7]

conopt.ConoptModelData.addVariable ( self,
* args )

Overload 1: adds a variable to the model.

The non-zero coefficients are added later.

Parameters
lowerlower bound for the variable
upperupper bound for the variable
currinitial value of the variable, can be set to 0
varstatusinitial status of the variable, see IniStat

|

Overload 2: adds a variable to the problem. The matrix non-zeros are added based on the supplied constraints.

Parameters
lowerlower bound for the variable
upperupper bound for the variable
consindexthe constraints this variable has non-zero coefficients
valuethe non-zero of the variable
nlflagflag to set whether the variable belongs to a non-linear term
currinitial value of the variable, can be set to 0
varstatusinitial status of the variable, see IniStat

|

Overload 3: adds a variable to the problem. The matrix non-zeros are added based on the supplied constraints.

Parameters
lowerlower bound for the variable
upperupper bound for the variable
consindexthe constraints this variable has non-zero coefficients
valuethe non-zero of the variable
nlflagflag to set whether the variable belongs to a non-linear term
currinitial value of the variable, can be set to 0
varstatusinitial status of the variable, see IniStat

|

Overload 4: adds a variable to the problem. The matrix non-zeros are added based on the supplied constraints.

Parameters
lowerlower bound for the variable
upperupper bound for the variable
consindexthe constraints this variable has non-zero coefficients
valuethe non-zero of the variable
nlflagflag to set whether the variable belongs to a non-linear term
currinitial value of the variable, can be set to 0
varstatusinitial status of the variable, see IniStat

Reimplemented in conopt.ModelData, conopt.ModelData, conopt.ModelData, conopt.ModelData, conopt.ModelData, conopt.ModelData, and conopt.ModelData.

Definition at line 2040 of file conopt.py.

◆ setObjectiveElement() [1/2]

conopt.ConoptModelData.setObjectiveElement ( self,
elem,
elemindex )

sets the index for the objective variable or constraint

Reimplemented in conopt.ModelData, and conopt.ModelData.

Definition at line 2099 of file conopt.py.

◆ setOptimizationSense() [1/2]

conopt.ConoptModelData.setOptimizationSense ( self,
sense )

sets the optimisation direction.

Reimplemented in conopt.ModelData, and conopt.ModelData.

Definition at line 2107 of file conopt.py.

◆ setInitialStatusOption() [1/2]

conopt.ConoptModelData.setInitialStatusOption ( self,
inistat )

the setting to indicate how the initial status of the variables and slack variables will be handled.

The initial status is set in the addVariable() and addConstraint() methods, or in the readMatrix() method if the classical model input approach is used. By default, the value of inistat is 0, which means that the variable and slack status is ignored.

If inistat == 1: The variable status has the following behaviour:

  • 0: The variable is initialized non-basic (if curr = lower or curr = upper) or super-basic, and
  • 1: The variable is initialized basic The slack status has the following behaviour:
  • 0: The slack is initialized non-basic (if the constraint is binding in the initial point) or super-basic,
  • 1: The slack is initialized basic

If inistat == 2: The variable status has the following behaviour:

  • 0: The variable is initialized at lower bound
  • 1: The variable is initialized at upper bound
  • 2: The variable is initialized basic, and
  • 3: The variable is initialized superbasic. The slack status has the following behaviour:
  • 0: The slack is initialized at lower bound.
  • 1: The slack is initialized at upper bound.
  • 2: The slack is initialized basic, and
  • 3: The slack is initialized superbasic.

Reimplemented in conopt.ModelData, and conopt.ModelData.

Definition at line 2115 of file conopt.py.

◆ numVar() [1/2]

conopt.ConoptModelData.numVar ( self)

returns the number of variables in the model

Reimplemented in conopt.ModelData, and conopt.ModelData.

Definition at line 2147 of file conopt.py.

◆ numCons() [1/2]

conopt.ConoptModelData.numCons ( self)

returns the number of constraints in the model

Reimplemented in conopt.ModelData, and conopt.ModelData.

Definition at line 2155 of file conopt.py.

◆ numHessianNonzeros() [1/2]

conopt.ConoptModelData.numHessianNonzeros ( self)

returns the number of non-zeros in the Hessian

Reimplemented in conopt.ModelData, and conopt.ModelData.

Definition at line 2163 of file conopt.py.

◆ getVariable() [1/2]

conopt.ConoptModelData.getVariable ( self,
* args )

Overload 1: returns a reference to the variable object

|

Overload 2: returns a reference to the variable object

Reimplemented in conopt.ModelData, and conopt.ModelData.

Definition at line 2171 of file conopt.py.

◆ getConstraint() [1/2]

conopt.ConoptModelData.getConstraint ( self,
* args )

Overload 1: returns a reference to the constraint object

|

Overload 2: returns a reference to the constraint object

Reimplemented in conopt.ModelData, and conopt.ModelData.

Definition at line 2187 of file conopt.py.

◆ setSDEvaluationType() [1/2]

conopt.ConoptModelData.setSDEvaluationType ( self,
sdevaltype )

informs CONOPT of the method for evaluating the second derivative

Reimplemented in conopt.ModelData, and conopt.ModelData.

Definition at line 2203 of file conopt.py.

◆ setSDLagrangianStructure() [1/2]

conopt.ConoptModelData.setSDLagrangianStructure ( self,
rownum,
colnum )

sets the structure of the second derivatives of the Lagrangian

Parameters
rownumVector of row numbers of the lower triangular part of the Hessian.
colnumVector of column numbers of the lower triangular part of the Hessian.

Reimplemented in conopt.ModelData, and conopt.ModelData.

Definition at line 2211 of file conopt.py.

◆ getSDLagrangianRowNumbers() [1/2]

conopt.ConoptModelData.getSDLagrangianRowNumbers ( self)

returns the row numbers in the second derivative of the lagrangian structure

Definition at line 2222 of file conopt.py.

◆ getSDLagrangianColumnNumbers() [1/2]

conopt.ConoptModelData.getSDLagrangianColumnNumbers ( self)

returns the column numbers in the second derivative of the lagrangian structure

Definition at line 2226 of file conopt.py.

◆ __disown__()

conopt.ConoptModelData.__disown__ ( self)

Definition at line 2229 of file conopt.py.

◆ getCPtr()

static long conopt.ConoptModelData.getCPtr ( ConoptModelData obj)
inlinestaticprotected

Definition at line 24 of file ConoptModelData.java.

◆ swigRelease()

static long conopt.ConoptModelData.swigRelease ( ConoptModelData obj)
inlinestaticprotected

Definition at line 28 of file ConoptModelData.java.

◆ finalize()

void conopt.ConoptModelData.finalize ( )
inlineprotected

Reimplemented in conopt.ModelData.

Definition at line 41 of file ConoptModelData.java.

◆ delete()

synchronized void conopt.ConoptModelData.delete ( )
inline

Reimplemented in conopt.ModelData.

Definition at line 45 of file ConoptModelData.java.

◆ swigDirectorDisconnect()

void conopt.ConoptModelData.swigDirectorDisconnect ( )
inlineprotected

Reimplemented in conopt.ModelData.

Definition at line 55 of file ConoptModelData.java.

◆ swigReleaseOwnership()

void conopt.ConoptModelData.swigReleaseOwnership ( )
inline

Reimplemented in conopt.ModelData.

Definition at line 60 of file ConoptModelData.java.

◆ swigTakeOwnership()

void conopt.ConoptModelData.swigTakeOwnership ( )
inline

Reimplemented in conopt.ModelData.

Definition at line 65 of file ConoptModelData.java.

◆ readMatrix() [2/2]

int conopt.ConoptModelData.readMatrix ( SWIGTYPE_p_double lower,
SWIGTYPE_p_double curr,
SWIGTYPE_p_double upper,
SWIGTYPE_p_int vsta,
SWIGTYPE_p_int type,
SWIGTYPE_p_double rhs,
SWIGTYPE_p_int esta,
SWIGTYPE_p_int colsta,
SWIGTYPE_p_int rowno,
SWIGTYPE_p_double value,
SWIGTYPE_p_int nlflag,
int numvar,
int numcon,
int numnz )
inline

loads the structure of the model into CONOPT.

Using the C++ interface, there are two ways to load the model into CONOPT.
The first method follows the process used for the Fortran and C interfaces. This involves:

  1. setting the problem dimension by calling setProblemDimension().
  2. set the objective element (constraint or variable) by calling setObjectiveElement().
  3. set the optimisation sense by calling setOptimizationSense().
  4. implementing a readMatrix() method that loads the model using a column-oriented sparse matrix format. For
    more details regarding the parameters of the readMatrix() method, please see API_DEFINING_THE_MODEL_F90

    The second method makes use of the convenience functions included in the C++ interface. Within the
    ConoptModelData the methods addConstraint() and addVariable() are provided. As such, to load the model into
    CONOPT, you must:
  1. write a member function for building the model.
  2. in the build model function, call addVariable() for each variable to be added to the problem.
  3. in the build model function, call addConstraint() for each constraint to be added to the problem. When adding
    a constraint, you should specify the variables (by index), coefficients and non-linear flags (for all
    nonlinear terms).
  4. set the objective element (constraint or variable) by calling setObjectiveElement().
  5. set the optimisation sense by calling setOptimizationSense().
    When the solve method is called, the default readMatrix() method will be called, which will load the model into
    CONOPT as specified by the calls to addVariable() and addConstraint().

    INCLUDEDOC readMatrix_params.dox

Definition at line 107 of file ConoptModelData.java.

◆ setProblemDimension() [2/2]

void conopt.ConoptModelData.setProblemDimension ( long numvar,
long numcons,
long numnz,
long numnlnz )
inline

sets the problem dimension. This is called if the user wants to implement a custom readMatrix() method.

NOTE: it is not possible to call setProblemDimension() and addConstraint() or addVariable(). The latter
functions can only be used if the problem dimension is not set and the default readMatrix() method is used.


INGROUP DEFINE_MODEL_XYZ

Parameters
numvarthe number of variables in the problem
numconsthe number of constraints in the problem
numnzthe number of non-zeros in the constraint matrix
numnlnzthe number of nonlinear non-zeros in the constraint matrix

Reimplemented in conopt.ModelData.

Definition at line 125 of file ConoptModelData.java.

◆ addConstraint() [2/5]

int conopt.ConoptModelData.addConstraint ( ConstraintType constype,
double rhs,
int slackstatus )
inline

adds a constraint to the problem. The non-zero coefficients are added later


INGROUP DEFINE_MODEL_XYZ

Parameters
constypethe type of constraint, 0: ==, 1: >=, 2: <=, 3: free
rhsthe right hand side
slackstatusinitial status of the slack variables, see IniStat

Reimplemented in conopt.ModelData.

Definition at line 139 of file ConoptModelData.java.

◆ addConstraint() [3/5]

int conopt.ConoptModelData.addConstraint ( ConstraintType constype,
double rhs )
inline

adds a constraint to the problem. The non-zero coefficients are added later


INGROUP DEFINE_MODEL_XYZ

Parameters
constypethe type of constraint, 0: ==, 1: >=, 2: <=, 3: free
rhsthe right hand side

Reimplemented in conopt.ModelData.

Definition at line 153 of file ConoptModelData.java.

◆ addConstraint() [4/5]

int conopt.ConoptModelData.addConstraint ( ConstraintType constype,
double rhs,
int[] varindex,
double[] value,
int[] nlflag,
int slackstatus )
inline

adds a constraint to the problem. The matrix non-zeros are added based on the supplied variables


INGROUP DEFINE_MODEL_XYZ

Parameters
constypethe type of constraint, 0: ==, 1: >=, 2: <=, 3: free
rhsthe right hand side
varindexthe variables this constraint has non-zero coefficients
valuethe non-zero of the variable
nlflagflag to set whether the variable belongs to a non-linear term
slackstatusinitial status of the slack variables, see IniStat

Reimplemented in conopt.ModelData.

Definition at line 170 of file ConoptModelData.java.

◆ addConstraint() [5/5]

int conopt.ConoptModelData.addConstraint ( ConstraintType constype,
double rhs,
int[] varindex,
double[] value,
int[] nlflag )
inline

adds a constraint to the problem. The matrix non-zeros are added based on the supplied variables


INGROUP DEFINE_MODEL_XYZ

Parameters
constypethe type of constraint, 0: ==, 1: >=, 2: <=, 3: free
rhsthe right hand side
varindexthe variables this constraint has non-zero coefficients
valuethe non-zero of the variable
nlflagflag to set whether the variable belongs to a non-linear term

Reimplemented in conopt.ModelData.

Definition at line 187 of file ConoptModelData.java.

◆ addVariable() [2/7]

int conopt.ConoptModelData.addVariable ( double lower,
double upper,
double curr,
int varstatus )
inline

adds a variable to the model. The non-zero coefficients are added later.


INGROUP DEFINE_MODEL_XYZ

Parameters
lowerlower bound for the variable
upperupper bound for the variable
currinitial value of the variable, can be set to 0
varstatusinitial status of the variable, see IniStat

Reimplemented in conopt.ModelData.

Definition at line 202 of file ConoptModelData.java.

◆ addVariable() [3/7]

int conopt.ConoptModelData.addVariable ( double lower,
double upper,
double curr )
inline

adds a variable to the model. The non-zero coefficients are added later.


INGROUP DEFINE_MODEL_XYZ

Parameters
lowerlower bound for the variable
upperupper bound for the variable
currinitial value of the variable, can be set to 0

Reimplemented in conopt.ModelData.

Definition at line 217 of file ConoptModelData.java.

◆ addVariable() [4/7]

int conopt.ConoptModelData.addVariable ( double lower,
double upper )
inline

adds a variable to the model. The non-zero coefficients are added later.


INGROUP DEFINE_MODEL_XYZ

Parameters
lowerlower bound for the variable
upperupper bound for the variable

Reimplemented in conopt.ModelData.

Definition at line 231 of file ConoptModelData.java.

◆ addVariable() [5/7]

int conopt.ConoptModelData.addVariable ( double lower,
double upper,
int[] consindex,
double[] value,
int[] nlflag,
double curr,
int varstatus )
inline

adds a variable to the problem. The matrix non-zeros are added based on the supplied constraints.


INGROUP DEFINE_MODEL_XYZ

Parameters
lowerlower bound for the variable
upperupper bound for the variable
consindexthe constraints this variable has non-zero coefficients
valuethe non-zero of the variable
nlflagflag to set whether the variable belongs to a non-linear term
currinitial value of the variable, can be set to 0
varstatusinitial status of the variable, see IniStat

Reimplemented in conopt.ModelData.

Definition at line 249 of file ConoptModelData.java.

◆ addVariable() [6/7]

int conopt.ConoptModelData.addVariable ( double lower,
double upper,
int[] consindex,
double[] value,
int[] nlflag,
double curr )
inline

adds a variable to the problem. The matrix non-zeros are added based on the supplied constraints.


INGROUP DEFINE_MODEL_XYZ

Parameters
lowerlower bound for the variable
upperupper bound for the variable
consindexthe constraints this variable has non-zero coefficients
valuethe non-zero of the variable
nlflagflag to set whether the variable belongs to a non-linear term
currinitial value of the variable, can be set to 0

Reimplemented in conopt.ModelData.

Definition at line 267 of file ConoptModelData.java.

◆ addVariable() [7/7]

int conopt.ConoptModelData.addVariable ( double lower,
double upper,
int[] consindex,
double[] value,
int[] nlflag )
inline

adds a variable to the problem. The matrix non-zeros are added based on the supplied constraints.


INGROUP DEFINE_MODEL_XYZ

Parameters
lowerlower bound for the variable
upperupper bound for the variable
consindexthe constraints this variable has non-zero coefficients
valuethe non-zero of the variable
nlflagflag to set whether the variable belongs to a non-linear term

Reimplemented in conopt.ModelData.

Definition at line 284 of file ConoptModelData.java.

◆ setObjectiveElement() [2/2]

void conopt.ConoptModelData.setObjectiveElement ( ObjectiveElement elem,
int elemindex )
inline

sets the index for the objective variable or constraint


INGROUP DEFINE_MODEL_XYZ

Reimplemented in conopt.ModelData.

Definition at line 294 of file ConoptModelData.java.

◆ setOptimizationSense() [2/2]

void conopt.ConoptModelData.setOptimizationSense ( Sense sense)
inline

sets the optimisation direction.


INGROUP DEFINE_MODEL_XYZ

Reimplemented in conopt.ModelData.

Definition at line 304 of file ConoptModelData.java.

◆ setInitialStatusOption() [2/2]

void conopt.ConoptModelData.setInitialStatusOption ( int inistat)
inline

the setting to indicate how the initial status of the variables and slack variables will be handled.

The initial status is set in the addVariable() and addConstraint() methods, or in the readMatrix() method if the
classical model input approach is used. By default, the value of inistat is 0, which means that the variable and
slack status is ignored.

If inistat == 1:
The variable status has the following behaviour:

  • 0: The variable is initialized non-basic (if curr = lower or curr = upper) or super-basic, and
  • 1: The variable is initialized basic
    The slack status has the following behaviour:
  • 0: The slack is initialized non-basic (if the constraint is binding in the initial point) or super-basic,
  • 1: The slack is initialized basic

    If inistat == 2:
    The variable status has the following behaviour:
  • 0: The variable is initialized at lower bound
  • 1: The variable is initialized at upper bound
  • 2: The variable is initialized basic, and
  • 3: The variable is initialized superbasic.
    The slack status has the following behaviour:
  • 0: The slack is initialized at lower bound.
  • 1: The slack is initialized at upper bound.
  • 2: The slack is initialized basic, and
  • 3: The slack is initialized superbasic.


    INGROUP DEFINE_MODEL_XYZ

Reimplemented in conopt.ModelData.

Definition at line 338 of file ConoptModelData.java.

◆ numVar() [2/2]

int conopt.ConoptModelData.numVar ( )
inline

returns the number of variables in the model


INGROUP QUERY_MODEL_XYZ

Reimplemented in conopt.ModelData.

Definition at line 348 of file ConoptModelData.java.

◆ numCons() [2/2]

int conopt.ConoptModelData.numCons ( )
inline

returns the number of constraints in the model


INGROUP QUERY_MODEL_XYZ

Reimplemented in conopt.ModelData.

Definition at line 358 of file ConoptModelData.java.

◆ numHessianNonzeros() [2/2]

int conopt.ConoptModelData.numHessianNonzeros ( )
inline

returns the number of non-zeros in the Hessian


INGROUP QUERY_MODEL_XYZ

Reimplemented in conopt.ModelData.

Definition at line 368 of file ConoptModelData.java.

◆ getVariable() [2/2]

Variable conopt.ConoptModelData.getVariable ( int index)
inline

returns a reference to the variable object


INGROUP QUERY_MODEL_XYZ

Reimplemented in conopt.ModelData.

Definition at line 378 of file ConoptModelData.java.

◆ getConstraint() [2/2]

Constraint conopt.ConoptModelData.getConstraint ( int index)
inline

returns a reference to the constraint object


INGROUP QUERY_MODEL_XYZ

Reimplemented in conopt.ModelData.

Definition at line 388 of file ConoptModelData.java.

◆ setSDEvaluationType() [2/2]

void conopt.ConoptModelData.setSDEvaluationType ( SDEvaluationType sdevaltype)
inline

informs CONOPT of the method for evaluating the second derivative


INGROUP DEFINE_SECOND_DERIVATIVE_XYZ

Reimplemented in conopt.ModelData.

Definition at line 398 of file ConoptModelData.java.

◆ setSDLagrangianStructure() [2/2]

void conopt.ConoptModelData.setSDLagrangianStructure ( int[] rownum,
int[] colnum )
inline

sets the structure of the second derivatives of the Lagrangian


INGROUP DEFINE_SECOND_DERIVATIVE_XYZ

Parameters
rownumVector of row numbers of the lower triangular part of the Hessian.
colnumVector of column numbers of the lower triangular part of the Hessian.

Reimplemented in conopt.ModelData.

Definition at line 411 of file ConoptModelData.java.

◆ getSDLagrangianRowNumbers() [2/2]

int[] conopt.ConoptModelData.getSDLagrangianRowNumbers ( )
inline

returns the row numbers in the second derivative of the lagrangian structure

Definition at line 418 of file ConoptModelData.java.

◆ getSDLagrangianColumnNumbers() [2/2]

int[] conopt.ConoptModelData.getSDLagrangianColumnNumbers ( )
inline

returns the column numbers in the second derivative of the lagrangian structure

Definition at line 425 of file ConoptModelData.java.

Field Documentation

◆ swigCMemOwn

transient boolean conopt.ConoptModelData.swigCMemOwn
protected

Definition at line 17 of file ConoptModelData.java.

Property Documentation

◆ thisown

conopt.ConoptModelData.thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
static

Definition at line 1942 of file conopt.py.


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