queues determine if the agent is free the isfinished(method is used to determine if the passenger currently being served by this agent has completed her transaction this method only flags the transaction as having been completed to actually end the transactionstopservice(must be called stopservice(sets the passenger field to none to again indicate the agent is free and returns the passenger object to begin transactionstartservice(is calledwhich assigns the appropriate fields with the supplied arguments listing the ticketagent class defined in the simpeople py module used to store and manage information related to an airline ticket agent class ticketagent creates ticket agent object def __init__selfidnum )self _idnum idnum self _passenger none self _stoptime - gets the ticket agent' id number def idnumself )return self _idnum determines if the ticket agent is free to assist passenger def isfreeself )return self _passenger is none determines if the ticket agent has finished helping the passenger def isfinishedselfcurtime )return self _passenger is not none and self _stoptime =curtime indicates the ticket agent has begun assisting passenger def startserviceselfpassengerstoptime )self _passenger passenger self _stoptime stoptime indicates the ticket agent has finished helping the passenger def stopserviceself )thepassenger self _passenger self _passenger none return thepassenger simulation class finallywe construct the ticketcountersimulation classwhich is provided in listing to manage the actual simulation this class will contain the various componentsmethodsand data values required to perform discrete event simulation sample instance is illustrated in figure the first step in the constructor is to initialize three simulation parameters note the arriveprob is the probability of passenger arriving during the current time step using the formula described earlier queue is createdwhich will be