Model version 0 ************************************************************************ ! Lingo model Ex3; ! Peter Lohmander 171110; model: ! Initial conditions; V0 = 300; PA0 = 20; ! Other parameters; PA1 = 20; c = 50; PB1 = 0; PB2 = 0; r = 0.03; r2 = 0.03; a = 0.05; K = 400; Prof1 = PA0*(V0 - V1)- c; Prof2 = (PA1*(V2 - V1)-c)/(@exp(r*t)-1); Prof3 = PB1*V0*1/r2; Prof4 = (V2-V1)/t*(PB2*1/r2+PB1*1/(r2*r2)); Prof = Prof1 + Prof2 + Prof3 + Prof4; @free(Prof1); @free(Prof2); @free(Prof3); @free(Prof4); @free(Prof); t>5; t<50; V1>20; V1 < V0; V2 = 1/(1/K+(1/V1-1/K)*@exp(-a*t)); max = Prof; end *********************************************************************************** Results from version 0 ********************** Local optimal solution found. Objective value: 6397.031 Infeasibilities: 0.000000 Total solver iterations: 38 Elapsed runtime seconds: 0.04 Model Class: NLP Total variables: 7 Nonlinear variables: 3 Integer variables: 0 Total constraints: 10 Nonlinear constraints: 2 Total nonzeros: 19 Nonlinear nonzeros: 5 Variable Value Reduced Cost V0 300.0000 0.000000 PA0 20.00000 0.000000 PA1 20.00000 0.000000 C 50.00000 0.000000 PB1 0.000000 0.000000 PB2 0.000000 0.000000 R 0.3000000E-01 0.000000 R2 0.3000000E-01 0.000000 A 0.5000000E-01 0.000000 K 400.0000 0.000000 PROF1 4993.625 0.000000 V1 47.81876 0.000000 PROF2 1403.406 0.000000 V2 120.4430 0.000000 T 23.09396 0.000000 PROF3 0.000000 0.000000 PROF4 0.000000 0.000000 PROF 6397.031 0.000000 ************************************************************************************** PROF* V1* t* V2* M0 6397 47.8 23.1 120.4 M1 (r=r2=0.02) 7577 82.8 19.2 162.2 M2 13598 97.7 17.7 175.9 (PB1=0.5) M3 36480 144.4 11.6 201.0 (PB1=2) M4 7645 82.6 19.6 163.7 (PB2=10) **************************************************************************************