11 Integer :: stacalls = 0
12 Integer :: solcalls = 0
29 call flog(
"Starting to execute", 0 )
33 open(10,file=trim(
progname) //
'.lst',status=
'Unknown')
34 open(11,file=trim(
progname) //
'.sta',status=
'Unknown')
41 Subroutine flog( Msg, Code )
43 character(len=*),
Intent(IN) :: Msg
44 Integer,
Intent(IN) :: Code
46 open(15,file=trim(
progname) //
'.rc',action=
'write',form=
'formatted',status=
'unknown')
47 write(15,
"(A,': ',A)") trim(
progname), msg
67Integer Function std_status( MODSTA, SOLSTA, ITER, OBJVAL, USRMEM )
76 INTEGER,
Intent(IN) :: modsta, solsta, iter
77 real*8,
Intent(IN) :: objval
78 real*8,
Intent(IN OUT) :: usrmem(*)
81 WRITE(*,*)
'CONOPT has finished optimizing.'
82 WRITE(*,*)
'Model status =',modsta
83 WRITE(*,*)
'Solver status =',solsta
84 WRITE(*,*)
'Iteration count=',iter
85 WRITE(*,*)
'Objective value=',objval
88 WRITE(10,*)
'CONOPT has finished optimizing.'
89 WRITE(10,*)
'Model status =',modsta
90 WRITE(10,*)
'Solver status =',solsta
91 WRITE(10,*)
'Iteration count=',iter
92 WRITE(10,*)
'Objective value=',objval
95 WRITE(11,*)
'Model status =',modsta
96 WRITE(11,*)
'Solver status =',solsta
97 WRITE(11,*)
'Objective value=',objval
103 stacalls = stacalls + 1
113Integer Function std_solution( XVAL, XMAR, XBAS, XSTA, YVAL, YMAR, YBAS, YSTA, N, M, USRMEM )
123 INTEGER,
Intent(IN) :: n, m
124 INTEGER,
Intent(IN),
Dimension(N) :: xbas, xsta
125 INTEGER,
Intent(IN),
Dimension(M) :: ybas, ysta
126 real*8,
Intent(IN),
Dimension(N) :: xval, xmar
127 real*8,
Intent(IN),
Dimension(M) :: yval, ymar
128 real*8,
Intent(IN OUT) :: usrmem(*)
131 CHARACTER*5,
Parameter,
Dimension(4) :: basc = (/
'Lower',
'Upper',
'Basic',
'Super' /)
132 CHARACTER*6,
Parameter,
Dimension(4) :: stat = (/
'Normal',
'NonOpt',
'Infeas',
'Unbnd ' /)
134 WRITE(10,
"(/' Variable Solution value Reduced cost Var-Basc Var-stat')")
136 WRITE(10,
"(1P,I7,E20.6,E16.6,4X,A5,7X,A6 )") i, xval(i), xmar(i), basc(1+xbas(i)), stat(1+xsta(i))
139 WRITE(10,
"(/' Constrnt Activity level Marginal cost Con-Basc Con-stat')")
141 WRITE(10,
"(1P,I7,E20.6,E16.6,4X,A5,7X,A6 )") i, yval(i), ymar(i), basc(1+ybas(i)), stat(1+ysta(i))
147 solcalls = solcalls + 1
152Integer Function std_message( SMSG, DMSG, NMSG, LLEN, USRMEM, MSGV )
164 INTEGER,
Intent(IN) :: smsg, dmsg, nmsg
165 INTEGER,
Intent(IN) ,
Dimension(*) :: llen
166 CHARACTER(len=133),
Intent(IN),
Dimension(*) :: msgv
167 real*8,
Intent(IN OUT) :: usrmem(*)
174 write(*,
"(A)") msgv(i)(1:llen(i))
180 write(11,
"(A)") msgv(i)(1:llen(i))
186 write(10,
"(A)") msgv(i)(1:llen(i))
197Integer Function std_errmsg( ROWNO, COLNO, POSNO, MSGLEN, USRMEM, MSG )
210 INTEGER,
Intent(IN) :: rowno, colno, posno, msglen
211 CHARACTER(Len=*),
Intent(IN) :: msg
212 real*8,
Intent(IN OUT) :: usrmem(*)
218 IF ( rowno .EQ. 0 )
THEN
219 WRITE(10,1001) colno, msg(1:msglen)
220 WRITE(11,1001) colno, msg(1:msglen)
221 ELSEIF ( colno .EQ. 0 )
THEN
222 WRITE(10,1002) rowno, msg(1:msglen)
223 WRITE(11,1002) rowno, msg(1:msglen)
225 WRITE(10,1000) colno, rowno, msg(1:msglen)
226 WRITE(11,1000) colno, rowno, msg(1:msglen)
2321001
FORMAT(
'Variable',i8,
' : ',a)
2331002
FORMAT(
'Equation',i8,
' : ',a)
2341000
FORMAT(
'Variable',i8,
' appearing in Equation',i8,
' : ',a)
240Integer Function std_triord( Mode, Type, Status, Irow, Icol, Inf, Value, Resid, Usrmem )
248 INTEGER,
INTENT(IN) :: mode,
Type, status, irow, icol, inf
249 real*8,
INTENT(IN) ::
VALUE, resid
250 real*8,
Intent(IN OUT) :: usrmem(*)
252 Integer,
Parameter :: pretriangular = 1, &
270 pretriainfeasb = 11, &
272 pretriainfeasp = 12, &
274 forcinginfeas = 13, &
279 If ( mode == -1 )
THEN
280 write(10,
"(/'The preprocessing transformation are described below in detection order:'/)")
281 Else if ( mode == -2 )
Then
282 write(10,
"(//'The order of the critical transformations is:'/)")
287 WRITE(10,
"('Equation',i7,' solved with respect to variable',i7,'. Value=',1p,e18.10)") irow, icol,
value
288 Elseif ( inf == 1 )
Then
289 WRITE(10,
"('Equation',i7,' solved with respect to variable',i7,'. Value=',9x,'+Infinity')") irow, icol
291 WRITE(10,
"('Equation',i7,' solved with respect to variable',i7,'. Value=',9x,'-Infinity')") irow, icol
294 WRITE(10,
"('Variable',i7,' fixed at value=',1p,e18.10)") icol,
value
296 WRITE(10,
"('Equation',i7,' is dependent (all variables are fixed.)')") irow
298 WRITE(10,
"('Equation',i7,' is redundant (will later be solved with respect to the slack.)')") irow
300 WRITE(10,
"('Equation',i7,' turned into lower bound on variable',i7,'. Bound=',1p,e18.10)") irow, icol,
value
302 WRITE(10,
"('Equation',i7,' turned into upper bound on variable',i7,'. Bound=',1p,e18.10)") irow, icol,
value
304 WRITE(10,
"('Variable',i7,' forced to lower bound=',1p,e18.10)") icol,
value
306 WRITE(10,
"('Variable',i7,' forced to upper bound=',1p,e18.10)") icol,
value
308 WRITE(10,
"('Previous variables were forced by equation',i7,' binding as a less than or equal constraint.')") irow
310 WRITE(10,
"('Previous variables were forced by equation',i7,' binding as a greater than or equal constraint.')") irow
311 Case (pretriainfeasb)
312 WRITE(10,
"('Equation',i7,' cannot be solved with respect to variable',i7,' due to bounds. Value=',1p,e18.10)") &
314 Case (pretriainfeasp)
316 "('Equation',i7,' cannot be solved with respect to variable',i7,'. Infeasibility has local minimum at',1p,e18.10)") &
319 WRITE(10,
"('Equation',i7,' is still infeasible after the above variables have been moved to the best bounds.')") irow
320 Case (inconsistentrow)
321 WRITE(10,
"('Equation',i7,' cannot be solved. No free variables left.')") irow
323 WRITE(10,
"('Pretriangular action=',i7,' not implemented yet.')")
type
326 If ( resid /= 0.d0 )
write(10,
"('Residual after last transformation=',1p,e18.10)") resid
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_triord(mode, type, status, irow, icol, inf, value, resid, usrmem)
integer function std_errmsg(rowno, colno, posno, msglen, usrmem, msg)
subroutine flog(msg, code)
character(len=128) progname