Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
VIGNET Pierre
cadbiom
Commits
fbedbf90
Commit
fbedbf90
authored
Oct 30, 2018
by
VIGNET Pierre
Browse files
Add command line for solutions_2_common_graph command
parent
ae9f44c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
command_line/cadbiom_cmd/cadbiom_cmd.py
View file @
fbedbf90
...
...
@@ -74,6 +74,7 @@ def solutions_2_graph(args):
params
[
'path'
]
)
def
solutions_2_json
(
args
):
"""Create a JSON formated file containing all data from complete MAC files
(*cam_complete files). The file will contain frontier places/boundaries
...
...
@@ -113,6 +114,24 @@ def json_2_interaction_graph(args):
)
def
solutions_2_common_graph
(
args
):
"""Create a GraphML formated file containing a representation of **all**
trajectories for **all** solutions 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
import
solution_sort
params
=
args_to_param
(
args
)
solution_sort
.
solutions_2_common_graph
(
params
[
'output'
],
params
[
'chart_file'
],
params
[
'path'
]
)
def
model_comparison
(
args
):
"""Isomorphism test.
...
...
@@ -348,6 +367,24 @@ def main():
parser_json_2_interaction_graph
.
set_defaults
(
func
=
json_2_interaction_graph
)
# subparser: Common representation of the trajectories of MACs in a complete file.
# Model file (xml : cadbiom language)
# Solution file (cam_complete)
parser_trajectories
=
subparsers
.
add_parser
(
'solutions_2_common_graph'
,
help
=
solutions_2_common_graph
.
__doc__
,
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
)
parser_trajectories
.
add_argument
(
'chart_file'
,
help
=
"bcx model file."
)
parser_trajectories
.
add_argument
(
'path'
,
help
=
"Complete solution file or directory with MAC solutions files "
"(*cam_complete.txt files) generated with the 'compute_macs' command."
)
parser_trajectories
.
add_argument
(
'--output'
,
action
=
ReadableDir
,
nargs
=
'?'
,
default
=
'graphs/'
,
help
=
"Output directory for GraphML files."
)
parser_trajectories
.
set_defaults
(
func
=
solutions_2_common_graph
)
# subparser: Merge solutions to a csv file
# Solution file (cam)
# Output (csv)
...
...
command_line/cadbiom_cmd/solution_sort.py
View file @
fbedbf90
...
...
@@ -309,10 +309,10 @@ def convert_solution_file_to_graphs(output_dir, sol_steps, transitions):
##
def
solutions_2_common_graph
(
model_file
,
path
,
output_dir
):
def
solutions_2_common_graph
(
output_dir
,
model_file
,
path
):
"""Entry point for solutions_2_common_graph
Create a GraphML formated file containing a representation of **
ALL
**
Create a GraphML formated file containing a representation of **
all
**
trajectories for **all** solutions in complete MAC files (\*cam_complete files).
This is a function to visualize paths taken by the solver from the boundaries
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment