Created
September 2, 2021 11:26
-
-
Save ivancorrales/6770b73009f31cd16c26f1540f145836 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define | |
(problem waiter-service) | |
(:domain restaurant) | |
; objects with types | |
(:objects | |
w1 w2 w3 - waiter | |
g1 g2 g3 g4 g5 g6 g7 g8 - group | |
t1 t2 t3 t4 t5 - table | |
) | |
(:init | |
; The waiters are available to attend clients | |
(is_available w1) | |
(is_available w2) | |
(is_available w3) | |
; The tables are free | |
(is_free t1) | |
(is_free t2) | |
(is_free t3) | |
(is_free t4) | |
(is_free t5) | |
; The groups are waiting for being accompained to the table | |
(waiting_for_a_table g1) | |
(waiting_for_a_table g2) | |
(waiting_for_a_table g3) | |
(waiting_for_a_table g4) | |
(waiting_for_a_table g5) | |
(waiting_for_a_table g6) | |
(waiting_for_a_table g7) | |
(waiting_for_a_table g8) | |
; Initialize to 0 the tips of the waiters | |
(= (tips w1) 0) | |
(= (tips w2) 0) | |
(= (tips w3) 0) | |
; Establish the capacity of each table | |
(= (capacity t1) 4) | |
(= (capacity t2) 6) | |
(= (capacity t3) 3) | |
(= (capacity t4) 2) | |
(= (capacity t5) 8) | |
; Define the number of people in each group | |
(= (group_size g1) 3) | |
(= (group_size g2) 4) | |
(= (group_size g3) 2) | |
(= (group_size g4) 5) | |
(= (group_size g5) 2) | |
(= (group_size g6) 7) | |
(= (group_size g7) 4) | |
(= (group_size g8) 8) | |
) | |
; The problem will be resolved when all the groups have paid | |
; and exit from the restaurant | |
(:goal (and | |
(bye g1) | |
(bye g2) | |
(bye g3) | |
(bye g4) | |
(bye g5) | |
(bye g6) | |
(bye g7) | |
(bye g8) | |
)) | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment