You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently working with this library and need to ground my problems.
Right now (as far as I know) there is no way to ground a problem in a way that does not remove preconditions and/or Actions.
The problems I am working with are unsolvable which I am trying to make solvable by removing preconditions.
Here is the problem: since all grounders remove actions/preconditions/effects while grounding (which is logical since the problem is assumed to be SOLVABLE) but I need a grounding option which does not remove anything i have missing actions.
Additional Material
This problem here is already "grounded" but for example using "pyperplan" (doesn't really matter all grounders do this)
grounding the task results in missing actions.
from unified_planning.shortcuts import Problem, Fluent, InstantaneousAction, BoolType, Compiler, CompilationKind
problem = Problem()
#variables
x = Fluent("x", BoolType())
y = Fluent("y", BoolType())
z = Fluent("z", BoolType())
p = Fluent("p", BoolType())
q = Fluent("q", BoolType())
#add variables and set initial values
problem.add_fluent(x, default_initial_value=True)
problem.add_fluent(y, default_initial_value=False)
problem.add_fluent(z, default_initial_value=False)
problem.add_fluent(p, default_initial_value=False)
problem.add_fluent(q, default_initial_value=False)
#add goals
problem.add_goal(p)
problem.add_goal(q)
#actions
a1 = InstantaneousAction("a1")
a1.add_precondition(x)
a1.add_precondition(y)
a1.add_effect(z, True)
a1.add_effect(p, True)
problem.add_action(a1)
a2 = InstantaneousAction("a2")
a2.add_precondition(z)
a2.add_effect(q, True)
problem.add_action(a2)
#ground problem
compiler = Compiler(name ="pyperplan")
compiler_result = compiler.compile(problem, compilation_kind = CompilationKind.GROUNDING)
print(compiler_result.problem)
The following result will miss the "a1" action
The text was updated successfully, but these errors were encountered:
User Story
I am currently working with this library and need to ground my problems.
Right now (as far as I know) there is no way to ground a problem in a way that does not remove preconditions and/or Actions.
The problems I am working with are unsolvable which I am trying to make solvable by removing preconditions.
Here is the problem: since all grounders remove actions/preconditions/effects while grounding (which is logical since the problem is assumed to be SOLVABLE) but I need a grounding option which does not remove anything i have missing actions.
Additional Material
This problem here is already "grounded" but for example using "pyperplan" (doesn't really matter all grounders do this)
grounding the task results in missing actions.
The following result will miss the "a1" action
The text was updated successfully, but these errors were encountered: