|
Rule Designer API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IlrParallelScenarioProvider
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 ListgetScenarioSuiteParts() { int numberOfScenario = getScenarioCount(); int numberOfParts = 2; return IlrScenarioSuitePart.getBalancedListOfScenarioSuiteParts(numberOfScenario, numberOfParts); } }
IlrKPIResultAggregator
Nested Class Summary | |
---|---|
static class |
IlrParallelScenarioProvider.IlrScenarioSuitePart
Defines a simulation part that can be distributed by the SSP to a dedicated processor or thread. |
Method Summary | |
---|---|
List<IlrParallelScenarioProvider.IlrScenarioSuitePart> |
getScenarioSuiteParts()
Returns the list of parts to be used for the parallel execution of the simulation. |
Methods inherited from interface ilog.rules.dvs.core.IlrScenarioProvider |
---|
close, getScenarioAt, getScenarioCount |
Methods inherited from interface ilog.rules.dvs.core.IlrInitializable |
---|
initialize |
Method Detail |
---|
List<IlrParallelScenarioProvider.IlrScenarioSuitePart> getScenarioSuiteParts() throws IlrScenarioProviderException
IlrScenarioProviderException
IlrKPIResultAggregator
.
|
Rule Designer API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |