#code for Tahvonen, Voss, Quaas, and Schmidt (2012) Optimal harvesting of an age-structured schooling fishery. #Environmental and resource economics. param T; #time horizon (years) param n; #number of age classes param r; #annual interest rate param w {s in 1..n}; #weight; unit kg per individual in age class param g {s in 1..n}; #maturity param q {s in 1..n}; #catchability coefficents param a {s in 1..n}; #survivability param x0 {s in 1..n}; #initial state, number of individuals; unit 10^9 var H {t in 0..T-1} >=0; #total harvest; unit 10^3 tonns var x {s in 1..n,t in 0..T} >= 0; #number of individuals; unit 10^9 var B {t in 0..T-1}=sum{s in 1..n} w[s]*x[s,t]*1000; #biomass; unit 10^3 tons var Xo{t in 0..T-1}=sum{s in 1..n} w[s]*g[s]*x[s,t]*1000; #spawning stock; unit 10^3 tonns var G {s in 1..n-1, t in 0..T}; #transformation function; unit number of individuals in 10^9 per 10^6 tons var y {s in 1..n,t in 0..T-1}=w[s]*x[s,t]*1000; #biomass per age class; unit 10^3 tonns maximize objective_function: sum{t in 0..T-1} (1/(1+r))^t*(0.15*H[t]-0.07*H[t]^1.1); subject to constraint1 {t in 0..T-1}: x[1,t+1]=(0.1042*Xo[t]/(0.5032+Xo[t]/1000)); subject to constraint2 {t in 0..T, s in 1..n-2}: G[s,t]=a[s]*q[s]*x[s,t]/(sum{i in 1..n} w[i]*q[i]*x[i,t]); subject to constraint2b {t in 0..T}: G[n-1,t]=(a[n-1]*q[n-1]*x[n-1,t]+a[n]*q[n]*x[n,t])/(sum{i in 1..n} w[i]*q[i]*x[i,t]); subject to constraint3 {s in 1..n-2, t in 0..T-1}: x[s+1,t+1]=a[s]*x[s,t]-H[t]*G[s,t]/1000; subject to constraint4 {t in 0..T-1}: x[n,t+1]=a[n-1]*x[n-1,t]+a[n]*x[n,t]-H[t]*G[n-1,t]/1000; subject to initial_condition {s in 1..n}: x[s,0] = x0[s];