Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] How to use the function getCollidingVehiclesNumber()

Hi sumo-users,

when I wrote "print(traci.simulation.getCollidingVehiclesNumber())" into my code, I got this error:

  Traceback (most recent call last):
  File "runner.py", line 173, in <module>
    run()
  File "runner.py", line 137, in run
    print(traci.simulation.getCollidingVehiclesNumber())
  File "/home/hzq/sumo/tools/traci/_simulation.py", line 187, in getCollidingVehiclesNumber
    return self._getUniversal(tc.VAR_COLLIDING_VEHICLES_NUMBER)
  File "/home/hzq/sumo/tools/traci/domain.py", line 115, in _getUniversal
    self._cmdGetID, varID, objectID)
  File "/home/hzq/sumo/tools/traci/connection.py", line 127, in _sendReadOneStringCmd
    return self._checkResult(cmdID, varID, objID)
  File "/home/hzq/sumo/tools/traci/connection.py", line 155, in _checkResult
    result = self._sendExact()
  File "/home/hzq/sumo/tools/traci/connection.py", line 105, in _sendExact
    raise TraCIException(prefix[1], _RESULTS[prefix[2]], err)
traci.exceptions.TraCIException: Get Simulation Variable: unsupported variable 0x80 specified

Could you please tell me how to fix it ?
Thanks in advance.
Best regards,
Zhiqiang 

Back to the top