Lotka Volterra fishing problem (AMPL)
Appearance
AMPL
The model in AMPL code for a fixed control discretization grid with a collocation method. We need a model file lotka_ampl.mod,
# ----------------------------------------------------------------
# Lotka Volterra fishing problem with collocation (explicit Euler)
# (c) Sebastian Sager
# ----------------------------------------------------------------
param T > 0;
param nt > 0;
param nu > 0;
param ntperu > 0;
param c1 > 0;
param c2 > 0;
param ref1 > 0;
param ref2 > 0;
param dt := T / (nt-1);
set I:= 0..nt;
set U:= 0..nu-1;
param uidx {I};
var x {I, 1..2} >= 0;
var w {U} >= 0, <= 1 binary;
minimize Deviation:
0.5 * dt * ( (x[0,1] - ref1)*(x[0,1] - ref1) + (x[0,2] - ref2)*(x[0,2] - ref2) )
+ 0.5 * dt * ( (x[nt,1] - ref1)*(x[nt,1] - ref1) + (x[nt,2] - ref2)*(x[nt,2] - ref2) )
+ dt * sum {i in I diff {0,nt} } ( (x[i,1] - ref1)*(x[i,1] - ref1)
+ (x[i,2] - ref2)*(x[i,2] - ref2) ) ;
subj to ODE_DISC_1 {i in I diff {0}}:
x[i,1] = x[i-1,1] + dt * ( x[i-1,1] - x[i-1,1]*x[i-1,2] - x[i-1,1]*c1*w[uidx[i-1]] );
subj to ODE_DISC_2 {i in I diff {0}}:
x[i,2] = x[i-1,2] + dt * ( - x[i-1,2] + x[i-1,1]*x[i-1,2] - x[i-1,2]*c2*w[uidx[i-1]] );
a data file lotka_ampl.dat,
# ------------------------------------
# Data: Lotka Volterra fishing problem
# ------------------------------------
# Algorithmic parameters
param ntperu := 1;
param nu := 100;
param nt := 100;
# Problem parameters
param T := 12.0;
param c1 := 0.4;
param c2 := 0.2;
param ref1 := 1.0;
param ref2 := 1.0;
# Initial values differential states
let x[0,1] := 0.5;
let x[0,2] := 0.7;
fix x[0,1];
fix x[0,2];
# Initial values control
let {i in U} w[i] := 0.0;
param mysum;
# Set indices of controls corresponding to time points
for {i in 0..nu-1} {
for {j in 0..ntperu-1} {
let uidx[i*ntperu+j] := i;
}
}
let uidx[nt] := nu-1;
and a running script lotka_ampl.run,
# ----------------------------------------------------
# Solve Lotka Volterra fishing problem via collocation
# ----------------------------------------------------
model ampl_lotka.mod;
data ampl_lotka.dat;
option solver bonmin;
solve;
Preliminary Results
Default values for all the options are used in all the solvers under NEOS Server environment using AMPL.
The preliminary results are as follows:
- MINLP : Infeasible problem
- FilMINT : Error in MINTO
- Bonmin : (options = B-BB, B-OA, B-QG and B-Hyb) Infeasible problem
- KNITRO : problem solved with objective value 1.5847 when using Branch and Bound; the solution can be obtained around 15 seconds (CPU time) by some branching strategies without parallel features
The preliminary results are tested by Henry Kar Ming Chan