Commit c56f7a23 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[cmd] Remove legacy stuff

parent 0ef5c3a9
......@@ -156,83 +156,6 @@ def draw_graph(output_dir, solution, solution_index, G,
plt.show()
def test_main():
"""Test"""
# chart_model.py
# chart_xml.py
parser = MakeModelFromXmlFile(BIO_MOLDELS_DIR + "mini_test_publi.bcx")
print(type(parser.parser))
print(dir(parser))
print("HANDLER")
print(dir(parser.handler))
print(dir(parser.parser))
print(dir(parser.model))
print("ICI")
# print(parser.model.get_simple_node())
print(parser.handler.node_dict)
print(parser.handler.top_pile)
print(parser.handler.pile_dict)
print(parser.handler.transition.event)
print(type(parser.handler.top_pile))
transitions = dict()
for transition in parser.handler.top_pile.transitions:
# print(type(transition)) => list
for trans in transition:
# 'action', 'activated', 'clean', 'clock', 'condition', 'event',
# 'ext', 'ext_coord', 'fact_ids', 'get_influencing_places',
# 'get_key', 'is_me', 'macro_node', 'name', 'note', 'ori',
# 'ori_coord', 'remove', 'search_mark', 'selected', 'set_action',
# 'set_condition', 'set_event', 'set_name', 'set_note'
# {'name': '', 'clock': None, 'selected': False, 'activated': False,
# 'search_mark': False, 'note': '', 'ext': <cadbiom.models.guard_transitions.chart_model.CSimpleNode object at 0x7f391c7406d0>,
# 'ext_coord': 0.0, 'ori': <cadbiom.models.guard_transitions.chart_model.CSimpleNode object at 0x7f391c740650>,
# 'action': u'', 'macro_node': <cadbiom.models.guard_transitions.chart_model.CTopNode object at 0x7f391c7db490>,
# 'ori_coord': 0.0, 'event': u'h5', 'condition': u'', 'fact_ids': []}
# print(dir(trans))
print("NEW trans", trans.event)
# print(trans.__dict__)
# print(trans.name, trans.clock, trans.selected, trans.activated,
# trans.search_mark, trans.note, trans.ext, trans.ext_coord,
# trans.ori, trans.action, trans.macro_node, trans.ori_coord,
# trans.event, trans.condition, trans.fact_ids
# )
transitions[trans.event] = trans.condition
#print("ORI", trans.ori.__dict__)
#{'name': 'n4', 'yloc': 0.906099768906, 'selected': False,
#'father': <cadbiom.models.guard_transitions.chart_model.CTopNode object at 0x7f09eed91490>,
#'xloc': 0.292715433748, 'search_mark': False, 'was_activated': False,
#'incoming_trans': [<cadbiom.models.guard_transitions.chart_model.CTransition object at 0x7f09eecf67d0>],
#'model': <cadbiom.models.guard_transitions.chart_model.ChartModel object at 0x7f09ef2cf3d0>,
#'outgoing_trans': [<cadbiom.models.guard_transitions.chart_model.CTransition object at 0x7f09eecf6850>],
#'activated': False, 'hloc': 1.0}
print("ORI", trans.ori.name)
try:
print("ori INCO", [(tr.event, tr.condition) for tr in trans.ori.incoming_trans])
except: pass
try:
print("ori OUTGO", [(tr.event, tr.condition) for tr in trans.ori.outgoing_trans])
except: pass
print("EXT", trans.ext.name)
try:
print("ext INCO", [(tr.event, tr.condition) for tr in trans.ext.incoming_trans])
except: pass
try:
print("ext OUTGO", [(tr.event, tr.condition) for tr in trans.ext.outgoing_trans])
except: pass
print(transitions)
def graph_isomorph_test(model_file_1, model_file_2, output_dir='graphs/',
make_graphs=False, make_json=False):
"""Entry point for model consistency checking.
......
Supports Markdown
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