Skip to content

Commit

Permalink
fix(interpreted functions): minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Gobbi committed Nov 27, 2024
1 parent bed8b92 commit 40a8c2e
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion plot-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
-r requirements.txt
plotly
matplotlib==3.7.3
kaleido==0.2.1
kaleido
pandas
pygraphviz
2 changes: 1 addition & 1 deletion unified_planning/engines/mixins/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from unified_planning.model import ProblemKind
from abc import ABC, abstractmethod
from enum import Enum, auto
from typing import Dict, Optional, OrderedDict
from typing import Optional
from warnings import warn

from unified_planning.model.fnode import FNode
Expand Down
1 change: 1 addition & 0 deletions unified_planning/engines/parallel.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.
#


import warnings
import unified_planning as up
import unified_planning.engines as engines
Expand Down
1 change: 1 addition & 0 deletions unified_planning/engines/results.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#
"""This module defines the PlanGenerationResult class."""


from fractions import Fraction
import unified_planning as up
from unified_planning.exceptions import UPUsageError, UPValueError
Expand Down
1 change: 0 additions & 1 deletion unified_planning/test/test_anml_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,6 @@ def test_anml_io(self):
or kind.has_interpreted_functions_in_numeric_assignments()
or kind.has_interpreted_functions_in_object_assignments()
or kind.has_interpreted_functions_in_conditions()
# could be done more cleanly with an has_interpreted_functions() imlpementation
):
continue
with tempfile.TemporaryDirectory() as tempdir:
Expand Down
1 change: 0 additions & 1 deletion unified_planning/test/test_partial_order_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.


import pytest
import unified_planning as up
from unified_planning.shortcuts import *
from unified_planning.model.problem_kind import basic_classical_kind, hierarchical_kind
Expand Down
2 changes: 1 addition & 1 deletion unified_planning/test/test_pddl_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ def test_examples_io(self):
or kind.has_interpreted_functions_in_numeric_assignments()
or kind.has_interpreted_functions_in_object_assignments()
or kind.has_interpreted_functions_in_conditions()
) # could be done more cleanly with an has_interpreted_functions() imlpementation
)
):
continue
with tempfile.TemporaryDirectory() as tempdir:
Expand Down
6 changes: 2 additions & 4 deletions unified_planning/test/test_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

from typing import Callable
import warnings

import unified_planning as up
from unified_planning.shortcuts import *
from unified_planning.model.problem_kind import (
Expand Down Expand Up @@ -98,8 +97,8 @@ def test_basic_parameters(self):
@skipIfEngineNotAvailable("tamer")
def test_basic_parallel(self):
problem = self.problems["basic"].problem
# print (problem)
a = problem.action("a")

with OneshotPlanner(
names=["tamer", "tamer"],
params=[{"heuristic": "hadd"}, {"heuristic": "hmax"}],
Expand Down Expand Up @@ -153,8 +152,8 @@ def test_basic_oversubscription(self):
@skipIfEngineNotAvailable("tamer")
def test_basic_oversubscription_parallel(self):
problem = self.problems["basic_oversubscription"].problem
# print(problem)
a = problem.action("a")

with OneshotPlanner(
names=["oversubscription[tamer]", "oversubscription[tamer]"],
params=[{"heuristic": "hadd"}, {"heuristic": "hmax"}],
Expand All @@ -172,7 +171,6 @@ def test_basic_oversubscription_parallel(self):
@skipIfEngineNotAvailable("tamer")
def test_timed_connected_locations_parallel(self):
problem = self.problems["timed_connected_locations"].problem
# print(problem)
move = problem.action("move")
with OneshotPlanner(
names=["tamer", "tamer"],
Expand Down
1 change: 0 additions & 1 deletion unified_planning/test/test_protobuf_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,6 @@ def test_all_problems(self):
or kind.has_interpreted_functions_in_numeric_assignments()
or kind.has_interpreted_functions_in_object_assignments()
or kind.has_interpreted_functions_in_conditions()
# could be done more cleanly with an has_interpreted_functions() imlpementation
):
continue
problem_pb = self.pb_writer.convert(problem)
Expand Down

0 comments on commit 40a8c2e

Please sign in to comment.