Class InputParameterDistContinuous
java.lang.Object
nl.tudelft.simulation.dsol.model.inputparameters.AbstractInputParameter<DistContinuous,DistContinuous>
nl.tudelft.simulation.dsol.model.inputparameters.InputParameterDistContinuous
- All Implemented Interfaces:
Serializable
,Cloneable
,InputParameter<DistContinuous,
DistContinuous>
public class InputParameterDistContinuous
extends AbstractInputParameter<DistContinuous,DistContinuous>
InputParameterDistContinuous provides a choice for a continuous distribution.
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.
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 Summary
ConstructorDescriptionInputParameterDistContinuous
(String key, String shortName, String description, StreamInterface stream, DistContinuous defaultValue, double displayPriority) Construct a new InputParameterDistContinuous. -
Method Summary
Modifier and TypeMethodDescriptionclone()
Provide the clone() method to make a deep copy.Retrieve the calculated value of the input parameter.void
setDistValue
(DistContinuous dist) Set the value of the distribution.void
setStream
(StreamInterface stream) Methods inherited from class nl.tudelft.simulation.dsol.model.inputparameters.AbstractInputParameter
getDefaultValue, getDescription, getDisplayPriority, getExtendedKey, getKey, getParent, getShortName, getValue, isReadOnly, setDefaultValue, setParent, setReadOnly, setValue, toString
-
Constructor Details
-
InputParameterDistContinuous
public InputParameterDistContinuous(String key, String shortName, String description, StreamInterface stream, DistContinuous defaultValue, double displayPriority) throws InputParameterException Construct a new InputParameterDistContinuous.- Parameters:
key
- String; unique (within the parent's input parameter map) name of the new InputParameterDistContinuousshortName
- String; concise description of the input parameterdescription
- String; long description of the input parameter (may use HTML markup)stream
- StreamInterface; the random number stream to use for the chosen distributiondefaultValue
- DistContinuous; the default value of this input parameterdisplayPriority
- double; sorting order when properties are displayed to the user- Throws:
InputParameterException
- in case the default value is not part of the listNullPointerException
- when key, shortName, defaultValue, description, or stream is nullIllegalArgumentException
- when displayPriority is NaN
-
-
Method Details
-
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
- Throws:
InputParameterException
- when calculation fails
-
getStream
- Returns:
- stream
-
setStream
- Parameters:
stream
- StreamInterface; set stream- Throws:
NullPointerException
- when stream is null
-
setDistValue
Set the value of the distribution.- Parameters:
dist
- DistContinuous; the distribution to set the value to- Throws:
NullPointerException
- when dist is nullInputParameterException
- when this InputParameter is read-only, or dist is not valid
-
clone
Provide the clone() method to make a deep copy.- Specified by:
clone
in interfaceInputParameter<DistContinuous,
DistContinuous> - Overrides:
clone
in classAbstractInputParameter<DistContinuous,
DistContinuous> - Returns:
- a deep copy of the InputParameter
-