58 INTEGER :: numcallback
59 INTEGER,
Dimension(:),
Pointer :: cntvect
68 Allocate( cntvect(numcallback) )
79 coi_error = max( coi_error,
coidef_optfile( cntvect,
'pen01.opt' ) )
89#if defined(LICENSE_INT_1) && defined(LICENSE_INT_2) && defined(LICENSE_INT_3) && defined(LICENSE_TEXT)
90 coi_error = max( coi_error,
coidef_license( cntvect, license_int_1, license_int_2, license_int_3, license_text) )
93 If ( coi_error .ne. 0 )
THEN
95 write(*,*)
'**** Fatal Error while loading CONOPT4 Callback routines.'
97 call flog(
"Skipping Solve due to setup errors", 1 )
108 If ( coi_error /= 0 )
then
109 call flog(
"Case 1: Errors encountered during solution", 1 )
111 call flog(
"Case 1: Status or Solution routine was not called", 1 )
112 elseif (
sstat /= 1 )
then
113 call flog(
"Case 1: Solver Status was 1 not as expected.", 1 )
121 If ( coi_error /= 0 )
then
122 call flog(
"Case 2: Errors encountered during solution", 1 )
124 call flog(
"Case 2: Status or Solution routine was not called", 1 )
125 elseif (
sstat /= 1 )
then
126 call flog(
"Case 2: Solver Status was 1 not as expected.", 1 )
134 If ( coi_error /= 0 )
then
135 call flog(
"Case 3: Errors encountered during solution", 1 )
137 call flog(
"Case 3: Status or Solution routine was not called", 1 )
138 elseif (
sstat /= 1 )
then
139 call flog(
"Case 3: Solver Status was 1 not as expected.", 1 )
143 write(*,*)
'End of pen01 example. Return code=',coi_error
145 if ( coi_free(cntvect) /= 0 )
call flog(
"Error while freeing control vector",1)
147 call flog(
"Successful Solve", 0 )
159 colsta, rowno, value, nlflag, n, m, nz, &
166 integer,
intent (in) :: n
167 integer,
intent (in) :: m
168 integer,
intent (in) :: nz
169 real*8,
intent (in out),
dimension(n) :: lower
170 real*8,
intent (in out),
dimension(n) :: curr
171 real*8,
intent (in out),
dimension(n) :: upper
172 integer,
intent (in out),
dimension(n) :: vsta
174 integer,
intent (out),
dimension(m) ::
type
175 integer,
intent (in out),
dimension(m) :: esta
177 real*8,
intent (in out),
dimension(m) :: rhs
178 integer,
intent (in out),
dimension(n+1) :: colsta
179 integer,
intent (out),
dimension(nz) :: rowno
180 integer,
intent (in out),
dimension(nz) :: nlflag
181 real*8,
intent (in out),
dimension(nz) ::
value
194 if ( casenum == 2 )
Then
198 if ( casenum == 3 )
Then
integer function std_solution(xval, xmar, xbas, xsta, yval, ymar, ybas, ysta, n, m, usrmem)
integer function std_status(modsta, solsta, iter, objval, usrmem)
integer function std_message(smsg, dmsg, nmsg, llen, usrmem, msgv)
integer function std_errmsg(rowno, colno, posno, msglen, usrmem, msg)
integer function coidef_errmsg(cntvect, coi_errmsg)
define callback routine for returning error messages for row, column or Jacobian elements.
integer function coidef_message(cntvect, coi_message)
define callback routine for handling messages returned during the solution process.
integer function coidef_readmatrix(cntvect, coi_readmatrix)
define callback routine for providing the matrix data to CONOPT.
integer function coidef_status(cntvect, coi_status)
define callback routine for returning the completion status.
integer function coidef_solution(cntvect, coi_solution)
define callback routine for returning the final solution values.
integer function coidef_optfile(cntvect, optfile)
define callback routine for defining an options file.
integer function coidef_license(cntvect, licint1, licint2, licint3, licstring)
define the License Information.
integer function coidef_numvar(cntvect, numvar)
defines the number of variables in the model.
integer function coidef_numnz(cntvect, numnz)
defines the number of nonzero elements in the Jacobian.
integer function coidef_optdir(cntvect, optdir)
defines the Optimization Direction.
integer function coidef_numnlnz(cntvect, numnlnz)
defines the Number of Nonlinear Nonzeros.
integer function coidef_numcon(cntvect, numcon)
defines the number of constraints in the model.
integer function coidef_objvar(cntvect, objvar)
defines the Objective Variable.
integer function coidef_size()
returns the size the Control Vector must have, measured in standard Integer units.
integer function coidef_inifort(cntvect)
initialisation method for Fortran applications.
integer function coi_solve(cntvect)
method for starting the solving process of CONOPT.
subroutine flog(msg, code)
integer function pen01_readmatrix(lower, curr, upper, vsta, type, rhs, esta, colsta, rowno, value, nlflag, n, m, nz, usrmem)
Define information about the model.
program pen01
Main program. A simple setup and call of CONOPT.