Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## umontreal.iro.lecuyer.contactcenters.msk.simlogic
Interface SimLogic

All Superinterfaces:
  AWTPeriod, StatPeriod

All Known Implementing Classes:
  BatchMeansLogic, RepLogic

    public interface SimLogic

extends StatPeriod

Represents a simulation logic performing a certain type of experiment on a model of a call center. This interface defines methods to perform simulations, obtain the statistical period of contacts, transform matrices of counters into matrices of observations ready to be added to statistical collectors, and update some simulation parameters.

Method Summary
`void` | `addSimLogicListener(SimLogicListener l)` Registers the listener `l` to be notified about the progress of the simulator.
`void` | `clearSimLogicListeners()` Removes all the listeners registered with this simulator.
`void` | `formatReport(Map<String,Object> evalInfo)` Adds the information specific to this simulation logic into the evaluation information map of the simulator.
`CallCenter` | `getCallCenter()` Returns the model associated with this simulation logic.
`CallCenterMeasureManager` | `getCallCenterMeasureManager()` Returns an object containing the counters updated throughout the simulation.
`CallCenterStatProbes` | `getCallCenterStatProbes()` Returns the call center statistical probes used by this simulation logic.
`int` | `getCompletedSteps()` Returns the number of completed simulation steps.
`int` | `getCurrentMainPeriod()` Returns the current period used by this simulator.
`int[][]` | `getScheduledAgents()` Returns the 2D array of scheduled agents for each shift and each agent group.
`List<SimLogicListener>` | `getSimLogicListeners()` Returns the listeners registered with this simulator.
`SimParams` | `getSimParams()` Returns the parameters associated with this simulation logic.
`int[]` | `getStaffing()` Returns the staffing vector used by this simulator.
`int[][]` | `getStaffingMatrix()` Gets the staffing matrix for the simulated model.
`void` | `init()` Initializes the simulation logic for a new experiment.
`boolean` | `isAborted()` Determines if the simulation has been aborted by using the `setAborted(boolean)` method.
`boolean` | `isSteadyState()` Determines if this simulator performs a steady-state simulation.
`boolean` | `isVerbose()` Determines if the simulation logic is in verbose mode.
`void` | `registerListeners()` Registers any listener required by the simulator from the model.
`void` | `removeSimLogicListener(SimLogicListener l)` Removes the listener `l` from the list of listeners registered with this simulator.
`void` | `reset(PerformanceMeasureType... pms)` Resets the simulation logic for a new experiment after the model has been reset.
`boolean` | `seemsUnstable()` Returns `true` if, after the simulation, the system seems unstable.
`void` | `setAborted(boolean aborted)` Aborts the current simulation.
`void` | `setCurrentMainPeriod(int mp)` Sets the current period for this simulator to `p`.
`void` | `setScheduledAgents(int[][] ag)` Sets the number of scheduled agents for each group and shift using the given 2D array.
`void` | `setStaffing(int[] staffing)` Sets the staffing vector used by this simulator to `staffing`.
`void` | `setStaffingMatrix(int[][] staffing)` Sets the 2D array representing the staffing matrix to `staffing`.
`void` | `setVerbose(boolean verbose)` Sets the verbose indicator to `verbose`.
`void` | `simulate(int numSteps)` Simulates `numSteps` steps, and updates observations in statistical collectors as well as the number of completed steps returned by `getCompletedSteps()`.
`void` | `unregisterListeners()` Disconnects every listener registered by the simulator from the model.

Methods inherited from interface umontreal.iro.lecuyer.contactcenters.msk.stat.StatPeriod
`getNumPeriodsForCounters, getNumPeriodsForCountersAwt, getStatPeriod, getStatPeriod, getStatPeriodAwt, needsSlidingWindows, needsStatForPeriodSegmentsAwt`

Methods inherited from interface umontreal.iro.lecuyer.contactcenters.msk.stat.AWTPeriod
`getAwtPeriod, getGlobalAwtPeriod`

Method Detail

### getCallCenter

    CallCenter getCallCenter()

  Returns the model associated with this simulation logic.

  Returns:
    the associated model.

### getSimParams

    SimParams getSimParams()

  Returns the parameters associated with this simulation logic.

  Returns:
    the associated parameters.

### getCallCenterMeasureManager

    CallCenterMeasureManager getCallCenterMeasureManager()

  Returns an object containing the counters updated throughout the simulation.

  Returns:
    the call center measures.

### getCallCenterStatProbes

    CallCenterStatProbes getCallCenterStatProbes()

  Returns the call center statistical probes used by this simulation logic.

  Returns:
    the call center statistical probes.

### reset

    void reset(PerformanceMeasureType... pms)

  Resets the simulation logic for a new experiment after the model has been reset. This method should update or recreate the associated counters and statistical probes, since the size of the model may have changed.

### init

    void init()

  Initializes the simulation logic for a new experiment. In particular, this resets the event list of the simulator, the state of the model, and the current number of completed steps to 0.

### simulate

    void simulate(int numSteps)

  Simulates `numSteps` steps, and updates observations in statistical collectors as well as the number of completed steps returned by `getCompletedSteps()`. Usually, this method simulates the required number of replications, and adds one observation to each statistical collector of the matrices returned by `getCallCenterStatProbes()`.

  Note that this method may be called several times during a simulation experiment using sequential sampling. For this reason, one should take account of every observation collected since the last call to `init()`.

### getCompletedSteps

    int getCompletedSteps()

  Returns the number of completed simulation steps.

  Returns:
    the number of completed steps.

### isSteadyState

    boolean isSteadyState()

  Determines if this simulator performs a steady-state simulation.

  Returns:
    `true` if this is a steady-state simulator, `false` otherwise.

### formatReport

    void formatReport(Map<String,Object> evalInfo)

  Adds the information specific to this simulation logic into the evaluation information map of the simulator. The keys and values of this map are listed at the beginning of the simulation report.

### getStaffing

    int[] getStaffing()

  Returns the staffing vector used by this simulator. This vector has the same format as the `EvalOptionType.STAFFINGVECTOR` evaluation option.

  Returns:
    the staffing vector.

### setStaffing

    void setStaffing(int[] staffing)

  Sets the staffing vector used by this simulator to `staffing`. This vector has the same format as the `EvalOptionType.STAFFINGVECTOR` evaluation option.

  Parameters:
    `staffing` - the new staffing vector.

### getStaffingMatrix

    int[][] getStaffingMatrix()

  Gets the staffing matrix for the simulated model. The returned 2D array has the format specified by `EvalOptionType.STAFFINGMATRIX`.

  Returns:
    the 2D array representing the staffing matrix.

### setStaffingMatrix

    void setStaffingMatrix(int[][] staffing)

  Sets the 2D array representing the staffing matrix to `staffing`.

  Parameters:
    `staffing` - the new staffing matrix.

### getScheduledAgents

    int[][] getScheduledAgents()

  Returns the 2D array of scheduled agents for each shift and each agent group. Element (i, j) of the returned array contains the number of agents scheduled in group i during shift j.

  Returns:
    the scheduled agents.

### setScheduledAgents

    void setScheduledAgents(int[][] ag)

  Sets the number of scheduled agents for each group and shift using the given 2D array.

  Parameters:
    `ag` - the array of scheduled agents.

### getCurrentMainPeriod

    int getCurrentMainPeriod()

  Returns the current period used by this simulator. If this simulator is not steady-state, this throws an `UnsupportedOperationException`.

  Returns:
    the current period.

### setCurrentMainPeriod

    void setCurrentMainPeriod(int mp)

  Sets the current period for this simulator to `p`. If this simulator is not steady-state, this throws an `UnsupportedOperationException`.

  Parameters:
    `mp` - the new current period.

### seemsUnstable

    boolean seemsUnstable()

  Returns `true` if, after the simulation, the system seems unstable. This is applicable for steady state simulations only.

  Returns:
    the result of the stability check.

### registerListeners

    void registerListeners()

  Registers any listener required by the simulator from the model.

### unregisterListeners

    void unregisterListeners()

  Disconnects every listener registered by the simulator from the model.

### isVerbose

    boolean isVerbose()

  Determines if the simulation logic is in verbose mode.

  Returns:
    the status of the verbose mode.

### setVerbose

    void setVerbose(boolean verbose)

  Sets the verbose indicator to `verbose`.

  Parameters:
    `verbose` - the value of the indicator.

### addSimLogicListener

    void addSimLogicListener(SimLogicListener l)

  Registers the listener `l` to be notified about the progress of the simulator.

  Parameters:
    `l` - the listener to be notified.
  Throws:
    `NullPointerException` - if `l` is `null`.

### removeSimLogicListener

    void removeSimLogicListener(SimLogicListener l)

  Removes the listener `l` from the list of listeners registered with this simulator.

  Parameters:
    `l` - the listener being removed.

### clearSimLogicListeners

    void clearSimLogicListeners()

  Removes all the listeners registered with this simulator.

### getSimLogicListeners

    List<SimLogicListener> getSimLogicListeners()

  Returns the listeners registered with this simulator.

  Returns:
    the list of registered listeners.

### isAborted

    boolean isAborted()

  Determines if the simulation has been aborted by using the `setAborted(boolean)` method.

  Returns:
    `true` if the simulation was aborted, `false` otherwise.

### setAborted

    void setAborted(boolean aborted)

  Aborts the current simulation.

Overview | Package | Class | Tree | Deprecated | Index | Help
| ContactCenters V. 0.9.9.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

To submit a bug or ask questions, send an e-mail to Richard Simard.