Rule Designer API

ilog.rules.dvs.core
Class IlrParallelScenarioProvider.IlrScenarioSuitePart

java.lang.Object
  extended by ilog.rules.dvs.core.IlrParallelScenarioProvider.IlrScenarioSuitePart
All Implemented Interfaces:
Serializable
Enclosing interface:
IlrParallelScenarioProvider

public static class IlrParallelScenarioProvider.IlrScenarioSuitePart
extends Object
implements Serializable

Defines a simulation part that can be distributed by the SSP to a dedicated processor or thread. Other parts of the simulation are distributed to other processors or threads so that all the parts of the simulation are executed concurrently in parallel. A scenario suite part is defined as a range of consecutive indexes that constitute a subset of the scenarios of the simulation. The index is relative to the complete scenario suite.

See Also:
Serialized Form

Constructor Summary
IlrParallelScenarioProvider.IlrScenarioSuitePart(int firstIndex, int lastIndex)
          Creates a scenario suite part, defined as a contiguous subset of scenarios provided by the scenario provider.
IlrParallelScenarioProvider.IlrScenarioSuitePart(int firstIndex, int lastIndex, Serializable customData)
          Creates a scenario suite part, defined as a contiguous subset of scenarios provided by the scenario provider.
 
Method Summary
static List<IlrParallelScenarioProvider.IlrScenarioSuitePart> getBalancedListOfScenarioSuiteParts(int totalNumberOfScenarios, int numberOfParts)
          Creates a balanced list of scenario suite parts for a given total number of scenarios.
 Serializable getCustomData()
          Returns the custom data attached to this simulation part, if any.
 int getFirstIndex()
          Returns the first index, relative to the complete scenario suite, of this set of scenarios.
 int getLastIndex()
          Returns the last index, relative to the complete scenario suite, of this set of scenarios.
 void setCustomData(Serializable customData)
          Attach custom data to this simulation part.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrParallelScenarioProvider.IlrScenarioSuitePart

public IlrParallelScenarioProvider.IlrScenarioSuitePart(int firstIndex,
                                                        int lastIndex)
                                                 throws IlrScenarioProviderException
Creates a scenario suite part, defined as a contiguous subset of scenarios provided by the scenario provider.

Throws:
IlrScenarioProviderException - if the last index is less than the first index, or if the first index is less than 0.
Parameters:
firstIndex - The first index (at least 0), relative to the complete scenario suite, of this set of scenarios. The getScenarioAt(int index) method of the scenario provider instance in charge of providing scenarios for this part is called first using this index value.
lastIndex - The last index (greater than or equal to the first index), relative to the complete scenario suite, of this set of scenarios. The getScenarioAt(int index) method of the scenario provider instance in charge of providing scenarios for this part is called last using this index value.

IlrParallelScenarioProvider.IlrScenarioSuitePart

public IlrParallelScenarioProvider.IlrScenarioSuitePart(int firstIndex,
                                                        int lastIndex,
                                                        Serializable customData)
                                                 throws IlrScenarioProviderException
Creates a scenario suite part, defined as a contiguous subset of scenarios provided by the scenario provider.

Throws:
IlrScenarioProviderException - if the last index is less than the first index, or if the first index is less than 0.
Parameters:
firstIndex - The first index (at least 0), relative to the complete scenario suite, of this set of scenarios. The getScenarioAt(int index) method of the scenario provider instance in charge of providing scenarios for this part is called first using this index value.
lastIndex - The last index (greater than or equal to the first index), relative to the complete scenario suite, of this set of scenarios. The getScenarioAt(int index) method of the scenario provider instance in charge of providing scenarios for this part is called last using this index value.
customData - Custom data to attach to this scenario suite part.
Method Detail

getBalancedListOfScenarioSuiteParts

public static List<IlrParallelScenarioProvider.IlrScenarioSuitePart> getBalancedListOfScenarioSuiteParts(int totalNumberOfScenarios,
                                                                                                         int numberOfParts)
                                                                                                  throws IlrScenarioProviderException
Creates a balanced list of scenario suite parts for a given total number of scenarios. This method can be used to divide an existing scenario suite into a number of parts that contain an equal number of scenarios.

Throws:
IlrScenarioProviderException - if the total number of scenarios is less than 1 or if the number of parts is more than the total number of scenarios.
Parameters:
totalNumberOfScenarios - The total number of scenarios (must be greater than 0).
numberOfParts - The number of parts to return in the list (must be lower or equal to the total number of scenarios).
Returns:
The list of parts. If the number of parts is less than the total number of scenarios, this method returns a list of exactly numberOfParts, which contain the totalNumberOfScenarios. If the number of parts is equal to the total number of scenarios, this method returns a list of parts equal to the totalNumberOfScenarios. Each part contains a single scenario.

getFirstIndex

public int getFirstIndex()
Returns the first index, relative to the complete scenario suite, of this set of scenarios.

Returns:
The first index, relative to the complete scenario suite, of this set of scenarios.

getLastIndex

public int getLastIndex()
Returns the last index, relative to the complete scenario suite, of this set of scenarios.

Returns:
The last index, relative to the complete scenario suite, of this set of scenarios.

setCustomData

public void setCustomData(Serializable customData)
Attach custom data to this simulation part.

Parameters:
customData - The custom data to attach to this set of scenarios.

getCustomData

public Serializable getCustomData()
Returns the custom data attached to this simulation part, if any.

Returns:
The custom data attached to this set of scenarios, if any.

Rule Designer API

© Copyright IBM Corp. 1987, 2013