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.ctmc
Class RateChangeTransitions

    java.lang.Object
      umontreal.iro.lecuyer.contactcenters.ctmc.RateChangeTransitions

    public class RateChangeTransitions

extends Object

Provides methods to determine transitions at which arrivl rates change in order to have piecewise-constant arrival rates in the CTMC simulator. By default, a simulator based on an implementation of `CallCenterCTMC` uses a fixed arrival rate for each call type. Each replication, N(T) transitions are simulated. This class provides methods to determine how many transitions to simulate with each arrival rate, and generate a sequence of (t, k, λk) tuples. Each tuple indicates that the arrival rate for call type k changes to λk at transition number t.

Constructor Summary
`RateChangeTransitions(CallCenter cc)` Constructs a new object for managing changes of arrival rates for the call center `cc`.

Method Summary
`RateChangeInfo[]` | `generateRateChanges(RandomStream stream, double[][] timeDist, int ntr)` Generates and returns a sequence of changes of arrival rates for simulating a uniformized CTMC with time-varying arrival rates for one or more call types.
`static double[]` | `getTimeDist(double[] times, double startingTime, double endingTime)` Constructs an array of length L + 1 giving the proportion of interval [a, b) taken by each interval [tj-1, tj).
`double[][]` | `getTimeDist(double startingTime, double endingTime)` Returns a 2D array with one row per call type.
`boolean` | `hasChanges()` Returns `true` if and only if the arrival rate for at least one call type of the associated model changes with time.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### RateChangeTransitions

    public RateChangeTransitions(CallCenter cc)

  Constructs a new object for managing changes of arrival rates for the call center `cc`. This constructor collects the arrival rates and time of changes for any call type with an arrival processs having piecewise-constant arrival rate. Any call type with an arrival process other than `PoissonArrivalProcessWithTimeIntervals` is ignored; the associated arrival rate will remain constant with time.

  Parameters:
    `cc` - the call center from which to collect the information.

Method Detail

### hasChanges

    public boolean hasChanges()

  Returns `true` if and only if the arrival rate for at least one call type of the associated model changes with time.

### getTimeDist

    public double[][] getTimeDist(double startingTime,
                                  double endingTime)

  Returns a 2D array with one row per call type. Row k of the returned array is created by calling `getTimeDist(double[],double,double)` with the time of changes for call type k, and the given values of `startingTime` and `endingTime`.

  Parameters:
    `startingTime` - the starting time a.
    `endingTime` - the ending time b.
  Returns:
    the 2D array of time distributions.

### getTimeDist

    public static double[] getTimeDist(double[] times,
                                       double startingTime,
                                       double endingTime)

  Constructs an array of length L + 1 giving the proportion of interval [a, b) taken by each interval [tj-1, tj). Let 0≤t0 < ... < tL-1 < ∞ be an increasing sequence of times. For each j = 0,…, L, the method sets the element j of the returned array to

  ((tj, b) - (tj-1, a), 0)/(b - a).

  Here, t-1 = 0 and tL = ∞. Each element of the returned array is in [0, 1], and the sum of the values is 1. Element j of the returned array gives the proportion of transitions, in a uniformized CTMC, that needs to be simulated with arrival rate λj corresponding to time interval [tj, tj+1). The arrival rate is always 0 with time t < t0 and t≥tL-1.

  Parameters:
    `times` - the sequence of times t0,…, tL-1.
    `startingTime` - the starting time a.
    `endingTime` - the ending time b.
  Returns:
    an array containing the proportion of total time for each interval.

### generateRateChanges

    public RateChangeInfo[] generateRateChanges(RandomStream stream,
                                                double[][] timeDist,
                                                int ntr)

  Generates and returns a sequence of changes of arrival rates for simulating a uniformized CTMC with time-varying arrival rates for one or more call types. For each call type k for which `timeDist[k]` is non-`null`, this method generates a vector from the multinomial distribution giving the number of transitions spent with each arrival rate. The vectors are generated using random stream `stream`, and parameter n of the multinomials is `ntr`, and the vector of probabilities for call type `k` is given by `timeDist[k]`. The method then creates a squence of objects representing change of arrival rates, and sorts these objects in increasing number of transition.

  Parameters:
    `stream` - the random stream used to generate random vectors.
    `timeDist` - the time distribution for each call type.
    `ntr` - the total number of transitions.
  Returns:
    the sequence of changes of arrival rates.

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.