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

Problem kind version #17

Merged
merged 4 commits into from
Oct 26, 2023
Merged
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 @@ -62,7 +62,7 @@ def run(self):


setup(name='up_enhsp',
version='0.0.20',
version='0.0.21',
description='up_enhsp',
author='UNIBS Team',
author_email='[email protected]',
Expand Down
59 changes: 30 additions & 29 deletions up_enhsp/enhsp_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,33 +52,34 @@ def _result_status(

@staticmethod
def supported_kind() -> 'ProblemKind':
supported_kind = ProblemKind()
supported_kind.set_problem_class('ACTION_BASED') # type: ignore
supported_kind.set_numbers('CONTINUOUS_NUMBERS') # type: ignore
supported_kind.set_numbers('DISCRETE_NUMBERS') # type: ignore
supported_kind.set_typing('FLAT_TYPING') # type: ignore
supported_kind.set_typing('HIERARCHICAL_TYPING') # type: ignore
supported_kind.set_fluents_type('NUMERIC_FLUENTS') # type: ignore
supported_kind.set_conditions_kind('NEGATIVE_CONDITIONS') # type: ignore
supported_kind.set_conditions_kind('DISJUNCTIVE_CONDITIONS') # type: ignore
supported_kind.set_conditions_kind('EXISTENTIAL_CONDITIONS') # type: ignore
supported_kind.set_conditions_kind('UNIVERSAL_CONDITIONS') # type: ignore
supported_kind.set_conditions_kind('EQUALITIES') # type: ignore
supported_kind.set_problem_type('SIMPLE_NUMERIC_PLANNING') # type: ignore
supported_kind.set_problem_type('GENERAL_NUMERIC_PLANNING') # type: ignore
supported_kind.set_effects_kind('INCREASE_EFFECTS') # type: ignore
supported_kind.set_effects_kind('DECREASE_EFFECTS') # type: ignore
supported_kind.set_effects_kind('FORALL_EFFECTS') # type: ignore
supported_kind.set_effects_kind('CONDITIONAL_EFFECTS') # type: ignore
supported_kind.set_effects_kind('STATIC_FLUENTS_IN_BOOLEAN_ASSIGNMENTS') # type: ignore
supported_kind.set_effects_kind('STATIC_FLUENTS_IN_NUMERIC_ASSIGNMENTS') # type: ignore
supported_kind.set_effects_kind('FLUENTS_IN_BOOLEAN_ASSIGNMENTS') # type: ignore
supported_kind.set_effects_kind('FLUENTS_IN_NUMERIC_ASSIGNMENTS') # type: ignore
supported_kind.set_quality_metrics("ACTIONS_COST") # type: ignore
supported_kind.set_quality_metrics("PLAN_LENGTH") # type: ignore
supported_kind.set_quality_metrics("FINAL_VALUE") # type: ignore
supported_kind.set_actions_cost_kind("STATIC_FLUENTS_IN_ACTIONS_COST") # type: ignore
supported_kind.set_actions_cost_kind("FLUENTS_IN_ACTIONS_COST") # type: ignore
supported_kind = ProblemKind(version=2)
supported_kind.set_problem_class('ACTION_BASED')
supported_kind.set_typing('FLAT_TYPING')
supported_kind.set_typing('HIERARCHICAL_TYPING')
supported_kind.set_fluents_type("INT_FLUENTS")
supported_kind.set_fluents_type("REAL_FLUENTS")
supported_kind.set_conditions_kind('NEGATIVE_CONDITIONS')
supported_kind.set_conditions_kind('DISJUNCTIVE_CONDITIONS')
supported_kind.set_conditions_kind('EXISTENTIAL_CONDITIONS')
supported_kind.set_conditions_kind('UNIVERSAL_CONDITIONS')
supported_kind.set_conditions_kind('EQUALITIES')
supported_kind.set_problem_type('SIMPLE_NUMERIC_PLANNING')
supported_kind.set_problem_type('GENERAL_NUMERIC_PLANNING')
supported_kind.set_effects_kind('INCREASE_EFFECTS')
supported_kind.set_effects_kind('DECREASE_EFFECTS')
supported_kind.set_effects_kind('FORALL_EFFECTS')
supported_kind.set_effects_kind('CONDITIONAL_EFFECTS')
supported_kind.set_effects_kind('STATIC_FLUENTS_IN_BOOLEAN_ASSIGNMENTS')
supported_kind.set_effects_kind('STATIC_FLUENTS_IN_NUMERIC_ASSIGNMENTS')
supported_kind.set_effects_kind('FLUENTS_IN_BOOLEAN_ASSIGNMENTS')
supported_kind.set_effects_kind('FLUENTS_IN_NUMERIC_ASSIGNMENTS')
supported_kind.set_quality_metrics("ACTIONS_COST")
supported_kind.set_quality_metrics("PLAN_LENGTH")
supported_kind.set_quality_metrics("FINAL_VALUE")
supported_kind.set_actions_cost_kind("STATIC_FLUENTS_IN_ACTIONS_COST")
supported_kind.set_actions_cost_kind("FLUENTS_IN_ACTIONS_COST")
supported_kind.set_actions_cost_kind("INT_NUMBERS_IN_ACTIONS_COST")
supported_kind.set_actions_cost_kind("REAL_NUMBERS_IN_ACTIONS_COST")
return supported_kind

@staticmethod
Expand Down Expand Up @@ -122,7 +123,7 @@ def _parse_plan_line(self, plan_line: str) -> str:




class ENHSPOptEngine(ENHSPEngine):

@property
Expand Down Expand Up @@ -182,4 +183,4 @@ def _get_cmd(self, domain_filename: str, problem_filename: str, plan_filename: s
@staticmethod
def supported_kind() -> 'ProblemKind':
supported_kind = ENHSPEngine.supported_kind()
return supported_kind
return supported_kind