|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectumontreal.iro.lecuyer.contactcenters.contact.ServiceTimes
public class ServiceTimes
Stores service times for a contact. By default, there are two types of service times: contact times and after-contact times. However, a model can define additional types of service times. For each of these types, one may generate a default service time v which applies for all agents, one service time vi for each agent group i. This class can be used to store and retrieve such service times. For greater efficiency, it is recommended to call method ensureCapacityForServiceTime before using setServiceTime in order to avoid multiple array reallocations.
Field Summary | |
---|---|
protected double |
servTime
|
Constructor Summary | |
---|---|
ServiceTimes(double serviceTime)
Constructs a new container for service times using the default service time serviceTime. |
Method Summary | |
---|---|
void |
add(ServiceTimes st)
Adds the service times stored in st to the corresponding service times in this object. |
ServiceTimes |
clone()
Clones this object, and its internal arrays of service times. |
void |
ensureCapacityForServiceTime(int capacity)
Makes sure that the length of the array containing the vi's is at least capacity for the number of groups. |
double |
getServiceTime()
Returns the default service time v for this object. |
double |
getServiceTime(int i)
Returns the service time vi for contacts served by an agent in group i. |
double[] |
getServiceTimes()
Returns the array of service times for all groups. |
boolean |
isSetServiceTime(int i)
Determines if a service time was set specifically for agent group i, by using setServiceTime(int,double) . |
void |
mult(double mult)
Multiplies each service time v and vi stored in this object by the given constant mult. |
void |
set(ServiceTimes st)
Replaces the service times v and vi's stored in this object with the values obtained from st. |
void |
setServiceTime(double serviceTime)
Sets the default service time v of this object to serviceTime. |
void |
setServiceTime(int i,
double t)
Sets the service time vi for contacts served by an agent in group i to t. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected double servTime
Constructor Detail |
---|
public ServiceTimes(double serviceTime)
serviceTime
- the default service time v.
IllegalArgumentException
- if the given service
time is negative or NaN.Method Detail |
---|
public double getServiceTime()
public void setServiceTime(double serviceTime)
serviceTime
- the new default service time.
IllegalArgumentException
- if the given service
time is negative or NaN.public double getServiceTime(int i)
isSetServiceTime(int)
returns false,
this returns the result of getServiceTime()
.
i
- the index of the agent group.
public double[] getServiceTimes()
public boolean isSetServiceTime(int i)
setServiceTime(int,double)
.
i
- the tested agent group index.
public void setServiceTime(int i, double t)
Double.NaN
unsets the service time for the specified agent group.
i
- the index of the agent group to set.t
- the new service time.
IllegalArgumentException
- if t is negative.public void ensureCapacityForServiceTime(int capacity)
setServiceTime(int,double)
to avoid multiple array reallocations.
capacity
- the new capacity for the groupspublic void set(ServiceTimes st)
st
- the input service times.public void add(ServiceTimes st)
st
- the service times to add to this object.public void mult(double mult)
mult
- the multiplier for service times.
IllegalArgumentException
- if mult is negative.public ServiceTimes clone()
clone
in class Object
public String toString()
toString
in class Object
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |