https://mintoc.de/api.php?action=feedcontributions&user=Ckirches&feedformat=atommintOC - User contributions [en]2024-03-29T06:53:18ZUser contributionsMediaWiki 1.25.2https://mintoc.de/index.php?title=Continuously_Stirred_Tank_Reactor_(TACO)&diff=694Continuously Stirred Tank Reactor (TACO)2011-10-04T15:07:52Z<p>Ckirches: </p>
<hr />
<div>This page contains a model of the [[Continuously Stirred Tank Reactor problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model can e.g. be found in <bibref>Diehl2001</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file cstr_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Continuously stirred tank reactor using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: M. Diehl, 2001<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
# time and fixed end time [in s]<br />
var t;<br />
var tf := 1500.0, >= 1500, <= 1500;<br />
<br />
# molar concentration of species A [mol/l]<br />
var cA := 2.14, >= -0.02, <= 6.0;<br />
<br />
# molar concentration of species B [mol/l]<br />
var cB := 1.09, >= -0.02, <= 4.0;<br />
<br />
# reactor temperature [degrees Celsius]<br />
var Tr := 114.2, >= 50.0, <= 160.0;<br />
<br />
# jacket temperature [degrees Celsius]<br />
var Tj := 112.9, >= 50.0, <= 160.0;<br />
<br />
# feed flow control [1/h]<br />
var ff := 14.19, >= 3.0, <= 35.0;<br />
let ff.type := "u0";<br />
<br />
# cooling rate control [kJ/h]<br />
var cr := -1113.5, >= -9000.0, <= 0.0;<br />
let cr.type := "u0";<br />
<br />
# pre-set deviation of initial state from steady state<br />
# set this to something different from 1.0 <br />
param alpha := 0.8;<br />
<br />
# various chemistry parameters<br />
param k10 := 1.287E+12;<br />
param k20 := 1.287E+12;<br />
param k30 := 9.043E+09;<br />
param cA0 := 5.1;<br />
param E1 := -9758.3;<br />
param E2 := -9758.3;<br />
param E3 := -8560.0;<br />
param theta0 := 104.9;<br />
param rho := 0.9342;<br />
param Cp := 3.01;<br />
param H1 := 4.2;<br />
param H2 := -11.0;<br />
param H3 := -41.85;<br />
param kw := 4032.0;<br />
param AR := 0.215;<br />
param VR := 10.0;<br />
param mK := 5.0;<br />
param CPK := 2.0;<br />
<br />
# steady state values<br />
param cAs := 2.14021053017;<br />
param cBs := 1.09030436131;<br />
param theta_s := 1.14191084421E+02;<br />
param theta_Ks := 1.12906592910E+02;<br />
param FFs := 14.19;<br />
param Qdot_Ks := -1113.5;<br />
<br />
# objective weights<br />
param Q11 := sqrt (0.2);<br />
param Q22 := sqrt (1.0);<br />
param Q33 := sqrt (0.5);<br />
param Q44 := sqrt (0.2);<br />
param R11 := sqrt (0.5);<br />
param R22 := sqrt (5.0E-7);<br />
<br />
# least-squares deviation from steady-state<br />
minimize Deviation: <br />
integral ( ((cA - cAs)*Q11)^2<br />
+ ((cB - cBs)*Q22)^2<br />
+ ((Tr - theta_s)*Q33)^2<br />
+ ((Tj - theta_Ks)*Q44)^2<br />
+ ((ff - FFs)*R11)^2<br />
+ ((cr - Qdot_Ks)*R22)^2, tf );<br />
let Deviation.scale := 100.0;<br />
<br />
var k1 = (k10*exp(E1/(273.15+Tr)));<br />
var k2 = (k20*exp(E2/(273.15+Tr)));<br />
var k3 = (k30*exp(E3/(273.15+Tr)));<br />
<br />
# dynamics<br />
subject to <br />
<br />
ODE_cA: diff(cA,t) = (1.0/3600.0) * (ff*(cA0 - cA) - k1*cA - k3*cA^2);<br />
<br />
ODE_cB: diff(cB,t) = (1.0/3600.0) * (- ff*cB + k1*cA - k2*cB);<br />
<br />
ODE_Tr: diff(Tr,t) = (1.0/3600.0) * ( ff * (theta0 - Tr) <br />
- 1.0/(rho*Cp) * (k1*cA*H1 + k2*cB*H2 + k3*cA^2*H3)<br />
+ kw*AR / (rho*Cp*VR) * (Tj - Tr) ); <br />
ODE_Tj: diff(Tj,t) = (1.0/3600.0) * ( 1.0/(mK*CPK) * (cr + kw*AR * (Tr - Tj)) );<br />
<br />
# initial value constraint<br />
IVC_cA: eval(cA,0) = (1-alpha)*cAs;<br />
let IVC_cA.type := "dpc";<br />
<br />
IVC_cB: eval(cB,0) = (1-alpha)*cBs;<br />
let IVC_cB.type := "dpc";<br />
<br />
IVC_Tr: eval(Tr,0) = alpha*85.0 + (1-alpha)*theta_s;<br />
let IVC_Tr.type := "dpc";<br />
<br />
IVC_Tj: eval(Tj,0) = alpha*85.0 + (1-alpha)*theta_Ks;<br />
let IVC_Tj.type := "dpc";<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Continuously Stirred Tank Reactor problem]]<br />
<br />
== References ==<br />
<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Batch_distillation_problem_(TACO)&diff=691Batch distillation problem (TACO)2011-10-03T20:29:03Z<p>Ckirches: </p>
<hr />
<div>This page contains a model of the [[Batch distillation problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model can be found in <bibref>Diehl2006c</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file batchdist_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Batch distillation problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: M.Diehl/H.G.Bock/E.Kostina'06<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
# time and free end-time<br />
<br />
var t;<br />
var tf := 2.5, >= 0.5, <= 10.0;<br />
<br />
# constant parameters<br />
<br />
param Pur := 0.99; # percent<br />
param V := 100.0; # mol/h<br />
param m := 0.1; # mol<br />
param mC := 0.1; # mol<br />
<br />
# control<br />
<br />
var R := 8.0, >= 0.0, <= 15.0;<br />
let R.type := "u1";<br />
let R.scale := 0.1;<br />
<br />
# differential states<br />
<br />
param NDIS := 5; # PDE discretization points<br />
<br />
var M0;<br />
var x{0..NDIS+1};<br />
var MD;<br />
var xD;<br />
var alpha;<br />
<br />
<br />
# algebraic expressions eliminated by AMPL's presolve<br />
<br />
var L = R/(1+R)*V;<br />
var y{i in 0..NDIS} = (1+alpha)*x[i]/(alpha+x[i]);<br />
<br />
var dot0 = ( L*x[1] - V*y[0] + (V-L)*x[0] ) / M0;<br />
var dot{i in 1..NDIS} = ( L*x[i+1] - V*y[i] + V*y[i-1] - L*x[i] )/m;<br />
var dotNDISp1 = V/mC * (-x[NDIS+1] + y[NDIS]);<br />
<br />
<br />
# objective function<br />
<br />
minimize Compromise:<br />
eval (t - MD, tf);<br />
<br />
<br />
# terminal constraint<br />
<br />
subject to Purity_Constraint:<br />
eval(xD, tf) >= Pur;<br />
<br />
<br />
# ODE system<br />
<br />
subject to ODE_M0:<br />
diff(M0, t) = -V+L;<br />
<br />
subject to ODE_x_0:<br />
diff(x[0], t) = dot0;<br />
<br />
subject to ODE_x{i in 1..NDIS}:<br />
diff(x[i], t) = dot[i];<br />
<br />
subject to ODE_x_NDISp1:<br />
diff(x[NDIS+1], t) = dotNDISp1;<br />
<br />
subject to ODE_MD:<br />
diff(MD, t) = V-L;<br />
<br />
subject to ODE_xD:<br />
diff(xD, t) = (V-L) * (x[NDIS] - xD)/MD;<br />
<br />
subject to ODE_alpha:<br />
diff(alpha, t) = 0.0;<br />
<br />
<br />
# Initial value constraints<br />
<br />
subject to IVC_M0:<br />
eval(M0, 0) = 100.0;<br />
<br />
subject to IVC_x_0:<br />
eval(x[0], 0) = 0.5;<br />
<br />
subject to IVC_x{i in 1..NDIS+1}:<br />
eval(x[i], 0) = 1;<br />
<br />
subject to IVC_MD:<br />
eval(MD, 0) = 0.1;<br />
<br />
subject to IVC_xD:<br />
eval(xD, 0) = 1;<br />
<br />
subject to IVC_alpha:<br />
eval(alpha, 0) = 0.2;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Batch distillation problem]]<br />
<br />
== References ==<br />
<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Batch_distillation_problem_(TACO)&diff=690Batch distillation problem (TACO)2011-10-03T20:27:51Z<p>Ckirches: fixed a reference</p>
<hr />
<div>This page contains a model of the [[Batch distillation problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model can be found in <bibref>Diehl2006cf</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file batchdist_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Batch distillation problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: M.Diehl/H.G.Bock/E.Kostina'06<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
# time and free end-time<br />
<br />
var t;<br />
var tf := 2.5, >= 0.5, <= 10.0;<br />
<br />
# constant parameters<br />
<br />
param Pur := 0.99; # percent<br />
param V := 100.0; # mol/h<br />
param m := 0.1; # mol<br />
param mC := 0.1; # mol<br />
<br />
# control<br />
<br />
var R := 8.0, >= 0.0, <= 15.0;<br />
let R.type := "u1";<br />
let R.scale := 0.1;<br />
<br />
# differential states<br />
<br />
param NDIS := 5; # PDE discretization points<br />
<br />
var M0;<br />
var x{0..NDIS+1};<br />
var MD;<br />
var xD;<br />
var alpha;<br />
<br />
<br />
# algebraic expressions eliminated by AMPL's presolve<br />
<br />
var L = R/(1+R)*V;<br />
var y{i in 0..NDIS} = (1+alpha)*x[i]/(alpha+x[i]);<br />
<br />
var dot0 = ( L*x[1] - V*y[0] + (V-L)*x[0] ) / M0;<br />
var dot{i in 1..NDIS} = ( L*x[i+1] - V*y[i] + V*y[i-1] - L*x[i] )/m;<br />
var dotNDISp1 = V/mC * (-x[NDIS+1] + y[NDIS]);<br />
<br />
<br />
# objective function<br />
<br />
minimize Compromise:<br />
eval (t - MD, tf);<br />
<br />
<br />
# terminal constraint<br />
<br />
subject to Purity_Constraint:<br />
eval(xD, tf) >= Pur;<br />
<br />
<br />
# ODE system<br />
<br />
subject to ODE_M0:<br />
diff(M0, t) = -V+L;<br />
<br />
subject to ODE_x_0:<br />
diff(x[0], t) = dot0;<br />
<br />
subject to ODE_x{i in 1..NDIS}:<br />
diff(x[i], t) = dot[i];<br />
<br />
subject to ODE_x_NDISp1:<br />
diff(x[NDIS+1], t) = dotNDISp1;<br />
<br />
subject to ODE_MD:<br />
diff(MD, t) = V-L;<br />
<br />
subject to ODE_xD:<br />
diff(xD, t) = (V-L) * (x[NDIS] - xD)/MD;<br />
<br />
subject to ODE_alpha:<br />
diff(alpha, t) = 0.0;<br />
<br />
<br />
# Initial value constraints<br />
<br />
subject to IVC_M0:<br />
eval(M0, 0) = 100.0;<br />
<br />
subject to IVC_x_0:<br />
eval(x[0], 0) = 0.5;<br />
<br />
subject to IVC_x{i in 1..NDIS+1}:<br />
eval(x[i], 0) = 1;<br />
<br />
subject to IVC_MD:<br />
eval(MD, 0) = 0.1;<br />
<br />
subject to IVC_xD:<br />
eval(xD, 0) = 1;<br />
<br />
subject to IVC_alpha:<br />
eval(alpha, 0) = 0.2;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Batch distillation problem]]<br />
<br />
== References ==<br />
<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Batch_distillation_problem_(TACO)&diff=689Batch distillation problem (TACO)2011-10-03T20:21:50Z<p>Ckirches: Batch distillation problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Batch distillation problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model can be found in <bibref>Diehl2006b</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file batchdist_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Batch distillation problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: M.Diehl/H.G.Bock/E.Kostina'06<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
# time and free end-time<br />
<br />
var t;<br />
var tf := 2.5, >= 0.5, <= 10.0;<br />
<br />
# constant parameters<br />
<br />
param Pur := 0.99; # percent<br />
param V := 100.0; # mol/h<br />
param m := 0.1; # mol<br />
param mC := 0.1; # mol<br />
<br />
# control<br />
<br />
var R := 8.0, >= 0.0, <= 15.0;<br />
let R.type := "u1";<br />
let R.scale := 0.1;<br />
<br />
# differential states<br />
<br />
param NDIS := 5; # PDE discretization points<br />
<br />
var M0;<br />
var x{0..NDIS+1};<br />
var MD;<br />
var xD;<br />
var alpha;<br />
<br />
<br />
# algebraic expressions eliminated by AMPL's presolve<br />
<br />
var L = R/(1+R)*V;<br />
var y{i in 0..NDIS} = (1+alpha)*x[i]/(alpha+x[i]);<br />
<br />
var dot0 = ( L*x[1] - V*y[0] + (V-L)*x[0] ) / M0;<br />
var dot{i in 1..NDIS} = ( L*x[i+1] - V*y[i] + V*y[i-1] - L*x[i] )/m;<br />
var dotNDISp1 = V/mC * (-x[NDIS+1] + y[NDIS]);<br />
<br />
<br />
# objective function<br />
<br />
minimize Compromise:<br />
eval (t - MD, tf);<br />
<br />
<br />
# terminal constraint<br />
<br />
subject to Purity_Constraint:<br />
eval(xD, tf) >= Pur;<br />
<br />
<br />
# ODE system<br />
<br />
subject to ODE_M0:<br />
diff(M0, t) = -V+L;<br />
<br />
subject to ODE_x_0:<br />
diff(x[0], t) = dot0;<br />
<br />
subject to ODE_x{i in 1..NDIS}:<br />
diff(x[i], t) = dot[i];<br />
<br />
subject to ODE_x_NDISp1:<br />
diff(x[NDIS+1], t) = dotNDISp1;<br />
<br />
subject to ODE_MD:<br />
diff(MD, t) = V-L;<br />
<br />
subject to ODE_xD:<br />
diff(xD, t) = (V-L) * (x[NDIS] - xD)/MD;<br />
<br />
subject to ODE_alpha:<br />
diff(alpha, t) = 0.0;<br />
<br />
<br />
# Initial value constraints<br />
<br />
subject to IVC_M0:<br />
eval(M0, 0) = 100.0;<br />
<br />
subject to IVC_x_0:<br />
eval(x[0], 0) = 0.5;<br />
<br />
subject to IVC_x{i in 1..NDIS+1}:<br />
eval(x[i], 0) = 1;<br />
<br />
subject to IVC_MD:<br />
eval(MD, 0) = 0.1;<br />
<br />
subject to IVC_xD:<br />
eval(xD, 0) = 1;<br />
<br />
subject to IVC_alpha:<br />
eval(alpha, 0) = 0.2;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Batch distillation problem]]<br />
<br />
== References ==<br />
<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Time_optimal_car_problem_(TACO)&diff=688Time optimal car problem (TACO)2011-10-03T17:46:20Z<p>Ckirches: typo</p>
<hr />
<div>This page contains a model of the [[Time optimal car problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The model can be found e.g. in<br />
<bibref>Cuthrell1987</bibref> and <bibref>Logsdon1992</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file tocar1_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Time optimal car problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: Cuthrell/Biegler'87, Logsdon/Biegler'92<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
var tf := 20, >= 5, <= 50;<br />
<br />
var s := 0, >= 0, <= 330;<br />
var v := 0, >= 0, <= 30;<br />
var gas := 0.0, >= -2.0, <= 1.0;<br />
let gas.type := "u0";<br />
<br />
var p := 0.05, >= 0, <= 0.1;<br />
<br />
minimize EndTime:<br />
eval(t,tf);<br />
let EndTime.scale := 10.0;<br />
<br />
subject to <br />
<br />
ODE_s: diff(s,t) = v;<br />
ODE_v: diff(v,t) = gas - p;<br />
<br />
IVC_s: eval(s,0) = 0;<br />
IVC_v: eval(v,0) = 0;<br />
<br />
TC_s: eval(s,tf) = 300.0;<br />
let TC_s.scale := 100.0;<br />
<br />
TC_v: eval(v,tf) = 0;<br />
let TC_v.scale := 10.0;<br />
<br />
let IVC_s.type := "dpc";<br />
let IVC_v.type := "dpc";<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Time optimal car problem]]<br />
<br />
[[Category:AMPL/TACO]]<br />
<br />
== References ==<br />
<br />
<bibreferences/></div>Ckircheshttps://mintoc.de/index.php?title=Time_optimal_car_problem_(TACO)&diff=687Time optimal car problem (TACO)2011-10-03T17:45:22Z<p>Ckirches: Time optimal car problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Time optimal car problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The model can be found e.g. in<br />
<bibref>Cuthrell1987<bibref> and <bibref>Logsdon1992</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file tocar1_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Time optimal car problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: Cuthrell/Biegler'87, Logsdon/Biegler'92<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
var tf := 20, >= 5, <= 50;<br />
<br />
var s := 0, >= 0, <= 330;<br />
var v := 0, >= 0, <= 30;<br />
var gas := 0.0, >= -2.0, <= 1.0;<br />
let gas.type := "u0";<br />
<br />
var p := 0.05, >= 0, <= 0.1;<br />
<br />
minimize EndTime:<br />
eval(t,tf);<br />
let EndTime.scale := 10.0;<br />
<br />
subject to <br />
<br />
ODE_s: diff(s,t) = v;<br />
ODE_v: diff(v,t) = gas - p;<br />
<br />
IVC_s: eval(s,0) = 0;<br />
IVC_v: eval(v,0) = 0;<br />
<br />
TC_s: eval(s,tf) = 300.0;<br />
let TC_s.scale := 100.0;<br />
<br />
TC_v: eval(v,tf) = 0;<br />
let TC_v.scale := 10.0;<br />
<br />
let IVC_s.type := "dpc";<br />
let IVC_v.type := "dpc";<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Time optimal car problem]]<br />
<br />
[[Category:AMPL/TACO]]<br />
<br />
== References ==<br />
<br />
<bibreferences/></div>Ckircheshttps://mintoc.de/index.php?title=Apollo_Reentry_Problem_(TACO)&diff=686Apollo Reentry Problem (TACO)2011-10-03T17:39:08Z<p>Ckirches: /* Other Descriptions */</p>
<hr />
<div>This page contains a model of the [[Apollo Reentry problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. Various results related to this model can be found in e.g. <br />
<bibref>Plitt1981</bibref>, <bibref>Stoer1992</bibref>, <bibref>Leineweber1995</bibref>, and <bibref>Potschka2008</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file reentry_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Apollo type vehicle reentry problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: Plitt'81, Stoer'92, Leineweber'95, Potschka'08<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var tf >= 220, <= 240, := 230;<br />
let tf.scale := 225.0;<br />
<br />
var t;<br />
<br />
var xd0 >= 0.2, <= 0.4, := 0.36;<br />
let xd0.interp_to := 0.27;<br />
let xd0.scale := 0.4;<br />
<br />
var xd1 >= -0.2, <= 0.1, := -0.1414;<br />
let xd1.interp_to := 0.0;<br />
let xd1.scale := 0.1;<br />
<br />
var xd2 >= 0.006, <= 0.03, := 0.01914;<br />
let xd2.interp_to := 0.01196;<br />
let xd2.scale := 0.02;<br />
<br />
var u := 0.5, >= -3.0, <= 2.0;<br />
let u.type := "u1";<br />
let u.scale := 1.0;<br />
let u.slope_min := -0.1;<br />
let u.slope_max := +0.1;<br />
<br />
var pi := 3.1415;<br />
var beta := 4.26;<br />
var g := 3.2172e-4;<br />
var r := 209.0;<br />
var sm := 53200.0;<br />
var rho0 := 2.704e-3;<br />
<br />
var exp_term = rho0 * exp(-beta * r * xd2);<br />
<br />
minimize Lagrangian:<br />
integral (10.0 * xd0^3 * sqrt(exp_term), tf);<br />
let Lagrangian.scale := 0.0275;<br />
<br />
subject to <br />
<br />
ODE0: diff(xd0,t) = - 0.5 * sm * exp_term * xd0^2 * (1.174 - 0.9*cos(u)) <br />
- g * sin(xd1) / (1.0 + xd2)^2;<br />
ODE1: diff(xd1,t) = 0.5 * sm * exp_term * xd0 * (0.6*sin(u)) <br />
+ xd0 * cos(xd1) / r / (1.0+xd2) <br />
- g * cos(xd1) / xd0 / (1.0+xd2)^2;<br />
ODE2: diff(xd2,t) = xd0 * sin(xd1) / r;<br />
<br />
SPC0: eval(xd0,0) = 0.36;<br />
let SPC0.scale := 0.4;<br />
let SPC0.type := "dpc";<br />
<br />
SPC1: eval(xd1,0) = -8.1*pi/180.0;<br />
let SPC1.scale := 0.2;<br />
let SPC1.type := "dpc";<br />
<br />
SPC2: eval(xd2,0) = 4.0/r;<br />
let SPC2.scale := 0.02;<br />
let SPC2.type := "dpc";<br />
<br />
EPC0: eval(xd0,tf) = 0.27;<br />
let EPC0.scale := 0.4;<br />
<br />
EPC1: eval(xd1,tf) = 0.0;<br />
let EPC1.scale := 0.2;<br />
<br />
EPC2: eval(xd2,tf) = 2.5/r;<br />
let EPC2.scale := 0.02;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Apollo reentry problem]]<br />
<br />
[[Category:AMPL/TACO]]<br />
<br />
== References ==<br />
<br />
<bibreferences/></div>Ckircheshttps://mintoc.de/index.php?title=Apollo_Reentry_Problem_(TACO)&diff=685Apollo Reentry Problem (TACO)2011-10-03T17:38:15Z<p>Ckirches: Apollo reentry problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Apollo Reentry problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. Various results related to this model can be found in e.g. <br />
<bibref>Plitt1981</bibref>, <bibref>Stoer1992</bibref>, <bibref>Leineweber1995</bibref>, and <bibref>Potschka2008</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file reentry_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Apollo type vehicle reentry problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: Plitt'81, Stoer'92, Leineweber'95, Potschka'08<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var tf >= 220, <= 240, := 230;<br />
let tf.scale := 225.0;<br />
<br />
var t;<br />
<br />
var xd0 >= 0.2, <= 0.4, := 0.36;<br />
let xd0.interp_to := 0.27;<br />
let xd0.scale := 0.4;<br />
<br />
var xd1 >= -0.2, <= 0.1, := -0.1414;<br />
let xd1.interp_to := 0.0;<br />
let xd1.scale := 0.1;<br />
<br />
var xd2 >= 0.006, <= 0.03, := 0.01914;<br />
let xd2.interp_to := 0.01196;<br />
let xd2.scale := 0.02;<br />
<br />
var u := 0.5, >= -3.0, <= 2.0;<br />
let u.type := "u1";<br />
let u.scale := 1.0;<br />
let u.slope_min := -0.1;<br />
let u.slope_max := +0.1;<br />
<br />
var pi := 3.1415;<br />
var beta := 4.26;<br />
var g := 3.2172e-4;<br />
var r := 209.0;<br />
var sm := 53200.0;<br />
var rho0 := 2.704e-3;<br />
<br />
var exp_term = rho0 * exp(-beta * r * xd2);<br />
<br />
minimize Lagrangian:<br />
integral (10.0 * xd0^3 * sqrt(exp_term), tf);<br />
let Lagrangian.scale := 0.0275;<br />
<br />
subject to <br />
<br />
ODE0: diff(xd0,t) = - 0.5 * sm * exp_term * xd0^2 * (1.174 - 0.9*cos(u)) <br />
- g * sin(xd1) / (1.0 + xd2)^2;<br />
ODE1: diff(xd1,t) = 0.5 * sm * exp_term * xd0 * (0.6*sin(u)) <br />
+ xd0 * cos(xd1) / r / (1.0+xd2) <br />
- g * cos(xd1) / xd0 / (1.0+xd2)^2;<br />
ODE2: diff(xd2,t) = xd0 * sin(xd1) / r;<br />
<br />
SPC0: eval(xd0,0) = 0.36;<br />
let SPC0.scale := 0.4;<br />
let SPC0.type := "dpc";<br />
<br />
SPC1: eval(xd1,0) = -8.1*pi/180.0;<br />
let SPC1.scale := 0.2;<br />
let SPC1.type := "dpc";<br />
<br />
SPC2: eval(xd2,0) = 4.0/r;<br />
let SPC2.scale := 0.02;<br />
let SPC2.type := "dpc";<br />
<br />
EPC0: eval(xd0,tf) = 0.27;<br />
let EPC0.scale := 0.4;<br />
<br />
EPC1: eval(xd1,tf) = 0.0;<br />
let EPC1.scale := 0.2;<br />
<br />
EPC2: eval(xd2,tf) = 2.5/r;<br />
let EPC2.scale := 0.02;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Apollo reentry problem]]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Toy_NMPC_problem_(TACO)&diff=684Toy NMPC problem (TACO)2011-10-03T17:31:28Z<p>Ckirches: /* Other Descriptions */</p>
<hr />
<div>This page contains a model of a small [[Toy NMPC problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. Here, it is used for off-line optimal control only. This problem can be found in the thesis <bibref>Diehl2001</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file toy_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Toy NMPC problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: M. Diehl, 2001<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var tf := 3, >= 2, <= 3;<br />
var t;<br />
<br />
var x := -0.5;<br />
<br />
var u >= -1.0, <= 1.0, := 0.0;<br />
let u.type := "u0";<br />
<br />
var p := 1.0;<br />
<br />
minimize LagrangeObjective:<br />
integral (x^2 + u^2, tf);<br />
<br />
subject to <br />
<br />
ODE: diff(x,t) = (x + p) * x + u;<br />
SPC: eval(x,0) = -0.5;<br />
EPC: eval(x,tf) = 0.0;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Toy NMPC problem]]<br />
<br />
== References ==<br />
<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Toy_NMPC_problem_(TACO)&diff=683Toy NMPC problem (TACO)2011-10-03T17:28:40Z<p>Ckirches: Toy NMPC problem (TACO)</p>
<hr />
<div>This page contains a model of a small [[Toy NMPC problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. Here, it is used for off-line optimal control only. This problem can be found in the thesis <bibref>Diehl2001</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file toy_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Toy NMPC problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: M. Diehl, 2001<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var tf := 3, >= 2, <= 3;<br />
var t;<br />
<br />
var x := -0.5;<br />
<br />
var u >= -1.0, <= 1.0, := 0.0;<br />
let u.type := "u0";<br />
<br />
var p := 1.0;<br />
<br />
minimize LagrangeObjective:<br />
integral (x^2 + u^2, tf);<br />
<br />
subject to <br />
<br />
ODE: diff(x,t) = (x + p) * x + u;<br />
SPC: eval(x,0) = -0.5;<br />
EPC: eval(x,tf) = 0.0;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Toy NMPC problem]]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Continuously_Stirred_Tank_Reactor_(TACO)&diff=682Continuously Stirred Tank Reactor (TACO)2011-10-03T17:25:30Z<p>Ckirches: /* AMPL */</p>
<hr />
<div>This page contains a model of the [[Continuously Stirred Tank Reactor problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model can e.g. be found in <bibref>Diehl2001</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file cstr_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Goddart's rocket problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: M. Diehl, 2001<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
# time and fixed end time [in s]<br />
var t;<br />
var tf := 1500.0, >= 1500, <= 1500;<br />
<br />
# molar concentration of species A [mol/l]<br />
var cA := 2.14, >= -0.02, <= 6.0;<br />
<br />
# molar concentration of species B [mol/l]<br />
var cB := 1.09, >= -0.02, <= 4.0;<br />
<br />
# reactor temperature [degrees Celsius]<br />
var Tr := 114.2, >= 50.0, <= 160.0;<br />
<br />
# jacket temperature [degrees Celsius]<br />
var Tj := 112.9, >= 50.0, <= 160.0;<br />
<br />
# feed flow control [1/h]<br />
var ff := 14.19, >= 3.0, <= 35.0;<br />
let ff.type := "u0";<br />
<br />
# cooling rate control [kJ/h]<br />
var cr := -1113.5, >= -9000.0, <= 0.0;<br />
let cr.type := "u0";<br />
<br />
# pre-set deviation of initial state from steady state<br />
# set this to something different from 1.0 <br />
param alpha := 0.8;<br />
<br />
# various chemistry parameters<br />
param k10 := 1.287E+12;<br />
param k20 := 1.287E+12;<br />
param k30 := 9.043E+09;<br />
param cA0 := 5.1;<br />
param E1 := -9758.3;<br />
param E2 := -9758.3;<br />
param E3 := -8560.0;<br />
param theta0 := 104.9;<br />
param rho := 0.9342;<br />
param Cp := 3.01;<br />
param H1 := 4.2;<br />
param H2 := -11.0;<br />
param H3 := -41.85;<br />
param kw := 4032.0;<br />
param AR := 0.215;<br />
param VR := 10.0;<br />
param mK := 5.0;<br />
param CPK := 2.0;<br />
<br />
# steady state values<br />
param cAs := 2.14021053017;<br />
param cBs := 1.09030436131;<br />
param theta_s := 1.14191084421E+02;<br />
param theta_Ks := 1.12906592910E+02;<br />
param FFs := 14.19;<br />
param Qdot_Ks := -1113.5;<br />
<br />
# objective weights<br />
param Q11 := sqrt (0.2);<br />
param Q22 := sqrt (1.0);<br />
param Q33 := sqrt (0.5);<br />
param Q44 := sqrt (0.2);<br />
param R11 := sqrt (0.5);<br />
param R22 := sqrt (5.0E-7);<br />
<br />
# least-squares deviation from steady-state<br />
minimize Deviation: <br />
integral ( ((cA - cAs)*Q11)^2<br />
+ ((cB - cBs)*Q22)^2<br />
+ ((Tr - theta_s)*Q33)^2<br />
+ ((Tj - theta_Ks)*Q44)^2<br />
+ ((ff - FFs)*R11)^2<br />
+ ((cr - Qdot_Ks)*R22)^2, tf );<br />
let Deviation.scale := 100.0;<br />
<br />
var k1 = (k10*exp(E1/(273.15+Tr)));<br />
var k2 = (k20*exp(E2/(273.15+Tr)));<br />
var k3 = (k30*exp(E3/(273.15+Tr)));<br />
<br />
# dynamics<br />
subject to <br />
<br />
ODE_cA: diff(cA,t) = (1.0/3600.0) * (ff*(cA0 - cA) - k1*cA - k3*cA^2);<br />
<br />
ODE_cB: diff(cB,t) = (1.0/3600.0) * (- ff*cB + k1*cA - k2*cB);<br />
<br />
ODE_Tr: diff(Tr,t) = (1.0/3600.0) * ( ff * (theta0 - Tr) <br />
- 1.0/(rho*Cp) * (k1*cA*H1 + k2*cB*H2 + k3*cA^2*H3)<br />
+ kw*AR / (rho*Cp*VR) * (Tj - Tr) ); <br />
ODE_Tj: diff(Tj,t) = (1.0/3600.0) * ( 1.0/(mK*CPK) * (cr + kw*AR * (Tr - Tj)) );<br />
<br />
# initial value constraint<br />
IVC_cA: eval(cA,0) = (1-alpha)*cAs;<br />
let IVC_cA.type := "dpc";<br />
<br />
IVC_cB: eval(cB,0) = (1-alpha)*cBs;<br />
let IVC_cB.type := "dpc";<br />
<br />
IVC_Tr: eval(Tr,0) = alpha*85.0 + (1-alpha)*theta_s;<br />
let IVC_Tr.type := "dpc";<br />
<br />
IVC_Tj: eval(Tj,0) = alpha*85.0 + (1-alpha)*theta_Ks;<br />
let IVC_Tj.type := "dpc";<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Continuously Stirred Tank Reactor problem]]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Continuously_Stirred_Tank_Reactor_(TACO)&diff=681Continuously Stirred Tank Reactor (TACO)2011-10-03T17:24:42Z<p>Ckirches: CSTR problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Continuously Stirred Tank Reactor problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model can e.g. be found in <bibref>Diehl2001</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file goddart_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Goddart's rocket problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: M. Diehl, 2001<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
include OptimalControl.mod;<br />
<br />
# time and fixed end time [in s]<br />
var t;<br />
var tf := 1500.0, >= 1500, <= 1500;<br />
<br />
# molar concentration of species A [mol/l]<br />
var cA := 2.14, >= -0.02, <= 6.0;<br />
<br />
# molar concentration of species B [mol/l]<br />
var cB := 1.09, >= -0.02, <= 4.0;<br />
<br />
# reactor temperature [degrees Celsius]<br />
var Tr := 114.2, >= 50.0, <= 160.0;<br />
<br />
# jacket temperature [degrees Celsius]<br />
var Tj := 112.9, >= 50.0, <= 160.0;<br />
<br />
# feed flow control [1/h]<br />
var ff := 14.19, >= 3.0, <= 35.0;<br />
let ff.type := "u0";<br />
<br />
# cooling rate control [kJ/h]<br />
var cr := -1113.5, >= -9000.0, <= 0.0;<br />
let cr.type := "u0";<br />
<br />
# pre-set deviation of initial state from steady state<br />
# set this to something different from 1.0 <br />
param alpha := 0.8;<br />
<br />
# various chemistry parameters<br />
param k10 := 1.287E+12;<br />
param k20 := 1.287E+12;<br />
param k30 := 9.043E+09;<br />
param cA0 := 5.1;<br />
param E1 := -9758.3;<br />
param E2 := -9758.3;<br />
param E3 := -8560.0;<br />
param theta0 := 104.9;<br />
param rho := 0.9342;<br />
param Cp := 3.01;<br />
param H1 := 4.2;<br />
param H2 := -11.0;<br />
param H3 := -41.85;<br />
param kw := 4032.0;<br />
param AR := 0.215;<br />
param VR := 10.0;<br />
param mK := 5.0;<br />
param CPK := 2.0;<br />
<br />
# steady state values<br />
param cAs := 2.14021053017;<br />
param cBs := 1.09030436131;<br />
param theta_s := 1.14191084421E+02;<br />
param theta_Ks := 1.12906592910E+02;<br />
param FFs := 14.19;<br />
param Qdot_Ks := -1113.5;<br />
<br />
# objective weights<br />
param Q11 := sqrt (0.2);<br />
param Q22 := sqrt (1.0);<br />
param Q33 := sqrt (0.5);<br />
param Q44 := sqrt (0.2);<br />
param R11 := sqrt (0.5);<br />
param R22 := sqrt (5.0E-7);<br />
<br />
# least-squares deviation from steady-state<br />
minimize Deviation: <br />
integral ( ((cA - cAs)*Q11)^2<br />
+ ((cB - cBs)*Q22)^2<br />
+ ((Tr - theta_s)*Q33)^2<br />
+ ((Tj - theta_Ks)*Q44)^2<br />
+ ((ff - FFs)*R11)^2<br />
+ ((cr - Qdot_Ks)*R22)^2, tf );<br />
let Deviation.scale := 100.0;<br />
<br />
var k1 = (k10*exp(E1/(273.15+Tr)));<br />
var k2 = (k20*exp(E2/(273.15+Tr)));<br />
var k3 = (k30*exp(E3/(273.15+Tr)));<br />
<br />
# dynamics<br />
subject to <br />
<br />
ODE_cA: diff(cA,t) = (1.0/3600.0) * (ff*(cA0 - cA) - k1*cA - k3*cA^2);<br />
<br />
ODE_cB: diff(cB,t) = (1.0/3600.0) * (- ff*cB + k1*cA - k2*cB);<br />
<br />
ODE_Tr: diff(Tr,t) = (1.0/3600.0) * ( ff * (theta0 - Tr) <br />
- 1.0/(rho*Cp) * (k1*cA*H1 + k2*cB*H2 + k3*cA^2*H3)<br />
+ kw*AR / (rho*Cp*VR) * (Tj - Tr) ); <br />
ODE_Tj: diff(Tj,t) = (1.0/3600.0) * ( 1.0/(mK*CPK) * (cr + kw*AR * (Tr - Tj)) );<br />
<br />
# initial value constraint<br />
IVC_cA: eval(cA,0) = (1-alpha)*cAs;<br />
let IVC_cA.type := "dpc";<br />
<br />
IVC_cB: eval(cB,0) = (1-alpha)*cBs;<br />
let IVC_cB.type := "dpc";<br />
<br />
IVC_Tr: eval(Tr,0) = alpha*85.0 + (1-alpha)*theta_s;<br />
let IVC_Tr.type := "dpc";<br />
<br />
IVC_Tj: eval(Tj,0) = alpha*85.0 + (1-alpha)*theta_Ks;<br />
let IVC_Tj.type := "dpc";<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Continuously Stirred Tank Reactor problem]]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=User:SvenLeyffer&diff=680User:SvenLeyffer2011-09-29T21:12:22Z<p>Ckirches: </p>
<hr />
<div>[http://wiki.mcs.anl.gov/leyffer Sven Leyffer], <br />
Argonne National Laboratory<br />
<br />
[[Category:Community]]</div>Ckircheshttps://mintoc.de/index.php?title=Particle_steering_problem_(TACO)&diff=679Particle steering problem (TACO)2011-09-29T20:58:41Z<p>Ckirches: Reference for particle steering problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Particle steering problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. This classical problem can e.g. be found in <bibref>Bryson1975</bibref>. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file particle_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Particle steering problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
param Pi := 3.14159265358979;<br />
param a := 100.0;<br />
<br />
var t;<br />
var tf := 1, >= 0, <=10;<br />
var y{1..4};<br />
var u >= -Pi/2, <= +Pi/2;<br />
let u.type := "u1";<br />
<br />
minimize time: eval(t,tf);<br />
<br />
subject to<br />
<br />
dy1: diff (y[1],t) = y[2];<br />
dy2: diff (y[2],t) = a*cos(u);<br />
dy3: diff (y[3],t) = y[4];<br />
dy4: diff (y[4],t) = a*sin(u);<br />
<br />
ivc{i in 1..4}: eval(y[i],0) = 0;<br />
<br />
by1d: eval(y[2],tf) = 45;<br />
by2: eval(y[3],tf) = 5;<br />
by2d: eval(y[4],tf) = 0;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Particle steering problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
== References ==<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Marine_population_dynamics_problem_(TACO)&diff=678Marine population dynamics problem (TACO)2011-09-29T20:55:25Z<p>Ckirches: /* AMPL */</p>
<hr />
<div>This page contains a model of the [[Marine population dynamics problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. This problem is due to <bibref>Rothschild1997</bibref>. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file marine_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Marine population dynamics problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Alexander S. Bondarenko - Summer 1998<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
<br />
param ne > 0, integer; # number of differential equations<br />
param nm > 0, integer; # number of measurements<br />
<br />
param tau {1..nm}; # times at which observations made<br />
param tf := tau[nm]; # ODEs defined in [0,tf]<br />
<br />
param z {1..nm,1..ne}; # observations<br />
var g {1..ne-1} >= 0, <= 1; # growth rates<br />
var m {1..ne} >= 0, <= 1; # mortality rates<br />
var u {1..ne};<br />
<br />
minimize l2error{j in 1..nm}:<br />
eval ( sum {s in 1..ne} (u[s] - z[j,s])^2, tau[j] );<br />
<br />
subject to g_bounds {s in 1..ne-1}: g[s] >= 0;<br />
<br />
subject to m_bounds {s in 1..ne}: m[s] >= 0;<br />
<br />
subject to de_1:<br />
diff(u[1],t) = -(m[1]+g[1])*u[1];<br />
<br />
subject to de_s {s in 2..ne-1}:<br />
diff(u[s],t) = g[s-1]*u[s-1] - (m[s]+g[s])*u[s]; <br />
<br />
subject to de_ne:<br />
diff(u[ne],t) = g[ne-1]*u[ne-1] - m[ne]*u[ne];<br />
<br />
data marine_taco.dat;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
This is the file marine_taco.dat<br />
<br />
<source lang="AMPL"><br />
param ne := 8;<br />
param nm := 21;<br />
<br />
# Time measurements<br />
<br />
param tau :=<br />
1 0.0<br />
2 0.5<br />
3 1.0<br />
4 1.5<br />
5 2.0<br />
6 2.5<br />
7 3.0<br />
8 3.5 <br />
9 4.0<br />
10 4.5<br />
11 5.0<br />
12 5.5<br />
13 6.0<br />
14 6.5<br />
15 7.0<br />
16 7.5<br />
17 8.0<br />
18 8.5<br />
19 9.0<br />
20 9.5<br />
21 10.0;<br />
<br />
# Measurements<br />
<br />
param z:<br />
1 2 3 4 5 6 7 8 := <br />
1 20000.0 17000.0 10000.0 15000.0 12000.0 9000.0 7000.0 3000.0<br />
2 12445.0 15411.0 13040.0 13338.0 13484.0 8426.0 6615.0 4022.0<br />
3 7705.0 13074.0 14623.0 11976.0 12453.0 9272.0 6891.0 5020.0<br />
4 4664.0 8579.0 12434.0 12603.0 11738.0 9710.0 6821.0 5722.0<br />
5 2977.0 7053.0 11219.0 11340.0 13665.0 8534.0 6242.0 5695.0<br />
6 1769.0 5054.0 10065.0 11232.0 12112.0 9600.0 6647.0 7034.0<br />
7 943.0 3907.0 9473.0 10334.0 11115.0 8826.0 6842.0 7348.0<br />
8 581.0 2624.0 7421.0 10297.0 12427.0 8747.0 7199.0 7684.0<br />
9 355.0 1744.0 5369.0 7748.0 10057.0 8698.0 6542.0 7410.0<br />
10 223.0 1272.0 4713.0 6869.0 9564.0 8766.0 6810.0 6961.0<br />
11 137.0 821.0 3451.0 6050.0 8671.0 8291.0 6827.0 7525.0<br />
12 87.0 577.0 2649.0 5454.0 8430.0 7411.0 6423.0 8388.0<br />
13 49.0 337.0 2058.0 4115.0 7435.0 7627.0 6268.0 7189.0<br />
14 32.0 228.0 1440.0 3790.0 6474.0 6658.0 5859.0 7467.0<br />
15 17.0 168.0 1178.0 3087.0 6524.0 5880.0 5562.0 7144.0<br />
16 11.0 99.0 919.0 2596.0 5360.0 5762.0 4480.0 7256.0<br />
17 7.0 65.0 647.0 1873.0 4556.0 5058.0 4944.0 7538.0<br />
18 4.0 44.0 509.0 1571.0 4009.0 4527.0 4233.0 6649.0<br />
19 2.0 27.0 345.0 1227.0 3677.0 4229.0 3805.0 6378.0<br />
20 1.0 20.0 231.0 934.0 3197.0 3695.0 3159.0 6454.0<br />
21 1.0 12.0 198.0 707.0 2562.0 3163.0 3232.0 5566.0;<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Marine population dynamics problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
== References ==<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Marine_population_dynamics_problem_(TACO)&diff=677Marine population dynamics problem (TACO)2011-09-29T20:54:16Z<p>Ckirches: Reference for marine pop problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Marine population dynamics problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. This problem is due to <bibref>Rothschild1997</bibref>. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file marine_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Marine population dynamics problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Alexander S. Bondarenko - Summer 1998<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
<br />
param ne > 0, integer; # number of differential equations<br />
param nm > 0, integer; # number of measurements<br />
<br />
param tau {1..nm}; # times at which observations made<br />
param tf := tau[nm]; # ODEs defined in [0,tf]<br />
<br />
param z {1..nm,1..ne}; # observations<br />
var g {1..ne-1} >= 0, <= 1; # growth rates<br />
var m {1..ne} >= 0, <= 1; # mortality rates<br />
var u {1..ne};<br />
<br />
minimize l2error{j in 1..nm}:<br />
eval ( sum {s in 1..ne} (u[s] - z[j,s])^2, tau[j] );<br />
<br />
subject to g_bounds {s in 1..ne-1}: g[s] >= 0;<br />
<br />
subject to m_bounds {s in 1..ne}: m[s] >= 0;<br />
<br />
subject to de_1:<br />
diff(u[1],t) = -(m[1]+g[1])*u[1];<br />
<br />
subject to de_s {s in 2..ne-1}:<br />
diff(u[s],t) = g[s-1]*u[s-1] - (m[s]+g[s])*u[s]; <br />
<br />
subject to de_ne:<br />
diff(u[ne],t) = g[ne-1]*u[ne-1] - m[ne]*u[ne];<br />
<br />
data cops_marine.dat;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
This is the file cops_marine.dat<br />
<br />
<source lang="AMPL"><br />
param ne := 8;<br />
param nm := 21;<br />
<br />
# Time measurements<br />
<br />
param tau :=<br />
1 0.0<br />
2 0.5<br />
3 1.0<br />
4 1.5<br />
5 2.0<br />
6 2.5<br />
7 3.0<br />
8 3.5 <br />
9 4.0<br />
10 4.5<br />
11 5.0<br />
12 5.5<br />
13 6.0<br />
14 6.5<br />
15 7.0<br />
16 7.5<br />
17 8.0<br />
18 8.5<br />
19 9.0<br />
20 9.5<br />
21 10.0;<br />
<br />
# Measurements<br />
<br />
param z:<br />
1 2 3 4 5 6 7 8 := <br />
1 20000.0 17000.0 10000.0 15000.0 12000.0 9000.0 7000.0 3000.0<br />
2 12445.0 15411.0 13040.0 13338.0 13484.0 8426.0 6615.0 4022.0<br />
3 7705.0 13074.0 14623.0 11976.0 12453.0 9272.0 6891.0 5020.0<br />
4 4664.0 8579.0 12434.0 12603.0 11738.0 9710.0 6821.0 5722.0<br />
5 2977.0 7053.0 11219.0 11340.0 13665.0 8534.0 6242.0 5695.0<br />
6 1769.0 5054.0 10065.0 11232.0 12112.0 9600.0 6647.0 7034.0<br />
7 943.0 3907.0 9473.0 10334.0 11115.0 8826.0 6842.0 7348.0<br />
8 581.0 2624.0 7421.0 10297.0 12427.0 8747.0 7199.0 7684.0<br />
9 355.0 1744.0 5369.0 7748.0 10057.0 8698.0 6542.0 7410.0<br />
10 223.0 1272.0 4713.0 6869.0 9564.0 8766.0 6810.0 6961.0<br />
11 137.0 821.0 3451.0 6050.0 8671.0 8291.0 6827.0 7525.0<br />
12 87.0 577.0 2649.0 5454.0 8430.0 7411.0 6423.0 8388.0<br />
13 49.0 337.0 2058.0 4115.0 7435.0 7627.0 6268.0 7189.0<br />
14 32.0 228.0 1440.0 3790.0 6474.0 6658.0 5859.0 7467.0<br />
15 17.0 168.0 1178.0 3087.0 6524.0 5880.0 5562.0 7144.0<br />
16 11.0 99.0 919.0 2596.0 5360.0 5762.0 4480.0 7256.0<br />
17 7.0 65.0 647.0 1873.0 4556.0 5058.0 4944.0 7538.0<br />
18 4.0 44.0 509.0 1571.0 4009.0 4527.0 4233.0 6649.0<br />
19 2.0 27.0 345.0 1227.0 3677.0 4229.0 3805.0 6378.0<br />
20 1.0 20.0 231.0 934.0 3197.0 3695.0 3159.0 6454.0<br />
21 1.0 12.0 198.0 707.0 2562.0 3163.0 3232.0 5566.0;<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Marine population dynamics problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
== References ==<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Isomerization_of_Alpha-Pinene_problem_(TACO)&diff=676Isomerization of Alpha-Pinene problem (TACO)2011-09-29T20:51:46Z<p>Ckirches: Reference for alpha-pinene problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Isomerization of Alpha-Pinene problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. This problem is due to <bibref>Box1973</bibref>. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file pinene_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Insomerization of Alpha-Pinene problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Alexander S. Bondarenko - Summer 1998<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
param ne > 0, integer; # number of differential equations<br />
param np > 0, integer; # number of ODE parameters<br />
param nm > 0, integer; # number of measurements<br />
<br />
param bc {1..ne}; # boundary conditions<br />
param tau {1..nm}; # times at which observations made<br />
<br />
var t;<br />
var tf := tau[nm];<br />
<br />
param z {1..nm,1..ne}; # observations<br />
var theta {1..np} >= 0, <= 100; # ODE parameters<br />
<br />
var u{1..ne} >= 0, <= 200;<br />
<br />
minimize l2error{i in 1..nm}:<br />
eval ( sum {s in 1..ne} (u[s] - z[i,s])^2, tau[i] );<br />
<br />
subject to theta_bounds {i in 1..np}: theta[i] >= 0.0; <br />
<br />
subject to ode_bc {s in 1..ne}: eval(u[s], 0.0) = bc[s];<br />
<br />
subject to de1:<br />
diff (u[1], t) = - (theta[1]+theta[2])*u[1];<br />
<br />
subject to de2:<br />
diff (u[2], t) = theta[1]*u[1];<br />
<br />
subject to de3:<br />
diff (u[3], t) = theta[2]*u[1] - (theta[3]+theta[4])*u[3] + theta[5]*u[5];<br />
<br />
subject to de4:<br />
diff (u[4], t) = theta[3]*u[3];<br />
<br />
subject to de5:<br />
diff (u[5], t) = theta[4]*u[3] - theta[5]*u[5];<br />
<br />
data pinene_taco.dat;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
This is the data file pinene_taco.dat<br />
<source lang="AMPL"><br />
param ne := 5; <br />
param np := 5;<br />
param nm := 8;<br />
<br />
# Time measurements<br />
<br />
param tau :=<br />
1 1230.0<br />
2 3060.0<br />
3 4920.0<br />
4 7800.0<br />
5 10680.0<br />
6 15030.0<br />
7 22620.0<br />
8 36420.0;<br />
<br />
# Concentrations<br />
<br />
param z :<br />
1 2 3 4 5 := <br />
1 88.35 7.3 2.3 0.4 1.75<br />
2 76.4 15.6 4.5 0.7 2.8<br />
3 65.1 23.1 5.3 1.1 5.8<br />
4 50.4 32.9 6.0 1.5 9.3<br />
5 37.5 42.7 6.0 1.9 12.0<br />
6 25.9 49.1 5.9 2.2 17.0<br />
7 14.0 57.4 5.1 2.6 21.0<br />
8 4.5 63.1 3.8 2.9 25.7;<br />
<br />
param bc := <br />
1 100.0 <br />
2 0.0 <br />
3 0.0 <br />
4 0.0<br />
5 0.0;<br />
<br />
# Initial values<br />
<br />
let {i in 1..np} theta[i] := 0.0;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Isomerization of Alpha-Pinene problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
== References ==<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Catalytic_cracking_problem_(TACO)&diff=675Catalytic cracking problem (TACO)2011-09-29T20:47:02Z<p>Ckirches: Reference for catalytic cracking problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Catalytic cracking problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. This problem is due to <bibref>Tjoa1991</bibref>. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file gasoil_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Catalytic cracking problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Michael Merritt - Summer 2000<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
<br />
param ne := 2; # number of differential equations<br />
param np := 3; # number of ODE parameters<br />
param nm > 0, integer; # number of measurements<br />
<br />
param bc {1..ne}; # ODE initial conditions<br />
param tau {1..nm}; # times at which observations made<br />
<br />
param z {1..nm, 1..ne}; # observations<br />
var theta {1..np} >= 0, <= 20; # ODE parameters<br />
<br />
var u {s in 1..ne};<br />
<br />
minimize l2error{j in 1..nm}:<br />
eval ( sum {s in 1..ne}(u[s] - z[j,s])^2, tau[j] );<br />
<br />
subject to theta_bounds {i in 1..np}: theta[i] >= 0.0; <br />
<br />
subject to bc_cond {s in 1..ne}: eval (u[s], 0) = bc[s];<br />
<br />
subject to de1:<br />
diff(u[1],t) = - (theta[1]+theta[3])*u[1]^2;<br />
<br />
subject to de2:<br />
diff(u[2],t) = theta[1]*u[1]^2 - theta[2]*u[2];<br />
<br />
data gasoil_taco.dat;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
This is the data file gasoil_taco.dat<br />
<source lang="AMPL"><br />
param nm := 21;<br />
<br />
# Time measurements<br />
<br />
param tau := <br />
1 0 <br />
2 0.025<br />
3 0.05<br />
4 0.075<br />
5 0.10<br />
6 0.125<br />
7 0.150<br />
8 0.175<br />
9 0.20<br />
10 0.225<br />
11 0.250<br />
12 0.30<br />
13 0.35<br />
14 0.40<br />
15 0.45<br />
16 0.50<br />
17 0.55<br />
18 0.65<br />
19 0.75<br />
20 0.85<br />
21 0.95;<br />
<br />
# Concentrations<br />
<br />
param z: 1 2 :=<br />
1 1.0000 0<br />
2 0.8105 0.2000<br />
3 0.6208 0.2886<br />
4 0.5258 0.3010<br />
5 0.4345 0.3215<br />
6 0.3903 0.3123<br />
7 0.3342 0.2716<br />
8 0.3034 0.2551<br />
9 0.2735 0.2258<br />
10 0.2405 0.1959<br />
11 0.2283 0.1789<br />
12 0.2071 0.1457<br />
13 0.1669 0.1198<br />
14 0.1530 0.0909<br />
15 0.1339 0.0719<br />
16 0.1265 0.0561<br />
17 0.1200 0.0460<br />
18 0.0990 0.0280<br />
19 0.0870 0.0190<br />
20 0.0770 0.0140<br />
21 0.0690 0.0100;<br />
<br />
param bc := 1 1 2 0; <br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Catalytic cracking problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
== References ==<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]<br />
R</div>Ckircheshttps://mintoc.de/index.php?title=Methanol_to_Hydrocarbons_problem_(TACO)&diff=674Methanol to Hydrocarbons problem (TACO)2011-09-29T20:43:58Z<p>Ckirches: References for methanol problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Methanol to Hydrocarbons problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. This problem is due to <bibref>Floudas1999</bibref> and <bibref>Maria1989</bibref>. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file methanol_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Methanol to Hydrocarbons problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Michael Merritt - Summer 2000<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
<br />
param ne := 3; # number of differential equations<br />
param np := 5; # number of ODE parameters<br />
param nm > 0, integer; # number of measurements<br />
<br />
param bc {1..ne}; # ODE initial conditions<br />
param tau {1..nm}; # times at which observations made<br />
<br />
param z {1..nm, 1..ne}; # observations<br />
var theta {1..np} := 1.0; # ODE parameters<br />
<br />
var u {s in 1..ne};<br />
<br />
minimize l2error{j in 1..nm}:<br />
eval (sum {s in 1..ne}(u[s] - z[j,s])^2, tau[j]);<br />
<br />
subject to theta_bounds {i in 1..np}: theta[i] >= 0.0; <br />
<br />
subject to bc_cond {s in 1..ne}: eval (u[s], 0) = bc[s];<br />
<br />
subject to eqn1:<br />
diff(u[1],t) = - (2*theta[2] - <br />
(theta[1]*u[2])/((theta[2]+theta[5])*u[1]+u[2]) +<br />
theta[3] + theta[4])*u[1];<br />
<br />
subject to eqn2:<br />
diff(u[2],t) = (theta[1]*u[1]*(theta[2]*u[1]-u[2]))/<br />
((theta[2]+theta[5])*u[1]+u[2]) +<br />
theta[3]*u[1];<br />
<br />
subject to eqn3:<br />
diff(u[3],t) = (theta[1]*u[1]*(u[2]+theta[5]*u[1]))/<br />
((theta[2]+theta[5])*u[1]+u[2]) +<br />
theta[4]*u[1];<br />
<br />
data methanol_taco.dat;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
This is the data file methanol_taco.dat<br />
<source lang="AMPL"><br />
<br />
# Time measurements<br />
<br />
param tau := <br />
1 0<br />
2 0.050<br />
3 0.065<br />
4 0.080<br />
5 0.123<br />
6 0.233<br />
7 0.273<br />
8 0.354<br />
9 0.397<br />
10 0.418<br />
11 0.502<br />
12 0.553<br />
13 0.681<br />
14 0.750<br />
15 0.916<br />
16 0.937<br />
17 1.122;<br />
<br />
# Concentrations<br />
<br />
param z: 1 2 3 :=<br />
1 1.0000 0 0<br />
2 0.7085 0.1621 0.0811<br />
3 0.5971 0.1855 0.0965<br />
4 0.5537 0.1989 0.1198<br />
5 0.3684 0.2845 0.1535<br />
6 0.1712 0.3491 0.2097<br />
7 0.1198 0.3098 0.2628<br />
8 0.0747 0.3576 0.2467<br />
9 0.0529 0.3347 0.2884<br />
10 0.0415 0.3388 0.2757<br />
11 0.0261 0.3557 0.3167<br />
12 0.0208 0.3483 0.2954<br />
13 0.0085 0.3836 0.2950<br />
14 0.0053 0.3611 0.2937<br />
15 0.0019 0.3609 0.2831<br />
16 0.0018 0.3485 0.2846<br />
17 0.0006 0.3698 0.2899;<br />
<br />
param bc := 1 1 2 0 3 0; <br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Methanol to Hydrocarbons problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
== References ==<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Catalyst_mixing_problem_(TACO)&diff=673Catalyst mixing problem (TACO)2011-09-29T20:38:28Z<p>Ckirches: Reference for catmix problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Catalyst mixing problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. This problem is due to <bibref>Stryk1999</bibref>. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file catmix_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Catalyst mixing problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
param ne := 2; # number of differential equations<br />
<br />
var tf := 1; # Final time<br />
var t;<br />
<br />
param bc {1..ne}; # Boundary conditions for x<br />
<br />
var u;<br />
let u.type := "u1";<br />
<br />
var v {1..ne};<br />
<br />
minimize objective: eval (-1 + v[1] + v[2], tf);<br />
let objective.scale := 0.01;<br />
<br />
subject to u_bounds: 0.0 <= u <= 1.0;<br />
<br />
subject to de1:<br />
diff(v[1],t) = u*(10*v[2] - v[1]);<br />
<br />
subject to de2:<br />
diff(v[2],t) = u*(v[1] - 10*v[2]) - (1 - u)*v[2];<br />
<br />
subject to b_eqn {s in 1..ne}: eval(v[s],0) = bc[s];<br />
<br />
data catmix_taco.dat;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
This is the data file catmix_taco.dat<br />
<source lang="AMPL"><br />
# Set the design parameters<br />
<br />
param bc :=<br />
1 1<br />
2 0;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Catalyst mixing problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
== References ==<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem_(TACO)&diff=672Lotka Volterra fishing problem (TACO)2011-09-29T20:35:19Z<p>Ckirches: Lotka TACO reference</p>
<hr />
<div>This page contains a model of the MIOCP [[Lotka Volterra fishing problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. This problem is due to <bibref>Sager2005</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or MINLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file lotka_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Lotka Volterra fishing problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
var xd0 := 0.5, >= 0, <= 20;<br />
var xd1 := 0.7, >= 0, <= 20;<br />
var dev := 0.0, >= 0, <= 20;<br />
<br />
var u := 1, >= 0, <= 1 integer suffix type "u0";<br />
<br />
param p0 := 0.4;<br />
param p1 := 0.2;<br />
param ref0 := 1.0;<br />
param ref1 := 1.0;<br />
<br />
# Minimize accumulated deviation from reference after 12 time units<br />
minimize Mayer: eval(dev,12);<br />
<br />
subject to<br />
<br />
# ODE system<br />
ODE_0: diff(xd0,t) = xd0 - xd0*xd1 - p0*u*xd0; # prey<br />
ODE_1: diff(xd1,t) = -xd1 + xd0*xd1 - p1*u*xd1; # predator<br />
ODE_2: diff(dev,t) = (xd0-ref0)^2 + (xd1-ref1)^2; # deviation from reference<br />
<br />
# initial value constraints<br />
IVC_0: eval(xd0,0) = 0.5;<br />
IVC_1: eval(xd1,0) = 0.7;<br />
IVC_2: eval(dev,0) = 0.0;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Lotka Volterra fishing problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at [[Lotka Volterra fishing problem (AMPL)]]<br />
* [[:Category:C | C code]] at [[Lotka Volterra fishing problem (C)]]<br />
* [[:Category:optimica | optimica]] at [[Lotka Volterra fishing problem (optimica)]]<br />
<br />
== References ==<br />
<bibreferences/> <br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Template:Current_News&diff=671Template:Current News2011-09-29T20:32:30Z<p>Ckirches: </p>
<hr />
<div>{| style="background:#EEEEFF;"<br />
<!-- Add news below this comment --><br />
{{News|2011/09/29|Added the [[:Category:AMPL/TACO | first set of AMPL optimal control problems]] using the TACO toolkit}}<br />
{{News|2010/11/21|Added New York [[Subway ride]] control problem}}<br />
{{News|2010/11/18|Extended description of [[:Category:Problem characterization | problem characterization]]}}<br />
{{News|2010/11/18|Description of benchmark library as [http://mathopt.de/PUBLICATIONS/Sager2011b.pdf pdf file] preprint}}<br />
{{News|2010/08/16|Added [[Bang-bang approximation of a traveling wave]] 1D PDE example}}<br />
<!-- Add news above this comment --><br />
|}<br />
<!-- Text within the following tag is not shown when this page is included in a different page (e.g. the main page, "News" section --><br />
<noinclude> <br />
== Older news ==<br />
<br />
{| style="background:#eaecd0;"<br />
<!-- Copy old news below this comment --><br />
{{News|2010/02/11|Launch of EU project [http://embocon.org embocon.org]}}<br />
{{News|2009/11/20|Added [[External Links]] page}}<br />
{{News|2009/10/26|Revision and Correction of several [[:Category:Optimica | optimica]] models}}<br />
{{News|2009/08/26|Knitro solution for [[F-8 aircraft (AMPL)]]}}<br />
{{News|2009/08/11|[[F-8 aircraft]] new local minimum found with [[:Category:Optimica | optimica]]/ipopt}}<br />
{{News|2009/07/31|New category [[:Category:Optimica | optimica]] introduced}}<br />
{{News|2009/07/07|[[:Category:AMPL]] revised page with discretized MINLPs in AMPL format}}<br />
<!-- Add news above this comment --><br />
|}<br />
<br />
== Adding items ==<br />
If you want to add events you have to edit this page. At the top of the page you will see something like this:<br />
<source lang="text"><br />
{| style="background:#EEEEFF;"<br />
<!-- Add items below this comment --><br />
{{News|2008/08/14, 15:15|Presentation of the restructured group wiki in the group meeting, room 432.}}<br />
<!-- Add items above this comment --><br />
|}<br />
</source><br />
<br />
To add a new item you have to enter a line of the form:<br />
<source lang="text"><br />
{{News|date|content}}<br />
</source><br />
where <code>date</code> is the date and <code>content</code> is the subject and further information. The field <code>News</code> is mandatory. Please write the <code>date</code> in the format '''YYYY/MM/DD, HH:MM''' to keep it nice and clean. The field <code>content</code> can contain any information you like (but please keep it short) and even wiki syntax is possible.<br />
<br />
''Please keep the items in a chronological order and remove older ones to keep the list short.''<br />
<br />
[[Category:News]]<br />
<br />
</noinclude></div>Ckircheshttps://mintoc.de/index.php?title=Robot_arm_problem_(TACO)&diff=670Robot arm problem (TACO)2011-09-29T19:46:36Z<p>Ckirches: Reference for robotarm problem</p>
<hr />
<div>This page contains a model of the [[Robot arm problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. This problem is due to <bibref>Moessner1995</bibref>. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file robotarm_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Robot arm problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# David Bortz - Summer 1998 <br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
# Final positions of the length and the angles for the robot arm<br />
<br />
param L; # total length of arm<br />
param pi := 4*atan(1);<br />
<br />
# Upper bounds on the controls<br />
<br />
param max_u_rho;<br />
param max_u_the;<br />
param max_u_phi;<br />
<br />
# Initial positions of the length and the angles for the robot arm<br />
<br />
param rho_0;<br />
param the_0;<br />
param phi_0;<br />
<br />
# Final positions of the length and the angles for the robot arm<br />
<br />
param rho_n;<br />
param the_n;<br />
param phi_n;<br />
<br />
# The length and the angles theta and phi for the robot arm.<br />
<br />
var rho >=0, <= L; <br />
var the >= -pi, <= pi; <br />
var phi >=0, <= pi;<br />
<br />
# The derivatives of the length and the angles.<br />
<br />
var rho_dot;<br />
var the_dot;<br />
var phi_dot;<br />
<br />
# The controls.<br />
<br />
var u_rho >= -max_u_rho, <= max_u_rho, suffix type "u0";<br />
var u_the >= -max_u_the, <= max_u_the, suffix type "u0";<br />
var u_phi >= -max_u_phi, <= max_u_phi, suffix type "u0";<br />
<br />
# The independent time and the final time.<br />
<br />
var t;<br />
var tf := 1.0, >= 0.1, <= 12 suffix scale 10.0;<br />
<br />
# The moments of inertia.<br />
<br />
var I_the = ((L-rho)^3+rho^3)*(sin(phi))^2/3.0;<br />
var I_phi = ((L-rho)^3+rho^3)/3.0;<br />
<br />
# The robot arm problem.<br />
<br />
minimize time: eval(t,tf) suffix scale 1e+2;<br />
<br />
subject to rho_eqn:<br />
diff(rho, t) = rho_dot;<br />
<br />
subject to the_eqn:<br />
diff(the, t) = the_dot;<br />
<br />
subject to phi_eqn:<br />
diff (phi, t) = phi_dot;<br />
<br />
subject to u_rho_eqn:<br />
diff (rho_dot, t) = u_rho/L;<br />
<br />
subject to u_the_eqn:<br />
diff (the_dot, t) = u_the/I_the;<br />
<br />
subject to u_phi_eqn:<br />
diff (phi_dot, t) = u_phi/I_phi;<br />
<br />
# Boundary Conditions<br />
<br />
subject to rho_0_eqn: eval (rho, 0) = 4.5 suffix type "dpc";<br />
subject to the_0_eqn: eval (the, 0) = 0 suffix type "dpc";<br />
subject to phi_0_eqn: eval (phi, 0) = pi/4 suffix type "dpc";<br />
<br />
subject to rho_f_eqn: eval (rho, tf) = 4.5;<br />
subject to the_f_eqn: eval (the, tf) = 2*pi/3;<br />
subject to phi_f_eqn: eval (phi, tf) = pi/4;<br />
<br />
subject to rho_dot_0_eqn: eval (rho_dot, 0) = 0 suffix type "dpc";<br />
subject to the_dot_0_eqn: eval (the_dot, 0) = 0 suffix type "dpc";<br />
subject to phi_dot_0_eqn: eval (phi_dot, 0) = 0 suffix type "dpc";<br />
<br />
subject to rho_dot_f_eqn: eval (rho_dot, tf) = 0;<br />
subject to the_dot_f_eqn: eval (the_dot, tf) = 0;<br />
subject to phi_dot_f_eqn: eval (phi_dot, tf) = 0;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Robot arm problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
== References ==<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Semibatch_esterification_problem_(TACO)&diff=669Semibatch esterification problem (TACO)2011-09-29T19:32:18Z<p>Ckirches: </p>
<hr />
<div>This page contains a model of the [[Semibatch esterification problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. <br />
The original model is due to <bibref>Kuehl2005</bibref> and <bibref>Milewska2006</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file semibatch_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Semibatch esterification problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
<br />
# propionic anhydride (species A, sd0) [mol]<br />
var nA := 0.0, >= 0.0, <= 10.0;<br />
<br />
# 2-butanol (species B, sd1) [mol]<br />
var nB := 6.893955747436589, >= 0.0, <= 10.0 suffix scale 10.0;<br />
<br />
# propionic acid (species C, sd2) [mol]<br />
var nC := 0.0, >= 0.0, <= 10.0;<br />
<br />
# reactor temperature change (sd3) [K]<br />
var Tr := 0.0, >= -23.0, <= 30.0 suffix scale 10.0;<br />
<br />
# accumulated dosing of propionic anhydride [mol]<br />
var nK1 := 0.0, >= 0.0, <= 7.0 suffix scale 5.0;<br />
<br />
# theoretical adiabatic temperature rise (DAE state) [degrees Celsius]<br />
var xA := 293.15, >= 270.15, <= 363.15 suffix type "dae" suffix scale 300.0;<br />
<br />
# dosing feed [kg/s]<br />
var dF := 0.0002472, >= 0.0, <= 0.0005 suffix type "u0" suffix scale 1.0e-2;<br />
<br />
# dosing temperature [K]<br />
var Tdos := 298.15, >= 298.15, <= 298.15 suffix type "u0" suffix scale 100.0;<br />
<br />
# ambient temperature [K]<br />
var Tamb := 298.15, >= 298.15, <= 298.15 suffix type "u0" suffix scale 100.0;<br />
<br />
# jacket temperature change [K]<br />
var dTj := 0.0, >= 0.0, <= 0.0 suffix type "u0";<br />
<br />
param TJ := 313.15;<br />
param Tr_sp := 313.15;<br />
param MA := 0.13014;<br />
param MB := 0.07412;<br />
param MC := 0.07408;<br />
param MD := 0.13011;<br />
param U1 := 195; <br />
param U2 := 155;<br />
param V1u := 0.8;<br />
param V2u := 1.6;<br />
param nS0 := 5.01/98.08;<br />
param N1 := 1.58;<br />
param N2 := 0.76;<br />
param EA := 9.14E+4;<br />
param A1 := 9.35E+10;<br />
param A2 := 9.22E+10;<br />
param A3 := 9.78E+10;<br />
param R := 8.314;<br />
param V1 := 1;<br />
param V2 := 2;<br />
param CpI1 := 117.3;<br />
param CpI2 := 198.4;<br />
param Amin := 0.0113;<br />
param Vmin := 0.124;<br />
param d := 0.155;<br />
param alpha := 0.1;<br />
param HA := 59458;<br />
<br />
var Tr_ = Tr + Tr_sp;<br />
var dens0 = 1000*0.13014/(0.46199*0.2166^((1-Tr_/630.0)^0.2857));<br />
var dens1 = 1000*0.07412/(0.3199 *0.2088^((1-Tr_/536.01)^0.2857));<br />
var dens2 = 1000*0.07408/(0.2848 *0.1993^((1-Tr_/611.0)^0.2857));<br />
var dens3 = 1000*0.13011/(0.5078 *0.2265^((1-Tr_/578.01)^0.2857));<br />
var V = (nA*MA/dens0 + nB*MB/dens1 + nC*MC/dens2 + nC*MD/dens3) * 1000;<br />
var Ua = U1 + (U2-U1)/(V2u-V1u)*(V-V1u);<br />
var xA_ = nA/(nA+nB+2*nC+nS0);<br />
var r = ( A1*exp(-EA/(R*Tr_)) + A2*exp(-EA/(R*Tr_)) <br />
* (nC/V)^N1 + A3*exp(-EA/(R*Tr_)) * (nS0/V)^N2 ) * (nA/V) * (nB/V);<br />
var Cpi = CpI1 + (CpI2 - CpI1)/(V2-V1) * (V-V1);<br />
var Area = (Amin + 4*(V-Vmin)/(1000*d));<br />
var cp0 = 683.7305 - 3.7009 * Tr_ + 9.6E-3 * Tr_^2 - 7.458E-6 * Tr_^3;<br />
var cp1 = 242.5725 - 2.3128 * Tr_ + 1.07E-2 * Tr_^2 - 1.159E-5 * Tr_^3;<br />
var cp2 = 94.8369 - 0.2432 * Tr_ + 2.2E-3 * Tr_^2 - 2.51E-6 * Tr_^3;<br />
var cp3 = 206.162 + 0.1994689 * Tr_ - 3.55512E-4 * Tr_^2 - 1.03625E-6 * Tr_^3;<br />
var cpm = nA*cp0 + nB*cp1 + nC*cp2 + nC*cp3;<br />
var qdil = -(-2232.74201/0.13963 * exp(-xA_/0.13963)) * (dF/MA-r*V);<br />
<br />
minimize Tracking: <br />
integral (nB^2,3600) suffix scale 1.0E+3;<br />
<br />
subject to <br />
<br />
ODE_nA: diff(nA,t) = dF/MA - r*V;<br />
ODE_nB: diff(nB,t) = -r*V;<br />
ODE_nC: diff(nC,t) = r*V;<br />
ODE_Tr: diff(Tr,t) = ( r*HA*V - qdil - Ua*Area*(Tr_-(TJ+dTj)) <br />
- alpha*(Tr_-Tamb) - dF/MA*cp0*(Tr_-Tdos) ) / (Cpi+cpm);<br />
ODE_nK1: diff(nK1,t) = dF/MA;<br />
<br />
DAE_xA: 0 = xA - (Tr_ + nA * 1000 * HA/(cpm * V * 900));<br />
<br />
IC_nA: eval(nA,0) = 0;<br />
IC_nB: eval(nB,0) = 6.893955747436589;<br />
IC_nC: eval(nC,0) = 0;<br />
IC_Tr: eval(Tr,0) = 0;<br />
IC_nK1: eval(nK1,0) = 0;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Semibatch esterification problem]]<br />
<br />
== References ==<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Semibatch_esterification_problem_(TACO)&diff=668Semibatch esterification problem (TACO)2011-09-29T19:29:01Z<p>Ckirches: Semibatch esterification problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Semibatch esterification problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. <br />
The original model is due to <bibref>Kuehl2005<bibref> and <bibref>Milewska2006</bibref>.<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file semibatch_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Semibatch esterification problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
<br />
# propionic anhydride (species A, sd0) [mol]<br />
var nA := 0.0, >= 0.0, <= 10.0;<br />
<br />
# 2-butanol (species B, sd1) [mol]<br />
var nB := 6.893955747436589, >= 0.0, <= 10.0 suffix scale 10.0;<br />
<br />
# propionic acid (species C, sd2) [mol]<br />
var nC := 0.0, >= 0.0, <= 10.0;<br />
<br />
# reactor temperature change (sd3) [K]<br />
var Tr := 0.0, >= -23.0, <= 30.0 suffix scale 10.0;<br />
<br />
# accumulated dosing of propionic anhydride [mol]<br />
var nK1 := 0.0, >= 0.0, <= 7.0 suffix scale 5.0;<br />
<br />
# theoretical adiabatic temperature rise (DAE state) [degrees Celsius]<br />
var xA := 293.15, >= 270.15, <= 363.15 suffix type "dae" suffix scale 300.0;<br />
<br />
# dosing feed [kg/s]<br />
var dF := 0.0002472, >= 0.0, <= 0.0005 suffix type "u0" suffix scale 1.0e-2;<br />
<br />
# dosing temperature [K]<br />
var Tdos := 298.15, >= 298.15, <= 298.15 suffix type "u0" suffix scale 100.0;<br />
<br />
# ambient temperature [K]<br />
var Tamb := 298.15, >= 298.15, <= 298.15 suffix type "u0" suffix scale 100.0;<br />
<br />
# jacket temperature change [K]<br />
var dTj := 0.0, >= 0.0, <= 0.0 suffix type "u0";<br />
<br />
param TJ := 313.15;<br />
param Tr_sp := 313.15;<br />
param MA := 0.13014;<br />
param MB := 0.07412;<br />
param MC := 0.07408;<br />
param MD := 0.13011;<br />
param U1 := 195; <br />
param U2 := 155;<br />
param V1u := 0.8;<br />
param V2u := 1.6;<br />
param nS0 := 5.01/98.08;<br />
param N1 := 1.58;<br />
param N2 := 0.76;<br />
param EA := 9.14E+4;<br />
param A1 := 9.35E+10;<br />
param A2 := 9.22E+10;<br />
param A3 := 9.78E+10;<br />
param R := 8.314;<br />
param V1 := 1;<br />
param V2 := 2;<br />
param CpI1 := 117.3;<br />
param CpI2 := 198.4;<br />
param Amin := 0.0113;<br />
param Vmin := 0.124;<br />
param d := 0.155;<br />
param alpha := 0.1;<br />
param HA := 59458;<br />
<br />
var Tr_ = Tr + Tr_sp;<br />
var dens0 = 1000*0.13014/(0.46199*0.2166^((1-Tr_/630.0)^0.2857));<br />
var dens1 = 1000*0.07412/(0.3199 *0.2088^((1-Tr_/536.01)^0.2857));<br />
var dens2 = 1000*0.07408/(0.2848 *0.1993^((1-Tr_/611.0)^0.2857));<br />
var dens3 = 1000*0.13011/(0.5078 *0.2265^((1-Tr_/578.01)^0.2857));<br />
var V = (nA*MA/dens0 + nB*MB/dens1 + nC*MC/dens2 + nC*MD/dens3) * 1000;<br />
var Ua = U1 + (U2-U1)/(V2u-V1u)*(V-V1u);<br />
var xA_ = nA/(nA+nB+2*nC+nS0);<br />
var r = ( A1*exp(-EA/(R*Tr_)) + A2*exp(-EA/(R*Tr_)) <br />
* (nC/V)^N1 + A3*exp(-EA/(R*Tr_)) * (nS0/V)^N2 ) * (nA/V) * (nB/V);<br />
var Cpi = CpI1 + (CpI2 - CpI1)/(V2-V1) * (V-V1);<br />
var Area = (Amin + 4*(V-Vmin)/(1000*d));<br />
var cp0 = 683.7305 - 3.7009 * Tr_ + 9.6E-3 * Tr_^2 - 7.458E-6 * Tr_^3;<br />
var cp1 = 242.5725 - 2.3128 * Tr_ + 1.07E-2 * Tr_^2 - 1.159E-5 * Tr_^3;<br />
var cp2 = 94.8369 - 0.2432 * Tr_ + 2.2E-3 * Tr_^2 - 2.51E-6 * Tr_^3;<br />
var cp3 = 206.162 + 0.1994689 * Tr_ - 3.55512E-4 * Tr_^2 - 1.03625E-6 * Tr_^3;<br />
var cpm = nA*cp0 + nB*cp1 + nC*cp2 + nC*cp3;<br />
var qdil = -(-2232.74201/0.13963 * exp(-xA_/0.13963)) * (dF/MA-r*V);<br />
<br />
minimize Tracking: <br />
integral (nB^2,3600) suffix scale 1.0E+3;<br />
<br />
subject to <br />
<br />
ODE_nA: diff(nA,t) = dF/MA - r*V;<br />
ODE_nB: diff(nB,t) = -r*V;<br />
ODE_nC: diff(nC,t) = r*V;<br />
ODE_Tr: diff(Tr,t) = ( r*HA*V - qdil - Ua*Area*(Tr_-(TJ+dTj)) <br />
- alpha*(Tr_-Tamb) - dF/MA*cp0*(Tr_-Tdos) ) / (Cpi+cpm);<br />
ODE_nK1: diff(nK1,t) = dF/MA;<br />
<br />
DAE_xA: 0 = xA - (Tr_ + nA * 1000 * HA/(cpm * V * 900));<br />
<br />
IC_nA: eval(nA,0) = 0;<br />
IC_nB: eval(nB,0) = 6.893955747436589;<br />
IC_nC: eval(nC,0) = 0;<br />
IC_Tr: eval(Tr,0) = 0;<br />
IC_nK1: eval(nK1,0) = 0;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Semibatch esterification problem]]<br />
<br />
== References ==<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Isomerization_of_Alpha-Pinene_problem_(TACO)&diff=667Isomerization of Alpha-Pinene problem (TACO)2011-09-29T19:23:52Z<p>Ckirches: Pinene data</p>
<hr />
<div>This page contains a model of the [[Isomerization of Alpha-Pinene problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file pinene_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Insomerization of Alpha-Pinene problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Alexander S. Bondarenko - Summer 1998<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
param ne > 0, integer; # number of differential equations<br />
param np > 0, integer; # number of ODE parameters<br />
param nm > 0, integer; # number of measurements<br />
<br />
param bc {1..ne}; # boundary conditions<br />
param tau {1..nm}; # times at which observations made<br />
<br />
var t;<br />
var tf := tau[nm];<br />
<br />
param z {1..nm,1..ne}; # observations<br />
var theta {1..np} >= 0, <= 100; # ODE parameters<br />
<br />
var u{1..ne} >= 0, <= 200;<br />
<br />
minimize l2error{i in 1..nm}:<br />
eval ( sum {s in 1..ne} (u[s] - z[i,s])^2, tau[i] );<br />
<br />
subject to theta_bounds {i in 1..np}: theta[i] >= 0.0; <br />
<br />
subject to ode_bc {s in 1..ne}: eval(u[s], 0.0) = bc[s];<br />
<br />
subject to de1:<br />
diff (u[1], t) = - (theta[1]+theta[2])*u[1];<br />
<br />
subject to de2:<br />
diff (u[2], t) = theta[1]*u[1];<br />
<br />
subject to de3:<br />
diff (u[3], t) = theta[2]*u[1] - (theta[3]+theta[4])*u[3] + theta[5]*u[5];<br />
<br />
subject to de4:<br />
diff (u[4], t) = theta[3]*u[3];<br />
<br />
subject to de5:<br />
diff (u[5], t) = theta[4]*u[3] - theta[5]*u[5];<br />
<br />
data pinene_taco.dat;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
This is the data file pinene_taco.dat<br />
<source lang="AMPL"><br />
param ne := 5; <br />
param np := 5;<br />
param nm := 8;<br />
<br />
# Time measurements<br />
<br />
param tau :=<br />
1 1230.0<br />
2 3060.0<br />
3 4920.0<br />
4 7800.0<br />
5 10680.0<br />
6 15030.0<br />
7 22620.0<br />
8 36420.0;<br />
<br />
# Concentrations<br />
<br />
param z :<br />
1 2 3 4 5 := <br />
1 88.35 7.3 2.3 0.4 1.75<br />
2 76.4 15.6 4.5 0.7 2.8<br />
3 65.1 23.1 5.3 1.1 5.8<br />
4 50.4 32.9 6.0 1.5 9.3<br />
5 37.5 42.7 6.0 1.9 12.0<br />
6 25.9 49.1 5.9 2.2 17.0<br />
7 14.0 57.4 5.1 2.6 21.0<br />
8 4.5 63.1 3.8 2.9 25.7;<br />
<br />
param bc := <br />
1 100.0 <br />
2 0.0 <br />
3 0.0 <br />
4 0.0<br />
5 0.0;<br />
<br />
# Initial values<br />
<br />
let {i in 1..np} theta[i] := 0.0;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Isomerization of Alpha-Pinene problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Isomerization_of_Alpha-Pinene_problem_(TACO)&diff=666Isomerization of Alpha-Pinene problem (TACO)2011-09-29T19:22:30Z<p>Ckirches: Isomerization of Alpha-Pinene (TACO)</p>
<hr />
<div>This page contains a model of the [[Isomerization of Alpha-Pinene problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file pinene_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Insomerization of Alpha-Pinene problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Alexander S. Bondarenko - Summer 1998<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
param ne > 0, integer; # number of differential equations<br />
param np > 0, integer; # number of ODE parameters<br />
param nm > 0, integer; # number of measurements<br />
<br />
param bc {1..ne}; # boundary conditions<br />
param tau {1..nm}; # times at which observations made<br />
<br />
var t;<br />
var tf := tau[nm];<br />
<br />
param z {1..nm,1..ne}; # observations<br />
var theta {1..np} >= 0, <= 100; # ODE parameters<br />
<br />
var u{1..ne} >= 0, <= 200;<br />
<br />
minimize l2error{i in 1..nm}:<br />
eval ( sum {s in 1..ne} (u[s] - z[i,s])^2, tau[i] );<br />
<br />
subject to theta_bounds {i in 1..np}: theta[i] >= 0.0; <br />
<br />
subject to ode_bc {s in 1..ne}: eval(u[s], 0.0) = bc[s];<br />
<br />
subject to de1:<br />
diff (u[1], t) = - (theta[1]+theta[2])*u[1];<br />
<br />
subject to de2:<br />
diff (u[2], t) = theta[1]*u[1];<br />
<br />
subject to de3:<br />
diff (u[3], t) = theta[2]*u[1] - (theta[3]+theta[4])*u[3] + theta[5]*u[5];<br />
<br />
subject to de4:<br />
diff (u[4], t) = theta[3]*u[3];<br />
<br />
subject to de5:<br />
diff (u[5], t) = theta[4]*u[3] - theta[5]*u[5];<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Isomerization of Alpha-Pinene problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Particle_steering_problem_(TACO)&diff=665Particle steering problem (TACO)2011-09-29T19:19:17Z<p>Ckirches: Particle steering problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Particle steering problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file particle_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Particle steering problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
param Pi := 3.14159265358979;<br />
param a := 100.0;<br />
<br />
var t;<br />
var tf := 1, >= 0, <=10;<br />
var y{1..4};<br />
var u >= -Pi/2, <= +Pi/2;<br />
let u.type := "u1";<br />
<br />
minimize time: <br />
eval(t,tf);<br />
<br />
subject to<br />
<br />
dy1: diff (y[1],t) = y[2];<br />
dy2: diff (y[2],t) = a*cos(u);<br />
dy3: diff (y[3],t) = y[4];<br />
dy4: diff (y[4],t) = a*sin(u);<br />
<br />
ivc{i in 1..4}: eval(y[i],0) = 0;<br />
<br />
by1d: eval(y[2],tf) = 45;<br />
by2: eval(y[3],tf) = 5;<br />
by2d: eval(y[4],tf) = 0;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Particle steering problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Robot_arm_problem_(TACO)&diff=664Robot arm problem (TACO)2011-09-29T19:16:16Z<p>Ckirches: Robot arm problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Robot arm problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file robotarm_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Robot arm problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# David Bortz - Summer 1998 <br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
# Final positions of the length and the angles for the robot arm<br />
<br />
param L; # total length of arm<br />
param pi := 4*atan(1);<br />
<br />
# Upper bounds on the controls<br />
<br />
param max_u_rho;<br />
param max_u_the;<br />
param max_u_phi;<br />
<br />
# Initial positions of the length and the angles for the robot arm<br />
<br />
param rho_0;<br />
param the_0;<br />
param phi_0;<br />
<br />
# Final positions of the length and the angles for the robot arm<br />
<br />
param rho_n;<br />
param the_n;<br />
param phi_n;<br />
<br />
# The length and the angles theta and phi for the robot arm.<br />
<br />
var rho >=0, <= L; <br />
var the >= -pi, <= pi; <br />
var phi >=0, <= pi;<br />
<br />
# The derivatives of the length and the angles.<br />
<br />
var rho_dot;<br />
var the_dot;<br />
var phi_dot;<br />
<br />
# The controls.<br />
<br />
var u_rho >= -max_u_rho, <= max_u_rho, suffix type "u0";<br />
var u_the >= -max_u_the, <= max_u_the, suffix type "u0";<br />
var u_phi >= -max_u_phi, <= max_u_phi, suffix type "u0";<br />
<br />
# The independent time and the final time.<br />
<br />
var t;<br />
var tf := 1.0, >= 0.1, <= 12 suffix scale 10.0;<br />
<br />
# The moments of inertia.<br />
<br />
var I_the = ((L-rho)^3+rho^3)*(sin(phi))^2/3.0;<br />
var I_phi = ((L-rho)^3+rho^3)/3.0;<br />
<br />
# The robot arm problem.<br />
<br />
minimize time: eval(t,tf) suffix scale 1e+2;<br />
<br />
subject to rho_eqn:<br />
diff(rho, t) = rho_dot;<br />
<br />
subject to the_eqn:<br />
diff(the, t) = the_dot;<br />
<br />
subject to phi_eqn:<br />
diff (phi, t) = phi_dot;<br />
<br />
subject to u_rho_eqn:<br />
diff (rho_dot, t) = u_rho/L;<br />
<br />
subject to u_the_eqn:<br />
diff (the_dot, t) = u_the/I_the;<br />
<br />
subject to u_phi_eqn:<br />
diff (phi_dot, t) = u_phi/I_phi;<br />
<br />
# Boundary Conditions<br />
<br />
subject to rho_0_eqn: eval (rho, 0) = 4.5 suffix type "dpc";<br />
subject to the_0_eqn: eval (the, 0) = 0 suffix type "dpc";<br />
subject to phi_0_eqn: eval (phi, 0) = pi/4 suffix type "dpc";<br />
<br />
subject to rho_f_eqn: eval (rho, tf) = 4.5;<br />
subject to the_f_eqn: eval (the, tf) = 2*pi/3;<br />
subject to phi_f_eqn: eval (phi, tf) = pi/4;<br />
<br />
subject to rho_dot_0_eqn: eval (rho_dot, 0) = 0 suffix type "dpc";<br />
subject to the_dot_0_eqn: eval (the_dot, 0) = 0 suffix type "dpc";<br />
subject to phi_dot_0_eqn: eval (phi_dot, 0) = 0 suffix type "dpc";<br />
<br />
subject to rho_dot_f_eqn: eval (rho_dot, tf) = 0;<br />
subject to the_dot_f_eqn: eval (the_dot, tf) = 0;<br />
subject to phi_dot_f_eqn: eval (phi_dot, tf) = 0;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Robot arm problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Methanol_to_Hydrocarbons_problem_(TACO)&diff=663Methanol to Hydrocarbons problem (TACO)2011-09-29T19:12:30Z<p>Ckirches: Methanol to Hydrocarbons problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Methanol to Hydrocarbons problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file methanol_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Methanol to Hydrocarbons problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Michael Merritt - Summer 2000<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
<br />
param ne := 3; # number of differential equations<br />
param np := 5; # number of ODE parameters<br />
param nm > 0, integer; # number of measurements<br />
<br />
param bc {1..ne}; # ODE initial conditions<br />
param tau {1..nm}; # times at which observations made<br />
<br />
param z {1..nm, 1..ne}; # observations<br />
var theta {1..np} := 1.0; # ODE parameters<br />
<br />
var u {s in 1..ne};<br />
<br />
minimize l2error{j in 1..nm}:<br />
eval (sum {s in 1..ne}(u[s] - z[j,s])^2, tau[j]);<br />
<br />
subject to theta_bounds {i in 1..np}: theta[i] >= 0.0; <br />
<br />
subject to bc_cond {s in 1..ne}: eval (u[s], 0) = bc[s];<br />
<br />
subject to eqn1:<br />
diff(u[1],t) = - (2*theta[2] - <br />
(theta[1]*u[2])/((theta[2]+theta[5])*u[1]+u[2]) +<br />
theta[3] + theta[4])*u[1];<br />
<br />
subject to eqn2:<br />
diff(u[2],t) = (theta[1]*u[1]*(theta[2]*u[1]-u[2]))/<br />
((theta[2]+theta[5])*u[1]+u[2]) +<br />
theta[3]*u[1];<br />
<br />
subject to eqn3:<br />
diff(u[3],t) = (theta[1]*u[1]*(u[2]+theta[5]*u[1]))/<br />
((theta[2]+theta[5])*u[1]+u[2]) +<br />
theta[4]*u[1];<br />
<br />
data methanol_taco.dat;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
This is the data file methanol_taco.dat<br />
<source lang="AMPL"><br />
<br />
# Time measurements<br />
<br />
param tau := <br />
1 0<br />
2 0.050<br />
3 0.065<br />
4 0.080<br />
5 0.123<br />
6 0.233<br />
7 0.273<br />
8 0.354<br />
9 0.397<br />
10 0.418<br />
11 0.502<br />
12 0.553<br />
13 0.681<br />
14 0.750<br />
15 0.916<br />
16 0.937<br />
17 1.122;<br />
<br />
# Concentrations<br />
<br />
param z: 1 2 3 :=<br />
1 1.0000 0 0<br />
2 0.7085 0.1621 0.0811<br />
3 0.5971 0.1855 0.0965<br />
4 0.5537 0.1989 0.1198<br />
5 0.3684 0.2845 0.1535<br />
6 0.1712 0.3491 0.2097<br />
7 0.1198 0.3098 0.2628<br />
8 0.0747 0.3576 0.2467<br />
9 0.0529 0.3347 0.2884<br />
10 0.0415 0.3388 0.2757<br />
11 0.0261 0.3557 0.3167<br />
12 0.0208 0.3483 0.2954<br />
13 0.0085 0.3836 0.2950<br />
14 0.0053 0.3611 0.2937<br />
15 0.0019 0.3609 0.2831<br />
16 0.0018 0.3485 0.2846<br />
17 0.0006 0.3698 0.2899;<br />
<br />
param bc := 1 1 2 0 3 0; <br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Methanol to Hydrocarbons problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Marine_population_dynamics_problem_(TACO)&diff=662Marine population dynamics problem (TACO)2011-09-29T19:08:16Z<p>Ckirches: Marine population dynamics problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Marine population dynamics problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file marine_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Marine population dynamics problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Alexander S. Bondarenko - Summer 1998<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
<br />
param ne > 0, integer; # number of differential equations<br />
param nm > 0, integer; # number of measurements<br />
<br />
param tau {1..nm}; # times at which observations made<br />
param tf := tau[nm]; # ODEs defined in [0,tf]<br />
<br />
param z {1..nm,1..ne}; # observations<br />
var g {1..ne-1} >= 0, <= 1; # growth rates<br />
var m {1..ne} >= 0, <= 1; # mortality rates<br />
var u {1..ne};<br />
<br />
minimize l2error{j in 1..nm}:<br />
eval ( sum {s in 1..ne} (u[s] - z[j,s])^2, tau[j] );<br />
<br />
subject to g_bounds {s in 1..ne-1}: g[s] >= 0;<br />
<br />
subject to m_bounds {s in 1..ne}: m[s] >= 0;<br />
<br />
subject to de_1:<br />
diff(u[1],t) = -(m[1]+g[1])*u[1];<br />
<br />
subject to de_s {s in 2..ne-1}:<br />
diff(u[s],t) = g[s-1]*u[s-1] - (m[s]+g[s])*u[s]; <br />
<br />
subject to de_ne:<br />
diff(u[ne],t) = g[ne-1]*u[ne-1] - m[ne]*u[ne];<br />
<br />
data cops_marine.dat;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
This is the file cops_marine.dat<br />
<br />
<source lang="AMPL"><br />
param ne := 8;<br />
param nm := 21;<br />
<br />
# Time measurements<br />
<br />
param tau :=<br />
1 0.0<br />
2 0.5<br />
3 1.0<br />
4 1.5<br />
5 2.0<br />
6 2.5<br />
7 3.0<br />
8 3.5 <br />
9 4.0<br />
10 4.5<br />
11 5.0<br />
12 5.5<br />
13 6.0<br />
14 6.5<br />
15 7.0<br />
16 7.5<br />
17 8.0<br />
18 8.5<br />
19 9.0<br />
20 9.5<br />
21 10.0;<br />
<br />
# Measurements<br />
<br />
param z:<br />
1 2 3 4 5 6 7 8 := <br />
1 20000.0 17000.0 10000.0 15000.0 12000.0 9000.0 7000.0 3000.0<br />
2 12445.0 15411.0 13040.0 13338.0 13484.0 8426.0 6615.0 4022.0<br />
3 7705.0 13074.0 14623.0 11976.0 12453.0 9272.0 6891.0 5020.0<br />
4 4664.0 8579.0 12434.0 12603.0 11738.0 9710.0 6821.0 5722.0<br />
5 2977.0 7053.0 11219.0 11340.0 13665.0 8534.0 6242.0 5695.0<br />
6 1769.0 5054.0 10065.0 11232.0 12112.0 9600.0 6647.0 7034.0<br />
7 943.0 3907.0 9473.0 10334.0 11115.0 8826.0 6842.0 7348.0<br />
8 581.0 2624.0 7421.0 10297.0 12427.0 8747.0 7199.0 7684.0<br />
9 355.0 1744.0 5369.0 7748.0 10057.0 8698.0 6542.0 7410.0<br />
10 223.0 1272.0 4713.0 6869.0 9564.0 8766.0 6810.0 6961.0<br />
11 137.0 821.0 3451.0 6050.0 8671.0 8291.0 6827.0 7525.0<br />
12 87.0 577.0 2649.0 5454.0 8430.0 7411.0 6423.0 8388.0<br />
13 49.0 337.0 2058.0 4115.0 7435.0 7627.0 6268.0 7189.0<br />
14 32.0 228.0 1440.0 3790.0 6474.0 6658.0 5859.0 7467.0<br />
15 17.0 168.0 1178.0 3087.0 6524.0 5880.0 5562.0 7144.0<br />
16 11.0 99.0 919.0 2596.0 5360.0 5762.0 4480.0 7256.0<br />
17 7.0 65.0 647.0 1873.0 4556.0 5058.0 4944.0 7538.0<br />
18 4.0 44.0 509.0 1571.0 4009.0 4527.0 4233.0 6649.0<br />
19 2.0 27.0 345.0 1227.0 3677.0 4229.0 3805.0 6378.0<br />
20 1.0 20.0 231.0 934.0 3197.0 3695.0 3159.0 6454.0<br />
21 1.0 12.0 198.0 707.0 2562.0 3163.0 3232.0 5566.0;<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Marine population dynamics problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Hanging_chain_problem_(TACO)&diff=661Hanging chain problem (TACO)2011-09-29T18:25:53Z<p>Ckirches: /* AMPL */</p>
<hr />
<div>This page contains a model of the [[Hanging chain problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file hangchain_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Hanging chain problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Alexander S. Bondarenko - Summer 1998<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
var tf := 1;<br />
<br />
var x >= 0, <= 10;<br />
var L >= 0, <= 10;<br />
var E >= 0, <= 10;<br />
var u >= -10, <= 20 suffix type "u1";<br />
<br />
param a := 1;<br />
param b := 3;<br />
param Lp := 4;<br />
<br />
minimize energy: eval(E,tf);<br />
<br />
subject to<br />
<br />
dx: diff(x,t) = u;<br />
dE: diff(E,t) = x*sqrt(1+u^2);<br />
dL: diff(L,t) = sqrt(1+u^2);<br />
<br />
x0: eval(x,0) = a;<br />
x1: eval(x,1) = b;<br />
E0: eval(E,0) = 0;<br />
L0: eval(L,0) = 0;<br />
L1: eval(L,1) = Lp;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Hanging chain problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Hanging_chain_problem_(TACO)&diff=660Hanging chain problem (TACO)2011-09-29T18:24:52Z<p>Ckirches: /* AMPL */</p>
<hr />
<div>This page contains a model of the [[Hanging chain problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file hangchain_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Hanging chain problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Alexander S. Bondarenko - Summer 1998<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
var tf := 1;<br />
<br />
var x >= 0, <= 10;<br />
var L >= 0, <= 10;<br />
var E >= 0, <= 10;<br />
var u >= -10, <= 20;<br />
let u.type := "u1";<br />
<br />
param a := 1;<br />
param b := 3;<br />
param Lp := 4;<br />
<br />
minimize energy: eval(E,tf);<br />
<br />
subject to<br />
<br />
dx: diff(x,t) = u;<br />
dE: diff(E,t) = x*sqrt(1+u^2);<br />
dL: diff(L,t) = sqrt(1+u^2);<br />
<br />
x0: eval(x,0) = a;<br />
x1: eval(x,1) = b;<br />
E0: eval(E,0) = 0;<br />
L0: eval(L,0) = 0;<br />
L1: eval(L,1) = Lp;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Hanging chain problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Hanging_chain_problem_(TACO)&diff=659Hanging chain problem (TACO)2011-09-29T18:23:46Z<p>Ckirches: Hanging chain problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Hanging chain problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file hangchain_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Hanging chain problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Alexander S. Bondarenko - Summer 1998<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
param nh > 0, integer; # number of subintervals<br />
param L > 0; # length of the suspended chain<br />
param a; # height of the chain at t=0 (left)<br />
param b; # height of the chain at t=1 (right)<br />
<br />
param tf; # ODEs defined in [0,tf]<br />
param h := tf/nh; # uniform interval length<br />
<br />
# x[*,1] - height of the chain<br />
# x[*,2] - potential energy of the chain<br />
# x[*,3] - lenght of the chain<br />
<br />
param tmin := if b > a then 0.25 else 0.75;;<br />
<br />
var x{k in 0..nh,j in 1..3}; # state variables <br />
var u{k in 0..nh}; # derivative of x<br />
<br />
minimize potential_energy: x[nh,2];<br />
<br />
subject to de1 {j in 0..nh-1}:<br />
x[j+1,1] = x[j,1] + 0.5*h*(u[j] + u[j+1]);<br />
<br />
subject to de2 {j in 0..nh-1}:<br />
x[j+1,2] = x[j,2] + 0.5*h*(x[j,1]*sqrt(1+u[j]^2) + x[j+1,1]*sqrt(1+u[j+1]^2));<br />
<br />
subject to de3 {j in 0..nh-1}:<br />
x[j+1,3] = x[j,3] + 0.5*h*(sqrt(1+u[j]^2) + sqrt(1+u[j+1]^2));<br />
<br />
# Boundary conditions<br />
<br />
subject to bc1: x[0,1] = a;<br />
subject to bc2: x[nh,1] = b;<br />
subject to bc3: x[0,2] = 0.0;<br />
subject to bc4: x[0,3] = 0.0;<br />
subject to bc5: x[nh,3] = L;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Hanging chain problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Goddart%27s_rocket_problem_(TACO)&diff=658Goddart's rocket problem (TACO)2011-09-29T18:18:12Z<p>Ckirches: /* AMPL */</p>
<hr />
<div>This page contains a model of the [[Goddart's rocket problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file goddart_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Goddart's rocket problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
<br />
var tf := 1.0, >= 0.01, <= 1;<br />
<br />
param v0 := 0.0;<br />
param m0 := 1.0;<br />
param g0 := 1.0;<br />
param h0 := 1.0;<br />
param hc := 500.0;<br />
param vc := 620.0;<br />
param mc := 0.6;<br />
param Tmax := 3.5*g0*m0;<br />
param c := 0.5*sqrt(g0*h0);<br />
param mf := mc*m0;<br />
<br />
var h >= h0, := 1;<br />
let h.interp_to := h0;<br />
var v >= v0;<br />
let v.interp_to := v0;<br />
var m <= m0;<br />
let m.interp_to := mf;<br />
<br />
var T >= 0, <= Tmax, := Tmax/2;<br />
let T.type := "u0";<br />
<br />
param Dc := 0.5*vc*m0/g0;<br />
var D = Dc*v^2*exp(-hc*(h-h0)/h0);<br />
var g = g0*(h0/h)^2;<br />
<br />
maximize FinalHeight: eval(h,tf);<br />
let FinalHeight.scale := 0.01;<br />
subject to<br />
<br />
dh: diff(h,t) = v;<br />
dv: diff(v,t) = (T - D)/m - g;<br />
dm: diff(m,t) = -T/c;<br />
<br />
ih: eval(h,0) = h0;<br />
iv: eval(v,0) = v0;<br />
im: eval(m,0) = m0;<br />
fm: eval(m,tf) = mf;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Goddart's rocket problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Goddart%27s_rocket_problem_(TACO)&diff=657Goddart's rocket problem (TACO)2011-09-29T18:16:55Z<p>Ckirches: Goddart's rocket problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Goddart's rocket problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file goddart_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Goddart's rocket problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Michael Merritt - Summer 2000<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
<br />
var tf := 1.0, >= 0.01, <= 1;<br />
<br />
param v0 := 0.0;<br />
param m0 := 1.0;<br />
param g0 := 1.0;<br />
param h0 := 1.0;<br />
param hc := 500.0;<br />
param vc := 620.0;<br />
param mc := 0.6;<br />
param Tmax := 3.5*g0*m0;<br />
param c := 0.5*sqrt(g0*h0);<br />
param mf := mc*m0;<br />
<br />
var h >= h0, := 1;<br />
let h.interp_to := h0;<br />
var v >= v0;<br />
let v.interp_to := v0;<br />
var m <= m0;<br />
let m.interp_to := mf;<br />
<br />
var T >= 0, <= Tmax, := Tmax/2;<br />
let T.type := "u0";<br />
<br />
param Dc := 0.5*vc*m0/g0;<br />
var D = Dc*v^2*exp(-hc*(h-h0)/h0);<br />
var g = g0*(h0/h)^2;<br />
<br />
maximize FinalHeight: eval(h,tf);<br />
let FinalHeight.scale := 0.01;<br />
subject to<br />
<br />
dh: diff(h,t) = v;<br />
dv: diff(v,t) = (T - D)/m - g;<br />
dm: diff(m,t) = -T/c;<br />
<br />
ih: eval(h,0) = h0;<br />
iv: eval(v,0) = v0;<br />
im: eval(m,0) = m0;<br />
fm: eval(m,tf) = mf;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Goddart's rocket problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Catalytic_cracking_problem_(TACO)&diff=656Catalytic cracking problem (TACO)2011-09-29T18:13:17Z<p>Ckirches: Catalytic cracking of gas/oil problem (TACO)</p>
<hr />
<div>This page contains a model of the [[Catalytic cracking problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file gasoil_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Catalytic cracking problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# Michael Merritt - Summer 2000<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
<br />
param ne := 2; # number of differential equations<br />
param np := 3; # number of ODE parameters<br />
param nm > 0, integer; # number of measurements<br />
<br />
param bc {1..ne}; # ODE initial conditions<br />
param tau {1..nm}; # times at which observations made<br />
<br />
param z {1..nm, 1..ne}; # observations<br />
var theta {1..np} >= 0, <= 20; # ODE parameters<br />
<br />
var u {s in 1..ne};<br />
<br />
minimize l2error{j in 1..nm}:<br />
eval ( sum {s in 1..ne}(u[s] - z[j,s])^2, tau[j] );<br />
<br />
subject to theta_bounds {i in 1..np}: theta[i] >= 0.0; <br />
<br />
subject to bc_cond {s in 1..ne}: eval (u[s], 0) = bc[s];<br />
<br />
subject to de1:<br />
diff(u[1],t) = - (theta[1]+theta[3])*u[1]^2;<br />
<br />
subject to de2:<br />
diff(u[2],t) = theta[1]*u[1]^2 - theta[2]*u[2];<br />
<br />
data gasoil_taco.dat;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
This is the data file gasoil_taco.dat<br />
<source lang="AMPL"><br />
param nm := 21;<br />
<br />
# Time measurements<br />
<br />
param tau := <br />
1 0 <br />
2 0.025<br />
3 0.05<br />
4 0.075<br />
5 0.10<br />
6 0.125<br />
7 0.150<br />
8 0.175<br />
9 0.20<br />
10 0.225<br />
11 0.250<br />
12 0.30<br />
13 0.35<br />
14 0.40<br />
15 0.45<br />
16 0.50<br />
17 0.55<br />
18 0.65<br />
19 0.75<br />
20 0.85<br />
21 0.95;<br />
<br />
# Concentrations<br />
<br />
param z: 1 2 :=<br />
1 1.0000 0<br />
2 0.8105 0.2000<br />
3 0.6208 0.2886<br />
4 0.5258 0.3010<br />
5 0.4345 0.3215<br />
6 0.3903 0.3123<br />
7 0.3342 0.2716<br />
8 0.3034 0.2551<br />
9 0.2735 0.2258<br />
10 0.2405 0.1959<br />
11 0.2283 0.1789<br />
12 0.2071 0.1457<br />
13 0.1669 0.1198<br />
14 0.1530 0.0909<br />
15 0.1339 0.0719<br />
16 0.1265 0.0561<br />
17 0.1200 0.0460<br />
18 0.0990 0.0280<br />
19 0.0870 0.0190<br />
20 0.0770 0.0140<br />
21 0.0690 0.0100;<br />
<br />
param bc := 1 1 2 0; <br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Catalytic cracking problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Catalyst_mixing_problem_(TACO)&diff=655Catalyst mixing problem (TACO)2011-09-29T18:09:30Z<p>Ckirches: </p>
<hr />
<div>This page contains a model of the [[Catalyst mixing problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file catmix_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Catalyst mixing problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
param ne := 2; # number of differential equations<br />
<br />
var tf := 1; # Final time<br />
var t;<br />
<br />
param bc {1..ne}; # Boundary conditions for x<br />
<br />
var u;<br />
let u.type := "u1";<br />
<br />
var v {1..ne};<br />
<br />
minimize objective: eval (-1 + v[1] + v[2], tf);<br />
let objective.scale := 0.01;<br />
<br />
subject to u_bounds: 0.0 <= u <= 1.0;<br />
<br />
subject to de1:<br />
diff(v[1],t) = u*(10*v[2] - v[1]);<br />
<br />
subject to de2:<br />
diff(v[2],t) = u*(v[1] - 10*v[2]) - (1 - u)*v[2];<br />
<br />
subject to b_eqn {s in 1..ne}: eval(v[s],0) = bc[s];<br />
<br />
data catmix_taco.dat;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
This is the data file catmix_taco.dat<br />
<source lang="AMPL"><br />
# Set the design parameters<br />
<br />
param bc :=<br />
1 1<br />
2 0;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Catalyst mixing problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Catalyst_mixing_problem_(TACO)&diff=654Catalyst mixing problem (TACO)2011-09-29T18:07:59Z<p>Ckirches: /* AMPL */</p>
<hr />
<div>This page contains a model of the [[Catalyst mixing problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or MINLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file catmix_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Catalyst mixing problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
param ne := 2; # number of differential equations<br />
<br />
var tf := 1; # Final time<br />
var t;<br />
<br />
param bc {1..ne}; # Boundary conditions for x<br />
<br />
var u;<br />
let u.type := "u1";<br />
<br />
var v {1..ne};<br />
<br />
minimize objective: eval (-1 + v[1] + v[2], tf);<br />
let objective.scale := 0.01;<br />
<br />
subject to u_bounds: 0.0 <= u <= 1.0;<br />
<br />
subject to de1:<br />
diff(v[1],t) = u*(10*v[2] - v[1]);<br />
<br />
subject to de2:<br />
diff(v[2],t) = u*(v[1] - 10*v[2]) - (1 - u)*v[2];<br />
<br />
subject to b_eqn {s in 1..ne}: eval(v[s],0) = bc[s];<br />
<br />
data catmix_taco.dat;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
This is the data file catmix_taco.dat<br />
<source lang="AMPL"><br />
# Set the design parameters<br />
<br />
param bc :=<br />
1 1<br />
2 0;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Catalyst mixing problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=External_Links&diff=653External Links2011-09-29T18:03:04Z<p>Ckirches: Added external link to COPS library</p>
<hr />
<div>= Work Groups =<br />
<br />
An incomplete list of work groups interested in aspects of mixed-integer dynamic optimization.<br />
<br />
* [http://mathopt.de Mathematical and Computational Optimization], Uni Heidelberg, led by Sebastian Sager<br />
* [http://www.unibw.de/lrt1/gerdts Optimal Control], Universität der Bundeswehr München, led by Matthias Gerdts<br />
* [http://www.am.uni-erlangen.de/wima Discrete Optimization], Uni Erlangen, led by Alexander Martin<br />
* [http://www3.mathematik.tu-darmstadt.de/ags/optimization/research/nonlinear-optimization.html Nonlinear Optimization], Uni Darmstadt, led by Stefan Ulbrich<br />
* [http://www.dyn.bci.tu-dortmund.de/ Process Dynamics and Operations], Uni Dortmund, led by Sebastian Engell<br />
* [http://www.aices.rwth-aachen.de/organization/institutes/procsyseng Process Systems Engineering], RWTH Aachen, led by Wolfgang Marquardt<br />
* [http://www.kuleuven.be/optec/ Optimization in Engineering], KU Leuven, led by Moritz Diehl<br />
* [http://numero.cheme.cmu.edu/ Biegler Research Group], Carnegie Mellon, led by Larry Biegler<br />
* [http://www.am.uni-erlangen.de/home/leugering/ Applied Mathematics II], Uni Erlangen, led by Günter Leugering<br />
* [http://egon.cheme.cmu.edu/ Grossmann Research Group], Carnegie Mellon, led by Ignacio Grossmann<br />
* [http://www.control.lth.se/user/johan.akesson/ Automatic Control], Lund University, led by Johan Akesson<br />
<br />
Feel free to update this list!<br />
<br />
= Benchmark Libraries =<br />
<br />
=== Embedded Optimization and Control ===<br />
<br />
* European FP 7 project [http://embocon.org EMBOCON]<br />
<br />
=== Hybrid Systems ===<br />
<br />
* [http://www.ist-hycon.org/ HYCON] network: two benchmark problems have been defined.<br />
<br />
=== Optimal Control ===<br />
<br />
* The [http://tomdyn.com/ PROPT homepage] (a matlab toolkit for dynamic optimization using collocation) states over 100 test cases from different applications with their results and computation time. <br />
* With the software package [http://abs-5.me.washington.edu/noc/dsoa.html dsoa] come currently 77 test problems. <br />
* The ESA provides a [http://www.esa.int/gsp/ACT/inf/op/globopt.htm test set of global optimization spacecraft trajectory problems] and their best putative solutions.<br />
* The [http://www.mcs.anl.gov/~more/cops/ COPS library] contains around 10 dynamic control and parameter estimation problems<br />
<br />
=== MINLP ===<br />
<br />
* CMU-IBM Cyber-Infrastructure for MINLP [http://minlp.org/ collaborative site]<br />
* MINLPlib <bibref>Bussieck2003a</bibref> <br />
* [http://www.gamsworld.org/performance GAMSWORLD]<br />
<br />
=== Generic Optimization ===<br />
<br />
* [http://cuter.rl.ac.uk/cuter-www/ CUTEr] is a versatile testing environment for optimization and linear algebra solvers.<br />
* [http://www.netlib.org/lp/ NETLIB] for linear programming (LP)<br />
* [http://miplib.zib.de/ MIPLIB] for mixed-integer linear programming (MILP)<br />
* Schittkowski Library <bibref>Schittkowski2002</bibref> for nonlinear programming (LP)<br />
<br />
== References ==<br />
<bibreferences/></div>Ckircheshttps://mintoc.de/index.php?title=Main_Page&diff=652Main Page2011-09-29T17:59:40Z<p>Ckirches: Link to AMPL/TACO category on main page</p>
<hr />
<div>__NOTOC__<br />
This wiki contains a '''benchmark library''' of '''mixed-integer optimal control problems'''. The main intention is to provide algorithm developers with a set of challenging problems to evaluate their numerical optimization methods. An important focus is given on '''reproducibility''' of optimal solutions.<br />
As, in contrast to say linear programming, there are no standard formats for the formulation of such problems, and they often show completely different characteristics, these pages dedicate some space for a thorough description of problem and solutions.<br />
<br />
A more detailed description of the underlying concepts of this library can be found in the article <bibref>Sager2011b</bibref><br />
<br />
Sager, S., 'A benchmark library of mixed-integer optimal control problems', <br />
Proceedings MINLP09 IMA Minneapolis, (accepted) <br />
<br />
A [http://mathopt.de/PUBLICATIONS/Sager2011b.pdf preprint] pdf is available.<br />
<br />
<!-- TOP TABLE WITH NEWS --><br />
<table bgcolor="#EEEEFF" width="100%" cellspacing="10px"><br />
<tr valign="top"><br />
<td width="80%" bgcolor="#EEEEFF"><br />
==[[:Category:News|News]] <span style="font-variant:small-caps" style="font-size:10px">[[Current News|(add)]]</span>==<br />
<!-- The actual news are being included from the page Current News with the following line. --><br />
{{:Current News}}<br />
<!-- Do not edit between this comment and the next '<td>' tag! --><br />
</td><br />
</tr><br />
</table><br />
<br />
<table width="100%"><br />
<br />
<!-- CATEGORY FIELD--><br />
<tr valign="top"><br />
<td width="50%"><br />
==[[:Category:Problem characterization|Problem characterization]] <span style="font-variant:small-caps" style="font-size:10px">[[Help:Adding a problem characterization|(add)]]</span>==<br />
<br />
via ''[[:Category:Model characterization|mathematical model]]'' - via ''[[:Category:Solution characterization|optimal solution]]'' - via ''[[:Category:Application|application area]]''<br />
<br />
''[[:Category:ODE model|ODE model]]'' - ''[[:Category:Bang bang|Bang bang]]'' - ''[[:Category:Chattering|Chattering]]'' - ''[[:Category:AMPL|AMPL]]'' - <br />
''[[:Category:AMPL/TACO|AMPL using TACO]]'' - ''[[:Category:C|C code]]'' - ''[[:Category:Optimica|optimica]]'' - ''[[:Category:Periodic|Periodicity]]''<br />
</td><br />
<br />
<!-- PROBLEM FIELD--><br />
<td width="50%" ><br />
<br />
==[[:Category:MIOCP|Problems]] <span style="font-variant:small-caps" style="font-size:10px">[[Help:Adding a Problem|(add)]]</span>==<br />
<br />
''[[Lotka Volterra fishing problem]]'' - [[F-8 aircraft]] - [[Annihilation of calcium oscillations | Calcium]] - [[Annihilation of calcium oscillations with PLC activation inhibition| Calcium 2]]<br />
<br />
''[[Supermarket refrigeration system]] - ''[[Car testdrive]]'' - ''[[Fuller's problem]]'' - ''[[Bang-bang approximation of a traveling wave | 1D wave]] - ''[[Subway ride | Subway]]<br />
</td><br />
</tr><br />
<br />
<tr valign="top"><br />
<br />
<!-- HELP FIELD--><br />
<td width="50%" ><br />
<br />
==[[:Category:Help|Help]] <span style="font-variant:small-caps" style="font-size:10px">[[User:SebastianSager|(contact)]]</span>==<br />
<br />
''[[Help:How to contribute|How to contribute]]'' - ''[[Help:How to cite|How to cite]]'' - ''[[Help:Using LaTeX|LaTeX]]'' - ''[[Help:Description guidelines | Guidelines]]<br />
</td><br />
<br />
<!-- COMMUNITY FIELD--><br />
<td width="50%" ><br />
<br />
==[[:Category:Community|Community]] <span style="font-variant:small-caps" style="font-size:10px">[[Help:Adding a User|(add)]]</span>==<br />
<br />
[[:Category:Community|Contributors]] - ''[[External Links]]''<br />
<br />
''Feel encouraged to participate!''<br />
<br />
</td><br />
</tr><br />
<br />
</table><br />
<br />
[[Category:Main]]</div>Ckircheshttps://mintoc.de/index.php?title=Catalyst_mixing_problem_(TACO)&diff=651Catalyst mixing problem (TACO)2011-09-29T17:56:47Z<p>Ckirches: COPS Catalyst mixing problem (AMPL/TACO)</p>
<hr />
<div>This page contains a model of the [[Catalyst mixing problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. The original model using a collocation formulation can be found in the [http://www.mcs.anl.gov/~more/cops/ COPS library].<br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or MINLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file catmix_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Catalyst mixing problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
#<br />
# Source: COPS 3.1 collocation formulation - March 2004<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
param ne := 2; # number of differential equations<br />
<br />
var tf := 1; # Final time<br />
var t;<br />
<br />
param bc {1..ne}; # Boundary conditions for x<br />
<br />
var u;<br />
let u.type := "u1";<br />
<br />
var v {1..ne};<br />
<br />
minimize objective: eval (-1 + v[1] + v[2], tf);<br />
let objective.scale := 0.01;<br />
<br />
subject to u_bounds: 0.0 <= u <= 1.0;<br />
<br />
subject to de1:<br />
diff(v[1],t) = u*(10*v[2] - v[1]);<br />
<br />
subject to de2:<br />
diff(v[2],t) = u*(v[1] - 10*v[2]) - (1 - u)*v[2];<br />
<br />
subject to b_eqn {s in 1..ne}: eval(v[s],0) = bc[s];<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
This is the data file catmix_taco.dat<br />
<source lang="AMPL"><br />
# Set the design parameters<br />
<br />
param bc :=<br />
1 1<br />
2 0;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Catalyst mixing problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at the [http://www.mcs.anl.gov/~more/cops/ COPS library]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Brachistochrone_problem_(TACO)&diff=650Brachistochrone problem (TACO)2011-09-29T17:42:50Z<p>Ckirches: brachistochrone: Cited Bernoulli, Betts1993</p>
<hr />
<div>This page contains a model of the classical [[Brachistochrone problem]] (Johann Bernoulli, 1696), see e.g. [http://en.wikipedia.org/wiki/Brachistochrone_curve Wikipedia] or <bibref>Betts1993</bibref>, in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. <br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file brac_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Brachistochrone problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
var tf := 1.0, >= 0.1, <= 1.0;<br />
let tf.scale := 0.5; # improves convergence<br />
<br />
var x := 0, >= 0, <= 1;<br />
var y := 0, >= 0, <= 1;<br />
var v := 0, >= 0, <= 8;<br />
<br />
var a := 0.5, >= 0, <= 1.57079327;<br />
let a.type := "u1";<br />
let a.slope_min := -10.0;<br />
let a.slope_max := +10.0;<br />
<br />
param gravity := 32.174; # in ft/s^2<br />
<br />
minimize <br />
<br />
EndTime: eval (t,tf);<br />
let EndTime.scale := 0.1;<br />
<br />
subject to <br />
<br />
ODE_x: diff(x,t) = v*cos(a);<br />
ODE_y: diff(y,t) = v*sin(a);<br />
ODE_v: diff(v,t) = gravity*sin(a);<br />
<br />
IVC_x: eval(x,0) = 0;<br />
IVC_y: eval(y,0) = 0;<br />
IVC_v: eval(v,0) = 0; <br />
TC_x: eval(x,tf) = 1.0;<br />
<br />
# treating IVCs as boundary constraints improves convergence<br />
let IVC_x.type := "dpc";<br />
let IVC_y.type := "dpc";<br />
let IVC_v.type := "dpc";<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Brachistochrone problem]]<br />
<br />
== References ==<br />
<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Brachistochrone_problem_(TACO)&diff=649Brachistochrone problem (TACO)2011-09-29T17:37:22Z<p>Ckirches: /* Other Descriptions */</p>
<hr />
<div>This page contains a model of the classical [[Brachistochrone problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. <br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file brac_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Brachistochrone problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
var tf := 1.0, >= 0.1, <= 1.0;<br />
let tf.scale := 0.5; # improves convergence<br />
<br />
var x := 0, >= 0, <= 1;<br />
var y := 0, >= 0, <= 1;<br />
var v := 0, >= 0, <= 8;<br />
<br />
var a := 0.5, >= 0, <= 1.57079327;<br />
let a.type := "u1";<br />
let a.slope_min := -10.0;<br />
let a.slope_max := +10.0;<br />
<br />
param gravity := 32.174; # in ft/s^2<br />
<br />
minimize <br />
<br />
EndTime: eval (t,tf);<br />
let EndTime.scale := 0.1;<br />
<br />
subject to <br />
<br />
ODE_x: diff(x,t) = v*cos(a);<br />
ODE_y: diff(y,t) = v*sin(a);<br />
ODE_v: diff(v,t) = gravity*sin(a);<br />
<br />
IVC_x: eval(x,0) = 0;<br />
IVC_y: eval(y,0) = 0;<br />
IVC_v: eval(v,0) = 0; <br />
TC_x: eval(x,tf) = 1.0;<br />
<br />
# treating IVCs as boundary constraints improves convergence<br />
let IVC_x.type := "dpc";<br />
let IVC_y.type := "dpc";<br />
let IVC_v.type := "dpc";<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Brachistochrone problem]]<br />
<br />
== References ==<br />
<br />
<bibreferences/><br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Category:AMPL&diff=648Category:AMPL2011-09-29T17:34:59Z<p>Ckirches: </p>
<hr />
<div>This category lists all problems for which [http://www.ampl.org AMPL] code is provided. AMPL does not support differential equations, hence all models are a (finite-dimensional) discretization in one sense or another of a control problem.<br />
<br />
MIOCPs include features related to different mathematical disciplines. Hence, it is not surprising that very different approaches have been proposed to analyze and solve them. There are three generic approaches to solve model-based optimal control problems, compare <bibref>Binder2001</bibref>: first, solution of the Hamilton-Jacobi-Bellman equation and in a discrete setting Dynamic Programming, second indirect methods, also known as the first optimize, then discretize approach, and third direct methods (first optimize, then discretize) and in particular all--at--once approaches that solve the simulation and the optimization task simultaneously. The combination with the additional combinatorial restrictions on control functions comes at different levels: for free in dynamic programming, as the control space is evaluated anyhow, by means of an enumeration in the inner optimization problem of the necessary conditions of optimality in Pontryagin's maximum principle, or by various methods from integer programming in the direct methods. <br />
<br />
Even in the case of direct methods, there are multiple alternatives to proceed. Various approaches have been proposed to discretize the differential equations by means of shooting methods or collocation, e.g., <bibref>Bock1984</bibref>,<bibref>Biegler1984</bibref>, to (re)formulate the control problem by outer convexification <bibref>Sager2009</bibref>, to use global optimization methods by under- and overestimators, e.g., <bibref>Esposito2000</bibref>,<bibref>Papamichail2004</bibref>,<bibref>Chachuat2006</bibref>, to optimize the time-points for a given switching structure, e.g., <bibref>Kaya2003</bibref>,<bibref>Gerdts2006</bibref>,<bibref>Sager2009</bibref>, to consider a static optimization problem instead of the transient behavior, e.g., <bibref>Grossmann2005</bibref>, to approximate nonlinearities by piecewise-linear functions, e.g., <bibref>Martin2006</bibref>, or by approximating the combinatorial decisions by continuous formulations, as in <bibref>Burgschweiger2009</bibref> for drinking water networks.<br />
<br />
We do not want to discuss these methods here, but rather refer to <bibref>Sager2009</bibref>,<bibref>Sager2009b</bibref> for more comprehensive surveys. The main purpose of mentioning them is to point out that they all discretize the optimization problem in function space in a different manner, and hence result in different mathematical problems that are actually solved on a computer.<br />
<br />
Powerful commercial MILP solvers and advances in MINLP solvers make the usage of general purpose MILP/MINLP solvers more and more attractive. ''Please be aware however that the MINLP formulations we provide in this category are only one out of many possible ways to formulate the underlying MIOCP problems.''<br />
<br />
There are compilers available to process [[:Category:optimica | optimica]] models and automatically generate AMPL output, e.g., by applying a Radau collocation.<br />
<br />
Recently, the [[:Category:AMPL/TACO | TACO Toolkit for AMPL Control Optimization]] is a new effort aimed at modeling optimal control problems in AMPL. A small set of extensions allows to decouple the choice of a discretization scheme from the actual AMPL model. MUSCOD-II (Heidelberg) will be the first solver to support AMPL models using the TACO extensions.<br />
<br />
== References ==<br />
<bibreferences/><br />
<br />
[[Category:Problem characterization]]</div>Ckircheshttps://mintoc.de/index.php?title=Category:AMPL&diff=647Category:AMPL2011-09-29T17:31:44Z<p>Ckirches: Mention TACO</p>
<hr />
<div>This category lists all problems for which [http://www.ampl.org AMPL] code is provided. AMPL does not support differential equations, hence all models are a (finite-dimensional) discretization in one sense or another of a control problem.<br />
<br />
MIOCPs include features related to different mathematical disciplines. Hence, it is not surprising that very different approaches have been proposed to analyze and solve them. There are three generic approaches to solve model-based optimal control problems, compare <bibref>Binder2001</bibref>: first, solution of the Hamilton-Jacobi-Bellman equation and in a discrete setting Dynamic Programming, second indirect methods, also known as the first optimize, then discretize approach, and third direct methods (first optimize, then discretize) and in particular all--at--once approaches that solve the simulation and the optimization task simultaneously. The combination with the additional combinatorial restrictions on control functions comes at different levels: for free in dynamic programming, as the control space is evaluated anyhow, by means of an enumeration in the inner optimization problem of the necessary conditions of optimality in Pontryagin's maximum principle, or by various methods from integer programming in the direct methods. <br />
<br />
Even in the case of direct methods, there are multiple alternatives to proceed. Various approaches have been proposed to discretize the differential equations by means of shooting methods or collocation, e.g., <bibref>Bock1984</bibref>,<bibref>Biegler1984</bibref>, to (re)formulate the control problem by outer convexification <bibref>Sager2009</bibref>, to use global optimization methods by under- and overestimators, e.g., <bibref>Esposito2000</bibref>,<bibref>Papamichail2004</bibref>,<bibref>Chachuat2006</bibref>, to optimize the time-points for a given switching structure, e.g., <bibref>Kaya2003</bibref>,<bibref>Gerdts2006</bibref>,<bibref>Sager2009</bibref>, to consider a static optimization problem instead of the transient behavior, e.g., <bibref>Grossmann2005</bibref>, to approximate nonlinearities by piecewise-linear functions, e.g., <bibref>Martin2006</bibref>, or by approximating the combinatorial decisions by continuous formulations, as in <bibref>Burgschweiger2009</bibref> for drinking water networks.<br />
<br />
We do not want to discuss these methods here, but rather refer to <bibref>Sager2009</bibref>,<bibref>Sager2009b</bibref> for more comprehensive surveys. The main purpose of mentioning them is to point out that they all discretize the optimization problem in function space in a different manner, and hence result in different mathematical problems that are actually solved on a computer.<br />
<br />
Powerful commercial MILP solvers and advances in MINLP solvers make the usage of general purpose MILP/MINLP solvers more and more attractive. ''Please be aware however that the MINLP formulations we provide in this category are only one out of many possible ways to formulate the underlying MIOCP problems.''<br />
<br />
There are compilers available to process [[:Category:optimica | optimica]] models and automatically generate AMPL output, e.g., by applying a Radau collocation.<br />
<br />
Recently, the [[Category:AMPL/TACO | TACO Toolkit for AMPL Control Optimization]] is a new effort aimed at modeling optimal control problems in AMPL. A small set of extensions allows to decouple the choice of a discretization scheme from the actual AMPL model. MUSCOD-II (Heidelberg) will be the first solver to support AMPL models using the TACO extensions.<br />
<br />
== References ==<br />
<bibreferences/><br />
<br />
[[Category:Problem characterization]]</div>Ckircheshttps://mintoc.de/index.php?title=Category:AMPL/TACO&diff=646Category:AMPL/TACO2011-09-29T17:30:59Z<p>Ckirches: AMPL/TACO Category page</p>
<hr />
<div>This category lists all problems for which [http://www.ampl.org AMPL] code is provided that uses the TACO Toolkit for AMPL Control Optimization extensions. As AMPL does not support differential equations, the traditional approach has been to include finite-dimensional discretizations of the problem dynamics in the AMPL model.<br />
TACO provides relief here by proposing a small set of extensions to the AMPL language that allows for easy and convenient modeling of ODE and DAE constraints as well as Bolza-type and least-squares-type objectives.<br />
<br />
== References ==<br />
<bibreferences/><br />
<br />
[[Category:Problem characterization]]</div>Ckircheshttps://mintoc.de/index.php?title=Lotka_Volterra_fishing_problem_(TACO)&diff=645Lotka Volterra fishing problem (TACO)2011-09-29T17:22:11Z<p>Ckirches: Lotka AMPL/TACO category</p>
<hr />
<div>This page contains a model of the MIOCP [[Lotka Volterra fishing problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. <br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or MINLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file lotka_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Lotka Volterra fishing problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
var xd0 := 0.5, >= 0, <= 20;<br />
var xd1 := 0.7, >= 0, <= 20;<br />
var dev := 0.0, >= 0, <= 20;<br />
<br />
var u := 1, >= 0, <= 1 integer suffix type "u0";<br />
<br />
param p0 := 0.4;<br />
param p1 := 0.2;<br />
param ref0 := 1.0;<br />
param ref1 := 1.0;<br />
<br />
# Minimize accumulated deviation from reference after 12 time units<br />
minimize Mayer: eval(dev,12);<br />
<br />
subject to<br />
<br />
# ODE system<br />
ODE_0: diff(xd0,t) = xd0 - xd0*xd1 - p0*u*xd0; # prey<br />
ODE_1: diff(xd1,t) = -xd1 + xd0*xd1 - p1*u*xd1; # predator<br />
ODE_2: diff(dev,t) = (xd0-ref0)^2 + (xd1-ref1)^2; # deviation from reference<br />
<br />
# initial value constraints<br />
IVC_0: eval(xd0,0) = 0.5;<br />
IVC_1: eval(xd1,0) = 0.7;<br />
IVC_2: eval(dev,0) = 0.0;<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Lotka Volterra fishing problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at [[Lotka Volterra fishing problem (AMPL)]]<br />
* [[:Category:C | C code]] at [[Lotka Volterra fishing problem (C)]]<br />
* [[:Category:optimica | optimica]] at [[Lotka Volterra fishing problem (optimica)]]<br />
<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=Brachistochrone_problem_(TACO)&diff=644Brachistochrone problem (TACO)2011-09-29T17:19:57Z<p>Ckirches: Brachistochrone problem (AMPL/TACO)</p>
<hr />
<div>This page contains a model of the classical [[Brachistochrone problem]] in [http://www.ampl.org AMPL] format, making use of the TACO toolkit for AMPL control optimization extensions. <br />
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.<br />
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.<br />
<br />
=== AMPL ===<br />
<br />
This is the source file brac_taco.mod<br />
<source lang="AMPL"><br />
# ----------------------------------------------------------------<br />
# Brachistochrone problem using AMPL and TACO<br />
# (c) Christian Kirches, Sven Leyffer<br />
# ----------------------------------------------------------------<br />
include OptimalControl.mod;<br />
<br />
var t;<br />
var tf := 1.0, >= 0.1, <= 1.0;<br />
let tf.scale := 0.5; # improves convergence<br />
<br />
var x := 0, >= 0, <= 1;<br />
var y := 0, >= 0, <= 1;<br />
var v := 0, >= 0, <= 8;<br />
<br />
var a := 0.5, >= 0, <= 1.57079327;<br />
let a.type := "u1";<br />
let a.slope_min := -10.0;<br />
let a.slope_max := +10.0;<br />
<br />
param gravity := 32.174; # in ft/s^2<br />
<br />
minimize <br />
<br />
EndTime: eval (t,tf);<br />
let EndTime.scale := 0.1;<br />
<br />
subject to <br />
<br />
ODE_x: diff(x,t) = v*cos(a);<br />
ODE_y: diff(y,t) = v*sin(a);<br />
ODE_v: diff(v,t) = gravity*sin(a);<br />
<br />
IVC_x: eval(x,0) = 0;<br />
IVC_y: eval(y,0) = 0;<br />
IVC_v: eval(v,0) = 0; <br />
TC_x: eval(x,tf) = 1.0;<br />
<br />
# treating IVCs as boundary constraints improves convergence<br />
let IVC_x.type := "dpc";<br />
let IVC_y.type := "dpc";<br />
let IVC_v.type := "dpc";<br />
<br />
option solver ...;<br />
<br />
solve;<br />
<br />
</source><br />
<br />
== Other Descriptions ==<br />
<br />
Other descriptions of this problem are available in<br />
<br />
* Mathematical notation at [[Brachistochrone problem]]<br />
* [[:Category:AMPL | AMPL]] (using a fixed discretization) at [[Brachistochrone problem (AMPL)]]<br />
<br />
[[Category:AMPL/TACO]]</div>Ckircheshttps://mintoc.de/index.php?title=File:Kirches.jpg&diff=642File:Kirches.jpg2011-09-28T22:30:46Z<p>Ckirches: Christian at Marina Bay, Singapore, March 2009</p>
<hr />
<div>Christian at Marina Bay, Singapore, March 2009</div>Ckirches