- Лайфстайл
- Недвижимость
- Здоровье
- Природа
- Дизайн
- Техника и оборудование
- Бизнес и предпринимательство
- Искусство
- Религия
- Строительство и ремонт
- Сад и огород
- Аудиокниги
- Кулинария
- Интервью
- Развлечения
- Лайфхаки
- Эзотерика
- Охота и рыбалка
- Наука
- Политика
- Психология
- Аудио
- Технологии и интернет
- Красота
- Телепередачи
- Детям
- Аниме
- Хобби
- Видеоигры
- Юмор
- Образование
- Спорт
- Разное
- Путешествия
- Животные
- Новости и СМИ
- Мультфильмы
- Музыка
- Сериалы
- Фильмы
- Авто-мото
SimPy Tutorial 1: Introduction to SimPy
In this video, I discuss some of the reasons SimPy is a good option for discrete event simulation. Then, I demonstrate the difference between a generator (one of the fundamental elements of SimPy) and a function. Finally, I wrap up the video by writing a simple SimPy program to illustrate how timeout events work.
Use 1080p for best viewing!
SimPy documentation: https://simpy.readthedocs.org/en/latest/index.html
Python download/installation instructions: https://www.python.org/downloads/
pip installation instructions: http://pip.readthedocs.org/en/stable/installing/
Discrete event simulation: https://en.wikipedia.org/wiki/Discrete_event_simulation
Averill Law's take on it: http://www.amazon.com/Simulation-McGraw-Hill-Industrial-Engineering-Management/dp/0073401323
Today's code:
==============================
import simpy
def main():
env = simpy.Environment()
env.process(traffic_light(env))
env.run(until=300)
print("Simulation complete")
def traffic_light(env):
while True:
print("Light turned GRN at t= "+str(env.now))
yield env.timeout(30)
print("Light turned YEL at t= "+str(env.now))
yield env.timeout(5)
print("Light turned RED at t= "+str(env.now))
yield env.timeout(20)
if __name__ == '__main__':
main()
==============================
Видео SimPy Tutorial 1: Introduction to SimPy автора Python: Кодовое возрождение
Видео SimPy Tutorial 1: Introduction to SimPy автора Python: Кодовое возрождение
Информация
2 декабря 2023 г. 20:37:03
00:16:24
Похожие видео






![Qwiklab:Fundamentals of Cloud Logging[GSP610]](http://pic.rutubelist.ru/video/5d/db/5ddb64a0cc5acd6c69bc9ea17ac0c873.jpg?size=s)














