Skip to content

Add or remove goals from a PDDL problem. #468

Answered by Framba-Luca
MannavaVivek asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @MannavaVivek .

So, your issue of on not being defined comes from the fact that on is a python variable that is never assigned to anything. For this you have to add the code commented with [1] .

Then for the remove_goal method you will have another problem: the PDDLReader parses the goals as a unique one (which is a "big and"). You need to rewrite the single goal (which is an And) into more goals. For this you have to add the code commented with [2].

Here the new python code that should work.

from unified_planning.io import PDDLReader, PDDLWriter
from unified_planning.shortcuts import *
from unified_planning.engines import PlanGenerationResultStatus
import unified_planning as up

up.sh…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by MannavaVivek
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants