averbraeck / opentrafficsim

Open Source Multi-Level Traffic Simulator
BSD 3-Clause "New" or "Revised" License
28 stars 8 forks source link

Visualization of GTU generators and generator functionality #43

Closed WJSchakel closed 1 year ago

WJSchakel commented 1 year ago

Visualization of GTU generators currently does not work. In the past we had number of GTU's in the queue being displayed. But as we have no formal definition of what a GTU generator should be able to report, a change in the code resulted in a TODO pending a better definition. Note that essentially any object can place GTUs on the network, and that such objects may not represent something with a specific location. For example, a generator could randomly put GTUs on the network in some neighborhood area. Others can split the demand over a set of connectors, and generate GTUs at the start of a few connected links. And yet others simply operate at the start of a single lane.

WJSchakel commented 1 year ago

queue

The Detector class has been renamed to LaneDetector, and a Detector interface is introduced. It extends LocatedObject. In this way a TrafficLightDetector (which is not a LaneDetector but uses 2, specifically StartEndDetector) can also be animated. The default animation factory purposefully ignores the StartEndDetector type, as the TrafficLightDetector is animated as a whole.