File: define.lp.ref

package info (click to toggle)
zimpl 2.07.ds1-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 3,416 kB
  • ctags: 2,560
  • sloc: ansic: 18,311; yacc: 882; lex: 326; makefile: 232; sh: 219
file content (62 lines) | stat: -rw-r--r-- 1,742 bytes parent folder | download
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
\ This file was automatically generated by Zimpl
\ set I := { 1..5 } * { 4..7};
\ var x[I];
\ defnumb dist(a,b) := a*a + b*b;
\ subto c1: sum <i,j> in I do dist(i,j) * x[i,j] >= 0;
\ defnumb ack(i,j) :=     if i == 0 then j + 1               else if j == 0 then ack(i - 1, 1)                             else ack(i - 1, ack(i, j - 1))                   end    end;
\ subto c2: ack(3,3) * x[ack(1,3),ack(2,2)] >= 0;
\ set K := { 1..10 };
\ var y[K];
\ defbool goodone(a,b) := a > b;
\ defset  bigger(i) := { <j> in K with goodone(j,i) };
\ subto c3: sum <i> in bigger(5) : y[i] >= 0;
\ set G := { 1..3 };
\ set H := { "hallo", "tach", "moin" };
\ param greet[G] := <1> "hallo", <2> "tach", <3> "moin";
\ var z[H];
\ defstrg greeting(m) := greet[(m + 1) mod card(G)];
\ subto c4: z[greeting(1)] + z[greeting(3)] >= 0;
\Problem name: define.zpl
Minimize
 Objective: 
Subject to
 c1_1:
  +74 x#5#7 +61 x#5#6 +50 x#5#5 +41 x#5#4 +65 x#4#7 +52 x#4#6
  +41 x#4#5 +32 x#4#4 +58 x#3#7 +45 x#3#6 +34 x#3#5 +25 x#3#4
  +53 x#2#7 +40 x#2#6 +29 x#2#5 +20 x#2#4 +50 x#1#7 +37 x#1#6
  +26 x#1#5 +17 x#1#4 >= 0
 c2_1:
  +61 x#5#7 >= 0
 c3_1:
  + y#10 + y#9 + y#8 + y#7 + y#6 >= 0
 c4_1:
  + z$hallo + z$tach >= 0
Bounds
 0 <= x#1#4 <= +inf
 0 <= x#1#5 <= +inf
 0 <= x#1#6 <= +inf
 0 <= x#1#7 <= +inf
 0 <= x#2#4 <= +inf
 0 <= x#2#5 <= +inf
 0 <= x#2#6 <= +inf
 0 <= x#2#7 <= +inf
 0 <= x#3#4 <= +inf
 0 <= x#3#5 <= +inf
 0 <= x#3#6 <= +inf
 0 <= x#3#7 <= +inf
 0 <= x#4#4 <= +inf
 0 <= x#4#5 <= +inf
 0 <= x#4#6 <= +inf
 0 <= x#4#7 <= +inf
 0 <= x#5#4 <= +inf
 0 <= x#5#5 <= +inf
 0 <= x#5#6 <= +inf
 0 <= x#5#7 <= +inf
 0 <= y#6 <= +inf
 0 <= y#7 <= +inf
 0 <= y#8 <= +inf
 0 <= y#9 <= +inf
 0 <= y#10 <= +inf
 0 <= z$hallo <= +inf
 0 <= z$tach <= +inf
End