Class InputParameterHelper

java.lang.Object
org.opentrafficsim.demo.InputParameterHelper
All Implemented Interfaces:
org.opentrafficsim.core.parameters.ParameterFactory

public final class InputParameterHelper extends Object implements org.opentrafficsim.core.parameters.ParameterFactory
InputParameterHelper.java.

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
  • Constructor Summary

    Constructors
    Constructor
    Description
    InputParameterHelper(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap rootMap)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.opentrafficsim.base.parameters.Parameters
    getParametersCar(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap rootMap)
    Get the car parameters as entered.
    static org.opentrafficsim.base.parameters.Parameters
    getParametersTruck(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap rootMap)
    Get the truck parameters as entered.
    static void
    makeInputParameterMapCar(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap map, double displayPriority)
    Make a map of input parameters for a demo with a car tabs with parameters.
    static void
    makeInputParameterMapCarTruck(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap map, double probabilityDisplayPriority)
    Make a map of input parameters for a demo with a car/truck ratio and car/truck tabs with parameters.
    static void
    makeInputParameterMapTruck(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap map, double displayPriority)
    Make a map of input parameters for a demo with a truck tabs with parameters.
    void
    setValues(org.opentrafficsim.base.parameters.Parameters parameters, org.opentrafficsim.core.gtu.GtuType gtuType)

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • InputParameterHelper

      public InputParameterHelper(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap rootMap)
      Constructor.
      Parameters:
      rootMap - InputParameterMap; input parameter map
  • Method Details

    • setValues

      public void setValues(org.opentrafficsim.base.parameters.Parameters parameters, org.opentrafficsim.core.gtu.GtuType gtuType) throws org.opentrafficsim.base.parameters.ParameterException
      Specified by:
      setValues in interface org.opentrafficsim.core.parameters.ParameterFactory
      Throws:
      org.opentrafficsim.base.parameters.ParameterException
    • makeInputParameterMapCarTruck

      public static void makeInputParameterMapCarTruck(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap map, double probabilityDisplayPriority)
      Make a map of input parameters for a demo with a car/truck ratio and car/truck tabs with parameters.
      Parameters:
      map - InputParameterMap; the map to add the car/truck input parameters to
      probabilityDisplayPriority - double; the display priority to use for the car probability in the generic map
    • makeInputParameterMapCar

      public static void makeInputParameterMapCar(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap map, double displayPriority)
      Make a map of input parameters for a demo with a car tabs with parameters.
      Parameters:
      map - InputParameterMap; the map to add the car input tab to
      displayPriority - double; the display priority to use for the car tab in the generic map
    • makeInputParameterMapTruck

      public static void makeInputParameterMapTruck(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap map, double displayPriority)
      Make a map of input parameters for a demo with a truck tabs with parameters.
      Parameters:
      map - InputParameterMap; the map to add the truck input tab to
      displayPriority - double; the display priority to use for the truck map in the generic map
    • getParametersCar

      public static org.opentrafficsim.base.parameters.Parameters getParametersCar(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap rootMap) throws org.opentrafficsim.base.parameters.ParameterException, nl.tudelft.simulation.dsol.model.inputparameters.InputParameterException
      Get the car parameters as entered.
      Parameters:
      rootMap - InputParameterMap; the root map of the model with a 'car' tab with the parameters
      Returns:
      the parameters where a, b, s0 and tSafe have been updated with the user's choices
      Throws:
      org.opentrafficsim.base.parameters.ParameterException - when the parameter was given an illegal setting
      nl.tudelft.simulation.dsol.model.inputparameters.InputParameterException - when the input parameter could not be found
    • getParametersTruck

      public static org.opentrafficsim.base.parameters.Parameters getParametersTruck(nl.tudelft.simulation.dsol.model.inputparameters.InputParameterMap rootMap) throws org.opentrafficsim.base.parameters.ParameterException, nl.tudelft.simulation.dsol.model.inputparameters.InputParameterException
      Get the truck parameters as entered.
      Parameters:
      rootMap - InputParameterMap; the root map of the model with a 'truck' tab with the parameters
      Returns:
      the parameters where a, b, s0 and tSafe have been updated with the user's choices
      Throws:
      org.opentrafficsim.base.parameters.ParameterException - when the parameter was given an illegal setting
      nl.tudelft.simulation.dsol.model.inputparameters.InputParameterException - when the input parameter could not be found