-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcw1_verbose.run
More file actions
37 lines (31 loc) · 781 Bytes
/
cw1_verbose.run
File metadata and controls
37 lines (31 loc) · 781 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
34
35
36
37
reset;
option solver conopt;
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 height;
display velocity;
display mass;
display thrust;
print "";
print "";
}