From 343b5e8a3722d5be457cec8cae495bfb453a1aeb Mon Sep 17 00:00:00 2001 From: leo Date: Fri, 20 May 2022 08:14:45 +0200 Subject: [PATCH] run 3600 --- rdpt_polytech_3600.rou.xml | 34 ++++++++++++++++++++++++++++++++++ runAllNetworks.py | 8 ++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 rdpt_polytech_3600.rou.xml diff --git a/rdpt_polytech_3600.rou.xml b/rdpt_polytech_3600.rou.xml new file mode 100644 index 0000000..f76c5c7 --- /dev/null +++ b/rdpt_polytech_3600.rou.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runAllNetworks.py b/runAllNetworks.py index 5682ef8..43838c0 100644 --- a/runAllNetworks.py +++ b/runAllNetworks.py @@ -8,7 +8,7 @@ def runSim(paths): m.fromPath(paths[0]) cc.fromPath(paths[1]) cc.prepareRoute() - while cc.t < 1800: + while cc.t < 3600: cc.update() newline = '\n' print(f"{paths[0]}/{paths[1]} : \ntemps d'arrĂȘt moyen : {cc.totalStopped / cc.carsDestroyed:.2f}s/voitures \nT : {cc.speedPercentageTotal / cc.carsDestroyed:.2f} \nbacklog total : {cc.getFlowBacklog():.2f} \n {newline.join(f'{f.id} : {f.backlog(cc.t):.2f}' for f in cc.flows)} \n nombre de voitures {cc.carsDestroyed}") @@ -26,6 +26,10 @@ paths = [ ["comp_inter.net.xml", "comp_inter.rou.xml"], ["comp_rdp.net.xml", "comp_rdp.rou.xml"] ] +paths2 = [ + [poly, "rdpt_polytech_3600.rou.xml"], + #[poly, "rdpt_polytech_burst.rou.xml"] + ] with Pool(nbThreads) as p: - for l in p.map(runSim,paths): + for l in p.map(runSim,paths2): print(l)