CONOPT
|
Methods for returning the final solution and optimisation status.
The following two callback routines returns the solution from CONOPT to the modeler. They are both mandatory and must be registered with coidef_status() and coidef_solution(), respectively. They are called by CONOPT in the order Status and Solution just before CONOPT returns and passes control back to the modeler. All argument values except USRMEM are defined by CONOPT and must not be changed.
where:
MODSTA
: Model statusSOLSTA
: Solver statusITER
: Number of iterationsOBJVAL
: Objective valueUSRMEM
: User memory as defined in coidef_usrmem() (Only for Fortran and C API).The model status informs the user about the status of the model, e.g. whether the model is optimal, unbounded, infeasible, etc. The solver status tells about the reason the solver stopped, e.g. iteration interrupt (this means that the iteration count has exceeded the value of ItLim
defined in coidef_itlim()), resource interrupt (the CPU time has exceeded ResLim
as defined in coidef_reslim()), user interrupt (the user has returned a nonzero value from Progress
), normal, failure, etc.
The model and solver status values and their interpretations are enumerated below (note that the two columns are independent):
MODSTA | SOLSTA |
---|---|
1. Optimal | 1. Normal completion |
2. Locally optimal | 2. Iteration interrupt |
3. Unbounded | 3. Resource interrupt |
4. Infeasible | 4. Terminated by solver |
5. Locally infeasible | 5. Evaluation error limit |
6. Intermediate infeasible | 6. Unknown |
7. Intermediate non-optimal | 7. Not Used |
8. Not Used | 8. User Interrupt |
9. Not Used | 9. Error: Setup failure |
10. Not Used | 10. Error: Solver failure |
11. (Free for future use) | 11. Error: Internal solver error |
12. Unknown type of error | |
13. Error no solution | |
14. Not Used | |
15. Solved Unique | 15. Terminated by Quick Mode |
16. Solved | |
17. Solved Singular |
The special MODSTA
value 15 to 17 are used for Square sets of equations, defined in coidef_square() with Square = 1.
If SOLSTA
, the solver status, is between 6 and 11 then there is no solution and the next callback routine, Solution, will not be called.
where:
XVAL
: Vector with the solution values of the variables. Defined by CONOPT.XMAR
: Vector with the corresponding marginal values or reduced costs. Defined by CONOPT.XBAS
: Vector with basis indicators for the variables (see definition below). Defined by CONOPT.XSTA
: Vector with status values for the variables (see definition below). Defined by CONOPT.YVAL
: Vector with the values of the left hand sides of all rows in the optimal solution, including both linear and nonlinear terms. Defined by CONOPT.YMAR
: Vector with the corresponding marginal values. Defined by CONOPT.YBAS
: Vector with basis indicators for the rows or constraints (see definition below). Defined by CONOPT.YSTA
: Vector with status values for the rows or constraints (see definition below). Defined by CONOPT.N
: Number of variables. Defined by CONOPT.M
: Number of constraints. Defined by CONOPT.USRMEM
: User memory as defined in coidef_usrmem() (Only for Fortran and C API).The signs of XMAR
and YMAR
are defined such that an +eps
change in the critical bound or critical right hand side gives a change in the optimal objective of XMAR*eps
or YMAR*eps
. If the solution is infeasible then XMAR
and YMAR
are defined relative to a scaled sum-of-infeasibility objective.
The basis indicators for the columns in XBAS
are defined as:
The basis indicators for the rows in YBAS
are defined as:
The status indicators in XSTA
and YSTA
are defined as:
Rtmaxv
)