def test_run_stepbystep_bottleneck_002(self): # Using new constructor sim_instance = Simulator.from_path(self.mocks_path, self.sim_path) with sim_instance as s: while s.do_next: s.run_step()
def test_create_vehicle_bottleneck_001(bottleneck_001, symuvia_library_path): symuflow = Simulator.from_path(bottleneck_001, symuvia_library_path) symuflow._set_manual_initialization() veh_id = symuflow.create_vehicle("VL", "Ext_In", "Ext_Out") assert veh_id == 0
def launch_simuflow(file) -> tuple: sim_instance = Simulator.from_path(file, DEFAULT_PATH_SYMUFLOW) sim_instance.trace_flow = True sim_instance.step_launch_mode = "full" with sim_instance as s: while s.do_next: s.run_step() yield sim_instance.simulationstep, sim_instance.request.datatraj
def test_runbystep_bottleneck_002(bottleneck_002, symuvia_library_path): sim_instance = Simulator.from_path(bottleneck_002, symuvia_library_path) with sim_instance as s: while s.do_next: s.run_step() assert s.do_next == False
def test_run_bottleneck_002(bottleneck_002, symuvia_library_path): sim_instance = Simulator.from_path(bottleneck_002, symuvia_library_path) sim_instance.run()
def test_constructor_bottleneck_002(bottleneck_002, symuvia_library_path): sim_instance = Simulator.from_path(bottleneck_002, symuvia_library_path) sim_instance.load_symuvia() valid = sim_instance.load_network() assert valid == 1
def test_run_simulation_alternative_constructor_bottleneck_001(self): sim_instance = Simulator.from_path(self.mocks_path, self.sim_path) sim_instance.run_simulation()
def test_constructor_bottleneck_001(self): sim_instance = Simulator.from_path(self.mocks_path, self.sim_path) self.assertEqual(self.mocks_path, sim_instance.casename)
def test_runbystep_bottleneck_001(bottleneck_001, symuvia_library_path): symuflow = Simulator.from_path(bottleneck_001, symuvia_library_path) with symuflow as s: while s.do_next: s.run_step() assert s.do_next == False
def test_run_bottleneck_001(bottleneck_001, symuvia_library_path): symuflow = Simulator.from_path(bottleneck_001, symuvia_library_path) symuflow.run()
def test_load_constructor_bottleneck_001(bottleneck_001, symuvia_library_path): symuflow = Simulator.from_path(bottleneck_001, symuvia_library_path) symuflow.load_symuvia() valid = symuflow.load_network() assert valid == 1