Difference between revisions of "Brachistochrone problem (TACO)"

From mintOC
Jump to: navigation, search
(Other Descriptions)
(brachistochrone: Cited Bernoulli, Betts1993)
Line 1: Line 1:
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.  
+
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.  
 
Note that you will need to include a generic [[support AMPL files|AMPL/TACO support file]], OptimalControl.mod.
 
Note that you will need to include a generic [[support AMPL files|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.
 
To solve this model, you require an optimal control or NLP code that uses the TACO toolkit to support the AMPL optimal control extensions.

Revision as of 18:42, 29 September 2011

This page contains a model of the classical Brachistochrone problem (Johann Bernoulli, 1696), see e.g. Wikipedia or <bibref>Betts1993</bibref>, 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

References

<bibreferences/>