Uploaded image for project: 'OpenTrafficSim'
  1. OpenTrafficSim
  2. OTS-76

Circular road demo gives errors around simulation time 10 minutes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Unresolved
    • Labels:

      Description

      (Use all default settings for the demo)
      Around 10 minutes in the simulation GTU 77 is already registered in a lane that it changes into.

      Deeper cause: GTU 77 is accidentally registered in a wrong lane when it changes lane.
      Even deeper cause: GTU is not unregistered from a lane at the time that its rear leaves the lane. In stead it is unregistered one ULP before the next evaluation time. This is wrong for two reasons:
      1: One ULP of the sample interval gets added to the current simulation time and subsequently rounded away.
      2: The GTU should be unregistered at the time its rear leaves the lane; not just before its next move evaluation
      3: If the unregister event gets sorted after the next evaluation event AND that next evaluation event results in a lane change, the GTU gets unregistered in all current lanes (including the one it is no longer on) and then registered on all new lanes (including one that is not on). That registration on a lane that the GTU is not actually on results in the error when the GTU is entering that lane again (after making it round the circular road).

      FIX:
      1: All GTUs must maintain a list of scheduled triggers organized for all lanes that the GTU is registered on. This allows proper removal of those triggers when a lane change occurs.
      2: The unregister event must be schedule for the exact time that the rear of the GTU leaves the lane.

      Additional fixes:
      All triggers should be scheduled for the time that the relative position of the GTU passes into or out of the lane or over the sensor.
      Output diagnostics when a GTU is registered in a lane that it is not really on.

        Attachments

          Activity

            People

            • Assignee:
              P.Knoppers Peter Knoppers
              Reporter:
              P.Knoppers Peter Knoppers
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: