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

Demo Crossing with Traffic Lights has a casting error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Unresolved
    • Labels:
      None
    • Epic Link:
    • Sprint:
      Sprint 10 (Version 0.15)
    • Java Project:
      ots-demo

      Description

      When running the Demos with Traffic Lights, the following casting error is thrown:

      Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: org.djunits.value.vdouble.scalar.DoubleScalar$Rel cannot be cast to org.djunits.value.vdouble.scalar.Duration
             at org.opentrafficsim.demo.carFollowing.CrossingTrafficLightstModel.constructModel(CrossingTrafficLights.java:357)
             at nl.tudelft.simulation.dsol.simulators.DEVSSimulator.initialize(DEVSSimulator.java:85)
             at org.opentrafficsim.core.dsol.OTSDEVSRealTimeClock.initialize(OTSDEVSRealTimeClock.java:44)
             at org.opentrafficsim.simulationengine.SimpleAnimator.<init>(SimpleAnimator.java:54)
             at org.opentrafficsim.simulationengine.AbstractWrappableAnimation.buildSimpleAnimator(AbstractWrappableAnimation.java:96)
             at org.opentrafficsim.simulationengine.AbstractWrappableAnimation.buildAnimator(AbstractWrappableAnimation.java:142)
             at org.opentrafficsim.simulationengine.AbstractWrappableAnimation.buildAnimator(AbstractWrappableAnimation.java:1)
             at org.opentrafficsim.demo.carFollowing.SuperDemo$3.actionPerformed(SuperDemo.java:229)
      

      Probably an error in DJUNITS, but maybe in the demo itself.

        Attachments

          Activity

            People

            • Assignee:
              averbraeck Alexander Verbraeck
              Reporter:
              averbraeck Alexander Verbraeck
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Time Tracking

                Estimated:
                Original Estimate - 30 minutes
                30m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 30 minutes
                30m