diff --git a/rdpt_polytech_burst.rou.xml b/rdpt_polytech_burst.rou.xml index 5708022..aadae6e 100644 --- a/rdpt_polytech_burst.rou.xml +++ b/rdpt_polytech_burst.rou.xml @@ -4,47 +4,47 @@ --> - + - + - + - + - + - + - + - + - + diff --git a/rdpt_polytech_burst_IA.rou.xml b/rdpt_polytech_burst_IA.rou.xml new file mode 100644 index 0000000..26f4714 --- /dev/null +++ b/rdpt_polytech_burst_IA.rou.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rdpt_polytech_burst_div2.rou.xml b/rdpt_polytech_burst_div2.rou.xml new file mode 100644 index 0000000..6232940 --- /dev/null +++ b/rdpt_polytech_burst_div2.rou.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rdpt_polytech_burst_dynSpeed.rou.xml b/rdpt_polytech_burst_dynSpeed.rou.xml new file mode 100644 index 0000000..81806b6 --- /dev/null +++ b/rdpt_polytech_burst_dynSpeed.rou.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/rdpt_polytech_burst_moy_IA.rou.xml b/rdpt_polytech_burst_moy_IA.rou.xml index 709d97b..cc6897e 100644 --- a/rdpt_polytech_burst_moy_IA.rou.xml +++ b/rdpt_polytech_burst_moy_IA.rou.xml @@ -4,55 +4,55 @@ --> - + - + - + - + - + - + - + - + - + diff --git a/rdpt_polytech_burst_moy_div2.rou.xml b/rdpt_polytech_burst_moy_div2.rou.xml index 560d4bc..bc711eb 100644 --- a/rdpt_polytech_burst_moy_div2.rou.xml +++ b/rdpt_polytech_burst_moy_div2.rou.xml @@ -4,47 +4,47 @@ --> - + - + - + - + - + - + - + - + - + diff --git a/rdpt_polytech_burst_moy_dynSpeed.rou.xml b/rdpt_polytech_burst_moy_dynSpeed.rou.xml index a5811aa..9c9132e 100644 --- a/rdpt_polytech_burst_moy_dynSpeed.rou.xml +++ b/rdpt_polytech_burst_moy_dynSpeed.rou.xml @@ -4,55 +4,55 @@ --> - + - + - + - + - + - + - + - + - + diff --git a/rdpt_polytech_burst_moy_shortcut_3.rou.xml b/rdpt_polytech_burst_moy_shortcut_3.rou.xml index bc45179..4c39662 100644 --- a/rdpt_polytech_burst_moy_shortcut_3.rou.xml +++ b/rdpt_polytech_burst_moy_shortcut_3.rou.xml @@ -4,47 +4,47 @@ --> - + - + - + - + - + - + - + - + - + diff --git a/rdpt_polytech_burst_shortcut_3.rou.xml b/rdpt_polytech_burst_shortcut_3.rou.xml new file mode 100644 index 0000000..209c4e5 --- /dev/null +++ b/rdpt_polytech_burst_shortcut_3.rou.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/runAllNetworks.py b/runAllNetworks.py index 20cbe7f..5682ef8 100644 --- a/runAllNetworks.py +++ b/runAllNetworks.py @@ -8,19 +8,21 @@ def runSim(paths): m.fromPath(paths[0]) cc.fromPath(paths[1]) cc.prepareRoute() - while cc.t < 3600: + while cc.t < 1800: cc.update() 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)}" + 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}") + 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)} \n nombre de voitures {cc.carsDestroyed}" + nbThreads = 7 poly = "rdpt_polytech_fixed.net.xml" paths = [ - [poly, "rdpt_polytech_burst_moy.rou.xml"], - [poly, "rdpt_polytech_burst_moy_dynSpeed.rou.xml"], - [poly, "rdpt_polytech_burst_moy_div2.rou.xml"], - [poly, "rdpt_polytech_burst_moy_IA.rou.xml"], - ["rdpt_polytech_shortcut_3.net.xml", "rdpt_polytech_burst_moy_shortcut_3.rou.xml"], + [poly, "rdpt_polytech_burst.rou.xml"], + [poly, "rdpt_polytech_burst_dynSpeed.rou.xml"], + [poly, "rdpt_polytech_burst_div2.rou.xml"], + [poly, "rdpt_polytech_burst_IA.rou.xml"], + ["rdpt_polytech_shortcut_3.net.xml", "rdpt_polytech_burst_shortcut_3.rou.xml"], ["comp_inter.net.xml", "comp_inter.rou.xml"], ["comp_rdp.net.xml", "comp_rdp.rou.xml"] ]