[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [sumo-user] Can't use traci.simulation.loadState in light rail and car network
|
Call traci.start before load or loadState. For calling load, it is enough to call start with an arbitrary network since load will load a new network anyway. For loadState you should load the same network that was used when saving the state.
Hi,
I have a network that contains light rail tracks and normal car roads. When I start a simulation and after some time I save a state and continue with the simulation. Later, if I load the saved state using traci.simulation.loadState i get the following error:
traci.simulation.loadState('saved_simulation')
File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\_simulation.py", line 430, in loadState
self._setCmd(tc.CMD_LOAD_SIMSTATE, "", "s", fileName)
File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\domain.py", line 185, in _setCmd
self._connection._sendCmd(self._cmdSetID, varID, objectID, format, *values)
File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\connection.py", line 178, in _sendCmd
return self._sendExact()
File "C:\Program Files (x86)\Eclipse\Sumo\tools\traci\connection.py", line 83, in _sendExact
self._socket.send(length + self._string)
AttributeError: 'Connection' object has no attribute '_socket'
But if I use traci.start it works and if I use traci.load it gives me the same error.
--
_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/sumo-user