mirror of
https://github.com/20kaushik02/house-reconfiguration-asp.git
synced 2025-12-06 06:44:07 +00:00
milestone 1 progress report
This commit is contained in:
parent
261434ced3
commit
87266a512b
BIN
(Re)configuration using Answer Set Programming.pdf
Normal file
BIN
(Re)configuration using Answer Set Programming.pdf
Normal file
Binary file not shown.
Binary file not shown.
BIN
Milestone - 1.docx
Normal file
BIN
Milestone - 1.docx
Normal file
Binary file not shown.
BIN
Milestone - 1.pdf
Normal file
BIN
Milestone - 1.pdf
Normal file
Binary file not shown.
25
draft_hcp.asp
Normal file
25
draft_hcp.asp
Normal file
@ -0,0 +1,25 @@
|
||||
% each thing must be placed in exactly one cabinet
|
||||
1 { cabinetTOthing(C, T) : cabinetDomain(C) } 1 :- thing(T).
|
||||
|
||||
% no cabinet should contain more than 5 things
|
||||
:- 6 {cabinetTOthing(C, T) : thing(T)}, cabinetDomain(C).
|
||||
|
||||
% each cabinet must be placed in exactly one room
|
||||
1 { roomTOcabinet(R, C) : room(R) } 1 :- cabinetDomain(C).
|
||||
|
||||
% a room can hold at most 4 cabinets
|
||||
:- 5 {roomTOcabinet(R, C) : cabinetDomain(C)}, room(R).
|
||||
|
||||
% only one owner per room
|
||||
personTOroom(P, R) :- personTOthing(P, T), cabinetTOthing(C, T), roomTOcabinet(R, C).
|
||||
|
||||
% one room per person
|
||||
:- personTOroom(P1, R), personTOroom(P2, R), P1 != P2.
|
||||
|
||||
% things of one person cannot be placed in a cabinet together with things of another person
|
||||
:- cabinetTOthing(X,Y1), cabinetTOthing(X,Y2), personTOthing(P1,Y1), personTOthing(P2,Y2), P1!= P2.
|
||||
|
||||
#show cabinetTOthing/2.
|
||||
#show roomTOcabinet/2.
|
||||
#show cabinet/1.
|
||||
#show room/1.
|
||||
Loading…
x
Reference in New Issue
Block a user