class ObjectSlideContainer extends Timeline{ predicate full {} // The full and empty predicates show if the object slide container holds object slides or not predicate empty {} predicate preparation1pending {} // "preparation 1" is the first process of dipping the object slide container into the first lidbox predicate preparation1done {} // This shows that "preparation 1" was done predicate preparation2pending {} // "preparation 2" is basically the same as "preparation 1", but the object slide container should be dipped into the second lidbox predicate preparation2done {} // This shows that "preparation 2" was done}
class LidBox extends Timeline{ predicate opened {} // Predicates to indicate whether a lidbox is opened or closed predicate closed {}}
class Workspace extends Timeline{ LidBox _lidbox_1; LidBox _lidbox_2; ObjectSlideContainer _osc;
Workspace(LidBox lidbox_1, LidBox lidbox_2, ObjectSlideContainer osc) { _lidbox_1 = lidbox_1; _lidbox_2 = lidbox_2; _osc = osc; }}
class Arm extends Timeline{ predicate pending {} // This indicates, that the goal was not achieved yet predicate done {} // This indicates, that the goal was achieved
Workspace _workspace;
Arm(Workspace workspace) { _workspace = workspace; }
action goalAchieved { duration=1; } action fill_osc { duration=1; } action empty_osc { duration=1; } action prepare_oss_1 { duration=1; } action prepare_oss_2 { duration=1; } action open_lidbox_1 { duration=1; } action close_lidbox_1 { duration=1; } action open_lidbox_2 { duration=1; } action close_lidbox_2 { duration=1; }}
Arm::goalAchieved{
// This is what needs to be done to achieve the goal: preparation 1 and preparation 2 needs to be done, both lidboxes need to be closed and the object slide container should be empty
met_by (condition object.pending); contained_by (condition object._workspace._osc.preparation1done); contained_by (condition object._workspace._osc.preparation2done); contained_by (condition object._workspace._lidbox_1.closed); contained_by (condition object._workspace._lidbox_2.closed); contained_by (condition object._workspace._osc.empty); meets (effect object.done);}
Arm::fill_osc{
// This fills the object slide container
met_by (condition object._workspace._osc.empty); meets (effect object._workspace._osc.full);}
Arm::empty_osc{
// This empties the object slide container
met_by (condition object._workspace._osc.full); meets (effect object._workspace._osc.empty);}
Arm::prepare_oss_1{
// This is the process of "preparation 1"
met_by (condition object._workspace._osc.preparation1pending); contained_by (condition object._workspace._lidbox_1.opened); contained_by (condition object._workspace._osc.full); meets (effect object._workspace._osc.preparation1done);}
Arm::prepare_oss_2{
// This is the process of "preparation 2"
met_by (condition object._workspace._osc.preparation2pending); contained_by (condition object._workspace._osc.preparation1done); contained_by (condition object._workspace._lidbox_2.opened); contained_by (condition object._workspace._osc.full); meets (effect object._workspace._osc.preparation2done);}
Arm::open_lidbox_1{
// Open lidbox 1
met_by (condition object._workspace._lidbox_1.closed); meets (effect object._workspace._lidbox_1.opened);}
Arm::close_lidbox_1{
// Close lidbox 1
met_by (condition object._workspace._lidbox_1.opened); meets (effect object._workspace._lidbox_1.closed);}
Arm::open_lidbox_2{
// Open lidbox 2
met_by (condition object._workspace._lidbox_2.closed); meets (effect object._workspace._lidbox_2.opened);}
Arm::close_lidbox_2{
// Close lidbox 2
met_by (condition object._workspace._lidbox_2.opened); meets (effect object._workspace._lidbox_2.closed);}
#include "SymbolicPlanning-model.nddl"
LidBox lidbox_1 = new LidBox();LidBox lidbox_2 = new LidBox();
ObjectSlideContainer osc = new ObjectSlideContainer();
Workspace workspace = new Workspace(lidbox_1, lidbox_2, osc);
Arm arm = new Arm(workspace);
close();
fact(lidbox_1.closed initCon1); // Initial condition for "lidbox 1 is closed"eq(initCon1.start, 0);
fact(lidbox_2.closed initCon2); // Initial condition for "lidbox 2 is closed"eq(initCon2.start, 0);
fact(osc.empty initCon3); // Initial condition for "object slide container is empty"eq(initCon3.start, 0);
fact(osc.preparation1pending initCon4); // Initial condition for "preparation 1 process is still pending"eq(initCon4.start, 0);
fact(osc.preparation2pending initCon5); // Initial condition for "preparation 2 process is still pending"eq(initCon5.start, 0);
fact(arm.pending initCon6); // Initial condition for "the overall goal was not achieved"eq(initCon6.start, 0);
goal(arm.done goal1);lt(0, goal1.start);lt(goal1.start, 10000);
I would highly appreciate every hint to solve this problem. If something is unclear, excuse me and give me the chance to explain it once more.
Since I am new to EUROPA, I think that the mistake is quite trivial, but anyway, I just can't get it to work.
Thanks in advance for any help
Christian Dreher
#include "SymbolicPlanning-model.nddl"
LidBox lidbox_1 = new LidBox();LidBox lidbox_2 = new LidBox();PreparationProcess p1 = new PreparationProcess();PreparationProcess p2 = new PreparationProcess();ObjectSlideContainerState oscs = new ObjectSlideContainerState();ObjectSlideContainer osc = new ObjectSlideContainer(oscs, p1, p2);Workspace workspace = new Workspace(lidbox_1, lidbox_2, osc);Arm arm = new Arm(workspace);
close();
fact(lidbox_1.closed initCon1);eq(initCon1.start, 0);
fact(lidbox_2.closed initCon2);eq(initCon2.start, 0);
fact(oscs.empty initCon3);eq(initCon3.start, 0);
fact(p1.pending initCon4);eq(initCon4.start, 0);
fact(p2.pending initCon5);eq(initCon5.start, 0);
goal(p1.done goal1);lt(0, goal1.start);lt(goal1.end, 10000);
goal(p2.done goal2);lt(goal1.end, goal2.start);lt(goal2.end, 10000);
goal(lidbox_1.closed goal3);lt(goal2.end, goal3.start);lt(goal3.start, 10000);
goal(lidbox_2.closed goal4);lt(goal3.end, goal4.start);lt(goal4.end, 10000);
goal(oscs.empty goal5);lt(goal4.end, goal5.start);lt(goal5.end, 10000);
class ObjectSlideContainerState extends Timeline{ predicate full {} predicate filling {} predicate empty {} predicate emptying {}}
class PreparationProcess extends Timeline{ predicate pending {} predicate processing {} predicate done {}}
class ObjectSlideContainer{ ObjectSlideContainerState _oscs; PreparationProcess _p1; PreparationProcess _p2; ObjectSlideContainer(ObjectSlideContainerState oscs, PreparationProcess p1, PreparationProcess p2) { _oscs = oscs; _p1 = p1; _p2 = p2; }}
class LidBox extends Timeline{ predicate opened {} predicate opening {} predicate closed {} predicate closing {}}
class Workspace{ LidBox _lidbox_1; LidBox _lidbox_2; ObjectSlideContainer _osc;
Workspace(LidBox lidbox_1, LidBox lidbox_2, ObjectSlideContainer osc) { _lidbox_1 = lidbox_1; _lidbox_2 = lidbox_2; _osc = osc; }}
class Arm{ Workspace _workspace;
Arm(Workspace workspace) { _workspace = workspace; }
action fill_osc { duration=5; } action empty_osc { duration=5; } action prepare_oss_1 { duration=3; } action prepare_oss_2 { duration=3; } action open_lidbox_1 { duration=1; } action close_lidbox_1 { duration=1; } action open_lidbox_2 { duration=1; } action close_lidbox_2 { duration=1; }}
Arm::fill_osc{ met_by (condition object._workspace._osc._oscs.empty); equals (effect object._workspace._osc._oscs.filling); meets (effect object._workspace._osc._oscs.full);}
Arm::empty_osc{ met_by (condition object._workspace._osc._oscs.full); equals (effect object._workspace._osc._oscs.emptying); meets (effect object._workspace._osc._oscs.empty);}
Arm::prepare_oss_1{ met_by (condition object._workspace._osc._p1.pending); contained_by (condition object._workspace._osc._p2.pending); contained_by (condition object._workspace._lidbox_1.opened); contained_by (condition object._workspace._osc._oscs.full); equals (effect object._workspace._osc._p1.processing); meets (effect object._workspace._osc._p1.done);}
Arm::prepare_oss_2{ met_by (condition object._workspace._osc._p2.pending); contained_by (condition object._workspace._osc._p1.done); contained_by (condition object._workspace._lidbox_2.opened); contained_by (condition object._workspace._osc._oscs.full); equals (effect object._workspace._osc._p2.processing); meets (effect object._workspace._osc._p2.done);}
Arm::open_lidbox_1{ met_by (condition object._workspace._lidbox_1.closed); equals (effect object._workspace._lidbox_1.opening); meets (effect object._workspace._lidbox_1.opened);}
Arm::close_lidbox_1{ met_by (condition object._workspace._lidbox_1.opened); equals (effect object._workspace._lidbox_1.closing); meets (effect object._workspace._lidbox_1.closed);}
Arm::open_lidbox_2{ met_by (condition object._workspace._lidbox_2.closed); equals (effect object._workspace._lidbox_2.opening); meets (effect object._workspace._lidbox_2.opened);}
Arm::close_lidbox_2{ met_by (condition object._workspace._lidbox_2.opened); equals (effect object._workspace._lidbox_2.closing); meets (effect object._workspace._lidbox_2.closed);}
Based on what I see on the graph on open-decisions it seems you have only 5 open decisions at the start of the search (as many as you have fact) when you should have 10 (as many as facts+goals).
This along with fact that the solver instantiate the facts properly suggest that your solver configuration is such that the solver is set to filter out your goals. Re3ason can be multiple for this:
- Maybe you have filter on your flaw handlers that exclude any goal with no handler that include them
- Maybe you have an horizon filter (as I recall “partially contained” filter can be tricky to use) that is such that all your goals with the temporal scope (start=[1,9999], end=[2, 10000]) are excluded as they are not necessarily within your plan scope (just a guess though, it’s been a while since I used Europa default filters)
In short your issue seems to be in the solver.cfg file and having this would help identify what is the issue here but it really seem that you have a filtering issue on the flaw handlers for your solver (as again the number of open condition in your problem instance should be the number of facts and goals)
Regards
-
Frederic Py
Like you can see, it doesn't find a plan. Only the initial states are populated into the table of actions.
I would highly appreciate every hint to solve this problem. If something is unclear, excuse me and give me the chance to explain it once more.
Since I am new to EUROPA, I think that the mistake is quite trivial, but anyway, I just can't get it to work.
Thanks in advance for any help
Christian Dreher
--
You received this message because you are subscribed to the Google Groups "europa-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europa-users...@googlegroups.com.
To post to this group, send email to europa...@googlegroups.com.
Visit this group at https://groups.google.com/group/europa-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "europa-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europa-users...@googlegroups.com.
To post to this group, send email to europa...@googlegroups.com.
Visit this group at https://groups.google.com/group/europa-users.
For more options, visit https://groups.google.com/d/optout.
...
goal(p1.done goal1);lt(0, goal1.start);lt(goal1.end, 10000);
goal(p2.done goal2);lt(goal1.end, goal2.start);lt(goal2.end, 10000);
goal(lidbox_1.closed goal3);lt(goal2.end, goal3.start);lt(goal3.start, 10000);
goal(lidbox_2.closed goal4);lt(goal3.end, goal4.start);lt(goal4.end, 10000);
goal(oscs.empty goal5);lt(goal4.end, goal5.start);lt(goal5.end, 10000);goal(p1.done goal1);lt(0, goal1.start);lt(goal1.end, 100);
goal(p2.done goal2);lt(goal1.end, goal2.start);lt(goal2.end, 200);
goal(lidbox_1.closed goal3);lt(goal2.end, goal3.start);lt(goal3.start, 300);
goal(lidbox_2.closed goal4);lt(goal3.end, goal4.start);lt(goal4.end, 400);
goal(oscs.empty goal5);lt(goal4.end, goal5.start);lt(goal5.end, 500);--
You received this message because you are subscribed to the Google Groups "europa-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europa-users...@googlegroups.com.
To post to this group, send email to europa...@googlegroups.com.
Visit this group at https://groups.google.com/group/europa-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "europa-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to europa-users...@googlegroups.com.
To post to this group, send email to europa...@googlegroups.com.
Visit this group at https://groups.google.com/group/europa-users.
For more options, visit https://groups.google.com/d/optout.