Stefan, at cue-in t = 6:00, you write def speaker(env): yield env.timeout(30) return 'handout' But that does not seem legal. And it does not work. It flags this error: SyntaxError: 'return' with argument inside generator There can be no return statement inside a generator, can there? Please explain.
The code from minute 8:00 is not working for me (when trying to follow the condition event example)
Shouldn't it be Discrete Event Simulation rather than Event Discrete Simulation in the caption ?
Wonderful video. Make more such informative videos for users like us.
Stefan, at cue-in t = 6:00, you write
def speaker(env):
yield env.timeout(30)
return 'handout'
But that does not seem legal. And it does not work. It flags this error: SyntaxError: 'return' with argument inside generator
There can be no return statement inside a generator, can there? Please explain.
Perhaps you're using Python 2.7?
Try using Python 3+
on the condition events (7:43) if I put exactly 30 in speaker env.timeout it will become error
You could raise this as an issue on the GitLab or GitHub for SimPy.
Very good presentation! Thank you!
One typo in the presentation.
BREAK_LENGTH
not LEN_BREAK
Otherwise the code doesn't work.
I'm not sure I really see the benefit vs. making my own simulator to do the same task.
im thinking about the same. I think sometimes its much easier to use a simple While loop instead.
bandersnatch anyone? simulation?
senpai