$************************************************************* $ Cart on a Track $ $ R. F. Stengel, "Optimal Control and Estimation", Dover $ Publications, 1994, p. 196. $ $ This problem has been modified from cart2.dat by adding $ a path constraint for a speed limit of 10. $ $ Optimal solution: 2383.5 $************************************************************* OPTION {{ FTOL = "1e-6"; OTOL = "1e-5"; MAXSTEP = 0.1; }} DECLARATION {{ PARA q = 1; PARA r = 100; XVAR {j,k1,k2}; ZVAR {x,v,u,int}; ISPE {x,v,int}; XUBD {1e6,10,10}; XSTP {0,0,0}; XLBD {-1e6,-10,-10}; ZINC {0,0,0,0}; TIME {0,10}; }} MODEL {{ MIN: j; dae1: x' =e= v; dae2: v' =e= u; dae3: u =e= k1 + k2*t; dae4: int' =e= u*u; obj1[1]: j =e= q*(x - 100)*(x - 100) + r*int; con1[1]: v =l= 10; con2: v =l= 10; }}