Skip to content

Commit

Permalink
Added the configuration space
Browse files Browse the repository at this point in the history
  • Loading branch information
alvalentini committed Aug 9, 2023
1 parent ddcb02f commit c48db20
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
author_email='tamer@fbk.eu',
url='https://tamer.fbk.eu',
packages=['up_tamer'],
install_requires=['pytamer==0.1.15'],
install_requires=['pytamer==0.1.15', 'ConfigSpace'],
python_requires='>=3.7',
license='APACHE'
)
5 changes: 5 additions & 0 deletions up_tamer/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
from unified_planning.engines import PlanGenerationResultStatus, ValidationResult, ValidationResultStatus, Credits
from up_tamer.converter import Converter
from fractions import Fraction
from ConfigSpace import ConfigurationSpace
from typing import IO, Callable, Optional, Dict, List, Tuple, Union, Set, cast


Expand Down Expand Up @@ -142,6 +143,10 @@ def satisfies(optimality_guarantee: up.engines.OptimalityGuarantee) -> bool:
def get_credits(**kwargs) -> Optional[up.engines.Credits]:
return credits

@staticmethod
def get_configuration_space() -> ConfigurationSpace:
return ConfigurationSpace(space={"weight": (0.0, 1.0), "heuristic": ["hadd", "hlandmarks", "hmax", "hff", "blind"]})

def _validate(self, problem: 'up.model.AbstractProblem', plan: 'up.plans.Plan') -> 'up.engines.results.ValidationResult':
assert isinstance(problem, up.model.Problem)
tproblem, _ = self._convert_problem(problem)
Expand Down

0 comments on commit c48db20

Please sign in to comment.