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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parsing error

alvalentini opened this issue · comments

Describe the bug
If I try to solve the counters problem with lpg I get an INTERNAL_ERROR in the PlanGenerationResult.

The problem seems to be in the lpg parser. In particular when the UP problem is dumped in PDDL this goal is generated: (<= (+ 1 (value c0)) (value c1)) and the order of the sum operators causes the bug.

To Reproduce

from unified_planning.shortcuts import *
from unified_planning.io import PDDLReader

reader = PDDLReader()
problem = reader.parse_problem("counters/domain.pddl", "counters/problem.pddl")

with OneshotPlanner(name="lpg") as planner:
    print(planner.supports(problem.kind))
    p = planner.solve(problem)
    print(p)

Here the files: counters.zip

To clarify: if I manually change the order in this way (<= (+ (value c0) 1) (value c1)), a solution is generated.

Hi @alvalentini, today we deploy new version of up-lpg. Can u try now?