eclipse-sumo / sumo

Eclipse SUMO is an open source, highly portable, microscopic and continuous traffic simulation package designed to handle large networks. It allows for intermodal simulation including pedestrians and comes with a large set of tools for scenario creation.
https://eclipse.dev/sumo
Eclipse Public License 2.0
2.51k stars 1.42k forks source link

Avoid unregistered platoon objects #12878

Closed TrinhTuanHung2021 closed 1 year ago

TrinhTuanHung2021 commented 1 year ago

Hello. I run a road network where all vehicles are platooning vehicles. I used simpla to create platoons.

My code is simple

if __name__ == "__main__":

    for i in range(10):          
        sumo_cmd = ['sumo-gui', '--duration-log.statistics', '--tripinfo-output', 'intelligent_lights_output_file.xml', '-c', 'scenario/amman.sumocfg']
        traci.start(sumo_cmd)
        simpla.load("scenario/1type.cfg.xml")
        step = 0 

        while step <36000:  # 1 hour
            step += 1        
            traci.simulationStep()

        traci.close()

But the model often gets errors when running image

image

m-kro commented 1 year ago

Could you please supply the files to reproduce the simulation? Seems quite odd that the removal of arrived vehicles does not work as expected.

TrinhTuanHung2021 commented 1 year ago

Could you please supply the files to reproduce the simulation? Seems quite odd that the removal of arrived vehicles does not work as expected.

Thank you for your quick reply. My model is here Ex.zip

m-kro commented 1 year ago

Could be reproduced in sumo v.1.16 , but not in the developer version...

TrinhTuanHung2021 commented 1 year ago

Could be reproduced in sumo v.1.16 , but not in the developer version...

Because I set the maxVehicle =3 in cfg.xml. This feature is only available in version 1.16. I removed it to try in other versions but it still had errors

m-kro commented 1 year ago

There was a side effect in checking whether platoons can split. The split was executed and only then was checked for safety. If the check failed, the platoon would not be added to the main platoon register and left as is.

@TrinhTuanHung2021 You can find the updated version here at Github or download the nightly snapshot tomorrow.

TrinhTuanHung2021 commented 1 year ago

There was a side effect in checking whether platoons can split. The split was executed and only then was checked for safety. If the check failed, the platoon would not be added to the main platoon register and left as is.

@TrinhTuanHung2021 You can find the updated version here at Github or download the nightly snapshot tomorrow.

Thank you. I will download the snapshot tomorrow and check it later.

m-kro commented 1 year ago

Closed as completed. If you still have questions or comments, please feel free to add them here and we will reopen the issue.