Class ParametricAnalysisDefinition
java.lang.Object
common.definitions.parametric.ParametricAnalysisDefinition
- All Implemented Interfaces:
ParametricAnalysis
- Direct Known Subclasses:
ArrivalRateParametricAnalysis, NumberOfCustomerParametricAnalysis, NumberOfServersParametricAnalysis, PopulationMixParametricAnalysis, RoutingProbabilitiesParametricAnalysis, SeedParametricAnalysis, ServiceTimesParametricAnalysis, TotalStationCapacityParametricAnalysis
Title: ParametricAnalysisDefinition
Description: this class represents a description of the parametric analysis to be performed. It includes the initial and final value, and the number of steps. Each type of parametric analysis is described by a subclass of this class.
- Author:
- Francesco D'Aquino Date: 14-dic-2005 Time: 10.57.24
-
Nested Class Summary
Nested classes/interfaces inherited from interface ParametricAnalysis
ParametricAnalysis.ValuesTable -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ClassDefinitionprotected doublestatic final Stringprotected doublestatic final Stringprotected intprotected Objectprotected Vectorstatic final Stringstatic final Stringstatic final Stringstatic final Stringprotected SimulationDefinitionprotected StationDefinitionstatic final Stringstatic final Stringprotected Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidchangeModel(int step) Changes the model preparing it for the next stepabstract intcheckCorrectness(boolean autocorrect) Checks if the PA model is still coherent with simulation model definition.abstract voidFinds the set of possible values of the parameter on which the simulation may be iterated on.doubleGets the final value of the parameter to be varieddoubleGets the initial value of the parameter to be variedintGets the number of steps to be performedintGets the number of worker threads used in the parametric analysisReturns the values assumed by the varying parameterGets a Map containing for each property its value.abstract ObjectGets the reference class.abstract StringGet the reference class nameabstract StringgetType()Gets the type of parametric analysisabstract voidRestore the original values of the parameterabstract intGets the maximum number of steps compatible with the model definition and the type of parametric analysis and in some implementation of this class initializes thevalidGlobalPopulationSizesVector, containing the values that the parameter will assume.voidsetFinalValue(double finalValue) Sets the final value of the parameter to be variedvoidsetInitialValue(double initialValue) Sets the initial value of the parameter to be variedvoidsetNumberOfSteps(int numberOfSteps) Sets the maximum number number of steps to be performedabstract voidsetProperty(String propertyName, String value) Sets the value for the specified property
-
Field Details
-
TYPE_PROPERTY
- See Also:
-
FROM_PROPERTY
- See Also:
-
TO_PROPERTY
- See Also:
-
STEPS_PROPERTY
- See Also:
-
IS_SINGLE_CLASS_PROPERTY
- See Also:
-
REFERENCE_CLASS_PROPERTY
- See Also:
-
REFERENCE_STATION_PROPERTY
- See Also:
-
REFERENCE_DEST_STATION_PROPERTY
- See Also:
-
SERVER_TYPE_PROPERTY
- See Also:
-
type
-
initialValue
protected double initialValue -
finalValue
protected double finalValue -
numberOfSteps
protected int numberOfSteps -
possibleValues
-
classDef
-
stationDef
-
simDef
-
originalValues
-
-
Constructor Details
-
ParametricAnalysisDefinition
public ParametricAnalysisDefinition()
-
-
Method Details
-
getType
Gets the type of parametric analysis- Returns:
- the type of parametric analysis
-
getInitialValue
public double getInitialValue()Gets the initial value of the parameter to be varied- Returns:
- the initial value of the parameter to be varied
-
getFinalValue
public double getFinalValue()Gets the final value of the parameter to be varied- Returns:
- the final value of the parameter to be varied
-
getNumberOfSteps
public int getNumberOfSteps()Gets the number of steps to be performed- Returns:
- the maximum number of steps to be performed
-
getParallelism
public int getParallelism()Gets the number of worker threads used in the parametric analysis- Returns:
- the what-if analysis parallelism
-
setInitialValue
public void setInitialValue(double initialValue) Sets the initial value of the parameter to be varied- Parameters:
initialValue-
-
setFinalValue
public void setFinalValue(double finalValue) Sets the final value of the parameter to be varied- Parameters:
finalValue-
-
setNumberOfSteps
public void setNumberOfSteps(int numberOfSteps) Sets the maximum number number of steps to be performed- Parameters:
numberOfSteps-
-
changeModel
public abstract void changeModel(int step) Changes the model preparing it for the next step -
searchForAvailableSteps
public abstract int searchForAvailableSteps()Gets the maximum number of steps compatible with the model definition and the type of parametric analysis and in some implementation of this class initializes thevalidGlobalPopulationSizesVector, containing the values that the parameter will assume.- Returns:
- the maximum number of steps
-
createValuesSet
public abstract void createValuesSet()Finds the set of possible values of the parameter on which the simulation may be iterated on. -
restoreOriginalValues
public abstract void restoreOriginalValues()Restore the original values of the parameter -
checkCorrectness
public abstract int checkCorrectness(boolean autocorrect) Checks if the PA model is still coherent with simulation model definition. If theautocorrectvariable is set to true, if the PA model is no more valid but it can be corrected it will be changed.- Parameters:
autocorrect- if true the PA model will be autocorrected- Returns:
- 0 - If the PA model is still valid
1 - If the PA model is no more valid, but it will be corrected
2 - If the PA model can be no more used
-
getParameterValues
-
getReferenceClass
-
getReferenceClassName
Get the reference class name- Returns:
- the name of the class
-
getProperties
-
setProperty
-