Getting error when writing tis example with simpy
Traceback (most recent call last):
File "banksim.py", line 6, in <module>
class Customer(Process):
NameError: name 'Process' is not defined
Hear is the code.
""" bank01: The single non-random Customer """
import simpy
## Model components -----------------------------
class Customer(Process):
""" Customer arrives, looks around and leaves """
def visit(self,timeInBank):
print now(),self.name," Here I am" &nbs
p;
yield hold,self,timeInBank
print now(),self.name," I must leave"
## Experiment data ------------------------------
maxTime = 100.0 # minutes
timeInBank = 10.0 # minutes
## Model/Experiment ------------------------------
initialize()
c = Customer(name="Klaus")
activate(c,c.visit(timeInBank),at=5.0) &nbs
p;
simulate(until=maxTime)
_______________________________________________ Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector