Commit 0b6c50d3 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

solutions_2_graph: add doc; rename sub functions

parent e797db74
......@@ -58,7 +58,11 @@ def launch_sort(args):
def solutions_2_graph(args):
"""Parse a complete solution file and make a representation of trajectories.
"""Create GraphML formated files containing a representation of the
trajectories for every solution in complete MAC files (*cam_complete files).
This is a function to visualize paths taken by the solver from the boundaries
to the entities of interest.
# Module import
......@@ -196,7 +196,7 @@ def draw_graph(output_dir, solution, solution_index, G,
def process_solutions(output_dir, sol_steps, transitions):
def convert_solution_file_to_graphs(output_dir, sol_steps, transitions):
"""Build a graph based on the given solution
Each solution is composed of a set of frontier places and steps,
......@@ -336,7 +336,7 @@ def solutions_2_graph(output_dir, model_file, solution_path):
if os.path.isfile(solution_path):
# The given path is a solution file
......@@ -351,7 +351,7 @@ def solutions_2_graph(output_dir, model_file, solution_path):
for file_number, solution_path in \
enumerate(glob.glob(solution_path + '*cam_complete.txt'), 1):
......@@ -111,6 +111,13 @@ def sort_solutions(path):
def solutions_2_json(output_dir, model_file, solution_path, conditions=True):
"""Entry point for solutions_2_json
Create a JSON formated file containing all data from complete MAC files
(*cam_complete files). The file will contain frontier places/boundaries
and decompiled steps with their respective events for each solution.
This is a function to quickly search all transition attributes involved
in a solution.
This functions tests if the given path is a directory or a file.
:param output_dir: Output path.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment