File: presol.hum.ref

package info (click to toggle)
zimpl 3.7.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,772 kB
  • sloc: ansic: 21,719; yacc: 993; lex: 370; sh: 349; makefile: 278
file content (106 lines) | stat: -rw-r--r-- 1,957 bytes parent folder | download | duplicates (5)
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
\ This file was automatically generated by Zimpl
\ set I := { 1..5 };
\ var x[<i> in I] binary startval i mod 2;
\ var y[<i> in I] integer <= 2 * i priority i * 10 startval istart;
\ var z[<i> in I] <= 4 * i;
\ var w[<i> in I] integer >= 1 <= if i mod 2 == 1 then 1 else 2 end;
\ minimize cost: sum <i> in I : -(x[i] + y[i]);
\ subto c1: forall <i> in I: x[i] <= 1;
\ subto c2: y[1] + y[2] == 6;
\ subto c3: sum <i> in I: x[i] <= 3;
\ subto c4: sum <i> in I: y[i] == 15;
\ subto c5: forall <i> in I: y[i] >= z[i];
\ subto c6: forall <i> in I with i < 3: x[i] <= z[i];
\ subto c7: forall <i> in I with i >= 3: 1 <= x[i] + y[i] <= 100;
\ subto c8: forall <i> in I with i mod 2 == 1: -3 * w[i] == -3;
\ subto c9: w[2] >= 2;
\ subto c10: w[4] <= 2;
\Problem name: presol.zpl
Minimize
 cost:  - x[1] - x[2] - x[3] - x[4] - x[5] - y[1]
  - y[2] - y[3] - y[4] - y[5]
Subject to
 c1_;1;:
  + x[1] <= 1
 c1_;2;:
  + x[2] <= 1
 c1_;3;:
  + x[3] <= 1
 c1_;4;:
  + x[4] <= 1
 c1_;5;:
  + x[5] <= 1
 c2_:
  + y[2] + y[1] = 6
 c3_:
  + x[5] + x[4] + x[3] + x[2] + x[1] <= 3
 c4_:
  + y[5] + y[4] + y[3] + y[2] + y[1] = 15
 c5_;1;:
  - z[1] + y[1] >= 0
 c5_;2;:
  - z[2] + y[2] >= 0
 c5_;3;:
  - z[3] + y[3] >= 0
 c5_;4;:
  - z[4] + y[4] >= 0
 c5_;5;:
  - z[5] + y[5] >= 0
 c6_;1;:
  - z[1] + x[1] <= 0
 c6_;2;:
  - z[2] + x[2] <= 0
 c7_;3;:
 1 <=  + y[3] + x[3] <= 100
 c7_;4;:
 1 <=  + y[4] + x[4] <= 100
 c7_;5;:
 1 <=  + y[5] + x[5] <= 100
 c8_;1;:
  -3 w[1] = -3
 c8_;3;:
  -3 w[3] = -3
 c8_;5;:
  -3 w[5] = -3
 c9_:
  + w[2] >= 2
 c10_:
  + w[4] <= 2
Bounds
 0 <= x[1] <= 1
 0 <= x[2] <= 1
 0 <= x[3] <= 1
 0 <= x[4] <= 1
 0 <= x[5] <= 1
 0 <= y[1] <= 2
 0 <= y[2] <= 4
 0 <= y[3] <= 6
 0 <= y[4] <= 8
 0 <= y[5] <= 10
 0 <= z[1] <= 4
 0 <= z[2] <= 8
 0 <= z[3] <= 12
 0 <= z[4] <= 16
 0 <= z[5] <= 20
 w[1] = 1
 1 <= w[2] <= 2
 w[3] = 1
 1 <= w[4] <= 2
 w[5] = 1
General
 x[1]
 x[2]
 x[3]
 x[4]
 x[5]
 y[1]
 y[2]
 y[3]
 y[4]
 y[5]
 w[1]
 w[2]
 w[3]
 w[4]
 w[5]
End