public interface IlrParallelScenarioProvider extends IlrScenarioProvider
IlrParallelScenarioProvider extends the capabilities of the IlrScenarioProvider interface to enable parallel execution
of a simulation in the SSP.
You must implement IlrParallelScenarioProvider to perform parallel execution of a simulation.
An instance of this provider specifies how a simulation is partitioned using a list of scenario suite parts.
The SSP uses this list to distribute the simulation cases to multiple parallel processors or threads.
Each part is then consolidated using the two step algorithm implemented by the IlrKPIResultAggregator KPI implementation.
IlrInitializable.initialize(IlrScenarioSuiteExecutionContext) method of the parallel scenario provider. At this stage, the
IlrScenarioSuiteExecutionContext.getCurrentScenarioSuitePart() method of the initialization parameter returns null.getScenarioSuiteParts() method to retrieve the list of parts.IlrScenarioProvider.getScenarioCount() method to retrieve the total number of scenarios.IlrInitializable.initialize(IlrScenarioSuiteExecutionContext) method of the new parallel scenario provider instance. At this stage, the
IlrScenarioSuiteExecutionContext.getCurrentScenarioSuitePart() method returns the simulation part that initialized the parallel scenario provider instance.IlrScenarioProvider.close() method. After all of the simulation parts are executed, the IlrScenarioProvider.close() method of
the first parallel scenario provider instance is then called.The following example extends a non-parallel scenario provider to split a simulation into two parts of equal length:
public class SampleParallelScenarioProvider extends AnExistingNonParallelScenarioProvider {
public List getScenarioSuiteParts() {
int numberOfScenario = getScenarioCount();
int numberOfParts = 2;
return IlrScenarioSuitePart.getBalancedListOfScenarioSuiteParts(numberOfScenario, numberOfParts);
}
}
IlrKPIResultAggregator| Modifier and Type | Interface and Description |
|---|---|
static class |
IlrParallelScenarioProvider.IlrScenarioSuitePart
Defines a simulation part that can be distributed by the SSP to a dedicated processor or thread.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.List<IlrParallelScenarioProvider.IlrScenarioSuitePart> |
getScenarioSuiteParts()
Returns the list of parts to be used for the parallel execution of the simulation.
|
close, getScenarioAt, getScenarioCountinitializejava.util.List<IlrParallelScenarioProvider.IlrScenarioSuitePart> getScenarioSuiteParts() throws IlrScenarioProviderException
IlrScenarioProviderExceptionIlrKPIResultAggregator.© Copyright IBM Corp. 1987, 2017