forked from potassco/asprilo-encodings
-
Notifications
You must be signed in to change notification settings - Fork 0
/
input.lp
29 lines (20 loc) · 1.3 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
% --------------------------------------------------------------------------------
% REPRESENTATION
robot(R) :- init(object(robot,R), _).
shelf(S) :- init(object(shelf,S), _).
station(P) :- init(object(pickingStation,P), _).
product(A) :- init(object(product,A), _).
isRobot(robot(R)) :- robot(R).
isShelf(shelf(S)) :- shelf(S).
isStation(station(T)) :- station(T).
isProduct(product(A)) :- product(A).
isOrder(order(O)) :- order(O).
order( O ) :- init(object(order,O), _).
ordered(order(O),product(A)) :- init(object(order,O), value(line,(A,_))). % IGNORING QUANTITIES
target(order(O),station(P)) :- init(object(order,O), value(pickingStation,P)).
shelved(shelf(S),product(A)) :- init(object(product,A), value(on,(S,_))). % IGNORING QUANTITIES
position( (X,Y)) :- init(object(node,_), value(at,(X,Y))).
position(station(P),(X,Y)) :- init(object(pickingStation,P), value(at,(X,Y))).
position( robot(R),(X,Y),0) :- init(object(robot,R), value(at,(X,Y))).
position( shelf(S),(X,Y),0) :- init(object(shelf,S), value(at,(X,Y))).
highway( C ) :- init(object(highway,_), value(at,C)).