开始使用免费开始使用

运行离散事件模型

您的"Farming Operation"团队终于整理出了本版离散事件模型要包含的流程,您计划后续继续完善。下表给出了这些流程及其耗时,单位为天。

Table with process names and their respective duration to be used to create a dictionary.

让我们先构建一个包含这些流程的字典,然后将模型运行 365 天。

本练习是课程的一部分

Python 中的离散事件模拟

查看课程

练习说明

  • 根据表格更新给定的字典,填入相应的流程。
  • 为变量 simulation_time 赋予合适的取值。
  • 运行存储在 discrete_model_farm() 中的模型。请注意,它按顺序接收 process_dictsimulation_time 作为输入变量。

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Create dictionary
process_dict = {
    "____": ____,
    "____": ____,
    "Weeding": 4,
    "Planting": 2,
    "Watering and growing": 60,
    "Harvesting": 7,
    "Delivery": 2
}

# Simulatiom time (days)
____

# Run the model
____(____, ____)
编辑并运行代码