Skip to content

Commit

Permalink
Restore state after planning in Hypertension task_permutations
Browse files Browse the repository at this point in the history
  • Loading branch information
Maumagnaguagno committed Oct 7, 2023
1 parent 1ce2aa3 commit fa00e20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Hypertension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -275,11 +275,11 @@ def problem(state, tasks, debug = false, ordered = true)
def task_permutations(state, tasks, goal_task = nil)
# All permutations are considered
tasks.permutation {|task_list|
@state = state
task_list = Marshal.load(Marshal.dump(task_list))
task_list << goal_task if goal_task
plan = planning(task_list)
return plan if plan
@state = state
}
nil
end
Expand Down

0 comments on commit fa00e20

Please sign in to comment.