aiplan4eu / up-lpg

LPG is a automated planner supporting classical and numeric state variables, and supports durative actions too. It computes plans using one-shoot and anytime operation mode.
Apache License 2.0
1 stars 5 forks source link

Error parsing plan generated by LPGEngine #8

Closed jrenoux closed 1 year ago

jrenoux commented 1 year ago

Hi there,

I am currently trying to use LPG for the flexible manufacturing usecase, which is of the following kind:

PROBLEM_CLASS: ['ACTION_BASED']
PROBLEM_TYPE: ['GENERAL_NUMERIC_PLANNING']
TIME: ['CONTINUOUS_TIME']
NUMBERS: ['DISCRETE_NUMBERS']
CONDITIONS_KIND: ['EQUALITY']
TYPING: ['FLAT_TYPING']
FLUENTS_TYPE: ['NUMERIC_FLUENTS']

The LPG planner manages to create a plan as the output displays it. It also display that the plan file is at /tmp/tmp4bd2gx9g/plan.txt_1_1.SOL.

But then I get the following message:

Traceback (most recent call last):
  File "/home/jennifer/work/projects/aiplan4eu/meritor/up-mer-usecase/aiplan4eu_mer/launcher.py", line 17, in <module>
    result = planner.solve(mer_problem, output_stream = sys.stdout)
  File "/home/jennifer/.cache/pypoetry/virtualenvs/aiplan4eu-mer-F4EqWIfX-py3.10/lib/python3.10/site-packages/unified_planning/engines/mixins/oneshot_planner.py", line 81, in solve
    return self._solve(problem, heuristic, timeout, output_stream)
  File "/home/jennifer/.cache/pypoetry/virtualenvs/aiplan4eu-mer-F4EqWIfX-py3.10/lib/python3.10/site-packages/unified_planning/engines/pddl_planner.py", line 255, in _solve
    plan = self._plan_from_file(
  File "/home/jennifer/.cache/pypoetry/virtualenvs/aiplan4eu-mer-F4EqWIfX-py3.10/lib/python3.10/site-packages/up_lpg/lpg_planner.py", line 60, in _plan_from_file
    raise UPException('Error parsing plan generated by ' + self.__class__.__name__)
unified_planning.exceptions.UPException: Error parsing plan generated by LPGEngine

If I attempt to navigate to the plan file through the file system, it does not exist.

Unsure if I should raise this issue with LGP or the UP, so I start here first :)

Here is the (dummy on purpose) plan generated according to the LPG output:

 0.0000: (ANNEALING_CAPACITY A4 O_17X GEAR) [D:3.5000; C:0.1000]
 3.5000: (ANNEALING_CAPACITY A4 O_17X GEAR) [D:3.5000; C:0.1000]

The problem itself is quite complex but I can try to find a minimal breaking example if needed.

mikand commented 1 year ago

@Framba-Luca Can you have a look? @serivan Any hint?

stoppini commented 1 year ago

Hi everyone, i made a few change in the lpg library and try and I tried to solve the bug. Can @jrenoux try the latest version of LPG?

Regards Alberto

jrenoux commented 1 year ago

It seems to be working fine now, thanks!