2023 Higher Education Society Cup Mathematical Modeling Ideas - Case: Shortest Time Production Planning Arrangement

0 Question Ideas

(Share on CSDN as soon as the competition questions come out)

https://blog.csdn.net/dc_sinor?type=blog

The shortest time production planning model

This model appears in several competition questions, and it is predicted that the 2023 national competition will also be related to this model.

1 Model description

Discrete system simulation plays a very important role in the process arrangement of industrial production. How to establish simple, easy-to-implement and highly monitorable mathematical models for some discrete problems with complex internal mechanisms has always been a research hotspot in simulation technology.

There are three simulation modeling strategies for discrete event systems, namely:

  • Event Scheduling
  • activity scanning method
  • Process interaction method.

In this model demo, the senior student used the activity scanning method to process a practical example in production.

The activity scanning method has good applicability to systems with strong correlation between events.

2 examples

2.1 Problem description

In the production process of many factories, due to limitations in the number of equipment and the order of product processing, production tasks cannot be simply arranged. We envision the use of powerful mathematical software combined with simple and easy methods to arrange.

Suppose that the products of a heavy machinery factory are all single pieces. There is a workshop with 4 different types of equipment. It is currently accepting processing tasks for 6 products. The procedures accepted by each product are processed on the designated equipment. The process and processing cycle are as follows surface

Insert image description here
Now we are looking for arrangements based on this practical problem.

Require:

1. Each product must be processed according to the prescribed procedures and must not be reversed.

2. Each piece of equipment can only serve one task at the same time (each process of each product is a task).

3. Complete all tasks accepted in the shortest possible time.

In order to save electric energy and reasonably allocate production tasks, the factory also requires:

1. Make a start and finish timetable for each process of each product.

2. Give a timetable for the tasks of each piece of equipment.

2.2 Mathematical model

2.2.1 Model process

Insert image description here

2.2.2 Symbol Conventions

Insert image description here

2.2.3 Solve the model

Insert image description hereInsert image description hereInsert image description here

2.3 Related code

clear
clc
seq=[3 1 2 3 4 0 0 0                     %各产品加工时所用的设备的次序
     1 4 2 3 0 0 0 0
     3 4 1 2 1 0 0 0
     2 3 4 1 4 3 0 0
     4 2 3 4 1 3 4 0
     1 2 1 3 4 1 3 1];
 tim=[8 2 4 24 6 0 0 0                   %加工对应使用的时间
      4 5 3 4 0 0 0 0
      3 7 15 20 8 0 0 0
      7 6 21 1 16 3 0 0
      10 4 8 4 12 6 1 0
      1 4 7 3 5 2 5 8];
whole=[0 0 0 0];
for i=1:6
    for j=1:8
        if(seq(i,j)~=0)
            whole(seq(i,j))=whole(seq(i,j))+tim(i,j);
        end
    end
end
whole                          %生产各件产品所需的总时间

mes=cell(4,1);                   %记录各个设备的工作时间(对应于上面tim的位置)
for k=1:4
    mes{
    
    k,1}=zeros(6,8);
    for j=1:8
        for i=1:6
            if(seq(i,j)==k)
            mes{
    
    k,1}(i,j)=tim(i,j);
        else
            mes{
    
    k,1}(i,j)=100;
            end
        end
    end
end

turn=cell(5,100);               %记录四个设备的开关时间及加工对象(on(i)for i=1:4
    for j=1:100
        turn{
    
    i,j}='off';
    end
end
for i=1:100
    turn{
    
    5,i}=[num2str(i) '分'];
end

open=zeros(6,8);           
%记录6个产品的加工进度,0表示未进行,1表示已开始(或已结束),2表示可选,3表示没有这个程序
for i=1:6
    open(i,1)=2;
end
for i=1:6
    for j=1:8
        if seq(i,j)==0
            open(i,j)=3;
        end
    end
end

gongxu=zeros(6,1);
dai=zeros(4,1);
j=1;
s=[1	1	1	1	1	3	3	3
1	1	1	1	3	3	3	3
1	1	1	1	1	3	3	3
1	1	1	1	1	1	3	3
1	1	1	1	1	1	1	3
1	1	1	1	1	1	1	1];
while isequal(open,s)==0
    on=[];
    for i=1:4
        if turn{
    
    i,j}=='off'  
%在turn矩阵中逐列搜索,若设备处于关机状态,则作记录(可用)
            on=[on i];
        end
    end
    l1=length(on);
    for m=1:l1          %在整个生产计划中(对设备逐个)寻找能够选作操作的步骤
        [x,y]=find(open==2);
        l2=length(x);
        a=[x(1) y(1)];
        for k=1:l2   %对某个设备on(m),找出当前它能操作的步骤中耗时最小的一个
            if mes{
    
    on(m)}(a(1),a(2))>mes{
    
    on(m)}(x(k),y(k))
                a=[x(k) y(k)];
            end
        end
        if turn{
    
    on(m),j}=='off' & mes{
    
    on(m)}(a(1),a(2))~=100 
%若时间为100则意味着这个步骤不属于我们希望使用的那件设备
            while tim(a(1),a(2))>0
                turn{
    
    on(m),tim(a(1),a(2))+j-1}=a(1);
                tim(a(1),a(2))=tim(a(1),a(2))-1;
            end
        end
    end
    for i=1:4
        if turn{
    
    i,j}~='off'
            dai(i)=turn{
    
    i,j};
        end
    end
    for i=1:4
        if turn{
    
    i,j}~='off' & turn{
    
    i,j+1}=='off'
            gongxu(turn{
    
    i,j})=gongxu(turn{
    
    i,j})+1;
            open(turn{
    
    i,j},gongxu(turn{
    
    i,j}))=1;
        end
        if gongxu(dai(i))<8 & open(dai(i),gongxu(dai(i))+1)~=3 & turn{
    
    i,j+1}=='off'
            open(dai(i),gongxu(dai(i))+1)=2;
        end
    end
    j=j+1;
end

2.4 Model solution results

The start and completion schedule of each process for each product

Insert image description here
Schedule of tasks undertaken by each device

Insert image description here
From the results, we can see that using this method, it only takes 78 units of time to complete all the processes. And we can also see at the beginning of the paper that it will take 75 units of time to complete. It can be seen that the results obtained by this method are quite satisfactory, and the operation is simple and the monitorability is strong.

Modeling information

Data Sharing: The strongest modeling data
Insert image description here
Insert image description here

Guess you like

Origin blog.csdn.net/math_assistant/article/details/132584555