-
Notifications
You must be signed in to change notification settings - Fork 0
/
model.eqn
175 lines (127 loc) · 2.81 KB
/
model.eqn
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
167
168
169
170
171
172
173
174
175
// 1. simplex (task 3)
min 4 x1 -8 x2 -7 x3
-2 x1 -2 x2 -1 x3 >= -1
-1 x1 + 4 x2 + 3 x3 >= -1
/*
max 1 x1 + 5 x2
-1 x1 + 3 x2 <= 6
-4 x1 + -4 x2 <= -5
x1 <= 2
/*
max 10 x1 -57 x2 -9 x3 -24 x4
1/2 x1 -11/2 x2 -5/2 x3 +9 x4 <= 0
1/2 x1 -3/2 x2 -1/2 x3 +1 x4 <= 0
1 x1 <= 1
/*
max 10 x1 + 6 x2
x1 + 5 x2 <= 7
-1 x1 + 2 x2 <= 1
3 x1 -1 x2 <= 5
min 7 x1 + 1 x2 + 5 x3
1 x1 -1 x2 +3 x3 >= 10
5 x1 + 2 x2 -1 x3 >= 6
max 6 x1 + 8 x2
5 x1 + 10 x2 <= 60
4 x1 + 4 x2 <= 40
http://home.ubalt.edu/ntsbarsh/opre640a/partv.htm#rintroDark
/////////////////////////////////////////
Unboundedness
max x1
x1 + x2 -2 x3 = 0
x1 -1 x2 = 2
DONE
/////////////////////////////////////////
Multiple Optimal Solutions (Innumerable optimal solutions)
max 6 x1 + 4 x2
x1 + 2 x2 <= 16
3 x1 + 2 x2 <= 24
DONE
/////////////////////////////////////////
No Solution (Infeasible LP)
max 5 x1 + 3 x2
4 x1 + 2 x2 <= 8
x1 >= 4
x2 >= 6
DONE
////////////////////////////////////////
Degeneracy
degenerate in both primal and dual
min x2
x2 -2 x3 + x4 = 1
x1 + 2 x2 -1 x3 = 0
x1 + x2 + 3 x3 = 2
... lumsk
ogs� degenerate
max 6 x1 + 3 x2
1 x1 <= 1
1 x2 <= 1
1 x1 -1 x2 <= 1
-1 x1 + x2 <= 1
max 10 x1 -57 x2 -9 x3 -24 x4
1/2 x1 -11/2 x2 -5/2 x3 +9 x4 <= 0
1/2 x1 -3/2 x2 -1/2 x3 +1 x4 <= 0
1 x1 <= 1
dual
max -1 x1 -1 x2
-2 x1 -1 x2 <= 4
-2 x1 +4 x2 <= -8
-1 x1 +3 x2 <= -7
MAX 10 X1 - 57 X2 - 9 X3 - 24 X4
SUBJECT TO
0.5 X1 - 5.5 X2 - 2.5 X3 + 9 X4 <= 0
0.5 X1 - 1.5 X2 - 0.5 X3 + X4 <= 0
X1 <= 1
END
CYCLE EXAMPLE WOOOOORKs
max 10 x1 -57 x2 -9 x3 -24 x4
1/2 x1 -11/2 x2 -5/2 x3 +9 x4 <= 0
1/2 x1 -3/2 x2 -1/2 x3 +1 x4 <= 0
1 x1 <= 1
skal kunne klare
cycle <- se exercises
hvordan detecter man cycle
lav eksempler for forskellige pivot rules
dantzig kan cycle
bland g�r ikke
unbounded <- hvis pivot row <= 0
DUAL TEST
dual
min 4 x1 -8 x2 -7 x3
-2 x1 -2 x2 -1 x3 >= -1
-1 x1 + 4 x2 + 3 x3 >= -1
primaal
max -1 x1 -1 x2
-2 x1 -1 x2 <= 4
-2 x1 + 4 x2 <= -8
-1 x1 + 3 x2 <= -7
max x1 - x2
x1 + x2 <= 2
2 x1 + 2 x2 >= 5
A OK
min -2 x1 - 3 x2 - 4 x3
3 x1 + 2 x2 + x3 <= 10
2 x1 + 5 x2 + 3 x3 <= 15
A OK
min -2 x1 -3 x2 -4 x3
3 x1 + 2 x2 + x3 = 10
2 x1 + 5 x2 + 3 x3 = 15
A OK
max 6 x1 + 8 x2
5 x1 + 10 x2 <= 60
4 x1 + 4 x2 <= 40
unboundedness // works!!!
A OK
max 2 x1 + 1 x2
x2 <= 5
-1 x1 + 1 x2 <= 1
infinite solution
A OK
max x1 + x2
5 x1 + 10 x2 <= 60
4 x1 + 4 x2 <= 40
degeneracy
A OK
max x2
-1 x1 + x2 <= 0
x1 <= 2
*/