diff options
Diffstat (limited to 'util/machina2dot.py')
-rwxr-xr-x | util/machina2dot.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/util/machina2dot.py b/util/machina2dot.py index fc3c6b5..eb89ec8 100755 --- a/util/machina2dot.py +++ b/util/machina2dot.py @@ -15,9 +15,8 @@ parser.parse_into_model(model, "file:" + sys.argv[1]) print """ digraph finite_state_machine { - rankdir=TD; - size="20,20" - node [shape = doublecircle, width = 1.25 ]; + rankdir=LR; + node [shape = doublecircle ]; """, node_durations = { } @@ -35,10 +34,10 @@ for result in initial_nodes_query.execute(model): node_id = result['n'].blank_identifier duration = float(result['dur'].literal_value['string']) node_durations[node_id] = duration - print '\t', node_id, "[ label = \"d:", duration, "\"];" + print '\t', node_id, "[ label = \"d =", duration, "\"];" -print "\tnode [shape = circle, width = 1.25 ];" +print "\tnode [shape = circle ];" nodes_query = RDF.SPARQLQuery(""" @@ -54,7 +53,7 @@ for result in nodes_query.execute(model): node_id = result['n'].blank_identifier duration = float(result['dur'].literal_value['string']) node_durations[node_id] = duration - print '\t', node_id, "[ label = \"d:", duration, "\"]; " + print '\t', node_id, "[ label = \"d =", duration, "\"]; " edge_query = RDF.SPARQLQuery(""" @@ -71,6 +70,6 @@ for edge in edge_query.execute(model): print '\t', edge['tail'].blank_identifier, ' -> ', print edge['head'].blank_identifier, ' ', print "[ label = \"", edge['prob'].literal_value['string'], "\" ", - print "minlen = ", node_durations[edge['tail'].blank_identifier] * 7.5, " ];" + print "minlen = ", node_durations[edge['tail'].blank_identifier] * 2, " ];" print "}" |