# Goddart's rocket problem (TACO)

Jump to: navigation, search

This page contains a model of the Goddart's rocket problem in 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 COPS library. 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 goddart_taco.mod

```# ----------------------------------------------------------------
# Rocket problem of Goddart using AMPL and TACO
# (c) Christian Kirches, Sven Leyffer
#
# Source: COPS 3.1 collocation formulation - March 2004
# ----------------------------------------------------------------
include OptimalControl.mod;

var t;

var tf := 1.0, >= 0.01, <= 1;

param v0 := 0.0;
param m0 := 1.0;
param g0 := 1.0;
param h0 := 1.0;
param hc := 500.0;
param vc := 620.0;
param mc := 0.6;
param Tmax := 3.5*g0*m0;
param c := 0.5*sqrt(g0*h0);
param mf := mc*m0;

var h >= h0, := 1;
let h.interp_to := h0;
var v >= v0;
let v.interp_to := v0;
var m <= m0;
let m.interp_to := mf;

var T >= 0, <= Tmax, := Tmax/2;
let T.type := "u0";

param Dc := 0.5*vc*m0/g0;
var D = Dc*v^2*exp(-hc*(h-h0)/h0);
var g = g0*(h0/h)^2;

maximize FinalHeight: eval(h,tf);
let FinalHeight.scale := 0.01;
subject to

dh: diff(h,t) = v;
dv: diff(v,t) = (T - D)/m - g;
dm: diff(m,t) = -T/c;

ih: eval(h,0) = h0;
iv: eval(v,0) = v0;
im: eval(m,0) = m0;
fm: eval(m,tf) = mf;

option solver ...;

solve;```

## Other Descriptions

Other descriptions of this problem are available in