НачатьНачать бесплатно

Transportation model: running the model

Now that the SimPy model generator has been created, which will call the methods that characterize the "Transport model" processes, it's time to build the SimPy model environment. Once that is complete, processes can be added, and simulations run.

By now you have done this several times in previous exercises, but these steps are always needed when building a model with SimPy. Recall that the generator has been saved as all_processes.

Это упражнение является частью курса

Discrete Event Simulation in Python

Посмотреть курс

Инструкции к упражнению

  • Build the SimPy environment.
  • Now that you have defined your all_processes() generator, include it in the model environment.
  • Your SimPy model environment has now been defined, so run it for 1200 seconds (=20 min).

Интерактивное практическое упражнение

Попробуйте выполнить это упражнение, дополнив этот пример кода.

# Build the SimPy Model
env = simpy.____()

# Add the process to the environment
env.____(all_processes(env, inputs))

# Run the discrete-event model for 1200 seconds
env.____(until=____)
Редактировать и запускать код