Class DefaultRemoteRunHelper
- All Implemented Interfaces:
IRemoteRunHelper
IRemoteRunHelper.
Does not support remote experiment execution.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIs there an experiment on the server with the provided run id?Run<?> createReattachedRemoteRun(ShortId id, int seed) 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?booleanIs remote execution of simulation runs available?booleanReturnstrueiff remote study execution has been implemented for this product, i.e., for the combination of the product ID and the client suffix.
-
Constructor Details
-
DefaultRemoteRunHelper
public DefaultRemoteRunHelper()
-
-
Method Details
-
supportsRemoteRun
public boolean supportsRemoteRun()Description copied from interface:IRemoteRunHelperReturnstrueiff remote study execution has been implemented for this product, i.e., for the combination of the product ID and the client suffix.- Specified by:
supportsRemoteRunin interfaceIRemoteRunHelper
-
createRemoteRun
Description copied from interface:IRemoteRunHelperHow 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
Runwill be created by calling this method overridden in the concrete simulation application.The availability of the server will be checked by calling
IRemoteRunHelper.isServerAvailable()method that must also be overridden in the concrete simulation application.- Specified by:
createRemoteRunin interfaceIRemoteRunHelper- Parameters:
scenario- the scenario for which the run must be createdseed- the random number seed for which the run must be created- Returns:
- A new instance of
Run - See Also:
-
createReattachedRemoteRun
Description copied from interface:IRemoteRunHelperHow 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 functionalRunthat reflects the current status of the remotely running experiment and gives full control of it, including experiment interruption (seeRun.stop()).- Specified by:
createReattachedRemoteRunin interfaceIRemoteRunHelper- 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 serverseed- the random number seed for which the run must be created- Returns:
- A new instance of
Runattached to the remotely executing run - See Also:
-
checkRemoteRunIsKnown
Description copied from interface:IRemoteRunHelperIs there an experiment on the server with the provided run id?- Specified by:
checkRemoteRunIsKnownin interfaceIRemoteRunHelper- Parameters:
id- run id- Returns:
- true if the Cloud Server knows such a run; false otherwise
-
isServerAvailable
public boolean isServerAvailable()Description copied from interface:IRemoteRunHelperIs 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.
- Specified by:
isServerAvailablein interfaceIRemoteRunHelper- Returns:
trueif 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;
falseotherwise
-