Skip to content

Commit

Permalink
Added optimum to tests in UP that have quality metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Framba-Luca committed Oct 25, 2023
1 parent 8d72871 commit a73c616
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions unified_planning/test/examples/minimals.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def get_example_problems():
problem.add_quality_metric(qm)
plan = up.plans.SequentialPlan([up.plans.ActionInstance(a)])
basic_oversubscription = TestCase(
problem=problem, solvable=True, valid_plans=[plan]
problem=problem, solvable=True, valid_plans=[plan], optimum=10
)
problems["basic_oversubscription"] = basic_oversubscription

Expand Down Expand Up @@ -321,7 +321,9 @@ def get_example_problems():
plan = up.plans.SequentialPlan(
[up.plans.ActionInstance(act_b), up.plans.ActionInstance(act_c)]
)
basic_with_costs = TestCase(problem=problem, solvable=True, valid_plans=[plan])
basic_with_costs = TestCase(
problem=problem, solvable=True, valid_plans=[plan], optimum=2
)
problems["basic_with_costs"] = basic_with_costs

# counter
Expand Down
4 changes: 2 additions & 2 deletions unified_planning/test/examples/testing_variants.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ def get_example_problems():
]
)
locations_connected_visited_oversubscription = TestCase(
problem=problem, solvable=True, valid_plans=[plan]
problem=problem, solvable=True, valid_plans=[plan], optimum=15
)
problems[
"locations_connected_visited_oversubscription"
Expand Down Expand Up @@ -893,7 +893,7 @@ def get_example_problems():
]
)
locations_connected_cost_minimize = TestCase(
problem=problem, solvable=True, valid_plans=[plan]
problem=problem, solvable=True, valid_plans=[plan], optimum=10
)
problems["locations_connected_cost_minimize"] = locations_connected_cost_minimize

Expand Down

0 comments on commit a73c616

Please sign in to comment.