Closed AntaiXie closed 11 months ago
Hi, I understand you want to restart the simulation once the vehicle reaches the end? You can write a layer of loop function outside of run_model()
and just start the next iteration after model.close()
. But remember to change the database
parameter of the model
during initialization, so that the data of the next simulation won't overwrite the data of the previous simulation.
Thank you for your answer. I solved this problem by moving to the starting point through traci's movetoXY
It's great to know that the problem is being solved
Also, could you answer another question I raised? Thank you very much.
Message ID: @.***>
Hello, I would like to enable the simulation to return to its original position and iterate repeatedly after the ego vehicle reaches its destination or meets certain conditions. How should I modify the code?