[tracipy]: Detect road situations which are a reason for message broadcasting
Implementation Details
Create a new class which extends Vehicle
. Within the observe()
method, one should detect situations worthy of message emission.
Example situations:
- A car is travelling on it's route and sees, that an edge is taking way longer than expected (e.g. 2x, 3x longer)
- make sure the information is not already available (car which observes it doesn't already know)
For this, a RoadAccident
class may be added as well, so that each car has a list of accidents which it knows about (or something similar)
Implementation notes
# get next traffic light information
traci.vehicle.getNextTLS(vehicleID)
# Return list of upcoming traffic lights [(tlsID, tlsIndex, distance, state), ...]
Edited by boyanh