Class ParametricAnalysisDefinition

java.lang.Object
common.definitions.parametric.ParametricAnalysisDefinition
All Implemented Interfaces:
ParametricAnalysis
Direct Known Subclasses:
ArrivalRateParametricAnalysis, NumberOfCustomerParametricAnalysis, NumberOfServersParametricAnalysis, PopulationMixParametricAnalysis, RoutingProbabilitiesParametricAnalysis, SeedParametricAnalysis, ServiceTimesParametricAnalysis, TotalStationCapacityParametricAnalysis

public abstract class ParametricAnalysisDefinition extends Object implements ParametricAnalysis

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
  • Field Details

  • Constructor Details

    • ParametricAnalysisDefinition

      public ParametricAnalysisDefinition()
  • Method Details

    • getType

      public abstract String 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 the validGlobalPopulationSizes Vector, 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 the autocorrect variable 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

      public abstract Vector<Number> getParameterValues()
      Returns the values assumed by the varying parameter
      Returns:
      a Vector containing the values assumed by the varying parameter
    • getReferenceClass

      public abstract Object getReferenceClass()
      Gets the reference class.
      Returns:
      reference classKey
    • getReferenceClassName

      public abstract String getReferenceClassName()
      Get the reference class name
      Returns:
      the name of the class
    • getProperties

      public abstract Map<String,String> getProperties()
      Gets a Map containing for each property its value. The supported properties are defined as constants inside this class.
      Returns:
      a Map containing the value for each property
    • setProperty

      public abstract void setProperty(String propertyName, String value)
      Sets the value for the specified property
      Parameters:
      propertyName - the name of the property to be set
      value - the value to be set