Class OdOptions

java.lang.Object
org.opentrafficsim.road.od.OdOptions

public class OdOptions extends Object
Options for vehicle generation based on an OD matrix.

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
  • Field Details

  • Constructor Details

    • OdOptions

      public OdOptions()
  • Method Details

    • set

      public final <K> OdOptions set(OdOptions.Option<K> option, K value)
      Set option value.
      Type Parameters:
      K - value type
      Parameters:
      option - Option<K>; option
      value - K; option value
      Returns:
      this option set
    • set

      public final <K> OdOptions set(Lane lane, OdOptions.Option<K> option, K value)
      Set option value for lane.
      Type Parameters:
      K - value type
      Parameters:
      lane - Lane; lane
      option - Option<K>; option
      value - K; option value
      Returns:
      this option set
    • set

      public final <K> OdOptions set(Node node, OdOptions.Option<K> option, K value)
      Set option value for node.
      Type Parameters:
      K - value type
      Parameters:
      node - Node; node
      option - Option<K>; option
      value - K; option value
      Returns:
      this option set
    • set

      public final <K> OdOptions set(LinkType linkType, OdOptions.Option<K> option, K value)
      Set option value for link type.
      Type Parameters:
      K - value type
      Parameters:
      linkType - LinkType; link type
      option - Option<K>; option
      value - K; option value
      Returns:
      this option set
    • get

      public final <K> K get(OdOptions.Option<K> option, Lane lane, Node node, LinkType linkType)
      Get option value. If a value is specified for a specific category, it is returned. The following order is used:
      • Lane
      • Node (origin)
      • LinkType
      • None (global option value)
      • Default option value
      Type Parameters:
      K - value type
      Parameters:
      option - Option<K>; option
      lane - Lane; lane to obtain specific option value, may be null
      node - Node; node to obtain specific option value, may be null
      linkType - LinkType; link type to obtain specific option value, may be null
      Returns:
      K; option value