ContactCenters
V. 0.9.9.

umontreal.iro.lecuyer.contactcenters.server
Class SetNumAgentsEvent

java.lang.Object
  extended by umontreal.iro.lecuyer.simevents.Event
      extended by umontreal.iro.lecuyer.contactcenters.server.SetNumAgentsEvent
All Implemented Interfaces:
Comparable<Event>

public class SetNumAgentsEvent
extends Event

Represents a simulation that sets the number of agents and agents' efficiency in an agent group.


Field Summary
 
Fields inherited from class umontreal.iro.lecuyer.simevents.Event
eventTime, priority, sim
 
Constructor Summary
SetNumAgentsEvent(AgentGroup group, int numAgents, double efficiency)
          Constructs a new set-num-agents event that sets the number of agents in the group group to numAgents, and the efficiency factor to efficiency.
SetNumAgentsEvent(Simulator sim, AgentGroup group, int numAgents, double efficiency)
          Equivalent to SetNumAgentsEvent(AgentGroup,int,double), using the given simulator sim.
 
Method Summary
 void actions()
           
 double getEfficiency()
          Returns the agents' efficiency in the target group after this event occurs.
 int getNumAgents()
          Returns the number of agents in the target group after the event occurs.
 AgentGroup getTargetAgentGroup()
          Returns the agent group affected by this event.
 String toString()
           
 
Methods inherited from class umontreal.iro.lecuyer.simevents.Event
cancel, cancel, compareTo, getRa, priority, reschedule, schedule, scheduleAfter, scheduleBefore, scheduleNext, setPriority, setRa, setSimulator, setTime, simulator, time
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SetNumAgentsEvent

public SetNumAgentsEvent(AgentGroup group,
                         int numAgents,
                         double efficiency)
Constructs a new set-num-agents event that sets the number of agents in the group group to numAgents, and the efficiency factor to efficiency.

Parameters:
group - the target agent group.
numAgents - the number of agents in the group after the event occurs.
efficiency - the efficiency after the event occurs.

SetNumAgentsEvent

public SetNumAgentsEvent(Simulator sim,
                         AgentGroup group,
                         int numAgents,
                         double efficiency)
Equivalent to SetNumAgentsEvent(AgentGroup,int,double), using the given simulator sim.

Method Detail

getTargetAgentGroup

public AgentGroup getTargetAgentGroup()
Returns the agent group affected by this event.

Returns:
the target agent group.

getNumAgents

public int getNumAgents()
Returns the number of agents in the target group after the event occurs.

Returns:
the desired number of agents in the target group.

getEfficiency

public double getEfficiency()
Returns the agents' efficiency in the target group after this event occurs.

Returns:
the desired efficiency in the target agent group.

actions

public void actions()
Specified by:
actions in class Event

toString

public String toString()
Overrides:
toString in class Object

ContactCenters
V. 0.9.9.

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