CONOPT
|
To start CONOPT you will in general have to go through 7 steps:
COI_Error
represent an error return code.
COI_Error
. COI_Error
can be tested at any point in the program.
Register your callback routines. The standard declaration and execution sections for this task are:
The list above includes all mandatory callback routines.
FDEval
only is mandatory for nonlinear models.
conoptf.lic
that contains the call to coidef_license() with the correct license information. If you add a copy of this file to the directory with your other Fortran files then you can in most cases replace the license calls with
Call CONOPT. The standard call is:
coi_solve() will start CONOPT. CONOPT will allocate the necessary memory and it will call the user defined callback routine registered with coidef_readmatrix(), here called My_ReadMatrix
, to set up the model. During the optimization, CONOPT will repeatedly need information about the nonlinear functions and their first derivatives and for this purpose it will call the user defined callback registered with coidef_fdeval(), here called My_FDEval
. During the optimization CONOPT will send messages to the modeler using the callback routine registered with coidef_message(), here called My_Message
, and it may also call the error message routine registered with coidef_errmsg(), here called My_ErrMsg
. When the optimization is finished, CONOPT will call two output routines that return the solution to the modeler. They are registered with coidef_status() and coidef_solution() and are here called My_Status
and My_Solution
. Finally, coi_solve() will return.
Several optional callback routines may be called if they have been registered. They can provide more information about the model from the modeler to CONOPT or more information about the solution process from CONOPT to the modeler.