-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcw1.run
More file actions
33 lines (28 loc) · 723 Bytes
/
cw1.run
File metadata and controls
33 lines (28 loc) · 723 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
reset;
option solver snopt;
option display_1col 1;
model cw1.mod;
data cw1.dat;
print "";
print "***** Math6120 - Nonlinear Optimization *****";
print "***** Coursework 1 - AMPL Model *****";
print "***** Emma Tarmey, 2940 4045 *****";
print "";
for {value in {10}} {
let N := value;
let t_final := 1;
let {t in TIMEINDEX} height[t] := 1;
let {t in TIMEINDEX} velocity[t] := velocity_function[t];
let {t in TIMEINDEX} mass[t] := mass_function[t];
let {t in TIMEINDEX} thrust[t] := (theta_max / 2);
solve;
print "";
print "***** Optimal Solution: *****";
print "";
display N;
display final_height;
display t_final;
display thrust;
print "";
print "";
}