Class InputParameterDistDiscreteSelection
java.lang.Object
nl.tudelft.simulation.dsol.model.inputparameters.AbstractInputParameter<T,T>
nl.tudelft.simulation.dsol.model.inputparameters.InputParameterSelectionMap<String,InputParameterMapDistDiscrete>
nl.tudelft.simulation.dsol.model.inputparameters.InputParameterDistDiscreteSelection
- All Implemented Interfaces:
Serializable
,Cloneable
,InputParameter<InputParameterMapDistDiscrete,
InputParameterMapDistDiscrete>
public class InputParameterDistDiscreteSelection
extends InputParameterSelectionMap<String,InputParameterMapDistDiscrete>
InputParameterDistDiscreteSelection takes care of exposing the necessary parameters for each of the discrete distribution
functions. It has a function called getDist() which returns the distribution of the current choice.
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:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
InputParameterDistDiscrete.Bernoulli class.static class
InputParameterDistDiscrete.Binomial class.static class
InputParameterDistDiscrete.DiscreteConstant class.static class
InputParameterDistDiscrete.DiscreteUniform class.static class
InputParameterDistDiscrete.Geometric class.static class
InputParameterDistDiscrete.NegBinomial class.static class
InputParameterDistDiscrete.Poisson class. -
Constructor Summary
ConstructorDescriptionInputParameterDistDiscreteSelection
(String key, String shortName, String description, StreamInterface stream, double displayPriority) -
Method Summary
Modifier and TypeMethodDescriptiongetDist()
Return the distribution function corresponding to the chosen distribution and parameters.static final SortedMap<String,
InputParameterMapDistDiscrete> Methods inherited from class nl.tudelft.simulation.dsol.model.inputparameters.InputParameterSelectionMap
clone, getCalculatedValue, getKeyforValue, getKeyforValue, getOptions, setKeyforValue, setMapValue, setObjectValue
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
-
InputParameterDistDiscreteSelection
public InputParameterDistDiscreteSelection(String key, String shortName, String description, StreamInterface stream, double displayPriority) throws InputParameterException - Parameters:
key
- String; unique name for the selection parameter of the distribution functionshortName
- 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 distributiondisplayPriority
- double; sorting order when properties are displayed to the user- Throws:
NullPointerException
- when key, shortName, defaultValue, description, or stream is nullIllegalArgumentException
- when displayPriority is NaNInputParameterException
- in case the default value is not part of the list; should not happen
-
-
Method Details
-
getDist
Return the distribution function corresponding to the chosen distribution and parameters.- Returns:
- DistDiscrete; the distribution function corresponding to the chosen distribution and parameters
- Throws:
InputParameterException
- on error retrieving the values for the distribution
-
getDistOptions
- Returns:
- distOptions
-
getStream
- Returns:
- stream
-