the Problem was defined in pddl as well. I am looking for a use friendly planner that I could use.online solver gave me this error:stderr: FATAL: container creation failed: mount /proc/self/fd/3->/var/lib/apptainer/mnt/session/rootfs error: while mounting image /proc/self/fd/3: failed to find loop device: could not attach image file to loop device: failed to attach loop device: could not open /dev/loop8: no such file or directory
stdout:
(define (problem logistic-problem) (:domain logistic)
(:objects
location_1 location_2 - delivery-location
item_1 item_2 item_3 - item
order_1 order_2 - order
transport_1 transport_2 - transport
)
(:init
(in-warehouse item_1)
(in-warehouse item_2)
(not(part-of-manufacturing item_3))
(=(warehouse-quantity item_1) 80)
(=(warehouse-quantity item_2) 10)
(=(fixed-order-quantity item_1)10)
(=(fixed-order-quantity item_2)10)
(=(transport-capacity transport_1) 40)
(=(transport-capacity transport_2) 80)
(=(num-items-ordered item_2 order_2)40)
(=(num-items-ordered item_2 order_1)20)
(transport-available transport_1)
(transport-available transport_2)
;todo: put the initial state's facts and numeric values here
)
(:goal (and
(order-delivered item_1 location_1)
(not(order-delivered item_2 location_2))
;todo: put the goal condition here
))
;un-comment the following line if metric is needed
;(:metric minimize (???))
)
Domain Definition
(define (domain logistic)
(:requirements :duration-inequalities :equality :negative-preconditions :numeric-fluents :object-fluents :typing :fluents :conditional-effects :strips)
order item delivery-location transport quantity
)
(:constants
perishable - item
sensitive - item
medical - item
)
(:predicates
(in-warehouse ?i - item)
(part-of-manufacturing ?i - item)
(transport-available ?t - transport)
(order-placed ?o - order)
(supplier-order-placed ?o - order ?i - item)
(scheduled-delivery ?o - order ?i - item)
(place-waiting-list ?o - order)
(delivery-location-same-area ?l - delivery-location ?i - item ?o - order)
(order-delivered ?i - item ?l - delivery-location)
(place-order-manufacturing ?i - item ?o - order)
)
(:functions
(warehouse-quantity ?i - item)
(num-items-ordered ?i - item ?o - order)
(fixed-order-quantity ?i - item)
(transport-capacity ?t - transport)
(scheduled-items-quantity ?o - order ?i - item)
)
(:action place-order
:parameters (?o - order ?i - item)
:precondition ( in-warehouse ?i)
:effect ( and
(when
(>= (warehouse-quantity ?i) (fixed-order-quantity ?i))
(order-placed ?o)
)
(decrease
(warehouse-quantity ?i)
(num-items-ordered ?i))
;list of order sorted by priority,item ,location and quantity
)
)
(:action order-manufacturing
:parameters (?i - item ?o - order)
:precondition (and
(not (in-warehouse ?i))
(not(order-placed ?o))
(part-of-manufacturing ?i)
)
:effect (place-order-manufacturing ?i ?o)
)
(:action order-supplier
:parameters (?i - item ?o - order)
:precondition (and
(not (in-warehouse ?i))
(not(place-order-manufacturing ?i ?o))
(not(part-of-manufacturing ?i)))
:effect (supplier-order-placed ?i ?o)
)
(:action schedule-delivery
:parameters (?o - order ?t - transport ?i - item) ;sorted order list ;list of transport(capacity)
:precondition (and
(transport-available ?t)
(order-placed ?o)
)
:effect (and (decrease
(transport-capacity ?t)
(num-items-ordered ?i ?o)
)
(scheduled-delivery ?o ?i)
(increase
(scheduled-items-quantity ?o ?i)
( transport-capacity ?t))
(when
(not (transport-available ?t))
(place-waiting-list ?o))
)
;return a schedule list of orders and a waiting list
;
;update the totalquantity of scheduled item items
;(decrease)available capacity for the available transport
;list of items tuple(item,quantity, location, order)
)
(:action delivery
:parameters (?o - order ?i - item ?t - transport ?l - delivery-location ) ;list of schedule list of orders
:precondition (and
(scheduled-delivery ?o ?i)
(place-waiting-list ?o)
)
:effect (and
( when(scheduled-delivery ?o ?i)
(forall
(?o - order ?i - item)
(when
(<= (transport-capacity ?t)0)
(order-delivered ?i ?l)
)))
(when
(and (= ?i perishable) (> (transport-capacity ?t)0) (delivery-location-same-area ?l ?i ?o))
(order-delivered ?i ?l))
(when
(and (= ?i medical) (> (transport-capacity ?t)0) (delivery-location-same-area ?l ?i ?o))
(order-delivered ?i ?l))
(when
(and (= ?i sensitive) (> (transport-capacity ?t)0)(delivery-location-same-area ?l ?i ?o) )
(order-delivered ?i ?l))
)
;delivered =true
;loop through the order and for each order set delivered to true
;universal quantify
)
)