Skip to content

Commit

Permalink
Output only IPC plan with IPC flag in Hypertension problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Maumagnaguagno committed Oct 19, 2023
1 parent d8c5d96 commit bd235a6
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Hypertension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,7 @@ def problem(state, tasks, debug = false, ordered = true)
t = Time.now.to_f
plan = ordered ? planning(tasks) : task_permutations(state, tasks, (tasks.pop if tasks.dig(-1,1,0) == :invisible_goal))
puts "Time: #{Time.now.to_f - t}s", 'Plan'.center(50,'-')
if plan
puts 'Empty plan' if plan.empty?
puts '==>', plan.map {|d| d.join(' ')}, root, @decomposition, '<=='
if plan then puts '==>', plan.map {|d| d.join(' ')}, root, @decomposition, '<=='
else abort(@nostack ? 'Planning failed, try with more stack' : 'Planning failed')
end
plan
Expand Down

0 comments on commit bd235a6

Please sign in to comment.