From 1091f56cd7ca056e414fac4e3780129ce222966d Mon Sep 17 00:00:00 2001 From: leo Date: Sun, 15 May 2022 12:36:19 +0200 Subject: [PATCH] fix --- runAllNetworks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runAllNetworks.py b/runAllNetworks.py index 669778b..b0f472f 100644 --- a/runAllNetworks.py +++ b/runAllNetworks.py @@ -13,7 +13,7 @@ def runSim(paths): newline = '\n' return 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)}" -nbThreads = 5 +nbThreads = 7 poly = "rdpt_polytech_fixed.net.xml" paths = [ [poly, "rdpt_polytech_burst.rou.xml"], @@ -26,5 +26,5 @@ paths = [ ["comp_inter.net.xml", "comp_inter.rou.xml"], ["comp_rdp.net.xml", "comp_rdp.rou.xml"] ] -with Pool(5) as p: +with Pool(nbThreads) as p: print(p.map(runSim,paths))