Generators - JelleLa/ChiPy GitHub Wiki

Generator are objects that generate orders.

The Generator class

A chipy.Generator generates lots according to an arrival rate and sends them in the assigned Run Environment.

cp.Generator(env = env, ta = ta, runenv = runenv, lots = lots, stations = stations, priority = lambda: 0)

The mandatory arguments for a generator are self-evidently the Environment (env), the inverse of rate of arrival ta, the Run Environment (runenv) to send lots to and a list of processed lots so the generator can stop generating once the desired amount of lots are produced. Finally, the end-user is required to parse a dictionary containing all stations through the station argument. This way, the generator can initiate each station's individual failing procedure and sent all stations to the run environment.

The only optional argument is lot priority in the form of a lambda function (priority, default lambda: 1), such that any desirable method can be used to determine lot priority.