Demo entry 6720724

SimPy example

   

Submitted by anonymous on Mar 17, 2018 at 20:49
Language: Python 3. Code size: 222 Bytes.

import simpy

state_variable = 0

def example_process(env):
    while True:
        state_variable += 1
        yield env.timeout(1)

env = simpy.Environment()
env.process(example_process(env))
env.run(until=10)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).