Skip to content

Commit

Permalink
Replaced get_env with get_environment
Browse files Browse the repository at this point in the history
  • Loading branch information
GiorgioBonardi authored Dec 19, 2023
1 parent 0eaa178 commit 1c609a9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions up_ibacop/ibacop.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import unified_planning as up
from unified_planning.shortcuts import get_env
from unified_planning.shortcuts import get_environment
from unified_planning.model import ProblemKind
from unified_planning.engines.mixins import PortfolioSelectorMixin
from unified_planning.engines import Engine, Credits
Expand Down Expand Up @@ -85,7 +85,7 @@ def supported_kind() -> ProblemKind:

@staticmethod
def supports(problem_kind: "ProblemKind") -> bool:
factory = get_env().factory
factory = get_environment().factory
installed_planners = factory.engines

for planner in default_planners:
Expand All @@ -102,7 +102,7 @@ def get_credits(**kwargs) -> Optional[Credits]:
def satisfies(
optimality_guarantee: "up.engines.mixins.oneshot_planner.OptimalityGuarantee",
) -> bool:
factory = get_env().factory
factory = get_environment().factory
installed_planners = factory.engines

for planner in default_planners:
Expand Down Expand Up @@ -321,7 +321,7 @@ def _get_prediction(self, features: List[str]) -> List[str]:
def _filter_with_system_planners(
self, planner_list: List[str]
) -> Tuple[List[str], List[Dict[str, Any]]]:
installed_planners = get_env().factory.engines
installed_planners = get_environment().factory.engines

planners = []
for planner in planner_list:
Expand Down

0 comments on commit 1c609a9

Please sign in to comment.