CONOPT
Loading...
Searching...
No Matches

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.


Status - Return completion Status

Attention
Mandatory callback routine
Integer Function Status( MODSTA, SOLSTA, ITER, OBJVAL, &
USRMEM )
INTEGER, Intent(IN) :: MODSTA, SOLSTA, ITER, LUNIT
REAL*8, Intent(IN) :: OBJVAL
REAL*8, Intent(IN OUT) :: USRMEM(*)

where:

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.


Solution – Return Solution values

Attention
Mandatory callback routine
Integer Function Solution( XVAL, XMAR, XBAS, XSTA, &
YVAL, YMAR, YBAS, YSTA, &
N, M, USRMEM )
INTEGER, Intent(IN) :: N, M
INTEGER, Dimension(N), Intent(IN) :: XBAS, XSTA
INTEGER, Dimension(M), Intent(IN) :: YBAS, YSTA
REAL*8, Dimension(N), Intent(IN) :: XVAL, XMAR
REAL*8, Dimension(M), Intent(IN) :: YVAL, YMAR
REAL*8, Intent(IN OUT) :: USRMEM(*)

where:

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: