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's versioning and Numeric kind's update #449

Merged
merged 20 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9e3ff56
Updated semantic of DISCRETE_NUMBERS and CONTINUOUS_NUMBERS
alvalentini Jul 6, 2023
637d1ad
Feat(Expression): Every expression defined as a Fraction but that is …
Framba-Luca Sep 13, 2023
171a04c
Removed obsolete code and added new features
Framba-Luca Sep 14, 2023
3bdd749
Added new file to handle problem kind's versioning and updated all in…
Framba-Luca Sep 15, 2023
83be91c
Updated commits-reference and versions of engines in the tests
Framba-Luca Sep 15, 2023
8b8971b
Fixed grounder resulting_kind versioning
Framba-Luca Sep 15, 2023
8aefc15
Fixed todos in compilers ProblemKind
Framba-Luca Sep 16, 2023
bcc948d
Small fixes
alvalentini Sep 22, 2023
a2c5733
Fixes after rebase
Framba-Luca Oct 19, 2023
e3e9b12
Feat(ProblemKind): Added ProblemKind's versioning with the desired be…
Framba-Luca Oct 20, 2023
65cd67a
Fix(PK Equals, LE): Added code to correctly calculate == or <= betwee…
Framba-Luca Oct 20, 2023
f8cef16
re-added get_version with deprecation
Framba-Luca Oct 24, 2023
3ff448f
Fixed deprecation waring
Framba-Luca Oct 24, 2023
35a2dfb
Fix(Supported python versions): Switched to use lru_cache instead of …
Framba-Luca Oct 25, 2023
22e2781
deps: Update required aries version
arbimo Oct 25, 2023
3958c23
Fix after rebase
Framba-Luca Oct 31, 2023
ac8041e
Updated fmap version
Alee08 Oct 27, 2023
4c52551
Fixed a notebook
alvalentini Oct 31, 2023
8234ddb
Merge pull request #510 from aiplan4eu/fmap-update
alvalentini Oct 31, 2023
fec6578
Updated engines versions
alvalentini Oct 31, 2023
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
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ on:
type: string

env:
up_tamer_commit: "08ddcc5a5518b1d86916d9fdcca90500fec58048"
up_pyperplan_commit: "23639395b661a768ba78832c0750ce417c7dc16a"
up_tamer_commit: "db6709d7c465d52db6d1522206b199e30aed23a1"
up_pyperplan_commit: "d6d54f8a8b67e7653599e007a8373245fb2fffd3"
up_fast_downward_commit: "a5d2e211c95aba896c03aa3499a4961f3e1956cf"
up_enhsp_commit: "10e2d8451c24114be4f98e96ac2e6dbaafeb00a6"
up_fmap_commit: "d0e3c0c920b3a515486ae7526c0fba51c75361e1"
up_enhsp_commit: "af93cd799974626ac17b8aaf1a83975f75c073ab"
up_fmap_commit: "3dd40496277e65af574ce24724b573b90a86464f"

jobs:
basic-check:
Expand Down
2 changes: 1 addition & 1 deletion docs/notebooks/09-multiagent-planning-simple.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@
],
"source": [
"with OneshotPlanner(name='fmap') as planner:\n",
" result = planner.solve(problem, None, \"1\")\n",
" result = planner.solve(problem, \"1\")\n",
" if result.status == up.engines.PlanGenerationResultStatus.SOLVED_SATISFICING:\n",
" print(\"%s Returned Sequential Plans object: %s\" % (planner.name, result.plan.all_sequential_plans()))\n",
" [print(f\"{idx} Sequential Plans: {seq_plan}\") for idx, seq_plan in enumerate(result.plan.all_sequential_plans())]\n",
Expand Down
36 changes: 33 additions & 3 deletions docs/problem_representation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,18 @@ Problem Kinds
* -
- FLUENTS_IN_DURATION
- The duration of at least one action is specified using non-static fluents (that might change over the course of a plan).
* -
- INT_TYPE_DURATIONS
- The duration of at least one action is of int type; added in ProblemKind's version 2.
* -
- REAL_TYPE_DURATIONS
- The duration of at least one action is of real type; added in ProblemKind's version 2.
* - NUMBERS
- CONTINUOUS_NUMBERS
- The problem uses numbers ranging over continuous domains (e.g. reals).
- The problem uses numbers ranging over continuous domains (e.g. reals); deprecated in ProblemKind's version 2.
* -
- DISCRETE_NUMBERS
- The problem uses numbers ranging over discrete domains (e.g. integers).
- The problem uses numbers ranging over discrete domains (e.g. integers); deprecated in ProblemKind's version 2.
* -
- BOUNDED_TYPES
- The problem uses bounded-domain numbers.
Expand Down Expand Up @@ -149,7 +155,13 @@ Problem Kinds
- At least one action has a parameter of real type.
* - FLUENTS_TYPE
- NUMERIC_FLUENTS
- The problem has at least one fluent of numeric type.
- The problem has at least one fluent of numeric type; deprecated in ProblemKind's version 2.
* -
- INT_FLUENTS
- The problem has at least one fluent of integer type; added in ProblemKind's version 2.
* -
- REAL_FLUENTS
- The problem has at least one fluent of real type; added in ProblemKind's version 2.
* -
- OBJECT_FLUENTS
- The problem has at least one finite-domain fluent (fluent of user-defined type).
Expand All @@ -171,6 +183,24 @@ Problem Kinds
* -
- TEMPORAL_OVERSUBSCRIPTION
- The problem has a quality metric associating a positive value to some optional timed goal and the objective is to find the plan of maximal value.
* - ACTIONS_COST_KIND
- STATIC_FLUENTS_IN_ACTIONS_COST
- There is at least a static fluent in the Action's cost (that may never change).
* -
- FLUENTS_IN_ACTIONS_COST
- There is at least a non-static fluent in the Action's cost (that might change over the course of a plan).
* -
- INT_NUMBERS_IN_ACTIONS_COST
- There is at least one Action's cost in the ACTIONS_COST that is of int type; added in ProblemKind's version 2.
* -
- REAL_NUMBERS_IN_ACTIONS_COST
- There is at least one Action's cost in the ACTIONS_COST that is of real type; added in ProblemKind's version 2.
* - OVERSUBSCRIPTION_KIND
- INT_NUMBERS_IN_OVERSUBSCRIPTION
- There is at least one gain in the Oversubscription (or Temporal Oversubscription) metric that is of int type; added in ProblemKind's version 2.
* -
- REAL_NUMBERS_IN_OVERSUBSCRIPTION
- There is at least one gain in the Oversubscription (or Temporal Oversubscription) metric that is of real type; added in ProblemKind's version 2.
* - SIMULATED_ENTITIES
- SIMULATED_EFFECTS
- The problem uses at least one simulated effect.
Expand Down
24 changes: 12 additions & 12 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,24 @@
"dev": ["tarski[arithmetic]", "pytest", "pytest-cov", "mypy"],
"grpc": ["grpcio", "grpcio-tools", "grpc-stubs"],
"tarski": ["tarski[arithmetic]"],
"pyperplan": ["up-pyperplan==1.0.0.1.dev1"],
"tamer": ["up-tamer==1.0.0.2.dev1"],
"enhsp": ["up-enhsp==0.0.19"],
"pyperplan": ["up-pyperplan==1.0.0.4.dev1"],
"tamer": ["up-tamer==1.0.0.4.dev1"],
"enhsp": ["up-enhsp==0.0.21"],
"fast-downward": ["up-fast-downward==0.3.1"],
"lpg": ["up-lpg==0.0.7"],
"fmap": ["up-fmap==0.0.7"],
"aries": ["up-aries>=0.0.8"],
"symk": ["up-symk>=0.0.3"],
"fmap": ["up-fmap==0.0.9"],
"aries": ["up-aries>=0.2.0"],
"symk": ["up-symk>=1.0.1"],
"engines": [
"tarski[arithmetic]",
"up-pyperplan==1.0.0.1.dev1",
"up-tamer==1.0.0.2.dev1",
"up-enhsp==0.0.19",
"up-pyperplan==1.0.0.4.dev1",
"up-tamer==1.0.0.4.dev1",
"up-enhsp==0.0.21",
"up-fast-downward==0.3.1",
"up-lpg==0.0.7",
"up-fmap==0.0.7",
"up-aries>=0.0.8",
"up-symk>=0.0.3",
"up-fmap==0.0.9",
"up-aries>=0.2.0",
"up-symk>=1.0.1",
],
"plot": [
"plotly",
Expand Down
18 changes: 13 additions & 5 deletions unified_planning/engines/compilers/bounded_types_remover.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
from unified_planning.model import Problem, ProblemKind, Fluent, FNode
from unified_planning.model.fluent import get_all_fluent_exp
from unified_planning.model.types import _RealType, _IntType
from unified_planning.model.problem_kind_versioning import LATEST_PROBLEM_KIND_VERSION
from unified_planning.model.walkers import FluentsSubstituter
from unified_planning.engines.compilers.utils import (
add_invariant_condition_apply_function_to_problem_expressions,
Expand Down Expand Up @@ -58,7 +59,7 @@ def name(self):

@staticmethod
def supported_kind() -> ProblemKind:
supported_kind = ProblemKind()
supported_kind = ProblemKind(version=LATEST_PROBLEM_KIND_VERSION)
supported_kind.set_problem_class("ACTION_BASED")
supported_kind.set_typing("FLAT_TYPING")
supported_kind.set_typing("HIERARCHICAL_TYPING")
Expand All @@ -68,12 +69,11 @@ def supported_kind() -> ProblemKind:
supported_kind.set_parameters("BOUNDED_INT_ACTION_PARAMETERS")
supported_kind.set_parameters("UNBOUNDED_INT_ACTION_PARAMETERS")
supported_kind.set_parameters("REAL_ACTION_PARAMETERS")
supported_kind.set_numbers("CONTINUOUS_NUMBERS")
supported_kind.set_numbers("DISCRETE_NUMBERS")
supported_kind.set_numbers("BOUNDED_TYPES")
supported_kind.set_problem_type("SIMPLE_NUMERIC_PLANNING")
supported_kind.set_problem_type("GENERAL_NUMERIC_PLANNING")
supported_kind.set_fluents_type("NUMERIC_FLUENTS")
supported_kind.set_fluents_type("INT_FLUENTS")
supported_kind.set_fluents_type("REAL_FLUENTS")
supported_kind.set_fluents_type("OBJECT_FLUENTS")
supported_kind.set_conditions_kind("NEGATIVE_CONDITIONS")
supported_kind.set_conditions_kind("DISJUNCTIVE_CONDITIONS")
Expand All @@ -98,6 +98,10 @@ def supported_kind() -> ProblemKind:
supported_kind.set_time("TIMED_GOALS")
supported_kind.set_time("DURATION_INEQUALITIES")
supported_kind.set_time("SELF_OVERLAPPING")
supported_kind.set_expression_duration("STATIC_FLUENTS_IN_DURATIONS")
supported_kind.set_expression_duration("FLUENTS_IN_DURATIONS")
supported_kind.set_expression_duration("INT_TYPE_DURATIONS")
supported_kind.set_expression_duration("REAL_TYPE_DURATIONS")
supported_kind.set_simulated_entities("SIMULATED_EFFECTS")
supported_kind.set_constraints_kind("STATE_INVARIANTS")
supported_kind.set_quality_metrics("ACTIONS_COST")
Expand All @@ -108,6 +112,10 @@ def supported_kind() -> ProblemKind:
supported_kind.set_quality_metrics("TEMPORAL_OVERSUBSCRIPTION")
supported_kind.set_quality_metrics("MAKESPAN")
supported_kind.set_quality_metrics("FINAL_VALUE")
supported_kind.set_actions_cost_kind("INT_NUMBERS_IN_ACTIONS_COST")
supported_kind.set_actions_cost_kind("REAL_NUMBERS_IN_ACTIONS_COST")
supported_kind.set_oversubscription_kind("INT_NUMBERS_IN_OVERSUBSCRIPTION")
supported_kind.set_oversubscription_kind("REAL_NUMBERS_IN_OVERSUBSCRIPTION")
return supported_kind

@staticmethod
Expand All @@ -122,7 +130,7 @@ def supports_compilation(compilation_kind: CompilationKind) -> bool:
def resulting_problem_kind(
problem_kind: ProblemKind, compilation_kind: Optional[CompilationKind] = None
) -> ProblemKind:
new_kind = ProblemKind(problem_kind.features)
new_kind = problem_kind.clone()
if new_kind.has_bounded_types():
new_kind.unset_numbers("BOUNDED_TYPES")
return new_kind
Expand Down
18 changes: 13 additions & 5 deletions unified_planning/engines/compilers/conditional_effects_remover.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
DurativeAction,
AbstractProblem,
)
from unified_planning.model.problem_kind_versioning import LATEST_PROBLEM_KIND_VERSION
from unified_planning.engines.compilers.utils import (
get_fresh_name,
check_and_simplify_preconditions,
Expand Down Expand Up @@ -73,7 +74,7 @@ def name(self):

@staticmethod
def supported_kind() -> ProblemKind:
supported_kind = ProblemKind()
supported_kind = ProblemKind(version=LATEST_PROBLEM_KIND_VERSION)
supported_kind.set_problem_class("ACTION_BASED")
supported_kind.set_typing("FLAT_TYPING")
supported_kind.set_typing("HIERARCHICAL_TYPING")
Expand All @@ -83,12 +84,11 @@ def supported_kind() -> ProblemKind:
supported_kind.set_parameters("BOUNDED_INT_ACTION_PARAMETERS")
supported_kind.set_parameters("UNBOUNDED_INT_ACTION_PARAMETERS")
supported_kind.set_parameters("REAL_ACTION_PARAMETERS")
supported_kind.set_numbers("CONTINUOUS_NUMBERS")
supported_kind.set_numbers("DISCRETE_NUMBERS")
supported_kind.set_numbers("BOUNDED_TYPES")
supported_kind.set_problem_type("SIMPLE_NUMERIC_PLANNING")
supported_kind.set_problem_type("GENERAL_NUMERIC_PLANNING")
supported_kind.set_fluents_type("NUMERIC_FLUENTS")
supported_kind.set_fluents_type("INT_FLUENTS")
supported_kind.set_fluents_type("REAL_FLUENTS")
supported_kind.set_fluents_type("OBJECT_FLUENTS")
supported_kind.set_conditions_kind("NEGATIVE_CONDITIONS")
supported_kind.set_conditions_kind("DISJUNCTIVE_CONDITIONS")
Expand All @@ -113,6 +113,10 @@ def supported_kind() -> ProblemKind:
supported_kind.set_time("TIMED_GOALS")
supported_kind.set_time("DURATION_INEQUALITIES")
supported_kind.set_time("SELF_OVERLAPPING")
supported_kind.set_expression_duration("STATIC_FLUENTS_IN_DURATIONS")
supported_kind.set_expression_duration("FLUENTS_IN_DURATIONS")
supported_kind.set_expression_duration("INT_TYPE_DURATIONS")
supported_kind.set_expression_duration("REAL_TYPE_DURATIONS")
supported_kind.set_simulated_entities("SIMULATED_EFFECTS")
supported_kind.set_constraints_kind("STATE_INVARIANTS")
supported_kind.set_quality_metrics("ACTIONS_COST")
Expand All @@ -123,6 +127,10 @@ def supported_kind() -> ProblemKind:
supported_kind.set_quality_metrics("TEMPORAL_OVERSUBSCRIPTION")
supported_kind.set_quality_metrics("MAKESPAN")
supported_kind.set_quality_metrics("FINAL_VALUE")
supported_kind.set_actions_cost_kind("INT_NUMBERS_IN_ACTIONS_COST")
supported_kind.set_actions_cost_kind("REAL_NUMBERS_IN_ACTIONS_COST")
supported_kind.set_oversubscription_kind("INT_NUMBERS_IN_OVERSUBSCRIPTION")
supported_kind.set_oversubscription_kind("REAL_NUMBERS_IN_OVERSUBSCRIPTION")
return supported_kind

@staticmethod
Expand All @@ -137,7 +145,7 @@ def supports_compilation(compilation_kind: CompilationKind) -> bool:
def resulting_problem_kind(
problem_kind: ProblemKind, compilation_kind: Optional[CompilationKind] = None
) -> ProblemKind:
new_kind = ProblemKind(problem_kind.features)
new_kind = problem_kind.clone()
if new_kind.has_conditional_effects():
new_kind.unset_effects_kind("CONDITIONAL_EFFECTS")
new_kind.set_conditions_kind("NEGATIVE_CONDITIONS")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
Oversubscription,
TemporalOversubscription,
)
from unified_planning.model.problem_kind_versioning import LATEST_PROBLEM_KIND_VERSION
from unified_planning.model.walkers import Dnf
from typing import Iterator, List, Optional, Tuple, Dict, cast
from itertools import product
Expand Down Expand Up @@ -68,7 +69,7 @@ def name(self):

@staticmethod
def supported_kind() -> ProblemKind:
supported_kind = ProblemKind()
supported_kind = ProblemKind(version=LATEST_PROBLEM_KIND_VERSION)
supported_kind.set_problem_class("ACTION_BASED")
supported_kind.set_typing("FLAT_TYPING")
supported_kind.set_typing("HIERARCHICAL_TYPING")
Expand All @@ -78,12 +79,11 @@ def supported_kind() -> ProblemKind:
supported_kind.set_parameters("BOUNDED_INT_ACTION_PARAMETERS")
supported_kind.set_parameters("UNBOUNDED_INT_ACTION_PARAMETERS")
supported_kind.set_parameters("REAL_ACTION_PARAMETERS")
supported_kind.set_numbers("CONTINUOUS_NUMBERS")
supported_kind.set_numbers("DISCRETE_NUMBERS")
supported_kind.set_numbers("BOUNDED_TYPES")
supported_kind.set_problem_type("SIMPLE_NUMERIC_PLANNING")
supported_kind.set_problem_type("GENERAL_NUMERIC_PLANNING")
supported_kind.set_fluents_type("NUMERIC_FLUENTS")
supported_kind.set_fluents_type("INT_FLUENTS")
supported_kind.set_fluents_type("REAL_FLUENTS")
supported_kind.set_fluents_type("OBJECT_FLUENTS")
supported_kind.set_conditions_kind("NEGATIVE_CONDITIONS")
supported_kind.set_conditions_kind("DISJUNCTIVE_CONDITIONS")
Expand All @@ -108,6 +108,10 @@ def supported_kind() -> ProblemKind:
supported_kind.set_time("TIMED_GOALS")
supported_kind.set_time("DURATION_INEQUALITIES")
supported_kind.set_time("SELF_OVERLAPPING")
supported_kind.set_expression_duration("STATIC_FLUENTS_IN_DURATIONS")
supported_kind.set_expression_duration("FLUENTS_IN_DURATIONS")
supported_kind.set_expression_duration("INT_TYPE_DURATIONS")
supported_kind.set_expression_duration("REAL_TYPE_DURATIONS")
supported_kind.set_simulated_entities("SIMULATED_EFFECTS")
supported_kind.set_quality_metrics("ACTIONS_COST")
supported_kind.set_actions_cost_kind("STATIC_FLUENTS_IN_ACTIONS_COST")
Expand All @@ -117,6 +121,10 @@ def supported_kind() -> ProblemKind:
supported_kind.set_quality_metrics("TEMPORAL_OVERSUBSCRIPTION")
supported_kind.set_quality_metrics("MAKESPAN")
supported_kind.set_quality_metrics("FINAL_VALUE")
supported_kind.set_actions_cost_kind("INT_NUMBERS_IN_ACTIONS_COST")
supported_kind.set_actions_cost_kind("REAL_NUMBERS_IN_ACTIONS_COST")
supported_kind.set_oversubscription_kind("INT_NUMBERS_IN_OVERSUBSCRIPTION")
supported_kind.set_oversubscription_kind("REAL_NUMBERS_IN_OVERSUBSCRIPTION")
return supported_kind

@staticmethod
Expand All @@ -131,7 +139,7 @@ def supports_compilation(compilation_kind: CompilationKind) -> bool:
def resulting_problem_kind(
problem_kind: ProblemKind, compilation_kind: Optional[CompilationKind] = None
) -> ProblemKind:
new_kind = ProblemKind(problem_kind.features)
new_kind = problem_kind.clone()
new_kind.unset_conditions_kind("DISJUNCTIVE_CONDITIONS")
return new_kind

Expand Down
20 changes: 13 additions & 7 deletions unified_planning/engines/compilers/grounder.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
)
from unified_planning.model.types import domain_size, domain_item
from unified_planning.model.walkers import Simplifier
from unified_planning.model.problem_kind_versioning import LATEST_PROBLEM_KIND_VERSION
from unified_planning.engines.compilers.utils import (
lift_action_instance,
create_action_with_given_subs,
Expand Down Expand Up @@ -245,20 +246,19 @@ def name(self):

@staticmethod
def supported_kind() -> ProblemKind:
supported_kind = ProblemKind()
supported_kind = ProblemKind(version=LATEST_PROBLEM_KIND_VERSION)
supported_kind.set_problem_class("ACTION_BASED")
supported_kind.set_typing("FLAT_TYPING")
supported_kind.set_typing("HIERARCHICAL_TYPING")
supported_kind.set_parameters("BOOL_FLUENT_PARAMETERS")
supported_kind.set_parameters("BOUNDED_INT_FLUENT_PARAMETERS")
supported_kind.set_parameters("BOOL_ACTION_PARAMETERS")
supported_kind.set_parameters("BOUNDED_INT_ACTION_PARAMETERS")
supported_kind.set_numbers("CONTINUOUS_NUMBERS")
supported_kind.set_numbers("DISCRETE_NUMBERS")
supported_kind.set_numbers("BOUNDED_TYPES")
supported_kind.set_problem_type("SIMPLE_NUMERIC_PLANNING")
supported_kind.set_problem_type("GENERAL_NUMERIC_PLANNING")
supported_kind.set_fluents_type("NUMERIC_FLUENTS")
supported_kind.set_fluents_type("INT_FLUENTS")
supported_kind.set_fluents_type("REAL_FLUENTS")
supported_kind.set_fluents_type("OBJECT_FLUENTS")
supported_kind.set_conditions_kind("NEGATIVE_CONDITIONS")
supported_kind.set_conditions_kind("DISJUNCTIVE_CONDITIONS")
Expand All @@ -285,17 +285,23 @@ def supported_kind() -> ProblemKind:
supported_kind.set_time("SELF_OVERLAPPING")
supported_kind.set_expression_duration("STATIC_FLUENTS_IN_DURATIONS")
supported_kind.set_expression_duration("FLUENTS_IN_DURATIONS")
supported_kind.set_expression_duration("INT_TYPE_DURATIONS")
supported_kind.set_expression_duration("REAL_TYPE_DURATIONS")
supported_kind.set_simulated_entities("SIMULATED_EFFECTS")
supported_kind.set_constraints_kind("STATE_INVARIANTS")
supported_kind.set_constraints_kind("TRAJECTORY_CONSTRAINTS")
supported_kind.set_quality_metrics("ACTIONS_COST")
supported_kind.set_actions_cost_kind("STATIC_FLUENTS_IN_ACTIONS_COST")
supported_kind.set_actions_cost_kind("FLUENTS_IN_ACTIONS_COST")
supported_kind.set_quality_metrics("PLAN_LENGTH")
supported_kind.set_quality_metrics("OVERSUBSCRIPTION")
supported_kind.set_quality_metrics("TEMPORAL_OVERSUBSCRIPTION")
supported_kind.set_quality_metrics("MAKESPAN")
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")
supported_kind.set_oversubscription_kind("INT_NUMBERS_IN_OVERSUBSCRIPTION")
supported_kind.set_oversubscription_kind("REAL_NUMBERS_IN_OVERSUBSCRIPTION")
return supported_kind

@staticmethod
Expand All @@ -310,7 +316,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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def supports(problem_kind):
def resulting_problem_kind(
problem_kind: ProblemKind, compilation_kind: Optional[CompilationKind] = None
) -> ProblemKind:
new_kind = ProblemKind(problem_kind.features)
new_kind = problem_kind.clone()
new_kind.unset_conditions_kind("DISJUNCTIVE_CONDITIONS")
return new_kind

Expand Down
Loading
Loading