Class InputParameterDouble

java.lang.Object
nl.tudelft.simulation.dsol.model.inputparameters.AbstractInputParameter<Double,Double>
nl.tudelft.simulation.dsol.model.inputparameters.InputParameterDouble
All Implemented Interfaces:
Serializable, Cloneable, InputParameter<Double,Double>

public class InputParameterDouble extends AbstractInputParameter<Double,Double>
InputParameterDouble.java.

Copyright (c) 2003-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
Author:
Alexander Verbraeck
See Also:
  • Constructor Details

    • InputParameterDouble

      public InputParameterDouble(String key, String shortName, String description, double defaultValue, double displayPriority)
      Construct a new InputParameterDouble.
      Parameters:
      key - String; unique (within the parent's input parameter map) name of the new InputParameterDouble
      shortName - String; concise description of the input parameter
      description - String; double description of the input parameter (may use HTML markup)
      defaultValue - double; the default value of this input parameter
      displayPriority - double; sorting order when properties are displayed to the user
      Throws:
      NullPointerException - when key, shortName, defaultValue, or description is null
      IllegalArgumentException - when displayPriority is NaN
    • InputParameterDouble

      public InputParameterDouble(String key, String shortName, String description, double defaultValue, double minimumValue, double maximumValue, boolean minIncluded, boolean maxIncluded, String format, double displayPriority)
      Construct a new InputParameterDouble.
      Parameters:
      key - String; unique (within the parent's input parameter map) name of the new InputParameterDouble
      shortName - String; concise description of the input parameter
      description - String; double description of the input parameter (may use HTML markup)
      defaultValue - double; the default value of this input parameter
      minimumValue - double; the lowest value allowed as input
      maximumValue - double; the highest value allowed as input
      minIncluded - boolean; is the minimum value included or excluded in the allowed interval?
      maxIncluded - boolean; is the maximum value included or excluded in the allowed interval?
      format - String; the format to use in displaying the double
      displayPriority - double; sorting order when properties are displayed to the user
      Throws:
      NullPointerException - when key, shortName, defaultValue, description, or format is null
      IllegalArgumentException - when displayPriority is NaN
  • Method Details

    • getCalculatedValue

      public Double getCalculatedValue()
      Retrieve the calculated value of the input parameter. This is often the same as the value type, except in situations where a sub-map or sub-list calculates a different value. This is, for instance, the case with distribution functions where the parameters are present in a sub-map (the value) and the return type of the value is a distribution function class.
      Returns:
      CT; the calculated value of the input parameter
    • setDoubleValue

      public void setDoubleValue(double newValue) throws InputParameterException
      Check and set the typed value, and call super.setValue to make the actual allocation.
      Parameters:
      newValue - double; the new value for the input parameter
      Throws:
      InputParameterException - when this InputParameter is read-only, or newValue is not valid
    • getFormat

      public String getFormat()
      Returns:
      format
    • setFormat

      public void setFormat(String format)
      Parameters:
      format - String; set format
    • getMinimumValue

      public Double getMinimumValue()
      Returns:
      minimumValue
    • setMinimumValue

      public void setMinimumValue(double minimumValue)
      Parameters:
      minimumValue - double; set minimumValue
    • getMaximumValue

      public Double getMaximumValue()
      Returns:
      maximumValue
    • setMaximumValue

      public void setMaximumValue(double maximumValue)
      Parameters:
      maximumValue - double; set maximumValue
    • isMinIncluded

      public boolean isMinIncluded()
      Returns:
      minIncluded
    • setMinIncluded

      public void setMinIncluded(boolean minIncluded)
      Parameters:
      minIncluded - boolean; set minIncluded
    • isMaxIncluded

      public boolean isMaxIncluded()
      Returns:
      maxIncluded
    • setMaxIncluded

      public void setMaxIncluded(boolean maxIncluded)
      Parameters:
      maxIncluded - boolean; set maxIncluded
    • clone

      public InputParameterDouble clone()
      Provide the clone() method to make a deep copy.
      Specified by:
      clone in interface InputParameter<Double,Double>
      Overrides:
      clone in class AbstractInputParameter<Double,Double>
      Returns:
      a deep copy of the InputParameter