Exemplo n.º 1
0
from logger import Logger

# Initializing
env = simpy.Environment()

logger = Logger(env)

production_line = ProductionLine(env, logger)

# Doing a couple of global repeats

for i in range(0,20):

    # First running through with one item.

    fas_instance = FASInstance(env, production_line, logger)
    fas_instance.spawn()
    env.run()
    
    # Then 2 items spaced a bit.
    
    fas_instance = FASInstance(env, production_line, logger)
    fas_instance.spawn()
    
    for j in range(0, 5):
        env.step()
    
    fas_instance = FASInstance(env, production_line, logger)
    fas_instance.spawn()
    
    env.run()
Exemplo n.º 2
0
from modules.clock import Clock

from logger import Logger

# Initializing
env = simpy.Environment()

logger = Logger(env)

production_line = ProductionLine(env, logger)


# First running through with one item for debugging reasons, to make sure the
# event indices follow this order.

fas_instance = FASInstance(env, production_line, logger)
clock = Clock(logger, env)
done = fas_instance.spawn()
clock.spawn()
env.run(done)

# Putting in 20 items, waiting for them to be done, and then putting in 50 more,
# waiting them to be done also.

for i in range(0, 20):
    fas_instance = FASInstance(env, production_line, logger)
    done = fas_instance.spawn()

clock.spawn()
env.run(done)