Hi Ben, Linas, etc I am trying to solve a resource allocation problem; assigning planes to flights.
Here is the domain definition in PDDL: ------------------------------------------------------------------------------------- (define (domain flight-plan) (:requirements :strips :typing :action-costs) (:types location localable leg - object airport - location register - localable ) (:predicates (at ?o - localable ?l - location) (assigned ?l - leg) (assigned-to ?l - leg ?r - register) (source ?l - leg ?a - airport) (destination ?l - leg ?a - airport) ) (:functions (start ?l - leg) - number (duration ?l - leg ?r - register) - number (pax ?l - leg) - number (capacity ?r - register) - number (assignement-cost ?l - leg ?r - register) - number (timeline ?r - register) - number (total-cost) - number ) (:action asgn :parameters (?l - leg ?r - register ?src ?dest - airport) :precondition (and (> (start ?l) (timeline ?r)) (source ?l ?src) (destination ?l ?dest) (at ?r ?src) (not (assigned ?l)) (> (capacity ?r) (pax ?l)) ) :effect (and (decrease (timeline ?r) (timeline ?r)) (increase (timeline ?r) (+ (start ?l) (duration ?l ?r))) (not (at ?r ?src)) (at ?r ?dest) (assigned ?l) (assigned-to ?l ?r) (increase (total-cost) (assignement-cost ?l ?r)) ) ) (:action shift-left-sixty :parameters (?l - leg) :precondition (and (not (assigned ?l)) (> (start ?l) 60) ) :effect (and (decrease (start ?l) 60) ) ) (:action shift-right-sixty :parameters (?l - leg) :precondition (and (not (assigned ?l)) (< (start ?l) 1380) ) :effect (and (increase (start ?l) 60) ) ) ) ------------------------------------------------------------------------------------- and here is a sample problem: ------------------------------------------------------------------------------------- (define (problem assignment) (:domain flight-plan) (:objects THR-SRY SRY-THR THR-ISF ISF-THR - leg MOC JHH MNT - register thr sry isf - airport ) (:init (= (total-cost) 0) (at MOC thr) (at JHH thr) (at MNT thr) (= (capacity MOC) 100) (= (timeline MOC) 0) (= (capacity JHH) 200) (= (timeline JHH) 0) (= (capacity MNT) 280) (= (timeline MNT) 0) (source THR-SRY thr) (destination THR-SRY sry) (= (start THR-SRY) 600) (= (pax THR-SRY) 90) (source SRY-THR sry) (destination SRY-THR thr) (= (start SRY-THR) 720) (= (pax SRY-THR) 150) (source THR-ISF thr) (destination THR-ISF isf) (= (start THR-ISF) 720) (= (pax THR-ISF) 220) (source ISF-THR isf) (destination ISF-THR thr) (= (start ISF-THR) 900) (= (pax ISF-THR) 190) (= (assignement-cost THR-SRY MOC) 1) (= (assignement-cost SRY-THR MOC) 1) (= (assignement-cost THR-ISF MOC) 1) (= (assignement-cost ISF-THR MOC) 1) (= (assignement-cost THR-SRY JHH) 1) (= (assignement-cost SRY-THR JHH) 1) (= (assignement-cost THR-ISF JHH) 1) (= (assignement-cost ISF-THR JHH) 1) (= (assignement-cost THR-SRY MNT) 1) (= (assignement-cost SRY-THR MNT) 1) (= (assignement-cost THR-ISF MNT) 1) (= (assignement-cost ISF-THR MNT) 1) (= (duration THR-SRY MOC) 180) (= (duration SRY-THR MOC) 180) (= (duration THR-ISF MOC) 120) (= (duration ISF-THR MOC) 120) (= (duration THR-SRY JHH) 180) (= (duration SRY-THR JHH) 180) (= (duration THR-ISF JHH) 120) (= (duration ISF-THR JHH) 120) (= (duration THR-SRY MNT) 180) (= (duration SRY-THR MNT) 180) (= (duration THR-ISF MNT) 120) (= (duration ISF-THR MNT) 120) ) (:goal (and (at MOC thr) (at JHH thr) (at MNT thr) (assigned THR-SRY) (assigned SRY-THR) (assigned THR-ISF) (assigned ISF-THR) )) (:metric minimize (total-cost)) ) ------------------------------------------------------------------------------------- Is it possible to use OpenCog planner and Atomese to solve this problem? Regards, Ramin -- You received this message because you are subscribed to the Google Groups "opencog" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/opencog. To view this discussion on the web visit https://groups.google.com/d/msgid/opencog/CAHmauB6Wh6DEJcF_2KoCSD%2BapWaeJtkKSPCT7%2Bd5K96c_tuRnA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
