Interface IRemoteRunHelper

All Known Implementing Classes:
DefaultRemoteRunHelper, RemoteRunHelper

public interface IRemoteRunHelper
Declares methods that are used to handle remote execution of experiments.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Is there an experiment on the server with the provided run id?
    Run<?>
    How to create a run that represents a previously launched remote experiment with the given run id?
    Run<?>
    createRemoteRun(org.eclipse.emf.ecore.EObject scenario, int seed)
    How to create an instance of remote run for the given scenario and random number seed?
    boolean
    Is remote execution of simulation runs available?
    boolean
    Returns true iff remote study execution has been implemented for this product, i.e., for the combination of the product ID and the client suffix.
  • Method Details

    • supportsRemoteRun

      boolean supportsRemoteRun()
      Returns true iff remote study execution has been implemented for this product, i.e., for the combination of the product ID and the client suffix.
    • createRemoteRun

      Run<?> createRemoteRun(org.eclipse.emf.ecore.EObject scenario, int seed)
      How to create an instance of remote run for the given scenario and random number seed?

      A remote run is the run performed on the server, not on the current machine.

      At some point of time, a user might want to run some simulation experiment remotely on the server rather than locally. In order to do so, a new instance of Run will be created by calling this method overridden in the concrete simulation application.

      The availability of the server will be checked by calling isServerAvailable() method that must also be overridden in the concrete simulation application.

      Parameters:
      scenario - the scenario for which the run must be created
      seed - the random number seed for which the run must be created
      Returns:
      A new instance of Run
      See Also:
    • createReattachedRemoteRun

      Run<?> createReattachedRemoteRun(ShortId id, int seed)
      How to create a run that represents a previously launched remote experiment with the given run id?

      A remote run is the run performed on the server, not on the current machine.

      At some point of time, a user might want to run an experiment remotely. Sometimes a remotely running experiment may take a long time to complete. In this case the user does not have to wait till the calculation is done. Instead, the user can save the study, then close the application, then, after a while, open the application again and open the saved study.

      At the moment when the study is loaded, this method is called for remotely running experiments of the loaded study.
      This method should return a fully functional Run that reflects the current status of the remotely running experiment and gives full control of it, including experiment interruption (see Run.stop()).

      Parameters:
      id - the id for which the run must be created; it is guaranteed by the caller that such run id is known to the server
      seed - the random number seed for which the run must be created
      Returns:
      A new instance of Run attached to the remotely executing run
      See Also:
    • checkRemoteRunIsKnown

      boolean checkRemoteRunIsKnown(ShortId id)
      Is there an experiment on the server with the provided run id?
      Parameters:
      id - run id
      Returns:
      true if the Cloud Server knows such a run; false otherwise
    • isServerAvailable

      boolean isServerAvailable()
      Is remote execution of simulation runs available?

      The following conditions must hold:
      1. Remote execution has been implemented for this application. See DesktopAppInfo class and its supportsRemoteRun() method for details.
      2. The remote server is available.
      3. The remote server reports that it can actually execute an experiment for this particular version of the application.

      Study part will periodically call this method to check if the server is available and enable/disable the corresponding UI elements accordingly.

      Note that this method may take a long time to complete due to network issues. It should therefore only be called outside the UI thread.

      Returns:
      true if the remote experiment execution has been implemented for this application, the server is available, and it reports that it can execute an experiment for this particular version of the application;
      false otherwise