Hello,
I have been running SUMO along with a reinforcement learning algorithm that reruns a TraCI simulation from scratch each episode. When I was placing a static blockage (stopped vehicle) in the same location every episode, it was working just fine. But now that I am changing the location and size of this blockage every episode, after a certain number of 'episodes' (232, to be precise), SUMO throws an error:
File "/.../marlenvironment.py", line 797, in step
for vh in self.simulation.traci_handler.vehicle.getIDList(): # Set LC mode from the beginning
libsumo.libsumo.FatalTraCIError: A network was not yet constructed.
are the SUMO-relevant lines from the stack trace that causes the system to stop functioning.
My understanding of this is that it is telling me that I am calling traci.start() before a traci.close() was called on a previous traci.start() - But I am unsure how to debug this and cannot see how this could have happened with the change I mentioned above, and why it happens only after 232 runs of the simulation?
Please advise. Thank you.
Sincerely,
Hriday