Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for forall over effects #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def is_pure(self):
return False

setup(name='up_lpg',
version='0.0.7',
version='0.0.8',
description='up_lpg',
long_description=long_description,
long_description_content_type ="text/markdown",
Expand Down
5 changes: 3 additions & 2 deletions up_lpg/lpg_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,15 +72,15 @@ def _plan_from_file(self, problem: 'up.model.Problem', plan_filename: str, get_i
parameters.append(problem.environment.expression_manager.ObjectExp(p_correct))
if tt:
start = re.match(r'^([\d.]+):', line).group(1)
dur = re.match(r'^[\d.]+:\s*\(\s*[\w?-]+((\s+[\w?-]+)*)\s*\)\s*\[([\d.]+)\]$', line).group(3)
dur = re.match(r'^[\d.]+:\s*\(\s*[\w?-]+((\s+[\w?-]+)*)\s*\)\s*\[([\d.]+)\]$', line).group(3)
actions.append((start,up.plans.ActionInstance(action, tuple(parameters)),dur))
else:
actions.append(up.plans.ActionInstance(action, tuple(parameters)))
elif re.match(r'no solution', line):
return None
else:
raise UPException('Error parsing plan generated by ' + self.__class__.__name__)

if tt:
return up.plans.TimeTriggeredPlan(actions)
else:
Expand Down Expand Up @@ -116,6 +116,7 @@ def supported_kind() -> 'ProblemKind':
supported_kind.set_effects_kind('DECREASE_EFFECTS') # type: ignore
supported_kind.set_effects_kind('STATIC_FLUENTS_IN_NUMERIC_ASSIGNMENTS') # type: ignore
supported_kind.set_effects_kind('FLUENTS_IN_NUMERIC_ASSIGNMENTS') # type: ignore
supported_kind.set_effects_kind("FORALL_EFFECTS") # type: ignore
supported_kind.set_time('CONTINUOUS_TIME') # type: ignore
supported_kind.set_quality_metrics('PLAN_LENGTH') # type: ignore
supported_kind.set_expression_duration('STATIC_FLUENTS_IN_DURATIONS') # type: ignore
Expand Down