Skip to content

Commit

Permalink
Updated pytamer and minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
alvalentini committed Oct 18, 2023
1 parent c48db20 commit 08ddcc5
Show file tree
Hide file tree
Showing 2 changed files with 3 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='[email protected]',
url='https://tamer.fbk.eu',
packages=['up_tamer'],
install_requires=['pytamer==0.1.15', 'ConfigSpace'],
install_requires=['pytamer==0.1.16', 'ConfigSpace'],
python_requires='>=3.7',
license='APACHE'
)
2 changes: 2 additions & 0 deletions up_tamer/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,8 @@ def _convert_problem(self, problem: 'up.model.Problem') -> Tuple[pytamer.tamer_p
converter = Converter(self._env, problem, fluents_map, {}, instances_map)
constants_assignments = {}
for k, v in problem.initial_values.items():
if k.type.is_real_type() and v.is_int_constant():
v = problem.environment.expression_manager.Real(Fraction(v.constant_value()))
if k.fluent() not in static_fluents:
ass = pytamer.tamer_expr_make_assign(self._env, converter.convert(k), converter.convert(v))
expr = pytamer.tamer_expr_make_temporal_expression(self._env, self._tamer_start, ass)
Expand Down

0 comments on commit 08ddcc5

Please sign in to comment.