Skip to content

Commit

Permalink
Print Empty plan for plan without visible operators in Hypertension_U…
Browse files Browse the repository at this point in the history
… problem
  • Loading branch information
Maumagnaguagno committed Sep 27, 2023
1 parent 2e955c7 commit e4b2fd3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Hypertension_U.rb
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ def problem(state, tasks, debug = false, max_plans = -1, min_prob = 0)
puts "Plan #{i.succ}".center(50,'-'),
"Probability: #{probability}",
"Valuation: #{valuation}"
if plan.empty? then puts 'Empty plan'
else print_data(plan.delete_if {|op,| op.start_with?('invisible_')})
if plan.delete_if {|op,| op.start_with?('invisible_')}.empty? then puts 'Empty plan'
else print_data(plan)
end
}.empty?
abort(@nostack ? 'Planning failed, try with more stack' : 'Planning failed')
Expand Down

0 comments on commit e4b2fd3

Please sign in to comment.