-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkalle
167 lines (157 loc) · 4.7 KB
/
kalle
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
ampl: solve;MINOS 5.51: ignoring integrality of 80 variables
MINOS 5.51: optimal solution found.
66 iterations, objective 0
ampl: display M;M = 50000
ampl: _display _OBJS;_display 1 0 1
_OBJS
overtime_cost
ampl: show overtime_cost;minimize overtime_cost: sum{o in OPERATING_ROOMS} overtime_penalty*
overtime[o];
ampl: _display indexarity('overtime_cost');_display 0 1 1
indexarity('overtime_cost')
0
ampl: option 'omit_zero_rows';option omit_zero_rows 0;
ampl: _display overtime_cost.val ;_display 0 1 1
overtime_cost
0
ampl: _display overtime_cost.val;_display 0 1 1
overtime_cost
0
ampl: display overtime_cost;overtime_cost = 0
ampl: display OPERATING_ROOMS;set OPERATING_ROOMS := o1 o2;
ampl: display SURGERIES;set SURGERIES := s1 s2 s3 s4 s5 s6;
ampl: display SURGERIES_IN_ROOM;set SURGERIES_IN_ROOM[o1] := s1 s2 s3;
set SURGERIES_IN_ROOM[o2] := s4 s5 s6;
ampl: _display _PARS;_display 1 0 7
_PARS
num_resources
daily_work_time_mins
overtime_penalty
M
preop_time
op_time
room_prep_time
ampl: show num_resources;param num_resources;
ampl: _display indexarity('num_resources');_display 0 1 1
indexarity('num_resources')
0
ampl: show daily_work_time_mins;param daily_work_time_mins;
ampl: _display indexarity('daily_work_time_mins');_display 0 1 1
indexarity('daily_work_time_mins')
0
ampl: show overtime_penalty;param overtime_penalty;
ampl: _display indexarity('overtime_penalty');_display 0 1 1
indexarity('overtime_penalty')
0
ampl: show M;param M;
ampl: _display indexarity('M');_display 0 1 1
indexarity('M')
0
ampl: show preop_time;param preop_time{s in SURGERIES};
ampl: _display indexarity('preop_time');_display 0 1 1
indexarity('preop_time')
1
ampl: show op_time;param op_time{s in SURGERIES};
ampl: _display indexarity('op_time');_display 0 1 1
indexarity('op_time')
1
ampl: show room_prep_time;param room_prep_time;
ampl: _display indexarity('room_prep_time');_display 0 1 1
indexarity('room_prep_time')
0
ampl: _display preop_time;_display 1 1 6
preop_time
s1,30
s2,35
s3,40
s4,45
s5,50
s6,65
ampl: _display op_time;_display 1 1 6
op_time
s1,60
s2,80
s3,90
s4,120
s5,140
s6,145
ampl: _display _VARS;_display 1 0 6
_VARS
preop_start_time
op_start_time
op_end_time
y
z
overtime
ampl: show preop_start_time;var preop_start_time{s in SURGERIES} integer >= 1;
ampl: _display indexarity('preop_start_time');_display 0 1 1
indexarity('preop_start_time')
1
ampl: show op_start_time;var op_start_time{s in SURGERIES} integer >= 1;
ampl: _display indexarity('op_start_time');_display 0 1 1
indexarity('op_start_time')
1
ampl: show op_end_time;var op_end_time{s in SURGERIES} integer >= 1;
ampl: _display indexarity('op_end_time');_display 0 1 1
indexarity('op_end_time')
1
ampl: show y;var y{s_prim in SURGERIES, s_bis in SURGERIES: s_prim != s_bis} binary;
ampl: _display indexarity('y');_display 0 1 1
indexarity('y')
2
ampl: show z;var z{s_prim in SURGERIES, s_bis in SURGERIES: s_prim != s_bis} binary;
ampl: _display indexarity('z');_display 0 1 1
indexarity('z')
2
ampl: show overtime;var overtime{o in OPERATING_ROOMS} integer >= 0;
ampl: _display indexarity('overtime');_display 0 1 1
indexarity('overtime')
1
ampl: _display preop_start_time.val;_display 1 1 6
preop_start_time.val
s1,156.00000000000009
s2,156.99999999999991
s3,320.4999999999999
s4,156.49999999999983
s5,320.99999999999994
s6,156.50000000000006
ampl: _display op_start_time.val;_display 1 1 6
op_start_time.val
s1,186.00000000000009
s2,191.99999999999997
s3,360.49999999999994
s4,201.4999999999999
s5,370.9999999999999
s6,221.5000000000001
ampl: _display op_end_time.val;_display 1 1 6
op_end_time.val
s1,246.00000000000009
s2,272
s3,450.49999999999983
s4,321.4999999999999
s5,510.99999999999994
s6,366.5000000000001
ampl: display y;y [*,*]
: s1 s2 s3 s4 s5 s6 :=
s1 . 0 0 0 0 0
s2 3e-05 . 0 2e-05 0 2e-05
s3 0.0033 0.00328 . 0.00329 0 0.00329
s4 2e-05 0 0 . 0 1e-05
s5 0.00331 0.00329 2e-05 0.0033 . 0.0033
s6 2e-05 0 0 1e-05 0 .
;
ampl: display z;z [*,*]
: s1 s2 s3 s4 s5 s6 :=
s1 . 0 0 0 0 0
s2 0 . 0 0 0 0
s3 0.0015 0.00098 . 0 0 0
s4 0 0 0 . 0 0
s5 0.00151 0.00099 0 0 . 0
s6 0 0 0 0 0 .
;
ampl: display overtime;overtime [*] :=
o1 0
o2 0
;
ampl: display daily_work_time_mins;daily_work_time_mins = 510
ampl: display pretime_betw_op;