开始使用免费开始使用

数学模型:纳入关键流程

您已经创建了如下所示的字典 processes,其中包含一家生产手机的公司在供应链运营中的各个步骤信息。

processes = {
    "Sourcing raw material":  5,
    "Transport of raw material": 1,
    "Manufacturing parts": 3,
    "Assembling parts": 2,
    "Selling products": 3,
}

您的模型保存在名为 discrete_model_build_phone() 的函数中,并根据字典中描述的流程来模拟生产线。模型的输入参数(按顺序)为:

  1. processes:包含流程信息的字典
  2. simulation_time:仿真运行时长。

模型中的时间单位为天。

Maptlotlib.pyplot 已以 plt 的名称为您加载。

本练习是课程的一部分

Python 中的离散事件模拟

查看课程

交互式实操练习

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

# Add the new key-value pair to the processes dictionary
processes["____"] = ____

# Assign the simulation time
simulation_time = ____

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