Class ReplicationStudyStep


public class ReplicationStudyStep extends ScenarioStudyStep
  • Field Details

    • ZERO_ID

      public static final ShortId ZERO_ID
  • Constructor Details

    • ReplicationStudyStep

      public ReplicationStudyStep(ScenarioStudyStep parent, int seed)
      Called for a new step added at runtime, and also for a step loaded from a study file which had not been launched before the study was saved to a file.
    • ReplicationStudyStep

      public ReplicationStudyStep(ScenarioStudyStep parent, int seed, ShortId id)
      Called for a ReplicationStudyStep loaded from a study file.
      The run id is known, because this step had been launched before its study was saved to a file.
      The study step has no result yet.

      The 'run' field will be initialized later in the tryReattachToServerRun(BiFunction, Supplier, Runnable) method.

    • ReplicationStudyStep

      public ReplicationStudyStep(ScenarioStudyStep parent, int seed, ShortId id, Result result)
      Called for a ReplicationStudyStep loaded from a study file.
      The run id is known, because this step had been launched before its study was saved to a file.
      The study step also has simulation results.
      The 'run' field is initialized with a LoadedRun instance.
  • Method Details

    • setCancellationMonitor

      public void setCancellationMonitor(Supplier<Boolean> cancellationMonitor)
    • setCompletionActionHandler

      public void setCompletionActionHandler(Runnable completionActionHandler)
    • id

      public ShortId id()
      Overrides:
      id in class StudyStep
    • loadedId

      public ShortId loadedId()
    • seed

      public int seed()
    • stop

      public void stop()
    • reset

      public void reset()
    • errorsCount

      public int errorsCount()
      Overrides:
      errorsCount in class StudyStep
    • results

      public List<? extends Result> results()
      Overrides:
      results in class ScenarioStudyStep
    • correctResult

      public ResultsList correctResult()
    • elapsedTimeMillis

      public int elapsedTimeMillis()
      Overrides:
      elapsedTimeMillis in class StudyStep
    • errorsFraction

      public double errorsFraction()
      Overrides:
      errorsFraction in class StudyStep
    • completedFraction

      public double completedFraction()
      Overrides:
      completedFraction in class StudyStep
    • addChild

      public void addChild(StudyStep childToAdd)
      Overrides:
      addChild in class StudyStep
    • replicationsCount

      public int replicationsCount()
      Overrides:
      replicationsCount in class ScenarioStudyStep
    • run

      public void run(BiFunction<org.eclipse.emf.ecore.EObject,Integer,Run<?>> runSupplier, Supplier<Boolean> cancellationMonitor, Runnable runCompletionHandler)
      Overrides:
      run in class StudyStep
    • tryReattachToServerRun

      public void tryReattachToServerRun(BiFunction<ShortId,Integer,Run<?>> runSupplier, Supplier<Boolean> cancellationMonitor, Runnable runCompletionHandler)
    • hasCorrectResult

      public boolean hasCorrectResult()
    • setCompletionHandled

      public void setCompletionHandled()
    • setInExecutionQueue

      public void setInExecutionQueue(boolean isInExecutionQueue)
    • runStatus

      public Run.Status runStatus()
    • scenario

      public org.eclipse.emf.ecore.EObject scenario()
      Specified by:
      scenario in class ScenarioStudyStep
    • name

      public String name()
      Specified by:
      name in class StudyStep
    • changeReplicationsCount

      public void changeReplicationsCount(int newReplicationsCount)
      Overrides:
      changeReplicationsCount in class ScenarioStudyStep
    • copy

      public ReplicationStudyStep copy(StudyStep parent)
      Description copied from class: StudyStep
      Creates a deep copy of this StudyStep and all its children, establishing the specified parent for the cloned StudyStep. This method performs a recursive clone of the entire subtree, maintaining the hierarchical structure.

      The cloning process includes:

      • Creating a new StudyStep instance with the same name and data as this node
      • Setting the specified parent for the cloned StudyStep
      • Creating deep copies of all child nodes, with each child having its parent set to the newly created clone of this node
      Specified by:
      copy in class StudyStep
      Parameters:
      parent - the StudyStep that will become the parent of the cloned StudyStep.
      Returns:
      a new StudyStep instance that is a deep copy of this StudyStep, with all child nodes recursively cloned and the specified parent set