Difference between revisions of "Brachistochrone problem (TACO)"
From mintOC
(Brachistochrone problem (AMPL/TACO)) |
(→Other Descriptions) |
||
Line 60: | Line 60: | ||
* Mathematical notation at [[Brachistochrone problem]] | * Mathematical notation at [[Brachistochrone problem]] | ||
− | + | ||
+ | == References == | ||
+ | |||
+ | <bibreferences/> | ||
[[Category:AMPL/TACO]] | [[Category:AMPL/TACO]] |
Revision as of 18:37, 29 September 2011
This page contains a model of the classical Brachistochrone problem in AMPL format, making use of the TACO toolkit for AMPL control optimization extensions. Note that you will need to include a generic AMPL/TACO support file, OptimalControl.mod. To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.
AMPL
This is the source file brac_taco.mod
# ---------------------------------------------------------------- # Brachistochrone problem using AMPL and TACO # (c) Christian Kirches, Sven Leyffer # ---------------------------------------------------------------- include OptimalControl.mod; var t; var tf := 1.0, >= 0.1, <= 1.0; let tf.scale := 0.5; # improves convergence var x := 0, >= 0, <= 1; var y := 0, >= 0, <= 1; var v := 0, >= 0, <= 8; var a := 0.5, >= 0, <= 1.57079327; let a.type := "u1"; let a.slope_min := -10.0; let a.slope_max := +10.0; param gravity := 32.174; # in ft/s^2 minimize EndTime: eval (t,tf); let EndTime.scale := 0.1; subject to ODE_x: diff(x,t) = v*cos(a); ODE_y: diff(y,t) = v*sin(a); ODE_v: diff(v,t) = gravity*sin(a); IVC_x: eval(x,0) = 0; IVC_y: eval(y,0) = 0; IVC_v: eval(v,0) = 0; TC_x: eval(x,tf) = 1.0; # treating IVCs as boundary constraints improves convergence let IVC_x.type := "dpc"; let IVC_y.type := "dpc"; let IVC_v.type := "dpc"; option solver ...; solve;
Other Descriptions
Other descriptions of this problem are available in
- Mathematical notation at Brachistochrone problem
References
<bibreferences/>