Skip to content

Commit

Permalink
Merge branch 'version-0.3.3' into fix-grounders
Browse files Browse the repository at this point in the history
  • Loading branch information
roeger authored Nov 7, 2023
2 parents 2cef9a8 + f250d1e commit c0ac6d4
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ UP Fast Downward 0.3.3
- fix bug in fast-downward-reachability grounder
- silence output in grounders

UP Fast Downward 0.3.2
- support UP problem kind version 2

UP Fast Downward 0.3.1
- fix windows wheel

Expand Down
2 changes: 1 addition & 1 deletion misc/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ changedir = {toxinidir}/tests/
deps =
pytest
up-fast-downward
unified-planning
unified-planning >= 1.0.0.168.dev1
commands =
pytest test-simple.py
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def run(self):
long_description = "This package makes the [Fast Downward](https://www.fast-downward.org/) planning system available in the [unified_planning library](https://github.com/aiplan4eu/unified-planning) by the [AIPlan4EU project](https://www.aiplan4eu-project.eu/)."

setup(name='up_fast_downward',
version='0.3.1',
version='0.3.2',
description='Unified Planning Integration of the Fast Downward planning system',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down
6 changes: 4 additions & 2 deletions up_fast_downward/fast_downward.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def satisfies(optimality_guarantee: "OptimalityGuarantee") -> bool:

@staticmethod
def supported_kind() -> "ProblemKind":
supported_kind = ProblemKind()
supported_kind = ProblemKind(version=2)
supported_kind.set_problem_class("ACTION_BASED")
supported_kind.set_typing("FLAT_TYPING")
supported_kind.set_typing("HIERARCHICAL_TYPING")
Expand All @@ -196,6 +196,7 @@ def supported_kind() -> "ProblemKind":
supported_kind.set_effects_kind("FORALL_EFFECTS")
supported_kind.set_quality_metrics("ACTIONS_COST")
supported_kind.set_actions_cost_kind("STATIC_FLUENTS_IN_ACTIONS_COST")
supported_kind.set_actions_cost_kind("INT_NUMBERS_IN_ACTIONS_COST")
supported_kind.set_quality_metrics("PLAN_LENGTH")
return supported_kind

Expand Down Expand Up @@ -236,7 +237,7 @@ def get_credits(**kwargs) -> Optional["Credits"]:

@staticmethod
def supported_kind() -> "ProblemKind":
supported_kind = ProblemKind()
supported_kind = ProblemKind(version=2)
supported_kind.set_problem_class("ACTION_BASED")
supported_kind.set_typing("FLAT_TYPING")
supported_kind.set_typing("HIERARCHICAL_TYPING")
Expand All @@ -247,6 +248,7 @@ def supported_kind() -> "ProblemKind":
supported_kind.set_conditions_kind("EQUALITIES")
supported_kind.set_quality_metrics("ACTIONS_COST")
supported_kind.set_actions_cost_kind("STATIC_FLUENTS_IN_ACTIONS_COST")
supported_kind.set_actions_cost_kind("INT_NUMBERS_IN_ACTIONS_COST")
supported_kind.set_quality_metrics("PLAN_LENGTH")
return supported_kind

Expand Down
14 changes: 8 additions & 6 deletions up_fast_downward/fast_downward_grounder.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def get_credits(**kwargs) -> Optional["Credits"]:

@staticmethod
def supported_kind() -> ProblemKind:
supported_kind = ProblemKind()
supported_kind = ProblemKind(version=2)
supported_kind.set_problem_class("ACTION_BASED")
supported_kind.set_typing("FLAT_TYPING")
supported_kind.set_typing("HIERARCHICAL_TYPING")
Expand All @@ -65,6 +65,7 @@ def supported_kind() -> ProblemKind:
supported_kind.set_effects_kind("FLUENTS_IN_BOOLEAN_ASSIGNMENTS")
supported_kind.set_quality_metrics("ACTIONS_COST")
supported_kind.set_actions_cost_kind("STATIC_FLUENTS_IN_ACTIONS_COST")
supported_kind.set_actions_cost_kind("INT_NUMBERS_IN_ACTIONS_COST")
supported_kind.set_quality_metrics("PLAN_LENGTH")
supported_kind.set_conditions_kind("UNIVERSAL_CONDITIONS")
supported_kind.set_conditions_kind("EXISTENTIAL_CONDITIONS")
Expand All @@ -82,7 +83,7 @@ def supports_compilation(compilation_kind: CompilationKind) -> bool:
def resulting_problem_kind(
problem_kind: ProblemKind, compilation_kind: Optional[CompilationKind] = None
) -> ProblemKind:
return ProblemKind(problem_kind.features)
return problem_kind.clone()

def _compile(
self, problem: "up.model.AbstractProblem", compilation_kind: "CompilationKind"
Expand Down Expand Up @@ -167,7 +168,7 @@ def get_credits(**kwargs) -> Optional["Credits"]:

@staticmethod
def supported_kind() -> ProblemKind:
supported_kind = ProblemKind()
supported_kind = ProblemKind(version=2)
supported_kind.set_problem_class("ACTION_BASED")
supported_kind.set_typing("FLAT_TYPING")
supported_kind.set_typing("HIERARCHICAL_TYPING")
Expand All @@ -179,6 +180,7 @@ def supported_kind() -> ProblemKind:
supported_kind.set_effects_kind("FLUENTS_IN_BOOLEAN_ASSIGNMENTS")
supported_kind.set_quality_metrics("ACTIONS_COST")
supported_kind.set_actions_cost_kind("STATIC_FLUENTS_IN_ACTIONS_COST")
supported_kind.set_actions_cost_kind("INT_NUMBERS_IN_ACTIONS_COST")
supported_kind.set_quality_metrics("PLAN_LENGTH")

# We don't support allquantified conditions because they can lead
Expand Down Expand Up @@ -208,9 +210,9 @@ def supports_compilation(compilation_kind: CompilationKind) -> bool:
def resulting_problem_kind(
problem_kind: ProblemKind, compilation_kind: Optional[CompilationKind] = None
) -> ProblemKind:
orig_features = problem_kind.features
features = set.difference(orig_features, {"DISJUNCTIVE_CONDITIONS"})
return ProblemKind(features)
resulting_problem_kind = problem_kind.clone()
resulting_problem_kind.unset_conditions_kind("DISJUNCTIVE_CONDITIONS")
return resulting_problem_kind

def _get_fnode(
self,
Expand Down

0 comments on commit c0ac6d4

Please sign in to comment.