|
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.SingleTypeContactFactory
public class SingleTypeContactFactory
Represents a contact factory used to create contacts of a single type. This factory also associates default patience, contact, and after-contact times to the constructed contacts. All random variates are generated at the time the contact is created.
Constructor Summary | |
---|---|
SingleTypeContactFactory(int type,
ValueGenerator probBalkGen,
RandomStream streamBalk,
RandomVariateGen pgen,
RandomVariateGen cgen,
RandomVariateGen[] cgenGroups,
RandomVariateGen acgen,
RandomVariateGen[] acgenGroups)
Constructs a new contact factory constructing contacts of type type. |
|
SingleTypeContactFactory(Simulator sim,
int type,
ValueGenerator probBalkGen,
RandomStream streamBalk,
RandomVariateGen pgen,
RandomVariateGen cgen,
RandomVariateGen[] cgenGroups,
RandomVariateGen acgen,
RandomVariateGen[] acgenGroups)
Equivalent to SingleTypeContactFactory(int,ValueGenerator,RandomStream,RandomVariateGen,RandomVariateGen,RandomVariateGen[],RandomVariateGen,RandomVariateGen[]) ,
using the given simulator sim. |
Method Summary | |
---|---|
RandomVariateGen |
getAfterContactTimeGen()
Returns the random-variate generator for default after-contact times. |
RandomVariateGen |
getAfterContactTimeGen(int i)
Returns the random variate generator for contacts served by agents in group i. |
RandomVariateGen[] |
getAfterContactTimeGenGroups()
Returns the random variate generators for after-contact times when served by agents in specific groups. |
RandomVariateGen |
getContactTimeGen()
Returns the random-variate generator for default contact times. |
RandomVariateGen |
getContactTimeGen(int i)
Returns the random variate generator for contacts served by agents in group i. |
RandomVariateGen[] |
getContactTimeGenGroups()
Returns the random variate generators for contact times when served by agents in specific groups. |
double |
getMeanAfterContactTime(int i)
Returns the mean after-contact time for a new contact served by an agent in group i. |
double |
getMeanContactTime(int i)
Returns the mean contact time for a new contact served by an agent in group i. |
RandomVariateGen |
getPatienceTimeGen()
Returns the random-variate generator for patience times. |
ValueGenerator |
getProbBalkGenerator()
Returns a reference to the value generator used for generating probabilities of balking. |
RandomStream |
getStreamBalk()
Returns the random stream used for balking. |
int |
getTypeId()
Returns the type identifier for contacts returned by this factory. |
Contact |
newInstance()
Creates a new instance of class Contact , and initializes it by
calling the setRandomVariables(Contact)
method. |
void |
setAfterContactTimeGen(RandomVariateGen acgen)
Sets the random variate generator for default after-contact times to acgen. |
void |
setAfterContactTimeGenGroups(RandomVariateGen[] acgenGroups)
Sets the contact-time generators for contacts served by specific agent groups to cgenGroups. |
void |
setContactTimeGen(RandomVariateGen cgen)
Sets the random variate generator for default contact times to cgen. |
void |
setContactTimeGenGroups(RandomVariateGen[] cgenGroups)
Sets the contact-time generators for contacts served by specific agent groups to cgenGroups. |
void |
setPatienceTimeGen(RandomVariateGen pgen)
Sets the random variate generator for patience times to pgen. |
void |
setProbBalkGenerator(ValueGenerator probBalkGen)
Sets the value generator for probability of balking to probBalkGen. |
void |
setRandomVariables(Contact contact)
Generates the random variates related to a contact, and assigns the generated value to the given contact object. |
void |
setSimulator(Simulator sim)
Sets the simulator associated with this contact factory to sim. |
void |
setStreamBalk(RandomStream streamBalk)
Sets the random stream used for balking to streamBalk. |
void |
setTypeId(int type)
Sets the type identifier of constructed contacts to type. |
Simulator |
simulator()
Returns the simulator associated with this contact factory. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleTypeContactFactory(int type, ValueGenerator probBalkGen, RandomStream streamBalk, RandomVariateGen pgen, RandomVariateGen cgen, RandomVariateGen[] cgenGroups, RandomVariateGen acgen, RandomVariateGen[] acgenGroups)
If probBalkGen or streamBalk are null, the probability of balking will always be 0. If pgen is null, the patience time will always be infinite. The default contact time when the given generator is null is infinite while the default after-contact time is 0.
The constructed call factory assigns the
default simulator returned by Simulator.getDefaultSimulator()
to each new contact.
type
- the contact type identifier of all new contacts.probBalkGen
- the generator for balking probabilities.streamBalk
- the random stream for balking.pgen
- the patience time generator.cgen
- the default contact time generator.cgenGroups
- the agent-group specific contact time generators.acgen
- the default after-contact time generator.acgenGroups
- the agent-group specific after-contact time generators.public SingleTypeContactFactory(Simulator sim, int type, ValueGenerator probBalkGen, RandomStream streamBalk, RandomVariateGen pgen, RandomVariateGen cgen, RandomVariateGen[] cgenGroups, RandomVariateGen acgen, RandomVariateGen[] acgenGroups)
SingleTypeContactFactory(int,ValueGenerator,RandomStream,RandomVariateGen,RandomVariateGen,RandomVariateGen[],RandomVariateGen,RandomVariateGen[])
,
using the given simulator sim.
Method Detail |
---|
public Simulator simulator()
public void setSimulator(Simulator sim)
sim
- the new associated simulator.public Contact newInstance()
Contact
, and initializes it by
calling the setRandomVariables(Contact)
method.
newInstance
in interface ContactFactory
public void setRandomVariables(Contact contact)
contact
- the contact object to set up.public RandomStream getStreamBalk()
public void setStreamBalk(RandomStream streamBalk)
streamBalk
- the new random stream for balking.public ValueGenerator getProbBalkGenerator()
public void setProbBalkGenerator(ValueGenerator probBalkGen)
public RandomVariateGen getPatienceTimeGen()
public void setPatienceTimeGen(RandomVariateGen pgen)
pgen
- the new random variate generator for patience times.public RandomVariateGen getContactTimeGen()
public void setContactTimeGen(RandomVariateGen cgen)
cgen
- the new random variate generator for contact times.public RandomVariateGen getAfterContactTimeGen()
public void setAfterContactTimeGen(RandomVariateGen acgen)
acgen
- the new random variate generator for default after-contact times.public RandomVariateGen[] getContactTimeGenGroups()
public RandomVariateGen getContactTimeGen(int i)
i
- the agent group index.
public void setContactTimeGenGroups(RandomVariateGen[] cgenGroups)
cgenGroups
- the new contact-time generators.public RandomVariateGen[] getAfterContactTimeGenGroups()
public RandomVariateGen getAfterContactTimeGen(int i)
i
- the agent group index.
public void setAfterContactTimeGenGroups(RandomVariateGen[] acgenGroups)
acgenGroups
- the new contact-time generators.public double getMeanContactTime(int i)
i
- the agent group identifier.
public double getMeanAfterContactTime(int i)
i
- the agent group identifier.
public int getTypeId()
public void setTypeId(int type)
type
- the type identifier of constructed contacts.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |