Skip to content

Commit

Permalink
Merge pull request #489 from Shi-Raida/tests/basic_numeric
Browse files Browse the repository at this point in the history
Tests: add a basic numeric example
  • Loading branch information
alvalentini authored Sep 26, 2023
2 parents 251254b + 84506d5 commit 862c4b2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions unified_planning/test/examples/minimals.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,4 +389,17 @@ def get_example_problems():
basic_with_object_constant = Example(problem=problem, plan=plan)
problems["basic_with_object_constant"] = basic_with_object_constant

# basic numeric
value = Fluent("value", IntType())
task = InstantaneousAction("task")
task.add_precondition(Equals(value, 1))
task.add_effect(value, 2)
problem = Problem("basic_numeric")
problem.add_fluent(value)
problem.add_action(task)
problem.set_initial_value(value, 1)
problem.add_goal(Equals(value, 2))
plan = up.plans.SequentialPlan([up.plans.ActionInstance(task)])
problems["basic_numeric"] = Example(problem=problem, plan=plan)

return problems
1 change: 1 addition & 0 deletions unified_planning/test/test_problem.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@ def test_simple_numeric_planning_kind(self):
"basic_int_fluent_param",
"basic_bounded_int_action_param",
"basic_unbounded_int_action_param",
"basic_numeric",
"sched:basic",
"sched:resource_set",
"sched:jobshop-ft06-operators",
Expand Down

0 comments on commit 862c4b2

Please sign in to comment.