fix
This commit is contained in:
parent
55cb4e8cc7
commit
1091f56cd7
@ -13,7 +13,7 @@ def runSim(paths):
|
|||||||
newline = '\n'
|
newline = '\n'
|
||||||
return f"{paths[0]}/{paths[1]} : \ntemps d'arrêt moyen : {cc.totalStopped / cc.carsDestroyed:.2f}s/voitures \n<vitesse/vitesse max>T : {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)}"
|
return f"{paths[0]}/{paths[1]} : \ntemps d'arrêt moyen : {cc.totalStopped / cc.carsDestroyed:.2f}s/voitures \n<vitesse/vitesse max>T : {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"
|
poly = "rdpt_polytech_fixed.net.xml"
|
||||||
paths = [
|
paths = [
|
||||||
[poly, "rdpt_polytech_burst.rou.xml"],
|
[poly, "rdpt_polytech_burst.rou.xml"],
|
||||||
@ -26,5 +26,5 @@ paths = [
|
|||||||
["comp_inter.net.xml", "comp_inter.rou.xml"],
|
["comp_inter.net.xml", "comp_inter.rou.xml"],
|
||||||
["comp_rdp.net.xml", "comp_rdp.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))
|
print(p.map(runSim,paths))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user