DaRL-LibSignal / LibSignal

114 stars 22 forks source link

Question about average travel time #22

Open BackMountainDevil opened 10 months ago

BackMountainDevil commented 10 months ago

In Paper "Table 3: Performance comparison of agents w.r.t. average travel time (in seconds) before and after calibration"

Then I run the code and got some output as below:

As you can see, in episode 193~200, real avg travel time( comes from self.metric.real_average_travel_time()) is getting bigger. And it is not equl to travel time( still comes from self.metric.real_average_travel_time()). The last two line has Final Travel Time( still comes from same func).

self.metric.real_average_travel_time() func return self.world.get_average_travel_time(). But in mplight or colight, even AttentionLight, they do not use the get_average_travel_time() as average travel time.

So which number should be the num in Table 3 as final score?

2024-01-22 10:23:45 (INFO): episode:2/200, real avg travel time:859.4379020286987
2024-01-22 10:23:48 (INFO): Test step:2/200, travel time :1314.948540326571, rewards:-286.4108072916667, queue:191.225, delay:0.7417051527235243, throughput:510
2024-01-22 10:23:51 (INFO): step:3600/3600, q_loss:1752.2039794921875, rewards:-219.97369791666668, queue:146.84166666666667, delay:0.7382037692599827, throughput:1338
2024-01-22 10:23:51 (INFO): episode:3/200, real avg travel time:820.210786739238
2024-01-22 10:23:53 (INFO): Test step:3/200, travel time :1051.2508659079663, rewards:-278.2649956597222, queue:185.8, delay:0.7478469000922309, throughput:848
2024-01-22 10:23:56 (INFO): step:3600/3600, q_loss:345.8424377441406, rewards:-188.90455729166666, queue:125.9888888888889, delay:0.7571139865451388, throughput:1706
2024-01-22 10:23:56 (INFO): episode:4/200, real avg travel time:363.3983176645225
2024-01-22 10:23:59 (INFO): Test step:4/200, travel time :1258.8179119247898, rewards:-286.99205729166664, queue:191.62777777777777, delay:0.7472451951768663, throughput:577
2024-01-22 10:24:02 (INFO): step:3600/3600, q_loss:489.8249206542969, rewards:-192.62042100694444, queue:128.56944444444446, delay:0.7700509813096789, throughput:1699
2024-01-22 10:24:02 (INFO): episode:5/200, real avg travel time:351.0336467095497
2024-01-22 10:24:05 (INFO): Test step:5/200, travel time :1205.414646214745, rewards:-282.0478949652778, queue:188.30833333333334, delay:0.7466458638509115, throughput:609
2024-01-22 10:24:08 (INFO): step:3600/3600, q_loss:541.1013793945312, rewards:-172.99289279513889, queue:115.34722222222223, delay:0.731319342719184, throughput:1673
2024-01-22 10:24:08 (INFO): episode:6/200, real avg travel time:322.04700643245917
2024-01-22 10:24:10 (INFO): Test step:6/200, travel time :1179.8758040573973, rewards:-279.40833333333336, queue:186.54166666666666, delay:0.7450555589463975, throughput:625
2024-01-22 10:24:13 (INFO): step:3600/3600, q_loss:562.461181640625, rewards:-185.64453125, queue:123.79166666666667, delay:0.7646314832899306, throughput:1700
2024-01-22 10:24:13 (INFO): episode:7/200, real avg travel time:347.7654626422563
2024-01-22 10:24:16 (INFO): Test step:7/200, travel time :1047.5264720435428, rewards:-276.15959201388887, queue:184.3972222222222, delay:0.7471856858995226, throughput:863
2024-01-22 10:24:19 (INFO): step:3600/3600, q_loss:562.9974975585938, rewards:-177.25579427083332, queue:118.18055555555556, delay:0.7533392164442274, throughput:1698

...

2024-01-22 10:38:56 (INFO): episode:193/200, real avg travel time:183.683819891143
2024-01-22 10:38:58 (INFO): Test step:193/200, travel time :212.267194458189, rewards:-98.22127821180555, queue:65.46388888888889, delay:0.716658189561632, throughput:1848
2024-01-22 10:39:01 (INFO): step:3600/3600, q_loss:584.511474609375, rewards:-95.20210503472222, queue:63.425, delay:0.7212346394856771, throughput:1836
2024-01-22 10:39:01 (INFO): episode:194/200, real avg travel time:205.3117268678872
2024-01-22 10:39:03 (INFO): Test step:194/200, travel time :243.0212765957447, rewards:-90.86710069444445, queue:60.47222222222222, delay:0.6561620924207899, throughput:1818
2024-01-22 10:39:06 (INFO): step:3600/3600, q_loss:591.1795654296875, rewards:-93.15581597222223, queue:62.09722222222222, delay:0.7047738817003039, throughput:1884
2024-01-22 10:39:06 (INFO): episode:195/200, real avg travel time:196.57001484413658
2024-01-22 10:39:08 (INFO): Test step:195/200, travel time :226.32558139534885, rewards:-95.26252170138889, queue:63.44444444444444, delay:0.6850776248508029, throughput:1824
2024-01-22 10:39:11 (INFO): step:3600/3600, q_loss:626.0236206054688, rewards:-87.17833116319444, queue:58.05555555555556, delay:0.6814577738444011, throughput:1857
2024-01-22 10:39:11 (INFO): episode:196/200, real avg travel time:210.8753092528451
2024-01-22 10:39:13 (INFO): Test step:196/200, travel time :192.32261256803562, rewards:-84.28835177951389, queue:56.172222222222224, delay:0.6935267978244357, throughput:1872
2024-01-22 10:39:15 (INFO): step:3600/3600, q_loss:607.767578125, rewards:-89.33538953993056, queue:59.49166666666667, delay:0.6868301815456814, throughput:1868
2024-01-22 10:39:15 (INFO): episode:197/200, real avg travel time:193.19495299356754
2024-01-22 10:39:17 (INFO): Test step:197/200, travel time :158.76991588322613, rewards:-76.43204752604167, queue:50.93888888888889, delay:0.6811378055148655, throughput:1917
2024-01-22 10:39:20 (INFO): step:3600/3600, q_loss:641.4354248046875, rewards:-90.39168294270833, queue:60.21111111111111, delay:0.6758840772840712, throughput:1834
2024-01-22 10:39:20 (INFO): episode:198/200, real avg travel time:250.10192973775358
2024-01-22 10:39:21 (INFO): Test step:198/200, travel time :188.54576942107866, rewards:-93.7296115451389, queue:62.42777777777778, delay:0.65865478515625, throughput:1897
2024-01-22 10:39:24 (INFO): step:3600/3600, q_loss:645.171875, rewards:-91.09501953125, queue:60.669444444444444, delay:0.6866438971625434, throughput:1840
2024-01-22 10:39:24 (INFO): episode:199/200, real avg travel time:222.88174171202374
2024-01-22 10:39:26 (INFO): Test step:199/200, travel time :243.66996536368134, rewards:-113.17209201388889, queue:75.41944444444445, delay:0.6514779832628038, throughput:1762
2024-01-22 10:39:29 (INFO): Final Travel Time is 243.6700, mean rewards: -113.1721, queue: 75.4194, delay: 0.6515, throughput: 1762
2024-01-22 10:39:29 (INFO): Total time taken: 956.3847246170044
wingsweihua commented 9 months ago

@derekmei233 Take a look