As per the discussion, I tried to extract the stage information using TraCI and combine the log files to generate the ticket data. However, for some of the cases, I get fatal errors as follows.
File "/home/dhrien/Documents/sumos/Bologna/acosta_persontrips/demo.py", line 86, in run prevStage = traci.person.getStage(peopleIDs[i],-1)
File "/usr/share/sumo/tools/traci/_person.py", line 192, in getStage tc.VAR_STAGE, personID))
File "/usr/share/sumo/tools/traci/connection.py", line 158, in _checkResult result = self._sendExact()
File "/usr/share/sumo/tools/traci/connection.py", line 101, in _sendExact raise FatalTraCIError("connection closed by SUMO")
FatalTraCIError: connection closed by SUMO
The above error is due the following code segment written inside run method of TraCI program.
currStage = traci.person.getStage(peopleIDs[i])
if currStage.type == 3: #record only if driving or riding
try:
prevStage = traci.person.getStage(peopleIDs[i],-1)
except FatalTraCIError:
print("Previous Stage Error for Person",peopleIDs[i])
continue
Note that previous stage is retrieved only if a person is boarded into a vehicle. Also, l am trying handle the exception but the program stops. Further, I do check if previous stage is null (None) and then operate but unfortunately nothing works at this moment.
Please suggest.
thanks and regards,
Dillip Rout