Skip to content

Commit

Permalink
Refactor method connections in Dot_Compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
Maumagnaguagno committed Oct 24, 2024
1 parent e52df60 commit aa1fb25
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compilers/Dot_Compiler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ def compile_domain(domain_name, problem_name, operators, methods, predicates, st
# Preconditions
predicates_to_dot(method_str, dec[2], dec[3])
# Subtasks
connections = ''
connections = "}\"\n ]\n \"#{met[0]}\":#{i} -> \"#{met[0]}_#{dec[0]}\" [style=dotted]\n"
dec[4].each_with_index {|subtask,j|
method_str << "|<#{j}>#{subtask.join(' ')}"
connections << " \"#{met[0]}_#{dec[0]}\":#{j} -> \"#{subtask[0]}\"\n" if all_connections or operators.assoc(subtask[0])
}
# Connections
method_str << "}\"\n ]\n \"#{met[0]}\":#{i} -> \"#{met[0]}_#{dec[0]}\" [style=dotted]\n#{connections}"
method_str << connections
}
domain_str << " \"#{met[0]}\" [\n style=bold\n label=\"{{\\N|#{met[1].join(' ')}}|{#{decompositions.join('|')}}}\"\n ]\n#{method_str}"
}
Expand Down

0 comments on commit aa1fb25

Please sign in to comment.