CONOPT
Loading...
Searching...
No Matches

Providing the matrix information and initial values to CONOPT.

The call back routine ReadMatrix described in this section defines the structure of the model. It is a mandatory routine that must be registered with COIDEF_ReadMatrix() defined above before CONOPT is started. CONOPT will call ReadMatrix as the first routine (except for calls of Message) and the modeler must define initial values, bounds, constraint types, right hand sides, and structure and nonlinearity pattern of the Jacobian. All arguments passed to ReadMatrix (except USRMEM) are allocated and owned by CONOPT. CONOPT assigns many arguments with default values before the routine is called to make the model building process as easy as possible. If these default values are appropriate, the modeler does not have to change them. The Tutorial and Examples using CONOPT provided with the Library show several uses of defaults.


ReadMatrix – Read Matrix

Attention
Mandatory callback routine.
int COI_CALLCONV ReadMatrix( double* LOWER, double* CURR,
double* UPPER, int* VSTA, int* TYPE, double* RHS,
int* ESTA, int* COLSTA, int* ROWNO, double* VALUE,
int* NLFLAG, int* N, int* M, int* NZ,
void* USRMEM );

where:



The lower bounds in LOWER must be less than or equal to the upper bounds in UPPER. Some of the bounds may be -INF or +INF, which are the bounds CONOPT assigns by default. If a bound is infinite, the user should normally not change the corresponding entry in LOWER or UPPER. If it is more convenient for the modeler to assign a value representing infinity it should be done using the values that are present in LOWER and UPPER when ReadMatrix is called, for example taken from the first element before any assignments are done. As an alternative, you may define the numerical value of Infinity to be used by the solution algorithm in option RTMAXV and store the same value in UPPER and -RTMAXV in LOWER.

The values in CURR, both those defined by the modeler and those defined by default, are without warning moved to the nearest bound if they are outside the bounds.

Note
CONOPT assumes that all functions are defined for all values of the variables between their bounds. CONOPT will never attempt to evaluate the functions in points outside the bounds specified by LOWER and UPPER.