Class GeneratorPositions.RoadPosition.ByValue

java.lang.Object
org.opentrafficsim.road.gtu.generator.GeneratorPositions.RoadPosition.ByValue
All Implemented Interfaces:
GeneratorPositions.RoadPosition
Enclosing interface:
GeneratorPositions.RoadPosition

public static class GeneratorPositions.RoadPosition.ByValue extends Object implements GeneratorPositions.RoadPosition
Fixed road position.

Copyright (c) 2013-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Details

    • ByValue

      public ByValue(double value)
      Constructor.
      Parameters:
      value - double; road position
  • Method Details

    • getValue

      public double getValue(org.djunits.value.vdouble.scalar.Speed desiredSpeed)
      Returns the road position (0.0 = right, 1.0 = left).
      Specified by:
      getValue in interface GeneratorPositions.RoadPosition
      Parameters:
      desiredSpeed - Speed; desired speed at the generator
      Returns:
      road position (0.0 = right, 1.0 = left)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object