-
Notifications
You must be signed in to change notification settings - Fork 0
/
input.lp
32 lines (24 loc) · 6.09 KB
/
input.lp
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
tuple(1, "distance", 179;1, "interest", 2;1, "expenditure", 54;1, "minage", 18;1, "maxage", 81;1, "timereq", 2;2, "distance", 230;2, "interest", 1;2, "expenditure", 44;2, "minage", 16;2, "maxage", 88;2, "timereq", 2;3, "distance", 114;3, "interest", 2;3, "expenditure", 51;3, "minage", 17;3, "maxage", 89;3, "timereq", 1;4, "distance", 215;4, "interest", 2;4, "expenditure", 25;4, "minage", 15;4, "maxage", 85;4, "timereq", 1;5, "distance", 117;5, "interest", 3;5, "expenditure", 30;5, "minage", 18;5, "maxage", 83;5, "timereq", 2;6, "distance", 162;6, "interest", 1;6, "expenditure", 43;6, "minage", 17;6, "maxage", 87;6, "timereq", 1;7, "distance", 137;7, "interest", 2;7, "expenditure", 57;7, "minage", 17;7, "maxage", 87;7, "timereq", 1;8, "distance", 169;8, "interest", 3;8, "expenditure", 86;8, "minage", 16;8, "maxage", 84;8, "timereq", 3;9, "distance", 222;9, "interest", 1;9, "expenditure", 88;9, "minage", 17;9, "maxage", 82;9, "timereq", 3;10, "distance", 207;10, "interest", 1;10, "expenditure", 38;10, "minage", 17;10, "maxage", 85;10, "timereq", 2;11, "distance", 124;11, "interest", 1;11, "expenditure", 43;11, "minage", 18;11, "maxage", 86;11, "timereq", 3;12, "distance", 92;12, "interest", 1;12, "expenditure", 77;12, "minage", 16;12, "maxage", 80;12, "timereq", 1;13, "distance", 166;13, "interest", 1;13, "expenditure", 37;13, "minage", 18;13, "maxage", 81;13, "timereq", 3;14, "distance", 82;14, "interest", 3;14, "expenditure", 31;14, "minage", 15;14, "maxage", 84;14, "timereq", 3;15, "distance", 63;15, "interest", 1;15, "expenditure", 33;15, "minage", 18;15, "maxage", 83;15, "timereq", 2;16, "distance", 85;16, "interest", 1;16, "expenditure", 37;16, "minage", 15;16, "maxage", 89;16, "timereq", 2;17, "distance", 182;17, "interest", 1;17, "expenditure", 94;17, "minage", 18;17, "maxage", 88;17, "timereq", 2;18, "distance", 195;18, "interest", 2;18, "expenditure", 89;18, "minage", 16;18, "maxage", 84;18, "timereq", 3;19, "distance", 265;19, "interest", 1;19, "expenditure", 7;19, "minage", 15;19, "maxage", 90;19, "timereq", 3;20, "distance", 156;20, "interest", 2;20, "expenditure", 39;20, "minage", 16;20, "maxage", 88;20, "timereq", 3;21, "distance", 113;21, "interest", 1;21, "expenditure", 94;21, "minage", 16;21, "maxage", 90;21, "timereq", 3;22, "distance", 34;22, "interest", 3;22, "expenditure", 20;22, "minage", 18;22, "maxage", 90;22, "timereq", 2;23, "distance", 36;23, "interest", 1;23, "expenditure", 42;23, "minage", 16;23, "maxage", 90;23, "timereq", 3;24, "distance", 84;24, "interest", 3;24, "expenditure", 60;24, "minage", 18;24, "maxage", 86;24, "timereq", 3;25, "distance", 118;25, "interest", 3;25, "expenditure", 17;25, "minage", 15;25, "maxage", 83;25, "timereq", 3;26, "distance", 41;26, "interest", 1;26, "expenditure", 95;26, "minage", 18;26, "maxage", 89;26, "timereq", 2;27, "distance", 156;27, "interest", 1;27, "expenditure", 0;27, "minage", 18;27, "maxage", 90;27, "timereq", 2;28, "distance", 75;28, "interest", 3;28, "expenditure", 64;28, "minage", 17;28, "maxage", 83;28, "timereq", 2;29, "distance", 246;29, "interest", 2;29, "expenditure", 19;29, "minage", 17;29, "maxage", 84;29, "timereq", 3;30, "distance", 199;30, "interest", 1;30, "expenditure", 91;30, "minage", 16;30, "maxage", 89;30, "timereq", 2;31, "distance", 152;31, "interest", 3;31, "expenditure", 73;31, "minage", 15;31, "maxage", 83;31, "timereq", 3;32, "distance", 85;32, "interest", 2;32, "expenditure", 70;32, "minage", 18;32, "maxage", 80;32, "timereq", 2;33, "distance", 214;33, "interest", 2;33, "expenditure", 92;33, "minage", 15;33, "maxage", 84;33, "timereq", 1;34, "distance", 112;34, "interest", 1;34, "expenditure", 38;34, "minage", 15;34, "maxage", 90;34, "timereq", 2;35, "distance", 30;35, "interest", 3;35, "expenditure", 84;35, "minage", 15;35, "maxage", 86;35, "timereq", 2;36, "distance", 115;36, "interest", 1;36, "expenditure", 37;36, "minage", 16;36, "maxage", 84;36, "timereq", 1;37, "distance", 87;37, "interest", 1;37, "expenditure", 44;37, "minage", 18;37, "maxage", 81;37, "timereq", 3;38, "distance", 188;38, "interest", 3;38, "expenditure", 31;38, "minage", 17;38, "maxage", 82;38, "timereq", 3;39, "distance", 18;39, "interest", 2;39, "expenditure", 76;39, "minage", 17;39, "maxage", 90;39, "timereq", 3;40, "distance", 29;40, "interest", 1;40, "expenditure", 4;40, "minage", 15;40, "maxage", 81;40, "timereq", 3;41, "distance", 144;41, "interest", 1;41, "expenditure", 77;41, "minage", 18;41, "maxage", 81;41, "timereq", 3;42, "distance", 239;42, "interest", 2;42, "expenditure", 0;42, "minage", 17;42, "maxage", 83;42, "timereq", 2;43, "distance", 263;43, "interest", 1;43, "expenditure", 39;43, "minage", 16;43, "maxage", 90;43, "timereq", 3;44, "distance", 236;44, "interest", 1;44, "expenditure", 44;44, "minage", 16;44, "maxage", 86;44, "timereq", 2;45, "distance", 208;45, "interest", 3;45, "expenditure", 83;45, "minage", 16;45, "maxage", 84;45, "timereq", 3;46, "distance", 250;46, "interest", 1;46, "expenditure", 35;46, "minage", 18;46, "maxage", 85;46, "timereq", 2;47, "distance", 195;47, "interest", 3;47, "expenditure", 53;47, "minage", 18;47, "maxage", 81;47, "timereq", 2;48, "distance", 182;48, "interest", 3;48, "expenditure", 90;48, "minage", 18;48, "maxage", 85;48, "timereq", 3;49, "distance", 183;49, "interest", 2;49, "expenditure", 88;49, "minage", 16;49, "maxage", 81;49, "timereq", 1;50, "distance", 36;50, "interest", 2;50, "expenditure", 60;50, "minage", 17;50, "maxage", 84;50, "timereq", 1).
%#const interest=4.
%#const budget=50.
%#const distance=50.
%#const age=30.
%#const timelimit=2.
10 { place(1..50) } 10.
bad1 :- place(X), tuple(X,Z,Y), Z="distance", Y>distance.
bad2 :- place(X), tuple(X,Z,Y), Z="expenditure", Y>budget.
bad3 :- place(X), tuple(X,Z,Y), Z="minage" ,age>=Y.
bad4 :- place(X), tuple(X,Z,Y), Z="maxage",age<=Y.
bad5 :- place(X), tuple(X,Z,Y), Z="timereq", Y<=timelimit.
bad6 :- place(X), tuple(X,Z,Y), Z="interest",interest!=3, Y!=interest.
%#minimize { Y,X : place(X), expenditure(X,Y) }.
%#minimize { Y,X : place(X), timereq(X,Y) }.
%#minimize { Y,X : place(X), distance(X,Y) }.
:~bad1. [1@0]
:~bad2. [1@0]
:~bad3. [1@1]
:~bad4. [1@1]
:~bad5. [1@0]
:~bad6. [1@0]
%{place(G):place(G)}10.
#show place/1.