Main Content

在批处理生产过程中优化共享资源

概述

此示例显示了如何建模和优化系统中共享资源的使用,以识别资源缺陷并改善容量计划。该示例基于批处理生产过程,在该过程中,仅根据批处理反应器的可用性来处理生产订单。在示例中,simevents®实体既代表制造过程的生产订单,又代表处理它们所需的批处理反应堆。在示例的稍后,我们将通过应用MATLAB全局优化工具箱的遗传算法求解器来找到系统的最佳资源能力。

modelName ='sebatchproduction';Open_System(modelName);scopes = find_system(modelname,“ LookunderMasks”,,,,'上',,,,'blocktype',,,,'范围');CellFun(@(x)Close_system(x),scopes);set_param(modelname,“仿真”,,,,'update');

模型的结构

At the top level of the model, the Entity Generators simulate the generation and backlog of production orders by generating entities that represent production orders. When a new entity is generated, the Obtain Reactor block requests a batch reactor to process the order. After the Execute Chemical Process Recipe subsystem completes the order according to a specified chemical process recipe, the block labeled Release Reactor releases the batch reactor back into the pool of resources, where it is now available to process a new order. The Data Analysis subsystem analyzes data related to completion of production orders.

在生产过程中共享资源

执行化学过程配方子系统形式lates the chemical process to produce sol (a type of colloid). A six-step recipe models the main operations in sol production. Execution of these steps requires different resources. A batch reactor provides built-in capabilities to execute steps like adding color, adding particles and stir. Thus the resources required by these steps do not need to be modeled separately. On the other hand, the steps to add water, heat up and drain require extra resources. These resources are shared by all the batch reactors and are limited by the capacity of the production system.

open_system([模型名称'/Execute Chemical Process Recipe');

For example, when water usage reaches the full capacity, water pressure is too low for another batch reactor to access. In this case, production in that reactor pauses until the water supply becomes available again. In the Execute Chemical Process Recipe subsystem, the example models such a resource sharing process with a Queue block labeled等待供水和标记的实体服务器块加水在添加水子系统中。这Capacity实体服务器块的参数建模供水的容量。在模拟过程中,队列块中的实体数量表示等待水的批处理反应器的数量。服务器块中的实体数代表访问水的批处理反应器的数量。

open_system([模型名称“/执行化学过程食谱/加水”);

这modeled batch production process is capable of producing two types of batches: type A and type B. Although the main steps required to produce either batch are the same, the chemical process recipes are different. For example, the recipe to produce type B requires more water, so the step to add water takes more time to complete.

Results and Displays

During simulation, the Data Analysis subsystem displays several results to show the performance of the production process.

这里最有说明的结果是第一个,Average number of orders in backlog,这代表了订单的等待时间,因为系统努力跟上流入。

SIM(modelName);open_system([模型名称'/Data Analysis/Order Backlog');

Other results of the system include the following and can be seen in the Data Analysis subsystem:

  • 平均等待水的批量数

  • Average number of batches waiting for heat

  • Average number of batches waiting for draining

  • 批处理反应堆的利用

  • Utilization of water supply

  • 供热的利用

  • Utilization of draining facility

  • A批次的吞吐量

  • 类型B批量的吞吐量

open_system([模型名称'/Data Analysis/Waiting For Water');open_system([模型名称'/Data Analysis/Waiting For Heat');open_system([模型名称'/Data Analysis/Waiting For Drain');open_system([模型名称'/数据分析/利用反应器');open_system([模型名称“/数据分析/利用水”);open_system([模型名称'/Data Analysis/Utilization Heaters');open_system([模型名称'/Data Analysis/Utilization Drains');open_system([模型名称'/数据分析/吞吐量');open_system([模型名称'/数据分析/吞吐量');

优化资源能力

We will now apply a Genetic Algorithm solver from the MATLAB Global Optimization Toolbox to this SimEvents model to find optimal resource capacities for this system. The genetic algorithm solves optimization problems by repeatedly modifying a population of individual points. Due to its random nature, the genetic algorithm improves your chances of finding a global solution. It does not require the functions to be differentiable or continuous.

此优化中的决策变量是:

  • Number of batch reactors

  • Number of water tanks

  • Number of heaters

  • Number of drains

遗传算法通过可变资源容量来运行模型的多个模拟,从而设置了这些变量。资源能力的起始值如下:

CellFun(@(x)Close_system(x),scopes);disp('优化之前的ResourceCececpacity =');disp(资源)close_system([modelname'/Data Analysis/Order Backlog');ResourceCeceCapacity = SerunoptimizationforBatchProductionProcess();disp('优化= ='');disp(资源)
优化之前的ResourceCecececectacity = 2 2 2 2使用“本地”配置文件...连接到并行池(工人数量:6)。优化终止:罚款健身价值的平均变化小于选项。FunctionToleranceand Cristaint违规少于选项。经过的时间为112.822855秒。使用“本地”配置文件的并行池正在关闭。优化后的资源能力= 13 2 4 2

Apply Optimization Results

We can now resimulate after applying the results of the optimization process back to the model to see that this significantly reduced the order backlog.

SIM(modelName);open_system([模型名称'/Data Analysis/Order Backlog');

%清理bdclose(modelname);清除modelscopes

也可以看看

|||||

Related Topics