|
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.simevents.Event
umontreal.iro.lecuyer.contactcenters.server.EndServiceEvent
public class EndServiceEvent
Represents the simulation event for a contact's
end of service. It is constructed and returned by the
AgentGroup.serve(Contact)
method and can be used to abort the service
of a contact, dynamically modify its service time, or
get information about the service.
The event contains scheduled as well as effective information.
A scheduled information is determined at the time the event
is scheduled. For example, the schedule contact time is the
contact time which was generated at the beginning of the service.
An effective information is determined at the time the
event occurs, or the service is aborted. It is different from
the scheduled information only when the service is aborted.
Field Summary |
---|
Fields inherited from class umontreal.iro.lecuyer.simevents.Event |
---|
eventTime, priority, sim |
Constructor Summary | |
---|---|
protected |
EndServiceEvent(AgentGroup group,
Contact contact,
double beginServiceTime)
Constructs a new end-service event with contact contact served by an agent in group group, with service beginning at simulation time beginServiceTime. |
Method Summary | |
---|---|
void |
actions()
|
boolean |
afterContactDone()
Determines if the after-contact work or service is terminated by the agent. |
EndServiceEvent |
clone()
Returns a copy of this event. |
EndServiceEvent |
clone(Contact clonedContact)
Similar to clone() , but initializes the contact
of the cloned event with clonedContact instead of
a clone of the contact returned by getContact() . |
boolean |
contactDone()
Determines if the communication is finished between the contact and the agent. |
boolean |
endContact(int ecType1)
Terminates the communication part of the service represented by this event, with end-contact type ecType, and returns true if and only if the communication part was terminated successfully. |
boolean |
endService(int esType1)
Terminates the after-contact part of the service represented by this event, with end-service type esType, and returns true if and only if the after-contact part was terminated successfully. |
AgentGroup |
getAgentGroup()
Returns the agent group containing the agent serving the contact. |
double |
getBeginServiceTime()
Returns the simulation time at which the service started. |
Contact |
getContact()
Returns the contact being served. |
double |
getEffectiveAfterContactTime()
Returns the effective after-contact time. |
double |
getEffectiveContactTime()
Returns the effective contact time. |
int |
getEffectiveEndContactType()
Returns the effective type of contact termination. |
int |
getEffectiveEndServiceType()
Returns the effective type of the service termination. |
double |
getEndingTime()
Returns the simulation time at which this step ended. |
double |
getScheduledAfterContactTime()
Returns the scheduled after-contact time. |
double |
getScheduledContactTime()
Returns the scheduled duration of the communication with the contact. |
int |
getScheduledEndContactType()
Returns the type of contact termination that will occur when this event happens for the first time. |
int |
getScheduledEndServiceType()
Returns the type of the service termination that will occur when this event happens for the second time. |
double |
getStartingTime()
Returns the simulation time at which this step started. |
boolean |
isObsolete()
Determines if this event is obsolete. |
void |
schedule(double delay)
|
void |
setScheduledEndContactType(int ecType)
Changes the type of contact termination that will occur when this event happens to ecType. |
void |
setScheduledEndServiceType(int esType)
Changes the type of service termination that will occur when this event happens to esType. |
String |
toString()
|
boolean |
wasGhostAgent()
Determines if the agent ending the service of the contact disappears after the service is completed. |
Methods inherited from class umontreal.iro.lecuyer.simevents.Event |
---|
cancel, cancel, compareTo, getRa, priority, reschedule, scheduleAfter, scheduleBefore, scheduleNext, setPriority, setRa, setSimulator, setTime, simulator, time |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
protected EndServiceEvent(AgentGroup group, Contact contact, double beginServiceTime)
This constructor is rarely used directly;
the recommended way to create end-service
events is to use
AgentGroup.serve(Contact)
.
group
- the associated agent group.contact
- the contact being served.beginServiceTime
- the time at which the service begins.Method Detail |
---|
public Contact getContact()
getContact
in interface ContactStepInfo
public double getBeginServiceTime()
public double getStartingTime()
ContactStepInfo
getStartingTime
in interface ContactStepInfo
public double getEndingTime()
ContactStepInfo
getEndingTime
in interface ContactStepInfo
public double getScheduledContactTime()
public double getEffectiveContactTime()
IllegalStateException
.
IllegalStateException
- if the communication is not
terminated.public double getScheduledAfterContactTime()
IllegalStateException
is thrown.
IllegalStateException
- if the communication is
not terminated.public double getEffectiveAfterContactTime()
IllegalStateException
.
IllegalStateException
- if the service is not terminated.public int getScheduledEndContactType()
AgentGroup.endContact(EndServiceEvent,int)
method.
public int getScheduledEndServiceType()
AgentGroup.endService(EndServiceEvent,int)
method.
public int getEffectiveEndContactType()
IllegalStateException
.
IllegalStateException
- if the communication is not terminated.public int getEffectiveEndServiceType()
IllegalStateException
.
IllegalStateException
- if the service is not terminated.public void setScheduledEndContactType(int ecType)
IllegalStateException
.
ecType
- the new end-contact type.
IllegalStateException
- if the communication is terminated.public void setScheduledEndServiceType(int esType)
IllegalStateException
.
esType
- the new end-service type.
IllegalStateException
- if the service is terminated.public AgentGroup getAgentGroup()
public boolean endContact(int ecType1)
getAgentGroup()
AgentGroup.endContact(EndServiceEvent,int)
,
and returns the result.
ecType1
- the end-contact type.
public boolean endService(int esType1)
getAgentGroup()
AgentGroup.endService(EndServiceEvent,int)
,
and returns the result.
esType1
- the end-service type.
public boolean contactDone()
public boolean afterContactDone()
public boolean wasGhostAgent()
public boolean isObsolete()
AgentGroup.init()
, some end-service
events might still be in the simulator's event list.
Since this agent group does not store every
scheduled end-service event by default, one must
use this method in actions()
to test
if this event is obsolete. If that returns true,
one should return immediately.
public void schedule(double delay)
schedule
in class Event
public void actions()
actions
in class Event
public String toString()
toString
in class Object
public EndServiceEvent clone()
clone
in class Object
public EndServiceEvent clone(Contact clonedContact)
clone()
, but initializes the contact
of the cloned event with clonedContact instead of
a clone of the contact returned by getContact()
.
This method can be useful when cloning a contact c
for which c.getSteps() returns a non-empty
list containing end-service events. In that case, the contact associated
with the events included in c.getSteps() must
correspond to c rather than clones of c.
clone
in interface ContactStepInfo
clonedContact
- the contact being cloned.
|
ContactCenters V. 0.9.9. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |