i seem to have made some changes to the petrinet formalism

This commit is contained in:
Joeri Exelmans 2024-12-03 17:58:49 +01:00
parent 9883e09ac2
commit 5633bf17a9
7 changed files with 26 additions and 26 deletions

View file

@ -25,10 +25,10 @@ if __name__ == "__main__":
# Read models from their files
mm_cs = read_file('metamodels/mm_design.od')
mm_rt_cs = mm_cs + read_file('metamodels/mm_runtime.od')
m_cs = read_file('models/m_example_simple.od')
m_rt_initial_cs = m_cs + read_file('models/m_example_simple_rt_initial.od')
# m_cs = read_file('models/m_example_mutex.od')
# m_rt_initial_cs = m_cs + read_file('models/m_example_mutex_rt_initial.od')
# m_cs = read_file('models/m_example_simple.od')
# m_rt_initial_cs = m_cs + read_file('models/m_example_simple_rt_initial.od')
m_cs = read_file('models/m_example_mutex.od')
m_rt_initial_cs = m_cs + read_file('models/m_example_mutex_rt_initial.od')
# Parse them
mm = loader.parse_and_check(state, mm_cs, scd_mmm, "Petri-Net Design meta-model")
@ -36,7 +36,6 @@ if __name__ == "__main__":
m = loader.parse_and_check(state, m_cs, mm, "Example model")
m_rt_initial = loader.parse_and_check(state, m_rt_initial_cs, mm_rt, "Example model initial state")
mm_rt_ramified = ramify(state, mm_rt)
rules = loader.load_rules(state,
@ -52,6 +51,7 @@ if __name__ == "__main__":
decision_maker=simulator.InteractiveDecisionMaker(auto_proceed=False),
# decision_maker=simulator.RandomDecisionMaker(seed=0),
renderer=lambda od: render_petri_net(od) + render_od(state, od.m, od.mm),
# renderer=lambda od: render_od(state, od.m, od.mm),
)
sim.run(ODAPI(state, m_rt_initial, mm_rt))