Class TotalStationCapacityParametricAnalysis
java.lang.Object
common.definitions.parametric.ParametricAnalysisDefinition
common.definitions.parametric.TotalStationCapacityParametricAnalysis
- All Implemented Interfaces:
ParametricAnalysis
Title: TotalStationCapacityParametricAnalysis
Description: this class is used to describe a parametric analysis where the
varied parameter is the total capacity inside a station. It
adds the stationKey field, used to keep the key of the station whose total capacity will be varied
- Author:
- Xinyu Gao Date: 20-June-2023 Time: XXXX
-
Nested Class Summary
Nested classes/interfaces inherited from interface ParametricAnalysis
ParametricAnalysis.ValuesTable -
Field Summary
Fields inherited from class ParametricAnalysisDefinition
classDef, finalValue, FROM_PROPERTY, initialValue, IS_SINGLE_CLASS_PROPERTY, numberOfSteps, originalValues, possibleValues, REFERENCE_CLASS_PROPERTY, REFERENCE_DEST_STATION_PROPERTY, REFERENCE_STATION_PROPERTY, SERVER_TYPE_PROPERTY, simDef, stationDef, STEPS_PROPERTY, TO_PROPERTY, type, TYPE_PROPERTY -
Constructor Summary
ConstructorsConstructorDescriptionTotalStationCapacityParametricAnalysis(ClassDefinition cd, StationDefinition sd, SimulationDefinition simd) -
Method Summary
Modifier and TypeMethodDescriptionvoidchangeModel(int step) Changes the model preparing it for the next stepintcheckCorrectness(boolean autocorrect) Checks if the PA model is still coherent with simulation model definition.voidFinds the set of possible values of the parameter on which the simulation may be iterated on.Returns the values assumed by the varying parameterGets a TreeMap containing for each property its value.Gets the class key of the job class whose number of servers will be increased.Get the reference class nameGets the station key whose total capacity will be variedGets name of the whose total capacity will be variedgetType()Gets the type of parametric analysisvoidRestore the original values of total capacityintGets the maximum number of steps compatible with the model definition and the type of parametric analysis.voidSets default final valuevoidSets the default initial ValuevoidsetProperty(String propertyName, String value) Sets the value for the specified property.voidsetReferenceStation(Object stationKey) Sets the station whose total capacity will be variedMethods inherited from class ParametricAnalysisDefinition
getFinalValue, getInitialValue, getNumberOfSteps, getParallelism, setFinalValue, setInitialValue, setNumberOfSteps
-
Constructor Details
-
TotalStationCapacityParametricAnalysis
public TotalStationCapacityParametricAnalysis(ClassDefinition cd, StationDefinition sd, SimulationDefinition simd)
-
-
Method Details
-
setDefaultInitialValue
public void setDefaultInitialValue()Sets the default initial Value -
setDefaultFinalValue
public void setDefaultFinalValue()Sets default final value -
getReferenceClass
Gets the class key of the job class whose number of servers will be increased. If the simulation is not single class, thenullvalue will be returned- Specified by:
getReferenceClassin classParametricAnalysisDefinition- Returns:
- the key of the class whose number of servers will be increased if the
parametric analysis is single class,
nullotherwise.
-
getReferenceClassName
Get the reference class name- Specified by:
getReferenceClassNamein classParametricAnalysisDefinition- Returns:
- the name of the class
-
getProperties
Gets a TreeMap containing for each property its value. The supported properties are defined as constants inside this class.- Specified by:
getPropertiesin classParametricAnalysisDefinition- Returns:
- a TreeMap containing the value for each property
-
setProperty
Sets the value for the specified property. The supported properties are:
- TO_PROPERTY
- FROM_PROPERTY
- STEPS_PROPERTY
- REFERENCE_STATION_PROPERTY- Specified by:
setPropertyin classParametricAnalysisDefinition- Parameters:
propertyName- the name of the property to be setvalue- the value to be set
-
getReferenceStation
Gets the station key whose total capacity will be varied- Returns:
- the key of the station whose total capacity will be varied
-
getReferenceStationName
Gets name of the whose total capacity will be varied- Returns:
- the key of the station whose total capacity will be varied
-
setReferenceStation
Sets the station whose total capacity will be varied- Parameters:
stationKey- the station whose total capacity will be varied
-
getType
Gets the type of parametric analysis- Specified by:
getTypein classParametricAnalysisDefinition- Returns:
- the type of parametric analysis
-
changeModel
public void changeModel(int step) Changes the model preparing it for the next step- Specified by:
changeModelin classParametricAnalysisDefinition
-
searchForAvailableSteps
public int searchForAvailableSteps()Gets the maximum number of steps compatible with the model definition and the type of parametric analysis.- Specified by:
searchForAvailableStepsin classParametricAnalysisDefinition- Returns:
- the maximum number of steps
-
createValuesSet
public void createValuesSet()Finds the set of possible values of the parameter on which the simulation may be iterated on.- Specified by:
createValuesSetin classParametricAnalysisDefinition
-
restoreOriginalValues
public void restoreOriginalValues()Restore the original values of total capacity- Specified by:
restoreOriginalValuesin classParametricAnalysisDefinition
-
checkCorrectness
public 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.- Specified by:
checkCorrectnessin classParametricAnalysisDefinition- 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
Returns the values assumed by the varying parameter- Specified by:
getParameterValuesin classParametricAnalysisDefinition- Returns:
- a Vector containing the values assumed by the varying parameter
-