[go: up one dir, main page]

CN1529209A - Integrated Optimal Control Method for Mixed Batch Assembly Line - Google Patents

Integrated Optimal Control Method for Mixed Batch Assembly Line Download PDF

Info

Publication number
CN1529209A
CN1529209A CNA2003101060069A CN200310106006A CN1529209A CN 1529209 A CN1529209 A CN 1529209A CN A2003101060069 A CNA2003101060069 A CN A2003101060069A CN 200310106006 A CN200310106006 A CN 200310106006A CN 1529209 A CN1529209 A CN 1529209A
Authority
CN
China
Prior art keywords
scheduling
plan
assembly line
simulation
mixed
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2003101060069A
Other languages
Chinese (zh)
Inventor
严洪森
夏琦峰
朱旻如
刘霞玲
郭智敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Southeast University
Original Assignee
Southeast University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Southeast University filed Critical Southeast University
Priority to CNA2003101060069A priority Critical patent/CN1529209A/en
Publication of CN1529209A publication Critical patent/CN1529209A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • General Factory Administration (AREA)

Abstract

混批装配线的集成优化控制方法涉及混批装配线(即一条装配线上可同时装配多种产品)的生产计划、调度与仿真的集成优化控制方法,该方法为:平滑客户的产品需求;根据平滑后的产品需求,用分枝定界算法求解混批装配线的混合整数规划模型;分别获得以粗生产计划作为初始解的混批装配线的最好生产计划即产品种类与数量,和调度即装配顺序;通过动画调度仿真观察混批装配线的最优调度过程;判断是否满足客户的产品需求;如果经过动画调度仿真;认为满足产品需求,则可将其作为准备下达执行的正式计划与调度;根据正式计划与调度,安排生产和控制待装品的上线,并根据动画调度仿真时确定的装配线移动速度控制混批装配线的运行。

Figure 200310106006

The integrated optimization control method of mixed batch assembly line involves the integrated optimization control method of production planning, scheduling and simulation of mixed batch assembly line (that is, one assembly line can assemble multiple products at the same time). use the branch and bound algorithm to solve the mixed integer programming model of the mixed-batch assembly line; respectively obtain the best production plan of the mixed-batch assembly line with the rough production plan as the initial solution, that is, the product type and quantity, and the scheduling, that is, the assembly sequence; Observe the optimal scheduling process of the mixed-batch assembly line through animation scheduling simulation; judge whether it meets the customer's product requirements; if it is considered to meet the product requirements after animation scheduling simulation, it can be used as a formal plan and scheduling for execution; according to the formal plan And scheduling, arrange production and control the on-line of the products to be loaded, and control the operation of the mixed-batch assembly line according to the moving speed of the assembly line determined during the animation scheduling simulation.

Figure 200310106006

Description

混批装配线的集成优化控制方法Integrated Optimal Control Method for Mixed Batch Assembly Line

                            技术领域Technical field

本发明涉及混批装配线(即一条装配线上可同时装配多种产品)的生产计划、调度与仿真的集成优化控制方法,并可依此安排生产和控制混批装配线的运行。属于生产线优化控制方法技术领域。The invention relates to an integrated optimization control method for production planning, scheduling and simulation of a mixed-batch assembly line (that is, multiple products can be assembled on one assembly line at the same time), and can arrange production and control the operation of the mixed-batch assembly line accordingly. The invention belongs to the technical field of production line optimization control methods.

                            背景技术 Background technique

现有混批装配线的生产计划、调度与优化文献的绝大多数仅仅涉及生产调度[1-8],很少涉及生产计划[9]。在实际生产中,往往先单独优化生产计划,然后在被优化的计划基础上优化生产调度,其结果是计划与调度不能达到整体优化,甚至出现生产计划导致调度不可行或性能很差的情况[10,11]。禁忌搜索(Tabu Search)是由Glover[12,13]提出的用于获取组合最优化难题近似解的一种高级启发式方法。目前,禁忌搜索法主要用于Flow shop调度,Job shop调度和制造单元形成等方面[14,15],而在混批装配线生产计划、调度方面的应用则非常少见。有关混批装配线的Petri网建模方面的文献非常少见,目前仅发现Kuo等人用有色定时Petri网(Colored Timed Petri Net)建立了汽车混批装配系统的模型,并据此开发了一个具有不同分派规则的实时仿真器[16]。但是该模型缺少决策点,不便将调度规则等融入其中。相比之下,扩展随机高级判断Petri网(ESHLEP-N)包含了决策点,更易将调度规则等融入其中,因而更适合建立混批装配线的调度仿真模型。Most of the existing production planning, scheduling and optimization literatures on mixed-batch assembly lines only involve production scheduling [1-8] , and rarely involve production planning [9] . In actual production, the production plan is often optimized first, and then the production scheduling is optimized on the basis of the optimized plan. As a result, the planning and scheduling cannot achieve overall optimization, and even the production plan leads to scheduling infeasibility or poor performance .[ 10, 11] . Tabu Search (Tabu Search) is an advanced heuristic method proposed by Glover [12, 13] to obtain approximate solutions to combinatorial optimization problems. At present, the tabu search method is mainly used in flow shop scheduling, job shop scheduling and manufacturing unit formation [14,15] , but its application in production planning and scheduling of mixed batch assembly lines is very rare. There are very few literatures on Petri net modeling of mixed batch assembly line. At present, it is only found that Kuo et al. used Colored Timed Petri Net (Colored Timed Petri Net) to establish a model of automobile mixed batch assembly system, and developed a model with different A real-time simulator of dispatch rules [16] . However, the model lacks decision points, and it is inconvenient to integrate scheduling rules into it. In contrast, the Extended Stochastic Advanced Judgment Petri Net (ESHLEP-N) includes decision points, and it is easier to integrate scheduling rules into it, so it is more suitable for establishing a scheduling simulation model of a mixed-batch assembly line.

[1]Agnetis A,Pacifici A,Rossi F,Lucertini M,Nicoletti S,Nicolo F,Oriolo G,Pacciarelli D,Pesaro E.Scheduling of flexible flow lines in an automobile assembly plant. European Journal ofOperational Research,1997,97(2),348-362.[1]Agnetis A, Pacifici A, Rossi F, Lucertini M, Nicoletti S, Nicolo F, Oriolo G, Pacciarelli D, Pesaro E. Scheduling of flexible flow lines in an automobile assembly plant. European Journal of Operational Research, 1997, 97( 2), 348-362.

[2]Karabati S,Tan B.Stochastic cyclic scheduling problem in synchronous assembly and productionlines.Journal of the Operational Research Society,1998,49(11),1173-1187.[2] Karabati S, Tan B. Stochastic cyclic scheduling problem in synchronous assembly and production lines. Journal of the Operational Research Society, 1998, 49(11), 1173-1187.

[3]Bolat A.Stochastic procedures for scheduling minimum job sets on mixed model assembly lines.Journal of the Operational Research Society,1997,48(5),490-501.[3]Bolat A. Stochastic procedures for scheduling minimum job sets on mixed model assembly lines. Journal of the Operational Research Society, 1997, 48(5), 490-501.

[4]Hyun C J,Kim Y,Kim Y K.A genetic algorithm for multiple objective sequencing problems inmixed model assembly lines. Computers and Operations Research,1998,25(7/8),675-690.[4]Hyun C J, Kim Y, Kim Y K.A genetic algorithm for multiple objective sequencing problems inmixed model assembly lines. Computers and Operations Research, 1998, 25(7/8), 675-690.

[5]Xiaobo Z,Ohno K. Algorithms for sequencing mixed models on an assembly line in a JITproduction system.Computers and Industrial Engineering,1997,32(1),47-56.[5] Xiaobo Z, Ohno K. Algorithms for sequencing mixed models on an assembly line in a JIT production system. Computers and Industrial Engineering, 1997, 32(1), 47-56.

[6]Zhang Y,Luh P B,Yoneda K,Kano T,Kyoya Y.Mixed-model assembly line scheduling using theLagrangian relaxation technique.IIE Transactions,2000,32(2),125-134.[6] Zhang Y, Luh P B, Yoneda K, Kano T, Kyoya Y. Mixed-model assembly line scheduling using the Lagrangian relaxation technique. IIE Transactions, 2000, 32(2), 125-134.

[7]Korkmazel T,Meral S.Bicriteria sequencing methods for the mixed-model assembly line injust-in-time production systems. European Journal of Operational Research,2001,131(1),188-207.[7] Korkmazel T, Meral S. Bicriteria sequencing methods for the mixed-model assembly line injust-in-time production systems. European Journal of Operational Research, 2001, 131(1), 188-207.

[8]Ventura J A,Radhakrishnan S.Sequencing mixed model assembly lines for a just-in-timeproduction system. Production Planning and Control,2002,13(2),199-210.[8] Ventura J A, Radhakrishnan S. Sequencing mixed model assembly lines for a just-in-time production system. Production Planning and Control, 2002, 13(2), 199-210.

[9]Balakrishnan A,Vanderbeck F.Tactical planning model for mixed-model electronics assemblyoperations.Operations Research,1999,47(3),395-409.[9] Balakrishnan A, Vanderbeck F. Tactical planning model for mixed-model electronics assembly operations. Operations Research, 1999, 47(3), 395-409.

[10]Lasserre J B.An integrated model for job-shop planning and scheduling. Management Science,1992,38(8),1201-1211.[10]Lasserre J B. An integrated model for job-shop planning and scheduling. Management Science, 1992, 38(8), 1201-1211.

[11]Caridi M,Sianesi A. Multi-agent systems in production planning and control:an application to thescheduling of mixed-model assembly lines. International Journal of Production Economics,2000,68(1),29-42.[11] Caridi M, Sianesi A. Multi-agent systems in production planning and control: an application to the scheduling of mixed-model assembly lines. International Journal of Production Economics, 2000, 68(1), 29-42.

[12]Glover F.Tabu search-part I.ORSA Journal on Computing,1989,1(3),190-206.[12] Glover F. Tabu search-part I. ORSA Journal on Computing, 1989, 1(3), 190-206.

[13]Glover F.Tabu search-part II.ORSA Journal on Computing,1990,2(1),4-32.[13] Glover F. Tabu search-part II. ORSA Journal on Computing, 1990, 2(1), 4-32.

[14]Nowicki E.The permutation flow shop with buffers:a tabu search approach. European Journal ofOperational Research,1999,116(1),205-219[14] Nowicki E. The permutation flow shop with buffers: a tabu search approach. European Journal of Operational Research, 1999, 116(1), 205-219

[15]Armentano V A,Ronconi D P.Tabu search for total tardiness minimization in flowshopscheduling problems.Computers and Operations Research,1999,26(3),219-235.[15] Armentano V A, Ronconi D P. Tabu search for total tardiness minimization in flowshop scheduling problems. Computers and Operations Research, 1999, 26(3), 219-235.

[16]Kuo C H,Huang H P,Wei K C,Tang S S H.System modeling and real-time simulator for highlymodel-mixed assembly systems.Journal of Manufacturing Science and Engineering,Transactionsof the ASME,1999,121(2),282-289.[16]Kuo C H, Huang H P, Wei K C, Tang S S H. System modeling and real-time simulator for highlymodel-mixed assembly systems. Journal of Manufacturing Science and Engineering, Transactions of the ASME, 1999, 121(2 ), 282-289.

                             发明内容Contents of Invention

技术问题:本发明的目的是提供一种在一条装配线上可同时装配多种产品,并使产品的超产、欠产与准备成本,各装配工位的空闲时间,调度跨度和各装配工位之间的负荷偏差达到最小化的混批装配线的集成优化控制方法。Technical problem: the purpose of this invention is to provide a kind of assembly line that can assemble multiple products at the same time, and make the overproduction, underproduction and preparation cost of the product, the idle time of each assembly station, the scheduling span and the relationship between each assembly station An integrated optimization control method for a mixed batch assembly line to minimize the load deviation among them.

技术方案:本发明建立了混批装配线的混合整数规划模型,以用分枝定界算法求得使各装配工位的准备成本和空闲时间尽可能少并尽可能满足产品需求的粗生产计划。然后在考虑装配线细节的基础上建立了混批装配线的生产计划与调度的集成优化模型,并分别提出嵌入式禁忌搜索仿真法、交替式禁忌搜索仿真法、和串行式禁忌搜索仿真法等三种不同方法来解决以粗生产计划作为初始解的混批装配线的生产计划、调度与仿真的集成优化问题,同时给出了这三种方法的计算复杂性。本发明的混批装配线的集成优化控制方法,其特征在于该方法包括以下步骤(见图3):Technical solution: The present invention establishes a mixed integer programming model of a mixed-batch assembly line to use a branch-and-bound algorithm to obtain a rough production plan that minimizes the preparation cost and idle time of each assembly station and satisfies product requirements as much as possible. Then, on the basis of considering the details of the assembly line, an integrated optimization model for production planning and scheduling of the mixed-batch assembly line is established, and three simulation methods, including the embedded tabu search simulation method, the alternate tabu search simulation method, and the serial tabu search simulation method, are proposed. Different methods are used to solve the integrated optimization problem of production planning, scheduling and simulation of mixed-batch assembly line with rough production plan as the initial solution, and the computational complexity of these three methods is given. The integrated optimization control method of mixed batch assembly line of the present invention is characterized in that the method comprises the following steps (see Fig. 3):

(1)平滑客户的产品需求;(1) Smooth customer product demand;

(2)根据平滑后的产品需求,用分枝定界算法求解混批装配线的混合整数规划模型,以获得使各装配工位的准备成本和空闲时间尽可能少并尽可能满足产品需求的粗生产计划;(2) According to the smoothed product demand, the branch and bound algorithm is used to solve the mixed integer programming model of the mixed-batch assembly line, so as to obtain the rough plan that minimizes the preparation cost and idle time of each assembly station and satisfies the product demand as much as possible. Production Plan;

(3)在混批装配线的生产计划与调度的集成优化模型的基础上,针对产品种类和数量的少、中、多等三个不同程度,分别用嵌入式禁忌搜索仿真法、交替式禁忌搜索仿真法、和串行式禁忌搜索仿真法来获得以粗生产计划作为初始解的混批装配线的最好生产计划即产品种类与数量,和调度即装配顺序;(3) On the basis of the integrated optimization model of production planning and scheduling of the mixed batch assembly line, aiming at three different levels of product types and quantities, such as small, medium and large, respectively use the embedded tabu search simulation method and the alternate tabu search The simulation method and the serial tabu search simulation method are used to obtain the best production plan of the mixed-batch assembly line with the rough production plan as the initial solution, that is, the product type and quantity, and the scheduling, that is, the assembly sequence;

(4)通过动画调度仿真观察混批装配线的最优调度过程;(4) Observe the optimal scheduling process of the mixed-batch assembly line through animation scheduling simulation;

(5)判断是否满足客户的产品需求;(5) Judging whether the product requirements of customers are met;

(6)如果经过动画仿真,认为不满足需求,则可对最好计划与调度作适当修改后再仿真;(6) If after animation simulation, it is considered that the requirements are not met, the best plan and scheduling can be properly modified and then simulated;

(7)如果经过动画仿真,认为满足需求,则可将其作为准备下达执行的正式计划与调度;(7) If it is considered to meet the requirements after animation simulation, it can be used as a formal plan and schedule to be issued for execution;

(8)根据正式计划与调度,安排生产和控制待装品的上线,并根据动画仿真时确定的装配线移动速度控制混批装配线的运行。(8) According to the formal plan and scheduling, arrange the production and control the on-line of the products to be installed, and control the operation of the mixed-batch assembly line according to the moving speed of the assembly line determined during the animation simulation.

由于客户的产品需求(订单)是随机的并具有突发性,而产品生产需要均匀和平稳进行,因此需要把客户的随机和突发性需求平滑成能够使生产平稳、连续进行的需求。需求平滑的方法是根据产品订单要求的交付期和重要性及生产能力,按照交付期最早优先和重要性最重优先的原则,将产品订货平滑分配到每个计划区间。Since the customer's product demand (order) is random and sudden, and product production needs to be carried out evenly and smoothly, it is necessary to smooth the customer's random and sudden demand into a demand that can make the production run smoothly and continuously. The method of demand smoothing is to smoothly allocate product orders to each planning interval according to the delivery date, importance and production capacity required by the product order, and according to the principle of the earliest delivery date and the most important priority.

嵌入式禁忌搜索仿真法的基本思想是以粗生产计划作为初始生产计划寻找一个可行计划与调度,然后在计划层用禁忌搜索寻找最好的计划,并对计划层生成的每个相邻计划用另一个禁忌搜索寻找经过快速仿真计算具有最好性能指标的调度,直至使生产计划与调度同时达到优化。因一个禁忌搜索嵌套着另一禁忌搜索并用快速仿真计算调度指标,故取名为嵌入式禁忌搜索仿真法。交替式禁忌搜索仿真法的基本思想是:(1)以粗生产计划作为初始生产计划寻找一个可行计划与调度;(2)给定调度,用禁忌搜索寻找经过快速仿真计算具有最好性能指标的计划;(3)反过来给定计划,又用另一禁忌搜索寻找经过快速仿真计算具有最好性能指标的调度;(4)交替使用(2)、(3)两步直至找到最好的计划与调度。由于分别对计划与调度交替使用两个禁忌搜索并用快速仿真计算其性能指标,故称为交替式禁忌搜索仿真法。串行式禁忌搜索仿真法的基本思想是:(1)以粗生产计划作为初始生产计划寻找一个可行计划与调度;(2)从可行计划开始,用禁忌搜索寻找基于规则调度并经过快速仿真计算具有最好性能指标的计划;(3)对于最好的计划,使用另一禁忌搜索寻找经过快速仿真计算具有最好性能指标的调度。由于对计划和调度依次使用禁忌搜索并用快速仿真计算其性能指标,故称为串行式禁忌搜索仿真法。这三种方法的快速仿真均通过用扩展随机高级判断Petri网建立调度仿真模型和面向对象的技术米实现,并用可变时间流来控制仿真进程。此处快速的含义是无文字和图形的动态显示,仅仅通过快速仿真计算给定调度的性能指标。上述方法和仿真均用Microsoft VisualC++5.0编成软件。在用上述方法获得性能指标最好的生产计划与调度后,就可依此安排生产并控制混批装配线的运行。与传统方法相比,本发明的优点是将解析方法、禁忌搜索和快速调度仿真有机地结合在一起,有效解决了混批装配线的生产计划、调度与仿真的集成优化问题,并保证至少有一个可行解。嵌入式禁忌搜索仿真法的问题求解速度最慢,但获得的性能指标往往最好;串行式禁忌搜索仿真法的问题求解速度和获得的性能指标正好与嵌入式禁忌搜索仿真法相反;而交替式禁忌搜索仿真法则介于嵌入式禁忌搜索仿真法和串行式禁忌搜索仿真法之间。嵌入式禁忌搜索仿真法适合求解小问题,交替式禁忌搜索仿真法适合求解中规模问题,串行式禁忌搜索仿真法适合求解大规模问题。The basic idea of the embedded tabu search simulation method is to use the rough production plan as the initial production plan to find a feasible plan and schedule, then use the tabu search to find the best plan at the planning layer, and use Another tabu search looks for the scheduling with the best performance index after fast simulation calculation, until the production planning and scheduling are optimized at the same time. Because a tabu search nests another tabu search and uses fast simulation to calculate the scheduling index, it is called the embedded tabu search simulation method. The basic idea of the alternate tabu search simulation method is: (1) use the rough production plan as the initial production plan to find a feasible plan and schedule; (2) given the schedule, use the tabu search to find the best performance index after fast simulation calculation. Plan; (3) Given the plan in turn, use another tabu search to find the schedule with the best performance index after fast simulation calculation; (4) Use (2) and (3) alternately until the best plan is found with scheduling. Since two tabu searches are alternately used for planning and scheduling respectively and their performance indicators are calculated by fast simulation, it is called alternate tabu search simulation method. The basic idea of the serial tabu search simulation method is: (1) use the rough production plan as the initial production plan to find a feasible plan and schedule; (2) start from the feasible plan, use tabu search to find a rule-based schedule and perform fast simulation calculations The plan with the best performance index; (3) For the best plan, use another tabu search to find the schedule with the best performance index after fast simulation calculation. Because tabu search is used sequentially for planning and scheduling and its performance index is calculated by fast simulation, it is called serial tabu search simulation method. The fast simulation of these three methods is realized by using the extended stochastic high-level judgment Petri net to establish the scheduling simulation model and the object-oriented technology meter, and the variable time flow is used to control the simulation process. The meaning of fast here is that there is no dynamic display of text and graphics, and only the performance index of a given schedule is calculated through fast simulation. The above methods and simulations are compiled into software with Microsoft VisualC ++ 5.0. After obtaining the production plan and scheduling with the best performance index by the above method, the production can be arranged accordingly and the operation of the mixed batch assembly line can be controlled. Compared with the traditional method, the present invention has the advantage of organically combining the analysis method, tabu search and fast scheduling simulation, effectively solving the integrated optimization problem of production planning, scheduling and simulation of the mixed-batch assembly line, and ensuring that at least one Feasible solution. The problem solving speed of the embedded tabu search simulation method is the slowest, but the performance index obtained is often the best; the problem solving speed and the obtained performance index of the serial tabu search simulation method are just opposite to the embedded tabu search simulation method; The formula tabu search simulation method is between the embedded tabu search simulation method and the serial tabu search simulation method. The embedded tabu search simulation method is suitable for solving small problems, the alternating tabu search simulation method is suitable for solving medium-scale problems, and the serial tabu search simulation method is suitable for solving large-scale problems.

有益效果:本发明解决了混批装配线生产计划、调度与仿真的集成优化控制问题,给出了粗生产计划的生成方法,提出了嵌入式禁忌搜索仿真法、交替式禁忌搜索仿真法和串行式禁忌搜索仿真法并给出了它们的计算复杂性和实现方法,为实现调度仿真建立了混批装配线的ESHLEP-N模型并给出了面向对象的实现方法。在此基础上,采用Microsoft Visual C++ 5.0开发了混批装配线的生产计划、调度与仿真的集成优化软件。借助这些软件,用大量算例进行了比较研究,结果表明:Beneficial effects: the present invention solves the problem of integrated optimization control of production planning, scheduling and simulation of mixed-batch assembly line, provides the generation method of rough production plan, proposes embedded tabu search simulation method, alternate tabu search simulation method and serial The tabu search simulation methods are presented and their computational complexity and implementation methods are given. The ESHLEP-N model of the mixed-batch assembly line is established for the scheduling simulation and an object-oriented implementation method is given. On this basis, an integrated optimization software for production planning, scheduling and simulation of mixed batch assembly line was developed by using Microsoft Visual C ++ 5.0. With the help of these software, a comparative study has been carried out with a large number of calculation examples, and the results show that:

(1)与传统方法相比,本发明的优点是将解析方法、禁忌搜索和快速调度仿真有机地结合在一起,有效解决了混批装配线生产计划与调度的集成优化问题,并保证至少有一个可行解。(1) Compared with the traditional method, the advantage of the present invention is that the analysis method, tabu search and fast scheduling simulation are organically combined, effectively solving the integrated optimization problem of production planning and scheduling of mixed batch assembly lines, and ensuring that at least one Feasible solution.

(2)嵌入式禁忌搜索仿真法和交替式禁忌搜索仿真法的问题求解时间平均比串行式禁忌搜索仿真法分别长38.69和1.73倍,但嵌入式禁忌搜索仿真法和交替式禁忌搜索仿真法的最好性能指标且平均比串行式禁忌搜索仿真法分别少7.78%和5.16%。(2) The problem solving time of the embedded tabu search simulation method and the alternating tabu search simulation method is 38.69 and 1.73 times longer than the serial tabu search simulation method respectively, but the embedded tabu search simulation method and the alternating tabu search simulation method The best performance index and average less than the serial tabu search simulation method were 7.78% and 5.16%.

(3)嵌入式禁忌搜索仿真法适合求解小问题,交替式禁忌搜索仿真法适合求解中规模问题,串行式禁忌搜索仿真法适合求解大规模问题。如果问题非常大,则建议使用算法4的Step 1-2求出可行计划与调度作为问题的解。(3) The embedded tabu search simulation method is suitable for solving small problems, the alternating tabu search simulation method is suitable for solving medium-scale problems, and the serial tabu search simulation method is suitable for solving large-scale problems. If the problem is very large, it is recommended to use Step 1-2 of Algorithm 4 to find the feasible plan and scheduling as the solution of the problem.

(4)嵌入式禁忌搜索仿真法、交替式禁忌搜索仿真法和串行式禁忌搜索仿真法的自可行计划与调度开始到最好计划与调度为止的平均性能指标改善率分别为18.87%、22.05%和25.49%。(4) The average performance index improvement rates of embedded tabu search simulation method, alternating tabu search simulation method and serial tabu search simulation method from feasible planning and scheduling to best planning and scheduling are 18.87% and 22.05% respectively. % and 25.49%.

(5)具有随机特性的混批装配线的生产计划与调度的集成优化问题可用嵌入式禁忌搜索仿真法、交替式禁忌搜索仿真法和串行式禁忌搜索仿真法的蒙特卡罗运行来求解。(5) The integrated optimization problem of production planning and scheduling of mixed-batch assembly line with random characteristics can be solved by Monte Carlo operation of embedded tabu search simulation method, alternate tabu search simulation method and serial tabu search simulation method.

(6)ESHLEP-N具有形象直观,结构简单,节点少,描述性好,决策能力强,双重令牌和双重标识等优点,非常适合混批装配线的建模和调度仿真。(6) ESHLEP-N has the advantages of intuitive image, simple structure, few nodes, good description, strong decision-making ability, double token and double identification, etc., which is very suitable for modeling and scheduling simulation of mixed batch assembly line.

此外,本发明的嵌入式禁忌搜索仿真法、交替式禁忌搜索仿真法和串行式禁忌搜索仿真法也可用于求解其目标函数和约束不同于式(9)-(11)的模型。In addition, the embedded tabu search simulation method, alternate tabu search simulation method and serial tabu search simulation method of the present invention can also be used to solve models whose objective functions and constraints are different from equations (9)-(11).

采用嵌入式禁忌搜索仿真法、交替式禁忌搜索仿真法和串行式禁忌搜索仿真法获得最好计划与调度后,可通过动画调度仿真观察混批装配线的最优调度过程,判断是否满足客户的产品需求。如果经过动画仿真,认为不满足需求,则可对最好计划与调度作适当修改后再仿真。如果经过动画仿真,认为满足需求,则可将其作为准备下达执行的正式计划与调度。然后,就可以根据上述混批装配线的正式计划(产品种类与数量)与调度(装配顺序)安排生产,并根据动画仿真时确定的装配线移动速度控制混批装配线的运行。After using the embedded tabu search simulation method, alternate tabu search simulation method and serial tabu search simulation method to obtain the best plan and scheduling, you can observe the optimal scheduling process of the mixed-batch assembly line through animation scheduling simulation to judge whether it meets the customer's requirements product demand. If after animation simulation, it is considered that the requirements are not met, the best plan and scheduling can be modified appropriately and then simulated. If it is considered to meet the requirements after animation simulation, it can be used as a formal plan and schedule to be issued for execution. Then, the production can be arranged according to the formal plan (product type and quantity) and scheduling (assembly sequence) of the above-mentioned mixed-batch assembly line, and the operation of the mixed-batch assembly line can be controlled according to the moving speed of the assembly line determined during animation simulation.

                         附图说明Description of drawings

图1是线型装配线示意图。Figure 1 is a schematic diagram of a linear assembly line.

图2是U型装配线示意图。Figure 2 is a schematic diagram of a U-shaped assembly line.

图3是混批装配线的计划、调度与仿真的集成优化控制方法总流程示意图。Fig. 3 is a schematic diagram of the overall flow of the integrated optimization control method of planning, scheduling and simulation of the mixed batch assembly line.

图4是嵌入式禁忌搜索仿真法流程图。Fig. 4 is a flowchart of the embedded tabu search simulation method.

图5是基于禁忌搜索的调度优化流程图。Fig. 5 is a flowchart of scheduling optimization based on tabu search.

图6是交替式禁忌搜索仿真法流程图。Fig. 6 is a flow chart of the alternate tabu search simulation method.

图7是串行式禁忌搜索仿真法流程图。Fig. 7 is a flow chart of the serial tabu search simulation method.

图8是相应于给定计划的调度确定算法流程图。Fig. 8 is a flowchart of a schedule determination algorithm corresponding to a given plan.

图9是混批装配线的ESHLEP-N图模型。Figure 9 is the ESHLEP-N graph model of the mixed batch assembly line.

图10是系统变迁处理的主流程图。FIG. 10 is a main flowchart of system transition processing.

图11是“待装品上装配线”变迁t1的处理流程图。Fig. 11 is a processing flow chart of transition t 1 of "products to be loaded onto the assembly line".

图12是“开始装配”变迁t2的处理流程图。Fig. 12 is a processing flow chart of the "start assembly" transition t2 .

图13是“完成装配”变迁t3的处理流程图。Fig. 13 is a processing flow chart of the "assemble complete" transition t3 .

图14是“故障发生”变迁t4的处理流程图。Fig. 14 is a processing flow chart of the transition t4 of "fault occurrence".

图15是变迁“故障结束”t5的处理流程图。Fig. 15 is a flowchart of the transition "failure end" t5 .

图16是阻塞状态下变迁的处理流程图。Fig. 16 is a flow chart of transition processing in the blocked state.

图17是混批装配线的生产计划、调度与仿真的集成优化软件结构图。Figure 17 is a structural diagram of integrated optimization software for production planning, scheduling and simulation of a mixed-batch assembly line.

                            具体实施方式 Detailed ways

本发明解决其技术问题所采用的技术方案和具体实施方式如下The technical solution adopted by the present invention to solve its technical problems and the specific implementation methods are as follows

1、混批装配线:1. Mixed batch assembly line:

本发明涉及的混批装配线有两种,即线型装配线(见图1)和U型装配线(见图2)。图中,工位1和m(1<k<m)分别表示产品的上线装配工位和下线装配工位,箭头表示产品在装配过程中的移动方向。每个装配工位可以分布在装配线的两侧,也可以在单侧,并有缓冲区。每一个工位在任何时候至多只能装一个产品。线上的产品总数在任何时候至多等于线上的工位数m,也就是,如果在某一时刻每一个工位都有一个产品,则只有等一个产品在最后一个工位m装好并下线后,才能在工位1上线一个待装品(即等待装配的产品)。装配线的同步移动速度是可变的并在线上无满缓冲区时由其最后一个工位m的装配速度确定,而在有满缓冲区时由其瓶颈工位的装配速度确定。由于每一个工位装配不同的产品可能需要不同的时间,所以当产品种类、混批发生变化时瓶颈工位可能发生转移。这里的缓冲区是一个逻辑上的和虚拟的概念。事实上,并无真正缓冲区,只是允许装配工人超越自己的工作区并在其它工位的工作区完成装配任务而在逻辑上形成虚拟缓冲区。The mixed batch assembly line that the present invention relates to has two kinds, promptly linear assembly line (see Fig. 1) and U-shaped assembly line (see Fig. 2). In the figure, stations 1 and m (1<k<m) represent the on-line assembly station and the off-line assembly station of the product respectively, and the arrows represent the moving direction of the product during the assembly process. Each assembly station can be distributed on both sides of the assembly line, or on one side, with a buffer zone. Each station can only hold at most one product at any time. The total number of products on the line is at most equal to the number m of stations on the line at any time, that is, if there is one product at each station at a certain moment, the only way to wait is for a product to be installed and placed at the last station m. A product to be loaded (that is, a product waiting to be assembled) can be put on the line at station 1 only after it has been online. The synchronous moving speed of the assembly line is variable and is determined by the assembly speed of the last station m when there is no full buffer on the line, and determined by the assembly speed of the bottleneck station when there is a full buffer. Since it may take different time for each station to assemble different products, the bottleneck station may be transferred when the product type and mixed batch change. The buffer here is a logical and virtual concept. In fact, there is no real buffer zone, but a virtual buffer zone is logically formed by allowing assembly workers to go beyond their own work area and complete assembly tasks in the work area of other stations.

2、粗生产计划:2. Rough production plan:

正如前面所述,一条混批装配线共有m个装配工位。现设计划区间内依据装配订单共需装n种产品且第i种产品需di个。再将装配线简化为一个Flow shop问题,且最优计划的目标是最大限度地满足产品需求并使各装配工位的准备成本和空闲时间尽可能少,则可建立求解最优粗生产计划的混合整数规划模型如下:As mentioned earlier, a mixed-batch assembly line has m assembly stations in total. According to the assembly order, a total of n products are required to be installed in the planning interval of the current design, and d i products are required for the i-th product. Then the assembly line is simplified as a flow shop problem, and the goal of the optimal plan is to satisfy the product demand to the greatest extent and to minimize the preparation cost and idle time of each assembly station, then a hybrid solution for the optimal rough production plan can be established The integer programming model is as follows:

minmin JJ == &Sigma;&Sigma; ii == 11 nno [[ aa ii ++ (( xx ii -- dd ii )) ++ ++ aa ii -- (( dd ii -- xx ii )) ++ ]] ++ &Sigma;&Sigma; jj == 11 mm &Sigma;&Sigma; ii == 11 nno bb ijij sgnsgn (( xx ii )) ++ &Sigma;&Sigma; jj == 11 mm cc jj &tau;&tau; jj .. .. .. .. .. .. (( 11 ))

sthe s .. tt .. &Sigma;&Sigma; ii == 11 nno tt ijij xx ii ++ &Sigma;&Sigma; ii == 11 nno &Delta;&Delta; tt ijij sgnsgn (( xx ii )) ++ &tau;&tau; jj == &beta;&beta; jj .. .. .. .. .. .. .. (( 22 ))

xi≥0且为整数,τj≥0,j=1,2,…,m                            (3)式中:n为计划区间内需装配的产品种类数;m为混批装配线上的装配工位数;xi为计划区间内装配第i种产品的产量,是整数;sgn(xi)为符号函数,当xi>0时,sgn(xi)取1,否则取0;di为计划区间内对第i种产品的需求,是整数;τj为计划区间内第j个装配工位的空闲时间;βj为计划区间内第j个装配工位的可用时间,是从计划区间内的生产总时间中扣除设备故障维修时间等所剩的时间;ai +为超产一个第i种产品的存储及占用流动资金的成本;ai -为欠产一个第i种产品而违约受罚的成本;bij为第i种产品在第j个装配工位上的准备成本;cj为与第j个装配工位资源闲置有关的成本系数;tij为第j个装配工位装配第i种产品所需要的时间;Δtij为第i种产品在第j个装配工位上的准备时间;(c)+为max(0,c)。x i ≥ 0 and an integer, τ j ≥ 0, j=1, 2, ..., m (3) In the formula: n is the number of product types to be assembled in the planning interval; m is the number of assembly stations on the mixed batch assembly line ; x i is the output of the i-th product assembled in the planning interval, which is an integer; sgn(xi ) is a sign function, when x i > 0, sgn( xi ) takes 1, otherwise it takes 0; d i is the plan The demand for the i-th product in the interval is an integer; τ j is the idle time of the j-th assembly station in the planning interval; β j is the available time of the j-th assembly station in the planning interval, which is from the planning interval The remaining time after deducting equipment failure maintenance time from the total production time ; a i + is the cost of storing and occupying working capital for overproduction of one i-th product; cost; b ij is the preparation cost of the i-th product at the j-th assembly station; c j is the cost coefficient related to the idle resources of the j-th assembly station; t ij is the j-th assembly station to assemble the i-th The time required for a product; Δt ij is the preparation time of the i-th product at the j-th assembly station; (c) + is max(0, c).

式(1)-(3)的混合整数非线性规划模型可转化为混合整数线性规划模型如下:The mixed integer nonlinear programming model of formulas (1)-(3) can be transformed into a mixed integer linear programming model as follows:

minmin JJ == &Sigma;&Sigma; ii == 11 nno (( aa ii ++ &Delta;&Delta; ++ xx ii ++ aa ii -- &Delta;&Delta; -- xx ii )) ++ &Sigma;&Sigma; jj == 11 mm &Sigma;&Sigma; ii == 11 nno bb ijij ythe y ii ++ &Sigma;&Sigma; jj == 11 mm cc jj &tau;&tau; jj .. .. .. .. .. .. (( 44 ))

sthe s .. tt .. &Sigma;&Sigma; ii == 11 nno tt ijij xx ii ++ &Sigma;&Sigma; ii == 11 nno &Delta;&Delta; tt ijij ythe y ii ++ &tau;&tau; jj == &beta;&beta; jj -- -- -- (( 55 ))

xi+xi-xi=di                                                       (6)x i+ x i- x i =d i (6)

Byi≥xi                                                                  (7)By i ≥ x i (7)

xi≥0且为整数,yi∈(0,1),τj≥0,Δ+xi≥0,Δ-xi≥0,j=1,2,…,m    (8)x i ≥ 0 and an integer, y i ∈ (0, 1), τ j ≥ 0, Δ + x i ≥ 0, Δ - x i ≥ 0, j = 1, 2, ..., m (8)

式中:yi是布尔变量,当xi>0时为1,否则为0;B是一个大的正数。In the formula: y i is a Boolean variable, it is 1 when xi > 0, otherwise it is 0; B is a large positive number.

到此,就可用分枝定界法求解式(4)-(8)的混合整数线性规划模型,以获取使各装配工位的准备成本和空闲时间尽可能少并尽可能满足产品需求的粗生产计划。At this point, the mixed integer linear programming model of formulas (4)-(8) can be solved by the branch and bound method to obtain a rough solution that minimizes the preparation cost and idle time of each assembly station and satisfies the product demand as much as possible. Production Plan.

3、生产计划、调度与仿真的集成优化方法及其实现:3. The integrated optimization method of production planning, scheduling and simulation and its realization:

为加快问题求解速度,在式(4)-(8)的模型中忽略了装配线的细节,并由此求出粗生产计划作为后续生产计划、调度与仿真的集成优化问题迭代求解的初始计划。另一方面,考虑细节的同步装配线调度往往是一个非结构化问题,很难用解析的方法来求解,较为可行的办法是使用基于可变时间流的快速调度仿真。此处快速的含义是无文字和图形的动态显示,仅仅通过快速仿真计算给定调度的性能指标。至于最优计划与调度的迭代选择问题则由嵌入式禁忌搜索仿真法、交替式禁忌搜索仿真法、和串行式禁忌搜索仿真法等三种不同方法来解决。In order to speed up the solution of the problem, the details of the assembly line are ignored in the model of equations (4)-(8), and the rough production plan is obtained as the initial plan for the iterative solution of the integrated optimization problem of subsequent production planning, scheduling and simulation. On the other hand, synchronous assembly line scheduling considering details is often an unstructured problem, which is difficult to solve analytically. A more feasible way is to use fast scheduling simulation based on variable time flow. The meaning of fast here is that there is no dynamic display of text and graphics, and only the performance index of a given schedule is calculated through fast simulation. As for the iterative selection problem of optimal planning and scheduling, it is solved by three different methods: embedded tabu search simulation method, alternate tabu search simulation method, and serial tabu search simulation method.

3.1嵌入式禁忌搜索仿真法及其实现:3.1 Embedded tabu search simulation method and its realization:

为节省产品装配准备时间,同种产品集中装配,不分割成多个装配任务,并在调度时仅占用一个排序位置。参照式(1)-(3),则求解混批装配线生产计划、调度与仿真的集成优化问题的数学模型可描述如下:In order to save product assembly preparation time, the same product is assembled in a centralized manner without being divided into multiple assembly tasks, and only occupies one sorting position during scheduling. Referring to formulas (1)-(3), the mathematical model for solving the integrated optimization problem of production planning, scheduling and simulation of mixed-batch assembly line can be described as follows:

MinMin xx ,, SS GG (( xx ,, SS )) == MinMin xx ,, SS {{ &Sigma;&Sigma; ii == 11 NN [[ aa &mu;&mu; (( SS ,, ii )) ++ (( xx &mu;&mu; (( SS ,, ii )) -- dd &mu;&mu; (( SS ,, ii )) )) ++ ++ aa &mu;&mu; (( SS ,, ii )) -- (( dd &mu;&mu; (( SS ,, ii )) -- xx &mu;&mu; (( SS ,, ii )) )) ++ ]]

++ &Sigma;&Sigma; jj == 11 mm &Sigma;&Sigma; ii == 11 nno bb &mu;&mu; (( SS ,, ii )) jj sgnsgn (( xx &mu;&mu; (( SS ,, ii )) )) ++ &Sigma;&Sigma; jj == 11 mm cc jj &tau;&tau; jj ++ rfrf (( xx ,, SS ))

++ qq &Sigma;&Sigma; jj == 11 mm [[ (( &beta;&beta; jj -- &tau;&tau; jj )) -- 11 mm &Sigma;&Sigma; jj == 11 mm (( &beta;&beta; jj -- &tau;&tau; jj )) ]] 22 }} .. .. .. .. .. .. (( 99 ))

sthe s .. tt .. &Sigma;&Sigma; ii == 11 nno tt &mu;&mu; (( SS ,, ii )) jj xx &mu;&mu; (( SS ,, ii )) ++ &Sigma;&Sigma; ii == 11 nno &Delta;&Delta; tt &mu;&mu; (( SS ,, ii )) jj sgnsgn (( xx &mu;&mu; (( SS ,, ii )) )) ++ &tau;&tau; jj == &beta;&beta; jj .. .. .. .. .. .. (( 1010 ))

xμ(S,i)≥0且为整数,τj≥0,j=1,2,…,m                           (11)x μ(S, i) ≥0 and an integer, τ j ≥0, j=1, 2,..., m (11)

式中:μ(S,i)为n种产品或其中部分通过装配线的顺序(调度)S中的第i个位置所对应的产品种类,如果对于h≤i≤n有μ(S,i)=0,则表示调度S中最多只包含h-1种产品;bμ(S,i)j为第μ(S,i)种产品在第j个装配工位上的准备成本;Δtμ(S,i)j为第μ(S,i)种产品在第j个装配工位上的准备时间;x=(xμ(S,1),xμ(S,2),…,xμ(S,n))T为生产计划向量;f(x,S)为产品装配任务全部完成的时间(调度跨度),由相应计划和调度共同决定;r为任务完成时间权系数;q为各装配工位负荷均衡权系数。In the formula: μ(S, i) is n kinds of products or the product category corresponding to the i-th position in the sequence (scheduling) S of n products or some of them passing through the assembly line, if for h≤i≤n there is μ(S,i) = 0, it means that the scheduling S only contains at most h-1 products; b μ(S, i)j is the preparation cost of the μ(S, i)th product at the j assembly station; Δt μ( S, i)j is the preparation time of the μ(S, i)th product at the j assembly station; x=(x μ(S, 1) , x μ(S, 2),… , x μ (S, n) ) T is the production plan vector; f(x, S) is the time (schedule span) for the completion of the product assembly task, which is determined by the corresponding planning and scheduling; r is the weight coefficient of task completion time; Assembly station load balancing weight coefficient.

禁忌搜索是由Glover提出的用于获取组合最优化难题近似解的一种高级启发式方法。在应用禁忌搜索法求解生产计划、调度与仿真的集成优化问题(9)-(11)之前,首先介绍两个概念,即相邻计划和相邻调度。设计划p**=(x1,x2,…,xn)T且对某些i有τj>tij>0,对j=1,2,…,m,则定义p=(x1,x2,…,xi-1,xi+1,xi+1,…,xn)T,p=(x1,x2,…,xi±1,…,xl1,…,xn)T和p=(x1,x2,…,xi-1,xi-1,xi+1,…,xn)T为p**的相邻计划。否则定义p=(x1,x2,…,xi±1,…,xl1,…,xn)T和p=(x1,x2,…,xi-1,xi-1,xi+1,…,xn)T为p**的相邻计划。可见p**的相邻计划最多可能有n2+n个。Tabu search is an advanced heuristic method proposed by Glover for obtaining approximate solutions to combinatorial optimization problems. Before applying the tabu search method to solve the integrated optimization problems (9)-(11) of production planning, scheduling and simulation, two concepts, namely adjacent planning and adjacent scheduling, are introduced first. Design plan p ** =(x 1 , x 2 ,...,x n ) T and for some i has τ j >t ij >0, for j=1, 2,..., m, then define p=(x 1 , x 2 , ..., x i-1 , x i+1 , x i+1 , ..., x n ) T , p=(x 1 , x 2 , ..., x i ±1, ..., x l  1, ..., x n ) T and p=(x 1 , x 2 , ..., x i-1 , x i-1 , x i+1 , ..., x n ) T is an adjacent plan of p ** . Otherwise define p=(x 1 , x 2 , . . . , xi ± 1 , . . . , x l 1 , . -1 , x i+1 , ..., x n ) T is the adjacent plan of p ** . It can be seen that there may be at most n 2 +n adjacent plans of p ** .

对于调度S**,我们定义仅交换S**中的两个元素而形成的调度为相邻于S**的调度。不失一般性,设初始调度S0中共包含三种产品,即S0={a,b,c},则依定义,相邻于S0的调度共有三种:S1={b,a,c},S2={c,b,a},S3={a,c,b}。注意相邻调度仅交换初始调度S0中的两个元素而得。如S1是仅交换S0中的a,b两个元素而得到的,是相邻于S0的调度;但{c,a,b}是交换S3中的a,c两个元素而得到的,不能直接交换S0中的两个元素而得,所以{c,a,b}不是相邻于S0的调度。一般地,对于包含n种产品的调度S**,则相邻调度共有n(n-1)/2种。For a schedule S ** , we define a schedule formed by exchanging only two elements in S ** as a schedule adjacent to S ** . Without loss of generality, suppose that the initial schedule S 0 contains three products, that is, S 0 = {a, b, c}, then by definition, there are three types of schedules adjacent to S 0 : S 1 = {b, a , c}, S 2 ={c,b,a}, S 3 ={a,c,b}. Note that adjacent schedules are obtained by exchanging only two elements in the original schedule S 0 . For example, S 1 is obtained by exchanging only two elements a and b in S 0 , which is a schedule adjacent to S 0 ; but {c, a, b} is obtained by exchanging two elements a and c in S 3 and obtained, cannot be obtained by directly exchanging two elements in S 0 , so {c, a, b} is not adjacent to S 0 . Generally, for a schedule S ** containing n products, there are n(n-1)/2 adjacent schedules.

目前,禁忌搜索法主要用于Flow shop调度,Job shop调度和制造单元形成等方面,而在混批装配线生产计划、调度方面的应用则非常少见。又本发明要解决的是计划、调度与仿真的集成优化问题,所以需要提出一种新的嵌入式禁忌搜索仿真法来解决。其基本思想是以粗生产计划作为初始解并用简化的禁忌搜索仿真法寻找一个可行计划与调度,然后在计划层用禁忌搜索寻找最好的计划,并对计划层生成的每个相邻计划用另一个禁忌搜索寻找经过快速仿真计算具有最好性能指标的调度,直至使生产计划与调度同时达到优化。因一个禁忌搜索嵌套着另一禁忌搜索并用快速仿真计算调度指标,故取名为嵌入式禁忌搜索仿真法。At present, the tabu search method is mainly used in flow shop scheduling, job shop scheduling and manufacturing unit formation, but its application in production planning and scheduling of mixed batch assembly lines is very rare. What the present invention is to solve is the integrated optimization problem of planning, scheduling and simulation, so a new embedded tabu search simulation method needs to be proposed to solve it. The basic idea is to use the rough production plan as the initial solution and use the simplified tabu search simulation method to find a feasible plan and schedule, then use the tabu search to find the best plan at the planning layer, and use Another tabu search looks for the scheduling with the best performance index after fast simulation calculation, until the production planning and scheduling are optimized at the same time. Because a tabu search nests another tabu search and uses fast simulation to calculate the scheduling index, it is called the embedded tabu search simulation method.

算法1:生产计划、调度与仿真的集成优化问题(9)-(11)的嵌入式禁忌搜索仿真法Algorithm 1: Embedded Tabu Search Simulation Method for Integrated Optimization Problems (9)-(11) of Production Planning, Scheduling and Simulation

Step 1初始化Step 1Initialization

(1)读取式(9)-(10)中的各种数据和参数。(1) Read various data and parameters in formulas (9)-(10).

(2)读取算法参数,包括生产计划禁忌表长度PT_size,给定的计划移动次数PM-max,调度禁忌表长度ST_size和给定的调度移动次数SM_max。(2) Read the algorithm parameters, including the length PT_size of the production plan taboo table, the given number of planned moves PM-max, the length of the scheduling taboo table ST_size and the given number of scheduled moves SM_max.

(3)设置G_best=M_big,PM_ctr=0,PT_list={φ},P_best=φ,S_best={φ}。(3) Set G_best=M_big, PM_ctr=0, PT_list={φ}, P_best=φ, S_best={φ}.

Step 2搜索初始可行计划与调度Step 2 Search for initial feasible plan and scheduling

(1)设置初始生产计划p0=x。(1) Set the initial production plan p 0 =x.

(2)设置当前计划p=p0,并调用算法2以搜索给定计划p的可行调度。(2) Set the current plan p=p 0 , and call Algorithm 2 to search for a feasible schedule for a given plan p.

(3)如果SC_flag=1且G(p,S***)<G_best,则设置p**←p,P_best←p,S_best←S***,G_best←G(p,S***)。然后转Step 3。(3) If SC_flag=1 and G(p, S *** )<G_best, then set p ** ←p, P_best←p, S_best←S *** , G_best←G(p, S *** ) . Then go to Step 3.

(4)生成p0的一个相邻计划p,设置p0=p。然后转Step 2的(2)。(4) Generate an adjacent plan p of p 0 and set p 0 =p. Then turn to Step 2 (2).

Step 3搜索最好计划与调度Step 3 Search for the best plan and schedule

(1)生成一个相邻于p**的所有可能计划集,并置G(p*,S***)=M_big。(1) Generate a set of all possible plans adjacent to p ** , and set G(p * , S *** )=M_big.

(2)对于该集合中的一个计划p,如果p不在PT_list中,则调用算法2以搜索对于给定计划p的最好调度,并更新当前相邻集中的最好计划:p*←p,G(p*,S***)←G(p,S***),如果SC_flag=1且G(p,S***)<G(p*,S***);否则丢弃p。如果计划禁忌表PT_list中的计划个数少于PT_size,将p加到PT_list的顶部。如此重复,直至做完p**的所有相邻计划。(2) For a plan p in this set, if p is not in PT_list, call Algorithm 2 to search for the best schedule for a given plan p, and update the best plan in the current adjacent set: p * ←p, G(p * , S *** )←G(p,S *** ), if SC_flag=1 and G(p,S *** )<G(p * ,S *** ); otherwise discard p . If the number of plans in the plan taboo table PT_list is less than PT_size, add p to the top of PT_list. Repeat this until all adjacent plans of p ** are completed.

(3)作一次计划移动:设置p**←p*,G(p**,S***)←G(p*,S***)且如果p**不在PT_list中则将p**加到PT_list的顶部;如果PT_list中的计划个数>PT_size,则从PT_list的底部删除一个最老的计划。(3) Make a planned move: set p ** ←p * , G(p ** , S *** )←G(p * , S *** ) and if p ** is not in the PT_list, set p * * Add to the top of PT_list; if the number of plans in PT_list>PT_size, delete the oldest plan from the bottom of PT_list.

(4)如果计划有改善,即如果G(p**,S***)<G_best,则更新最好解:P_best←p**,S_best←S***,G_best←G(p**,S***)。(4) If the plan is improved, that is, if G(p ** , S *** )<G_best, update the best solution: P_best←p ** , S_best←S *** , G_best←G(p ** , S *** ).

(5)更新到目前为止所作的计划移动次数:PM_ctr←PM_ctr+1。如果PM_ctr>PM_max,则停止迭代并转Step 4,否则转Step 3的(1)。(5) Update the number of planned moves made so far: PM_ctr←PM_ctr+1. If PM_ctr>PM_max, stop iteration and go to Step 4, otherwise go to (1) of Step 3.

Step 4输出结果Step 4 output result

输出P_best,S_best和G_best。Output P_best, S_best and G_best.

这里:M_big为一个很大的数;SC_flag为对于给定计划p是否存在满足约束(10)-(11)的调度的标志,SC_flag=1表示存在,SC_flag=0表示不存在;p*为在当前相邻计划集中的最好计划;p**为在紧前相邻计划集中的最好计划:P_best为到目前为止找到的最好生产计划;S***为相应计划的最好调度;S_best为针对到目前为止找到的最好生产计划,所找到的最好调度;G(p,S)为与生产计划p和调度S相对应的性能指标:G_best为到目前为止所达到的最好指标。Here: M_big is a very large number; SC_flag is a sign of whether there is a scheduling that satisfies constraints (10)-(11) for a given plan p, SC_flag=1 means that it exists, and SC_flag=0 means that it does not exist; p * is in The best plan in the current adjacent planning set; p ** is the best plan in the immediately preceding adjacent planning set: P_best is the best production plan found so far; S *** is the best scheduling of the corresponding plan; S_best is the best scheduling found for the best production plan found so far; G(p, S) is the performance index corresponding to the production plan p and scheduling S: G_best is the best achieved so far index.

算法2:基于禁忌搜索的调度优化Algorithm 2: Scheduling Optimization Based on Tabu Search

Step 1初始化Step 1Initialization

设置SM_ctr=0,调度禁忌表ST_list={φ}。Set SM_ctr=0, scheduling taboo table ST_list={φ}.

Step 2寻找初始调度Step 2 Find the initial schedule

(1)对给定的当前生产计划p,依次按最早交付期和最小批量等优先规则,确定初始调度S0,并置S**=S0,S***=S0,SC_flag=0。(1) For a given current production plan p, determine the initial schedule S 0 according to priority rules such as the earliest delivery date and the smallest batch, and set S ** = S 0 , S *** = S 0 , SC_flag = 0 .

(2)通过快速调度仿真,计算相应于p和S0的性能指标G(p,S0),并置G(p,S***)=G(p,S0)。(2) Calculate the performance index G(p, S 0 ) corresponding to p and S 0 through fast scheduling simulation, and set G(p, S *** )=G(p, S 0 ).

如果S0可行(即满足约束(10)-(11)),置SC_flag=1。If S 0 is feasible (ie satisfying constraints (10)-(11)), set SC_flag=1.

Step 3调度搜索Step 3 Schedule search

(1)生成一个相邻于紧前相邻调度集中的最好调度S**的所有可能调度集,并置G(p,S*)=M_big。(1) Generate all possible scheduling sets adjacent to the best scheduling S ** in the immediately preceding adjacent scheduling set, and set G(p, S * )=M_big.

(2)对于该集合中的一个调度S,如果S不在ST_list中,则通过快速调度仿真,计算调度性能指标G(p,S),并更新当前相邻集中的最好调度:S*←S,G(p,S*)←G(p,S),SC_flag=1如果S可行且G(p,S)<G(p,S*);S*←S,G(p,S*)←G(p,S)如果S和S*都不可行且G(p,S)<G(p,S*);否则丢弃S。如此重复,直至做完S**的所有相邻调度。(2) For a schedule S in this set, if S is not in ST_list, calculate the scheduling performance index G(p, S) through fast scheduling simulation, and update the best schedule in the current adjacent set: S * ← S , G(p, S * ) ← G(p, S), SC_flag=1 if S is feasible and G(p, S)<G(p, S * ); S * ←S, G(p, S * ) ←G(p,S) if neither S nor S * is feasible and G(p,S)<G(p,S * ); otherwise discard S. Repeat this until all adjacent scheduling of S ** is done.

(3)作一次调度移动;设置S**←S*,G(p,S**)←G(p,S*),并将S**加到ST_list的顶部;(3) Make a scheduling move; set S ** ←S * , G(p, S ** )←G(p, S * ), and add S ** to the top of ST_list;

如果ST_list中的调度个数>ST_size,则从ST_list的底部删除一个最老的调度。If the number of schedules in ST_list > ST_size, delete the oldest schedule from the bottom of ST_list.

(4)如果调度有改善,即S**可行且G(p,S**)<G(p,S***)或S**和S***都不可行且G(p,S**)<G(p,S***),则更新最好解:S***←S**,G(p,S***)←G(p,S**)。(4) If the scheduling is improved, that is, S ** is feasible and G(p, S ** ) < G(p, S *** ) or neither S ** nor S *** is feasible and G(p, S ** ** )<G(p, S *** ), update the best solution: S *** ← S ** , G(p, S *** ) ← G(p, S ** ).

(5)更新对当前计划所作的调度移动次数:SM_ctr←SM_ctr+1。如果SM_ctr>SM_max,则停止迭代并转Step 4;否则转Step 3的(1)。(5) Update the number of scheduling moves made on the current plan: SM_ctr←SM_ctr+1. If SM_ctr>SM_max, stop iteration and go to Step 4; otherwise go to (1) of Step 3.

Step 4返回Step 4Return

算法1 Step 2中的x是由求解式(4)-(8)所获得的粗生产计划并被当作算法的初始解以加快问题的求解速度,因为粗生产计划往往比随机选择的初始解更接近式(9)-(11)的真实解。尽管如此,由于式(4)-(8)忽略了装配线调度等方面的细节,由此获得的粗生产计划对式(9)-(11)来讲往往还是不可行。此外,从粗生产计划演变成可行计划的有效方法无疑是减少装配线的负荷,所以算法1 Step 2中的相邻计划可只定义为p=(x1,x2,…,xi-1,xi-1,xi+1,…,xn)T以加快获得初始可行解的速度。The x in Algorithm 1 Step 2 is the rough production plan obtained by solving equations (4)-(8) and is used as the initial solution of the algorithm to speed up the solution of the problem, because the rough production plan is often better than the randomly selected initial solution It is closer to the true solution of equations (9)-(11). However, since formulas (4)-(8) ignore details such as assembly line scheduling, the rough production plan thus obtained is often infeasible for formulas (9)-(11). In addition, the effective way to evolve from a rough production plan to a feasible plan is undoubtedly to reduce the load on the assembly line, so the adjacent plan in Algorithm 1 Step 2 can only be defined as p=(x 1 , x 2 ,…,xi -1 , x i-1 , x i+1 ,…, x n ) T to speed up the speed of obtaining the initial feasible solution.

如果混批装配线具有随机特性(如设备故障,装配时间发生变化等),可通过算法1的蒙特卡罗运行来求解其集成优化问题。具体做法是:(1)在每次蒙特卡罗运行之前,先按照各随机变量的分布函数计算各自的样本值并用这些样本值代替式(9)-(10)中的相应值,然后调用算法1;(2)在第一次蒙特卡罗运行时,算法1 Step 2中的x为粗生产计划,但第二次及以后的蒙特卡罗运行时,x则为前次蒙特卡罗运行后所获得的最好生产计划以加快其求解速度。因为尽管当前蒙特卡罗运行的样本值很可能同前次蒙特卡罗运行的不一样,但前次最好生产计划往往还是比粗生产计划更接近本次最优解;(3)所有蒙特卡罗运行结束后,需计算除最好调度以外的所有结果平均值,并用圆整后的最好计划平均值及随机参数平均值作为输入再一次调用算法2以获取相应的最好调度,最后将其和圆整的最好计划平均值及其它结果的平均值一起作为具有随机特性的混批装配线生产计划与调度集成优化问题的解。If the mixed-batch assembly line has random characteristics (such as equipment failure, assembly time changes, etc.), the integrated optimization problem can be solved by the Monte Carlo operation of Algorithm 1. The specific method is: (1) Before each Monte Carlo run, calculate the respective sample values according to the distribution function of each random variable and replace the corresponding values in formulas (9)-(10) with these sample values, and then call the algorithm 1; (2) In the first Monte Carlo run, x in Algorithm 1 Step 2 is the rough production plan, but in the second and subsequent Monte Carlo runs, x is the value after the previous Monte Carlo run The best production plan obtained to speed up its solution. Because although the sample value of the current Monte Carlo operation is likely to be different from that of the previous Monte Carlo operation, the best production plan of the previous time is often closer to the optimal solution than the rough production plan; (3) all Monte Carlo After running Luo, it is necessary to calculate the average value of all results except the best schedule, and use the rounded average value of the best plan and the average value of random parameters as input to call Algorithm 2 again to obtain the corresponding best schedule, and finally Together with the rounded average of the best plan and the average of other results, it is the solution of the integrated optimization problem of production planning and scheduling of mixed batch assembly line with stochastic characteristics.

算法1和算法2的程序流程图分别如图4和5所示。这样,根据算法1和算法2及其程序流程图,本发明者已采用Microsoft Visual C++5.0编程实现了求解上述混批装配线生产计划与调度集成优化问题的嵌入式禁忌搜索仿真法。The program flowcharts of Algorithm 1 and Algorithm 2 are shown in Figures 4 and 5, respectively. Thus, according to Algorithm 1 and Algorithm 2 and their program flow charts, the inventor has implemented the embedded tabu search simulation method for solving the above-mentioned mixed-batch assembly line production planning and scheduling integration optimization problem by using Microsoft Visual C ++ 5.0 programming.

算法1的计算复杂性是o(0.5n2(n2-1)×SM_max×PM_max)次仿真。如果n比较大,用算法1求解式(9)-(11)会需要太多的时间以致无法在可接受的时间内获得最优解。为此我们将提出另一种求解式(9)-(11)的算法,即交替式禁忌搜索仿真法。The computational complexity of Algorithm 1 is o(0.5n 2 (n 2 −1)×SM_max×PM_max) simulations. If n is relatively large, using Algorithm 1 to solve equations (9)-(11) will take too much time to obtain the optimal solution within an acceptable time. For this reason, we will propose another algorithm for solving equations (9)-(11), that is, the alternate tabu search simulation method.

3.2交替式禁忌搜索仿真法及其实现:3.2 Alternate tabu search simulation method and its realization:

交替式禁忌搜索仿真法的基本思想是:(1)以粗生产计划作为初始生产计划并用简化的禁忌搜索仿真法寻找一个可行计划与调度;(2)给定调度,用禁忌搜索寻找经过快速仿真计算具有最好性能指标的计划;(3)反过来给定计划,又用另一禁忌搜索寻找经过快速仿真计算具有最好性能指标的调度;(4)交替使用(2)、(3)两步直至找到最好的计划与调度。由于分别对计划与调度交替使用两个禁忌搜索并用快速仿真计算其性能指标,故称为交替式禁忌搜索仿真法。The basic idea of the alternate tabu search simulation method is: (1) use the rough production plan as the initial production plan and use the simplified tabu search simulation method to find a feasible plan and schedule; (2) given the schedule, use the tabu search to find Calculate the plan with the best performance index; (3) Given the plan in turn, use another tabu search to find the schedule with the best performance index after fast simulation calculation; (4) Use (2) and (3) alternately step until the best plan and schedule is found. Since two tabu searches are alternately used for planning and scheduling respectively and their performance indicators are calculated by fast simulation, it is called alternate tabu search simulation method.

算法3生产计划、调度与仿真的集成优化问题的交替式禁忌搜索仿真法Alternative Tabu Search Simulation Method for Integrated Optimization Problems of Algorithm 3 Production Planning, Scheduling and Simulation

Step 1初始化Step 1Initialization

(1)读取式(9)-(10)中的各种数据和参数。(1) Read various data and parameters in formulas (9)-(10).

(2)读取算法参数,包括生产计划禁忌表长度PT_size,给定的计划移动次数PM-max,调度禁忌表长度ST_size和给定的调度移动次数SM_max。(2) Read the algorithm parameters, including the length PT_size of the production plan taboo table, the given number of planned moves PM-max, the length of the scheduling taboo table ST_size and the given number of scheduled moves SM_max.

(3)设置G_best=M_big,PM_ctr=0,PT_list={φ},P_best=φ,S_best={φ}。(3) Set G_best=M_big, PM_ctr=0, PT_list={φ}, P_best=φ, S_best={φ}.

Step 2搜索初始可行计划与调度Step 2 Search for initial feasible plan and scheduling

(1)设置初始生产计划p0=x。(1) Set the initial production plan p 0 =x.

(2)设置当前计划p=p0,并调用算法2以搜索给定计划p的可行调度。(2) Set the current plan p=p 0 , and call Algorithm 2 to search for a feasible schedule for a given plan p.

(3)如果SC_flag=1且G(p,S***)<G_best,则设置p**←p,P_best←p,S_best←S***,G_best←G(p,S***)。然后转Step 3。(3) If SC_flag=1 and G(p, S *** )<G_best, then set p ** ←p, P_best←p, S_best←S *** , G_best←G(p, S *** ) . Then go to Step 3.

(4)生成p0的一个相邻计划p,设置p0=p。然后转Step 2的(2)。(4) Generate an adjacent plan p of p 0 and set p 0 =p. Then turn to Step 2 (2).

Step 3搜索最好计划与调度Step 3 Search for the best plan and schedule

(1)生成一个相邻于p**的所有可能计划集,并置G(p*,S***)=M_big。(1) Generate a set of all possible plans adjacent to p ** , and set G(p * , S *** )=M_big.

(2)对于该集合中的一个计划p,如果p不在PT_list中,则通过快速调度仿真计算相应p和S***的性能指标G(p,S***),并更新当前相邻集中的最好计划:p*←p,G(p*,S***)←G(p,S***),如果SC_flag=1且G(p,S***)<G(p*,S***);否则丢弃p。如果计划禁忌表PT_list中的计划个数少于PT_size,将p加到PT_list的顶部。如此重复,直至做完p**的所有相邻计划。(2) For a plan p in the set, if p is not in the PT_list, calculate the performance index G(p, S *** ) corresponding to p and S *** through fast scheduling simulation, and update the current adjacent set The best plan for : p * ← p, G(p * , S *** ) ← G(p, S *** ), if SC_flag=1 and G(p, S *** )<G(p * , S *** ); otherwise discard p. If the number of plans in the plan taboo table PT_list is less than PT_size, add p to the top of PT_list. Repeat this until all adjacent plans of p ** are completed.

(3)调用算法2以搜索对于给定p*的最好调度S***(3) Algorithm 2 is invoked to search for the best schedule S *** for a given p * .

(4)作一次计划移动:设置p**←p*,G(p**,S***)←G(p*,S***)且如果p**不在PT_list中则将p**加到PT_list的顶部;如果PT_list中的计划个数>PT_size,则从PT_list的底部删除一个最老的计划。(4) Make a planned move: set p ** ←p * , G(p ** , S *** )←G(p * , S *** ) and if p ** is not in the PT_list, set p * * Add to the top of PT_list; if the number of plans in PT_list>PT_size, delete the oldest plan from the bottom of PT_list.

(5)如果计划有改善,即如果G(p**,S***)<G_best,则更新最好解:P_best←p**,S_best←S***,G_best←G(p**,S***)。(5) If the plan is improved, that is, if G(p ** , S *** )<G_best, update the best solution: P_best←p ** , S_best←S *** , G_best←G(p ** , S *** ).

(6)更新到目前为止所作的计划移动次数:PM_ctr←PM_ctr+1。如果PM_ctr>PM_max,则停止迭代并转Step 4,否则转Step 3的(1)。(6) Update the number of planned moves made so far: PM_ctr←PM_ctr+1. If PM_ctr>PM_max, stop iteration and go to Step 4, otherwise go to (1) of Step 3.

Step 4 输出结果Step 4 output result

输出P_best,S_best和G_best。Output P_best, S_best and G_best.

算法3的程序流程图如图6所示。这样,根据算法3及其程序流程图,本发明者已采用MicrosoftVisual C++5.0编程实现了求解上述混批装配线生产计划与调度集成优化问题的交替式禁忌搜索仿真法。The program flow chart of Algorithm 3 is shown in Figure 6. In this way, according to Algorithm 3 and its program flow chart, the inventor has implemented the alternate tabu search simulation method for solving the above-mentioned mixed-batch assembly line production planning and scheduling integration optimization problem by using MicrosoftVisual C ++ 5.0 programming.

算法3的计算复杂性是o((n2+n+0.5n(n-1)SM_max)PM_max)次仿真。如果n足够大,则算法1的复杂性是o(n4),而算法3是o(n2)。所以算法3比算法1快得多,但后者往往比前者获得更好解。如果n非常大,即使算法3也无法在可接受的时间内获得最优或次优解。为此,我们将提出串行式禁忌搜索仿真法来求解式(9)-(11)。The computational complexity of Algorithm 3 is o((n 2 +n+0.5n(n-1)SM_max)PM_max) simulations. If n is large enough, the complexity of Algorithm 1 is O(n 4 ), while Algorithm 3 is O(n 2 ). So Algorithm 3 is much faster than Algorithm 1, but the latter tends to get better solutions than the former. If n is very large, even Algorithm 3 cannot achieve optimal or suboptimal solutions in acceptable time. To this end, we will propose a serial tabu search simulation method to solve equations (9)-(11).

3.3串行式禁忌搜索仿真法及其实现3.3 Serial tabu search simulation method and its realization

无疑,加速求解过程的一种有效方法是减少算法的计算复杂性,也就是减少为获取最好调度所做的仿真总次数。为此,串行式禁忌搜索仿真法的基本思想是:(1)以粗生产计划作为初始计划并用规则调度仿真法寻找一个可行计划与调度;(2)从可行计划开始,用禁忌搜索寻找基于规则调度并经过快速仿真计算具有最好性能指标的计划;(3)对于最好的计划,使用另一禁忌搜索寻找经过快速仿真计算具有最好性能指标的调度。由于对计划和调度依次使用禁忌搜索并用快速仿真计算其性能指标,故称为串行式禁忌搜索仿真法。Undoubtedly, an effective way to speed up the solution process is to reduce the computational complexity of the algorithm, that is, to reduce the total number of simulations done to obtain the best schedule. For this reason, the basic idea of the serial tabu search simulation method is: (1) use the rough production plan as the initial plan and use the rule scheduling simulation method to find a feasible plan and schedule; (2) start from the feasible plan, use the tabu search to find the Regular scheduling and the plan with the best performance index calculated by fast simulation; (3) For the best plan, another tabu search is used to find the schedule with the best performance index calculated by fast simulation. Because tabu search is used sequentially for planning and scheduling and its performance index is calculated by fast simulation, it is called serial tabu search simulation method.

算法4生产计划、调度与仿真的集成优化问题的串行式禁忌搜索仿真法Algorithm 4 A serial tabu search simulation method for integrated optimization problems of production planning, scheduling and simulation

Step 1初始化Step 1Initialization

(1)读取式(9)-(10)中的各种数据和参数。(1) Read various data and parameters in formulas (9)-(10).

(2)读取算法参数,包括生产计划禁忌表长度PT_size,给定的计划移动次数PM-max,调度禁忌表长度ST_size和给定的调度移动次数SM_max。(2) Read the algorithm parameters, including the length PT_size of the production plan taboo table, the given number of planned moves PM-max, the length of the scheduling taboo table ST_size and the given number of scheduled moves SM_max.

(3)设置G_best=M_big,PM_ctr=0,PT_list={φ},P_best=φ,S_best={φ}。(3) Set G_best=M_big, PM_ctr=0, PT_list={φ}, P_best=φ, S_best={φ}.

Step 2搜索可行计划Step 2Search for feasible plans

(1)设置初始生产计划p0=x。(1) Set the initial production plan p 0 =x.

(2)设置当前计划p=p0,并调用算法5以确定相应于p的调度。(2) Set the current plan p=p 0 , and call Algorithm 5 to determine the schedule corresponding to p.

(3)如果SC_flag=1且G(p,S)<G_best,则设置p**←p,P_best←p,S_best←S,G_best←G(p,S)。然后转Step 3。(3) If SC_flag=1 and G(p, S)<G_best, set p ** ←p, P_best←p, S_best←S, G_best←G(p, S). Then go to Step 3.

(4)生成p0的一个相邻计划p,设置p0=p。然后转Step2的(2)。(4) Generate an adjacent plan p of p 0 and set p 0 =p. Then go to (2) of Step2.

Step 3搜索最好计划Step 3 Search for the best plan

(1)生成一个相邻于p**的所有可能计划集,并置G(p*,S)=M_big。(1) Generate a set of all possible plans adjacent to p ** , and set G(p * , S)=M_big.

(2)对于该集合中的一个计划p,如果p不在PT_list中,则调用算法5以确定相应于p的调度,并更新当前相邻集中的最好计划:P*←p,G(p*,S)←G(p,S),如果SC_flag=1且G(p,S)<G(p*,S);否则丢弃p。如果计划禁忌表PT_list中的计划个数少于PT_size,将p加到PT_list的顶部。如此重复,直至做完p**的所有相邻计划。(2) For a plan p in this set, if p is not in the PT_list, call Algorithm 5 to determine the schedule corresponding to p, and update the best plan in the current adjacent set: P * ← p, G(p * ,S)←G(p,S), if SC_flag=1 and G(p,S)<G(p * ,S); otherwise p is discarded. If the number of plans in the plan taboo table PT_list is less than PT_size, add p to the top of PT_list. Repeat this until all adjacent plans of p ** are completed.

(3)作一次计划移动:设置p**←p*,G(p**,S)←G(p*,S)且如果p**不在PT_list中则将p**加到PT_list的顶部;如果PT_list中的计划个数>PT_size,则从PT_list的底部删除一个最老的计划。(3) Make a planned move: set p ** ←p * , G(p ** , S)←G(p * , S) and add p ** to the top of PT_list if p ** is not in PT_list ; If the number of plans in PT_list > PT_size, delete the oldest plan from the bottom of PT_list.

(4)如果计划有改善,即如果G(p**,S)<G_best,则更新最好解:P_best←p**,S_best←S,G_best←G(p**,S)。(4) If the plan is improved, that is, if G(p ** , S) < G_best, update the best solution: P_best←p ** , S_best←S, G_best←G(p ** , S).

(5)更新到目前为止所作的计划移动次数:PM_ctr←PM_ctr+1。如果PM_ctr>PM_max,则转Step 4,否则转Step 3的(1)。(5) Update the number of planned moves made so far: PM_ctr←PM_ctr+1. If PM_ctr>PM_max, go to Step 4, otherwise go to (1) of Step 3.

Step 4搜索最好调度Step 4 Search for the best schedule

(1)设置p=P_best,并调用算法2以搜索相应于p的最好调度。(1) Set p=P_best, and call Algorithm 2 to search for the best schedule corresponding to p.

(2)如果调度有改善,即G(p,S***)<G_best,则更新最好解:S_best←S***,G_best←G(p,S***)。(2) If the scheduling is improved, that is, G(p, S *** )<G_best, update the best solution: S_best←S *** , G_best←G(p, S *** ).

Step 5  输出结果Step 5 output result

输出P_best,S_best和G_best。Output P_best, S_best and G_best.

这里,S是由算法5确定的一个调度。Here, S is a schedule determined by Algorithm 5.

算法5  相应于给定计划的调度确定算法Algorithm 5 corresponds to the scheduling determination algorithm for a given plan

Step 1确定调度Step 1 Determine the schedule

(1)对于给定计划p,依次按照最早交付期、最小批量等优先规则,确定调度S。(1) For a given plan p, determine the schedule S according to priority rules such as the earliest delivery date and the smallest batch.

(2)通过快速调度仿真,计算相应于p和S的G(p,S)。(2) Calculate G(p, S) corresponding to p and S through fast scheduling simulation.

(3)如果S不可行,则置SC_flag=0,否则置SC_flag=1。(3) If S is not feasible, set SC_flag=0, otherwise set SC_flag=1.

Step 2返回Step 2Return

算法4的计算复杂性是o((n2+n)PM_max+0.5n(n-1)SM_max)次仿真。如果n足够大,算法4的复杂性同算法3一样都是o(n2)。但是使用算法4从初始可行计划开始搜索到最好计划与调度要比使用算法3少做[1+0.5n(n-1)SM_max](PM_max-1)次仿真。因此,算法4要比算法3快,但后者往往比前者获得更好解。The computational complexity of Algorithm 4 is o((n 2 +n)PM_max+0.5n(n-1)SM_max) simulations. If n is large enough, the complexity of Algorithm 4 is O(n 2 ) same as Algorithm 3. However, using Algorithm 4 to search for the best plan and schedule from the initial feasible plan requires less [1+0.5n(n-1)SM_max](PM_max-1) simulations than using Algorithm 3. Therefore, Algorithm 4 is faster than Algorithm 3, but the latter tends to obtain better solutions than the former.

算法4和算法5的程序流程图分别如图7和8所示。这样,根据算法4和算法5及其程序流程图,本发明者已采用Microsoft Visual C++5.0编程实现了求解上述混批装配线生产计划与调度集成优化问题的串行式禁忌搜索仿真法。The program flowcharts of Algorithm 4 and Algorithm 5 are shown in Figures 7 and 8, respectively. In this way, according to Algorithm 4 and Algorithm 5 and their program flow charts, the inventor has implemented a serial tabu search simulation method for solving the above-mentioned integrated optimization problem of production planning and scheduling of the mixed-batch assembly line by using Microsoft Visual C ++ 5.0 programming.

在生产计划、调度与仿真的集成优化中,计划的职能是确定每种产品的装配批量,调度的职能是确定每种产品按什么样的顺序上线装配,仿真的职能是计算给定调度的性能指标。In the integrated optimization of production planning, scheduling and simulation, the function of planning is to determine the assembly batch of each product, the function of scheduling is to determine the order in which each product will be assembled online, and the function of simulation is to calculate the performance of a given schedule index.

4、生产调度的快速仿真方法及其实现4. Fast simulation method of production scheduling and its realization

上述嵌入式禁忌搜索仿真法、交替式禁忌搜索仿真法、和串行式禁忌搜索仿真法的快速调度仿真均通过用扩展随机高级判断Petri网建立调度仿真模型和面向对象的技术来实现,并用可变时间流来控制仿真进程。此处快速的含义是无文字和图形的动态显示,仅仅通过快速仿真计算给定调度的性能指标。The above-mentioned embedded tabu search simulation method, alternating tabu search simulation method, and the fast scheduling simulation of the serial tabu search simulation method are all realized by using the extended random high-level judgment Petri net to establish a scheduling simulation model and object-oriented technology, and use the available Vary the flow of time to control the progress of the simulation. The meaning of fast here is that there is no dynamic display of text and graphics, and only the performance index of a given schedule is calculated through fast simulation.

4.1扩展随机高级判断Petri网4.1 Extended Stochastic Advanced Judgment Petri Net

由于市场需求的瞬息万变要求能在一条混批装配线上及时完成品种、批量时刻发生变化的订单,因此如何编制和优化混批装配线的生产计划与调度是很重要的。为了得到集成优化的计划与调度必须计算每一可行计划的每一种调度的性能指标,然而由于混批装配线调度的复杂性,很难用解析的办法考虑装配线的各种因素,较为可行的方法是仿真。为此,需要建立仿真模型,即需要一种能够描述混批装配线结构和运行状态的建模工具。本发明采用本发明者提出的并在柔性制造系统(FMS)建模、调度、仿真中获得成功应用的扩展随机高级判断Petri网(ESHLEP-N)对混批装配线进行建模,以解决混批装配线的调度仿真问题。Due to the rapidly changing market demand, it is necessary to timely complete orders with changing varieties and batches on a mixed-batch assembly line, so how to compile and optimize the production plan and scheduling of the mixed-batch assembly line is very important. In order to obtain integrated optimized planning and scheduling, it is necessary to calculate the performance index of each scheduling of each feasible plan. However, due to the complexity of mixed-batch assembly line scheduling, it is difficult to use analytical methods to consider various factors of the assembly line. A more feasible method is simulation. Therefore, it is necessary to establish a simulation model, that is, a modeling tool that can describe the structure and operation status of the mixed-batch assembly line is needed. The present invention adopts the Extended Random Advanced Judgment Petri Net (ESHLEP-N) proposed by the inventor and successfully applied in flexible manufacturing system (FMS) modeling, scheduling and simulation to model the mixed batch assembly line to solve the problem of mixed batch An assembly line scheduling simulation problem.

ESHLEP-N的主要优点是:(1)为使库所中的令牌既便于用户观察和性能分析,又便于FMS调度仿真,在ESHLEP-N中定义了双重令牌和双重标识;(2)将调度等规则引入到ESHLEP-N中,以提高它的推理和决策能力。但ESHLEP-N的原来定义是针对FMS建模的,因而需要对此进行修改和完善,使其适合混批装配线的建模。修改后的Petri网仍称为ESHLEP-N,其定义如下:The main advantages of ESHLEP-N are: (1) In order to make the tokens in the warehouse not only convenient for user observation and performance analysis, but also convenient for FMS scheduling simulation, double tokens and double identification are defined in ESHLEP-N; (2) Introduce scheduling and other rules into ESHLEP-N to improve its reasoning and decision-making ability. However, the original definition of ESHLEP-N is for FMS modeling, so it needs to be modified and perfected to make it suitable for the modeling of mixed batch assembly line. The modified Petri net is still called ESHLEP-N, and its definition is as follows:

定义1  ESHLEP-N可定义为一个16元组:Definition 1 ESHLEP-N can be defined as a 16-tuple:

ESHLEP-N={P,T(R),F,Ap,C,I-,I+,Ia,Is,Ir,DIa,DIs,DIr,K,M0,CM0}其中:ESHLEP-N={P, T(R), F, A p , C, I , I + , I a , I s , I r , DI a , DI s , DI r , K, M 0 , CM 0 }in:

P={Pg,R}={p1,p2,…,ph,r1,r2,…,rk}是一个有限库所集,pi∈Pg,rj∈R,Pg是普通库所集,R是决策点集。P={P g , R}={p 1 , p 2 ,..., p h , r 1 , r 2 ,..., r k } is a finite place set, p i ∈ P g , r j ∈ R, Pg is the general place set, and R is the decision point set.

T(R)={t1(r1),t2(r2),…,tk(rk)}是一个有限变迁集T(R)∩P=φ,φ是空集。T(R)={t 1 (r 1 ), t 2 (r 2 ),...,t k (r k )} is a finite transition set T(R)∩P=φ, φ is an empty set.

FP×T(R)∪T(R)×P是流关系。FP×T(R)∪T(R)×P is a flow relation.

Ap∶Pg→Ap(Pg),R→Ap(R)。Ap(Pg)是Pg上的参数表集。Ap(R)=S={S1,S2,…,Sk}表示R上的规则(决策逻辑)集。Sj是控制变迁tj(rj)使能和触发的规则集。Ap(Pg)∪Ap(R)是ESHLEP-N的令牌集。A p : P g →A p (P g ), R→A p (R). A p (P g ) is a set of parameter tables on P g . A p (R)=S={S 1 , S 2 , . . . , S k } represents a set of rules (decision logic) on R. S j is the rule set that controls the enabling and triggering of transition t j (r j ). A p (P g )∪A p (R) is the token set of ESHLEP-N.

C∶Ap(P)∪T(R)→已知颜色的幂集合,使得p∈P,C(Ap(p))是一个p上所有可能的令牌色的集合:t(r)∈T(R),C(t(r))是一个t(r)上所有可能出现色的集合。C: A p (P)∪T(R)→The power set of known colors, such that p∈P, C(A p (p)) is a set of all possible token colors on p: t( r)∈T(R), C(t(r)) is a set of all possible colors on t(r).

I-是一个负函数,使得I - is a negative function such that

    (p,t(r))∈Pg×T(R):I-(p,t(r))∈[C(t(r))MS→C(Ap(p))MS]L且I-(p,t(r))=0的充分条件是 ( p , t ( r ) ) &NotElement; F . 这里,C(...)MS是多重集,C(Ap(p))MS是p上的有色令牌集,[...]L是线性函数集。(p, t(r))∈P g ×T(R): I - (p, t(r))∈[C(t(r)) MS →C(A p (p)) MS ] L And the sufficient condition for I - (p, t(r)) = 0 is ( p , t ( r ) ) &NotElement; f . Here, C(...) MS is the multiset, C(A p (p)) MS is the set of colored tokens on p, [...] L is the set of linear functions.

I+是一个正函数,使得I + is a positive function such that

      (t(r),p)∈T(R)×Pg:I+(p,t(r))∈[C(t(r))MS→C(Ap(p))MS]L且I+(p,t(r))=O的充分条件是 ( t ( r ) , p ) &NotElement; F . (t(r), p)∈T(R)×P g : I + (p, t(r))∈[C(t(r)) MS →C(A p (p)) MS ] L And the sufficient condition for I + (p, t(r))=O is ( t ( r ) , p ) &NotElement; f .

Ia∶Ap(Pg)→φ∪Ra +,Ra +是非负实数集,表示所有产品在各装配工位的装配时间集。若r∈Ra +,则r表示某一产品在某一装配工位的装配时间。I a : A p (P g )→φ∪R a + , R a + is a non-negative real number set, which represents the assembly time set of all products at each assembly station. If r∈R a + , then r represents the assembly time of a certain product at a certain assembly station.

Is∶Ap(Pg)→φ∪Rs +。Rs +是非负实数集,表示服务台(装配工位、装配机器人、设备、工具等)的无故障服务时间集。I s : A p (P g )→φ∪R s + . R s + is a set of non-negative real numbers, representing the set of trouble-free service time of service desks (assembly stations, assembly robots, equipment, tools, etc.).

Ir∶Ap(Pg)→φ∪Rr +。Rr +是非负实数集,表示服务台的维修时间集。I r : A p (P g )→φ∪R r + . R r + is a non-negative real number set, which represents the maintenance time set of the service desk.

DIa∶Ap(Pg)→φ∪{N(μ11,σ11 2),N(μ12,σ12 2),…,N(μ21,σ21 2),…}。其中N(μij,σij 2)是产品i在第j个装配工位的装配时间所服从的正态分布函数,μij是均值,σij 2是方差。DI a : A p (P g )→φ∪{N(μ 11 , σ 11 2 ), N(μ 12 , σ 12 2 ),..., N(μ 21 , σ 21 2 ),...}. Among them, N(μ ij , σ ij 2 ) is the normal distribution function obeyed by the assembly time of product i at the jth assembly station, μ ij is the mean value, and σ ij 2 is the variance.

DIs∶Ap(Pg)→φ∪{exp(λ1),exp(λ2),…,exp(λm)}。其中,exp(λj)是服务台j的故障间隔所服从的负指数分布函数,λj是故障率。DI s : A p (P g )→φ∪{exp(λ 1 ), exp(λ 2 ), . . . , exp(λ m )}. Among them, exp(λ j ) is the negative exponential distribution function obeyed by the failure interval of service station j, and λ j is the failure rate.

DIr∶Ap(Pg)→φ∪{exp(θ1),exp(θ2),…,exp(θm)}。其中,exp(θj)是服务台j的维修时间所服从的负指数分布函数,θj是维修率。DI r : A p (P g )→φ∪{exp(θ 1 ), exp(θ 2 ), . . . , exp(θ m )}. Among them, exp(θ j ) is the negative exponential distribution function that the maintenance time of service station j obeys, and θ j is the maintenance rate.

K∶Pg→N+∪{ω},这里N+为正整数集,ω表示正无穷大,K为正容量函数。p∈Pg,K(p)是N+∪{ω}的子集,它的每一元素都表示p中相应的有色令牌数的上界。显然,K(p)的维数与C(Ap(p))的相同。如果K(p)的某一元素为ω,则p中与该元素相对应的有色令牌的数目不受限制。K: P g →N + ∪{ω}, where N + is a positive integer set, ω represents positive infinity, and K is a positive capacity function. p∈P g , K(p) is a subset of N + ∪{ω}, each element of which represents an upper bound on the number of corresponding colored tokens in p. Obviously, K(p) has the same dimension as C(A p (p)). If an element of K(p) is ω, the number of colored tokens corresponding to this element in p is unlimited.

M0是ESHLEP-N的初始令牌所构成的初始标识,满足p∈P∶M0∈Ap(p)。M 0 is the initial identity formed by the initial token of ESHLEP-N, satisfying p∈P: M 0 ∈A p (p).

CM0是用于用户观察有色令牌分布和性能统计的ESHLEP-N的初始有色标识,满足CM 0 is the initial colored identity of ESHLEP-N for users to observe the distribution of colored tokens and performance statistics, satisfying

            p∈Pg∶M0(p)∈Ap(p)→CM0(p)∈C(Ap(p))MS p∈P g : M 0 (p)∈A p (p)→CM 0 (p)∈C(A p (p)) MS

需要指出的一点是,一个变迁的触发就是根据与该变迁有关的决策点中的规则从某一库所子集中取出某些令牌和同等数量的相应有色令牌,将其加到其它库所子集。无论何时,只要一个变迁的某一输入库所子集及某一输出库所子集中的令牌与其决策点中的某些规则相匹配时,该变迁就被使能。这意味着:(1)这些输入库所持有足够的合适令牌;(2)这些输出库所中某种令牌(可以映射成同种颜色的有色令牌)数的上界不会因为该变迁触发后这种令牌的增加而被超过;(3)这些令牌在输入库所中要停留足够的时间。变迁一经使能就被触发。It should be pointed out that the trigger of a transition is to take some tokens and the corresponding colored tokens of the same amount from a subset of places according to the rules in the decision point related to the transition, and add them to other places Subset. Whenever a transition has tokens in a certain subset of input places and a certain subset of output places that match certain rules in its decision points, the transition is enabled. This means: (1) These input pools hold enough suitable tokens; (2) The upper bound of the number of certain tokens (colored tokens that can be mapped to the same color) in these output pools will not be due to The increase of such tokens after the transition is triggered is exceeded; (3) These tokens should stay in the input warehouse for a sufficient time. Transitions are triggered as soon as they are enabled.

4.2基于ESHLEP-N的混批装配线建模4.2 Modeling of mixed batch assembly line based on ESHLEP-N

一条混批装配线共有m(=33)个装配工位。由于装配一个产品需要许多装配件(零件、部件和组件等),因此为简化建模,我们用产品在每个装配工位的装配时间来表示每个装配工位的装配件装配过程,而不对每个具体装配件进行建模。由于产品在各装配工位的装配时间可以不等,对于个别产品甚至在某些装配工位的装配时间可以为零,即只通过这些装配工位而不进行具体装配。产品按照预先给定的调度(顺序)依次通过各装配工位,上一工位装配完后,依次送到下一工位继续装配。由于产品装配由工人完成,所以如果上一工位的装配任务已经完成,且在本工位的装配任务也已完成,则工人可以自由跨越装配工位的区间限制,直接装配下一个产品。同样,如果在某个工位上的产品未完成装配,而该产品已随装配线移到了该工位的界限之外,则允许这一工位的工人把任务顺延到下一工位继续完成,从而在逻辑上形成虚拟缓冲区。但应注意到工人不能无限制地跨越工位,各装配工位也可能发生故障。每一工位在任何时候至多只能装一个产品。线上的产品总数在任何时候至多等于线上的工位数m,也就是,如果在某一时刻每一工位都有一个产品,则只有等一个产品在最后一个工位m装好并下线后,才能在工位1上线一个待装品。装配线的同步移动速度是可变的,在线上无满缓冲区时由其最后一个工位的装配速度确定,而在有满缓冲区时由其瓶颈工位的装配速度确定。由于每一工位装配不同的产品可能需要不同的时间,所以当产品种类、混批发生变化时瓶颈工位可能发生转移。A mixed batch assembly line has a total of m (=33) assembly stations. Since assembling a product requires many assemblies (parts, components, components, etc.), in order to simplify modeling, we use the assembly time of the product at each assembly station to represent the assembly process of each assembly station, instead of Each specific assembly is modeled. Since the assembly time of products at each assembly station can vary, the assembly time for individual products even at some assembly stations can be zero, that is, only pass through these assembly stations without specific assembly. The products pass through each assembly station in turn according to the predetermined schedule (sequence), and after the previous station is assembled, they are sent to the next station to continue assembly. Since the product assembly is completed by workers, if the assembly task at the previous station has been completed and the assembly task at this station has also been completed, the worker can freely cross the interval limit of the assembly station and directly assemble the next product. Similarly, if the product at a certain station has not been assembled, and the product has moved beyond the boundary of the station along with the assembly line, the workers at this station are allowed to postpone the task to the next station to continue to complete, Thus logically forming a virtual buffer. However, it should be noted that workers cannot cross stations indefinitely, and failures may occur at various assembly stations. Each station can only hold at most one product at any time. The total number of products on the line is at most equal to the number m of stations on the line at any time, that is, if there is one product at each station at a certain moment, the only way to wait is for a product to be installed at the last station m and placed. A product to be loaded can be put online at station 1 only after it is online. The synchronous moving speed of the assembly line is variable, determined by the assembly speed of the last station when there is no full buffer on the line, and determined by the assembly speed of the bottleneck station when there is a full buffer. Since it may take different time for each station to assemble different products, the bottleneck station may be transferred when the product type and mixed batch change.

根据前面对混批装配线的描述和ESHLEP-N的定义,我们首先确定ESHLEP-N普通库所的个数、位置和含义。然后依次画出变迁、决策点和节点之间的弧。最后得到如图9所示的混批装配线的ESHLEP-N图形模型。图9中,普通库所、决策点和变迁的含义解释如下:According to the previous description of the mixed batch assembly line and the definition of ESHLEP-N, we first determine the number, location and meaning of ESHLEP-N general warehouses. Then draw transitions, decision points, and arcs between nodes in sequence. Finally, the ESHLEP-N graphical model of the mixed-batch assembly line shown in Figure 9 is obtained. In Figure 9, the meanings of common places, decision points and transitions are explained as follows:

p1是“装配工位空闲”库所。当库所p1只持有有色令牌时,相应的装配工位处于空闲状态。p 1 is the "assembly station free" place. When place p1 only holds colored tokens, the corresponding assembly station is idle.

p2是“待装品库”库所。当库所p2持有有色令牌时,待装品库中有等待上线装配的待装品。p 2 is the storehouse of "to-be-loaded goods storehouse". When the warehouse p 2 holds colored tokens, there are goods waiting to be assembled in the warehouse.

p3是“排队”库所。当库所p3持有有色令牌时,相应装配工位的缓冲区中有相应的产品正在等待装配。p 3 is the "queuing" place. When the place p 3 holds a colored token, there are corresponding products waiting to be assembled in the buffer of the corresponding assembly station.

p4是“装配”库所。当库所p4持有有色令牌时,相应的装配工位正在装配(含准备)相应的产品。p 4 is the "assembly" place. When the warehouse p 4 holds a colored token, the corresponding assembly station is assembling (including preparing) the corresponding product.

p5是“故障”库所。当库所p5持有有色令牌时,相应的装配工位正处于故障状态,正在维修。p 5 is the "failure" place. When the place p 5 holds a colored token, the corresponding assembly station is in a fault state and is being repaired.

p6是“成品库”库所。当库所p6持有有色令牌时,成品库中存有装配好的成品。p 6 is the "finished product warehouse" warehouse. When the warehouse p 6 holds colored tokens, there are assembled finished products in the finished product warehouse.

r1-5是决策点。这些节点规定了ESHLEP-N图中需引入决策的位置。决策点rj(j=1-5)中的规则集Sj是控制变迁tj(rj)使能和触发的规则集。r 1-5 are decision points. These nodes specify where in the ESHLEP-N diagram decisions are to be introduced. The rule set S j in the decision point r j (j=1-5) is the rule set enabling and triggering the control transition t j (r j ).

t1即t1(r1),是“待装品上装配线”变迁。它的触发表示待装品库中有一个待装品进入第一个工位的缓冲区等待装配。t 1 is t 1 (r 1 ), which is the change of "the assembly line of the goods to be loaded". Its triggering indicates that there is a product to be loaded in the warehouse to enter the buffer zone of the first station to wait for assembly.

t2即t2(r2),是“开始装配”变迁。它的触发表示相应的装配工位开始对相应产品进行指定装配(含准备)。t 2 is t 2 (r 2 ), which is the "start assembly" transition. Its trigger means that the corresponding assembly station starts to carry out the specified assembly (including preparation) of the corresponding product.

t3即t3(r3),是“完成装配”变迁。它的触发表示相应装配工位完成相应产品的指定装配。t 3 is t 3 (r 3 ), which is the "complete assembly" transition. Its trigger means that the corresponding assembly station completes the specified assembly of the corresponding product.

t4即t4(r4),是“故障发生”变迁。它的触发表示处于装配状态或空闲状态的相应工位出故障。t 4 is t 4 (r 4 ), which is the "failure occurs" transition. Its triggering indicates that the corresponding station in the assembly state or idle state has failed.

t5即t5(r5),是“故障结束”变迁。它的触发意味着相应装配工位或空闲工位结束故障状态。t 5 is t 5 (r 5 ), which is the "failure over" transition. Its triggering means that the corresponding assembly station or idle station ends the fault state.

为使ESHLEP-N更能反映由工人完成装配的特点,下面对以上ESHLEP-N图模型作必要的说明:In order to make ESHLEP-N better reflect the characteristics of assembly completed by workers, the following is a necessary description of the above ESHLEP-N diagram model:

(1)p3是“排队”库所,为实现工人跨工位装配产品,并且不使跨越的工位数量超过一定范围,我们在数据库中设置每个工位允许的最多的排队数量,即每个工位的虚拟缓冲区。如果某工位上的工人前移或者后移的工位数超过这一限制,则说明在此时刻装配线发生阻塞。(1) p 3 is the "queuing" warehouse. In order to realize the cross-station assembly of products by workers and not make the number of crossed stations exceed a certain range, we set the maximum number of queues allowed by each station in the database, that is Virtual buffer for each station. If the number of workers at a certain station moving forward or backward exceeds this limit, it means that the assembly line is blocked at this moment.

(2)p2是“待装品库”库所。在混批装配线中,待装品的上线由成品下线控制。在程序中反映为每一成品离开装配线最后一个工位后,要求在“排队”库所中的第一个工位队列中加入一待装品,即触发t1变迁。因此,在计划中要求的所有待装品上线后,为了保证所有线上产品都能够完成剩下的装配,可在“待装品库”库所中加入虚拟的待装品来保证仿真顺利进行。(2) p 2 is the storehouse of "stock to be loaded". In a mixed-batch assembly line, the on-line of the goods to be loaded is controlled by the off-line of the finished products. It is reflected in the program that after each finished product leaves the last station of the assembly line, it is required to add a product to be loaded in the first station queue in the "queuing" warehouse, which triggers the t1 transition. Therefore, after all the items to be installed in the plan are online, in order to ensure that all online products can complete the rest of the assembly, virtual items to be installed can be added to the "warehouse of items to be installed" to ensure the smooth progress of the simulation .

由于ESHLEP-N图是面向用户的,主要用于分析混批装配线的性能,所以在图9的普通库所中只显示有色令牌。这是因为通过有色令牌表示ESHLEP-N图模型的状态可以减少状态数。例如,图9库所p1的有色令牌5w表示有5个装配工位处于空闲状态。但是,这5个装配工位分别可以是m(=33)个装配工位中的任何一个,也就是对应 C m 5 = 237336 种工位组合。如果每个装配工位都用一个令牌表示,则这5个有色令牌对应着237336种令牌组合(即从33个相异令牌取出5个的组合数)。尽管图9普通库所中的令牌没有显示,但的确存在,只是隐含而已。当一个有色令牌移动时,用户应该想象到有一个令牌随之移动。这样,就可以根据普通库所中有色令牌的分布大致确定相应令牌的分布。下面主要讨论与有色令牌相关的问题。Since the ESHLEP-N diagram is user-oriented and mainly used to analyze the performance of the mixed-batch assembly line, only the colored tokens are shown in the common place in Fig. 9. This is because representing the states of the ESHLEP-N graph model by colored tokens can reduce the number of states. For example, the colored token 5w of place p 1 in Fig. 9 indicates that there are 5 assembly stations in an idle state. However, these five assembly stations can be any one of the m (=33) assembly stations, that is, the corresponding C m 5 = 237336 A combination of workstations. If each assembly station is represented by a token, then these 5 colored tokens correspond to 237336 kinds of token combinations (that is, the number of 5 combinations taken from 33 different tokens). Although not shown in Figure 9, the tokens in the common repository do exist, only implicitly. When a colored token moves, the user should imagine a token moving with it. In this way, the distribution of corresponding tokens can be roughly determined based on the distribution of colored tokens in common exchanges. The issues related to colored tokens are mainly discussed below.

根据定义1对ESHLEP-N的定义,如果用w表示一个装配工位,b表示一个产品(待装品,正装产品或成品),qi(i=1,2,…,m)表示一个等待第i号工位装配的产品,<·>表示复合色,图9普通库所中所有可能的有色令牌的颜色集可表示如下:According to the definition of ESHLEP-N in Definition 1, if w represents an assembly station, b represents a product (to-be-assembled product, ready-assembled product or finished product), and q i (i=1, 2, ..., m) represents a waiting The product assembled at the i-th station, <·> represents the composite color, and the color sets of all possible colored tokens in the common warehouse in Figure 9 can be expressed as follows:

C(Ap(p1))={w},表示有工位处于空闲状态。C(A p (p 1 ))={w}, which means that there are workstations in an idle state.

C(Ap(p2))={b}。表示待装品库中有待装品。C(A p (p 2 ))={b}. Indicates that there is an item to be loaded in the item to be loaded library.

C(Ap(p3))={q1,q2,…,qm},表示有产品在第i(i=1,2,…,m)个工位上排队等待装配。C(A p (p 3 ))={q 1 , q 2 ,...,q m }, which means that there are products waiting for assembly at the i-th (i=1,2,...,m) station.

C(Ap(p4))={<w,b>},表示有产品在装配。C(A p (p 4 ))={<w, b>}, indicating that there are products being assembled.

C(Ap(p5))={w,<w,b>},w表示有一处于空闲状态的工位出现故障。<w,b>表示有一处于装配状态的工位出现故障。C(A p (p 5 ))={w,<w,b>}, where w indicates that there is a fault in an idle station. <w, b> indicates that a station in assembly state has failed.

c(Ap(p6))={b},表示成品库中存有装配好的成品。c(A p (p 6 ))={b}, which means that there are assembled finished products in the finished product warehouse.

决策点中的令牌比较特殊,它们可以重复使用却不能移到其它库所,也就是说,与某一决策点相关的变迁的触发将使令牌从该决策点移出并重又移入该决策点。Tokens in a decision point are special in that they can be reused but cannot be moved to other places, that is, the triggering of a transition related to a decision point will cause the token to move out of the decision point and move into the decision point again .

ESHLEP-N的变迁触发同普通的Petri网不一样,它不是从所有输入库所中移出令牌,然后将其加到所有输出库所,而是根据决策点中的规则,从部分或全部输入库所中移山令牌和相应的有色令牌,将其加入到部分和全部输出库所。例如,变迁t2触发时一种可能的有色令牌移动是:The transition trigger of ESHLEP-N is different from ordinary Petri nets. It does not remove tokens from all input places and add them to all output places, but according to the rules in the decision point, some or all of the input Move mountain tokens and corresponding colored tokens in the warehouse, adding them to some and all output warehouses. For example, one possible colored token move when transition t2 fires is:

从输入库所p1,p3中分别移出一个有色令牌w,qj,(j=1,2,…,m),合并成一个复合有色令牌<w,b>,将其加到输出库所p4Remove a colored token w, q j , (j=1, 2, ..., m) from input places p 1 , p 3 respectively, combine them into a composite colored token <w, b>, add it to Output place p 4 .

一旦确定了图9中所有变迁触发与其相应的有色令牌的移动关系,就可据此确定该模型的动态过程。Once the movement relationship between all transition triggers and their corresponding colored tokens in Figure 9 is determined, the dynamic process of the model can be determined accordingly.

图9中所有变迁的所有可能的出现色如下:All possible occurrences of all transitions in Figure 9 are as follows:

C(t1)={q1),             C(t2)={<w,b>},C(t 1 )={q 1 ), C(t 2 )={<w,b>},

C(t3)={w,b,q2,q3,…,qm},C(t4)={w,<w,b>}C(t 3 )={w,b,q 2 ,q 3 ,...,q m }, C(t 4 )={w,<w,b>}

C(t5)={w,<w,b>}C(t 5 )={w,<w,b>}

下面对照图9的ESHLEP-N图模型进行动态描述。设:The following is a dynamic description with reference to the ESHLEP-N graph model in Fig. 9 . set up:

(q1←b)表示一种线性映射,即从b映射到q1,表示待装品到工位1的队列。(q 1 ←b) represents a linear mapping, that is, mapping from b to q 1 , which represents the queue of items to be loaded to station 1.

pr1,pr2是投影,即取复合色<·>中的第一种色或第二种色的映射。p r 1, p r 2 are projections, that is, the mapping of the first color or the second color in the composite color <·>.

ID是恒等映射。ID is an identity map.

X(t2)表示由于变迁t2的触发而引起的有色令牌的移动,且满足X(t 2 ) represents the movement of colored tokens caused by the triggering of transition t 2 , and satisfies

             X(t2)∈C(t2)MS X(t 2 )∈C(t 2 ) MS

这样,ESHLEP-N模型的动态描述举例如下:In this way, the dynamic description of the ESHLEP-N model is as follows:

1)初始状态1) Initial state

图9普通库所中的初始有色标识可表示如下:The initial colored logo in the general storehouse in Figure 9 can be expressed as follows:

CM0(p1)=5w,表示有5个装配工位空闲。CM 0 (p 1 )=5w, indicating that there are 5 assembly stations free.

CM0(p2)=10b,表示待装品库中有10个待装品。CM 0 (p 2 )=10b, which means that there are 10 items to be loaded in the item library.

CM0(p3)=q1+q5+2q10+2q25,表示1号和5号工位各有一个、10号和25号工位各有二个产品等待装配,其余工位无产品等待装配。CM 0 (p 3 )=q 1 +q 5 +2q 10 +2q 25 , which means that No. 1 and No. 5 stations each have one product, No. 10 and No. 25 stations each have two products waiting to be assembled, and the other stations have no Product awaits assembly.

CM0(p4)=26<w,b>,表示有26个工位正在装配产品。CM 0 (p 4 )=26<w, b>, indicating that 26 stations are assembling products.

CM0(P5)=w+<w,b>,表示各有一个处于空闲和装配状态的工位出故障。CM 0 (P 5 )=w+<w, b>, which means that each of the idle and assembly stations fails.

CM0(p6)=20b,表示成品库中有20个装配好的成品。CM 0 (p 6 )=20b, which means that there are 20 assembled finished products in the finished product warehouse.

如用向量表示则If expressed as a vector then

CM0=(5w,10b,q1+q5+2q10+2q25,26<w,b>,w+<w,b>,20b)CM 0 =(5w, 10b, q 1 +q 5 +2q 10 +2q 25 , 26<w,b>,w+<w,b>, 20b)

2)设CM0(p1)=5w中的空闲工位之一为1号。这样,由决策点r2中的规则,t2可以触发,也即各有一个有色令牌从p1和p3中移出,合并成一个复合有色令牌<w,b>移入p4中(设此时无故障发生)。2) Let one of the idle stations in CM 0 (p 1 )=5w be number 1. In this way, according to the rules in the decision point r 2 , t 2 can be triggered, that is, one colored token is removed from p 1 and p 3 , and combined into a composite colored token <w, b> moved into p 4 ( Assume no fault occurs at this time).

再设I-(p1,t2)=pr1;Let I - (p 1 , t 2 )=p r 1 again;

II __ (( pp 33 ,, tt 22 )) == (( qq 11 &LeftArrow;&LeftArrow; LL bb )) (( PP ,, 22 )) ;;

I+(p4,t2)=ID;I + (p 4 , t 2 ) = ID;

X(t2)=<w,b>X(t 2 )=<w,b>

这样:so:

CM1(p1)=CM0(p1)-I-(p1,t2)X(t2)=5w-(Pr1)<w,b>=5w-w=4wCM 1 (p 1 )=CM 0 (p 1 )-I (p 1 , t 2 )X(t 2 )=5w-(P r 1 )<w,b>=5w-w=4w

CC Mm 11 (( pp 33 )) == CC Mm 00 (( pp 33 )) -- II __ (( pp 33 ,, tt 22 )) Xx (( tt 22 ))

== qq 11 ++ qq 55 ++ 22 qq 1010 ++ 22 qq 2525 -- (( qq 11 &LeftArrow;&LeftArrow; LL bb )) (( pp rr 22 )) << ww ,, bb >>

== qq 11 ++ qq 55 ++ 22 qq 1010 ++ 22 qq 2525 -- qq 11 == qq 55 ++ 22 qq 1010 ++ 22 qq 2525

CM1(p4)=CM0(p4)+I+(p4,t2)<w,b>=26<w,b>+<w,b>CM 1 (p 4 )=CM 0 (p 4 )+I + (p 4 ,t 2 )<w,b>=26<w,b>+<w,b>

       =27<w,b>= 27<w, b>

即CM1=(4w,10b,q5+2q10+2q25,27<w,b>,w+<w,b>,20b)That is, CM 1 =(4w, 10b, q 5 +2q 10 +2q 25 , 27<w, b>, w+<w, b>, 20b)

3)再设工位33完成装配任务,则根据决策点r3中的规则,变迁t3触发。为此将一个复合有色令牌<w,b>从p4中移出,并分解成有色令牌w和b分别移入p1和p6。这时,有色标识变成:3) Set station 33 to complete the assembly task, then transition t 3 is triggered according to the rule in decision point r 3 . To this end, a compound colored token <w, b> is moved out of p 4 and decomposed into colored tokens w and b into p 1 and p 6 respectively. At this point, the colored logo becomes:

CM2=(5w,10b,q5+2q10+2q25,26<w,b>,w+<w,b>,21b)。CM 2 =(5w, 10b, q 5 +2q 10 +2q 25 , 26<w,b>,w+<w,b>, 21b).

4)对于其它变迁也一样,只要其输入/输出库所中的令牌和有色令牌与相应决策点中的规则相匹配就触发。因此,混批装配线虽然复杂,但用ESHLEP-N图可以清晰地对其动态过程加以描述。4) The same is true for other transitions, as long as the tokens and colored tokens in its input/output stores match the rules in the corresponding decision points, it will be triggered. Therefore, although the mixed-batch assembly line is complicated, its dynamic process can be clearly described by ESHLEP-N diagram.

4.3混批装配线的ESHLEP-N模型的面向对象的实现4.3 Object-Oriented Implementation of ESHLEP-N Model for Mixed Batch Assembly Line

面向对象(Object-Oriented)一词来自60年代推出的Simula语言,面向对象技术的基本思想是构造对象,通过建模的方法,将数据结构和行为都合并到单一的实体中。它围绕着客观现实的事物来组织模型,将某些对象和模型的共同方法和行为抽取出来进行封装形成类,类中的对象具有相同的属性和行为模式,再由类的实例化产生对象,这组对象还具有一般关系,一般行为及一般语义。当然,不同类的对象也可能具有相同的属性值和关系。The term object-oriented (Object-Oriented) comes from the Simula language introduced in the 1960s. The basic idea of object-oriented technology is to construct objects and combine data structures and behaviors into a single entity through modeling methods. It organizes models around objective and realistic things, extracts the common methods and behaviors of certain objects and models, and encapsulates them to form classes. The objects in the class have the same attributes and behavior patterns, and then the objects are generated by the instantiation of the class. This set of objects also has general relationships, general behavior and general semantics. Of course, objects of different classes may also have the same attribute values and relationships.

面向对象方法强调对象属性只能由对象自己的行为改变,对象之间通过消息传递进行交互,通过继承机制可以实现对象类的细化,通过对对象行为的重置则诱发对象的多态性概念。封装、继承、多态性是面向对象的重要特征。The object-oriented method emphasizes that object properties can only be changed by the behavior of the object itself, and that objects interact through message passing. The object class can be refined through the inheritance mechanism, and the concept of polymorphism of the object can be induced by resetting the behavior of the object. . Encapsulation, inheritance, and polymorphism are important features of object-oriented.

本发明采用Microsoft公司的Visual C++5.0作为开发工具来实现混批装配线的ESHELP-N模型。Visual C++5.0自诞生以来,一直是Windows环境下最主要的应用开发系统。它提供了方便的classwizard使开发者能够方便地处理自己设计的类,并且提供已经封装好的MFC使开发者能够方便地实现各种操作。在本发明中,也主要用它的classwizard来设计用于实现仿真的类,利用MFC来实现数据库中基本仿真数据的提取,变迁链表的构建等操作。下面讨论ESHELP-N模型的面向对象的实现。The present invention adopts Visual C ++ 5.0 of Microsoft Corporation as a development tool to realize the ESHELP-N model of the mixed-batch assembly line. Since Visual C ++ 5.0 was born, it has been the most important application development system under the Windows environment. It provides a convenient classwizard to enable developers to easily handle their own designed classes, and provides packaged MFC to enable developers to easily implement various operations. In the present invention, its classwizard is also mainly used to design classes for realizing simulation, and MFC is used to realize extraction of basic simulation data in the database, construction of transition list and other operations. The object-oriented implementation of the ESHELP-N model is discussed below.

4.3.1库所和变迁表示4.3.1 Place and Transition Representation

在ESHLEP-N的实现过程中,我们用基本类来实现普通库所中的令牌,用其中的属性来表示具体的令牌处于哪个库所,为此,在Microsoft Visual C++5.0中,利用Microsoft MFC设计如下的类:In the implementation process of ESHLEP-N, we use the basic class to realize the token in the general storehouse, and use the attributes in it to indicate which storehouse the specific token is in. For this reason, in Microsoft Visual C ++ 5.0, Use Microsoft MFC to design the following classes:

           
    class CWorkstation:public CObject

    {

    public:

        stationstate priorstate;    ∥在发生故障的时候记录故障以前状态

        double surplus_needtime;    ∥用于记录相应装配工位在装配相应产品的过程中碰

                                     ∥到故障时该产品的剩余装配时间

        long buffer;                ∥相应装配工位缓冲区的大小,即存放位置数
        <!-- SIPO <DP n="18"> -->
        <dp n="d18"/>
        Cprodnode waitingprod;    ∥在相应工位缓冲区中排队等待装配的产品,p3库所

        double needtime;          ∥该产品在该共位上需要的装配时间

        stationstate state;       ∥工位状态

        double sum_emptytime,sum_processtime,sum_readytime;

                                   ∥累计空闲时间,累计工位处理(装配)时间,累计准备时间

        int current_prodno,current-prodtype;  ∥相应工位正在装配的产品的编号和种类

        double begintime,planfinishtime;

                                   ∥该产品在该工位上的开始装配时间和计划完成时间

        int GetProdNumber();         ∥取得相应工位正在装配的产品的编号

        double getplanfinishtime();  ∥取得该产品在该工位上的计划完成时间

        int getcurrentprodtype();    ∥取得相应工位正在装配的产品的种类

        CWorkstation();

        virtual~CWorkstation();

        void init();

    };

    class CWorkstation: public CObject

    {

    public:

        stationstate priorstate; ∥ record the state before the failure when a failure occurs

        double surplus_needtime; ∥ is used to record the meeting of the corresponding assembly station during the process of assembling the corresponding product

                                     ∥ Remaining assembly time of the product at the time of failure

        long buffer; ∥The size of the buffer of the corresponding assembly station, that is, the number of storage locations
        <!-- SIPO <DP n="18"> -->
        <dp n="d18"/>
        Cprodnode waitingprod; ∥The products queued for assembly in the corresponding station buffer, p3 warehouse

        double needtime; ∥ the assembly time required by the product on the co-location

        stationstate state; ∥ station state

        double sum_emptytime, sum_processtime, sum_readytime;

                                   ∥Accumulated idle time, accumulated station processing (assembly) time, accumulated preparation time

        int current_prodno, current-prodtype; ∥ the number and type of the product being assembled at the corresponding station

        double begintime, planfinishtime;

                                   ∥ The starting time of assembly and the planned completion time of the product at the station

        int GetProdNumber(); ∥Get the serial number of the product being assembled by the corresponding station

        double getplanfinishtime(); ∥Get the planned completion time of the product at the station

        int getcurrentprodtype(); ∥Get the type of product being assembled at the corresponding station

        CWorkstation();

        virtual~CWorkstation();

        void init();

    };

        

在该类中封装的属性记录了相应工位在整条装配线工作过程中的状态,而该类中的方法则实现对该工位属性的操作。属性state属于typedef enum{empty=1,wrong,working,waiting,ready,sleep}stationstate,其值empty,ready和sleep(表示该相应工位还没有开始工作)表示相应工位处于库所p1,working表示相应工位处于库所p4,wrong表示相应工位处于库所p5The properties encapsulated in this class record the state of the corresponding station during the entire assembly line, and the methods in this class implement the operation of the station's properties. The attribute state belongs to typedef enum {empty=1, wrong, working, waiting, ready, sleep} stationstate, and its values empty, ready and sleep (indicating that the corresponding station has not started working) indicate that the corresponding station is in the warehouse p 1 , working indicates that the corresponding station is in place p 4 , and wrong indicates that the corresponding station is in place p 5 .

对于ESHLEP-N中的“待装品库”库所p2,我们在程序中设计了待装品库所类:For the "warehousing goods warehouse" place p 2 in ESHLEP-N, we have designed the goods-to-be-loaded warehouse class in the program:

           
    class Cbodysimu            ∥建立初始待装品链表的类

    {

    public:

        Cbodysimu();

        virtual~Cbodysimu();

    public: 

        int prodnum;          ∥待装品编号

        int prodtype;         ∥待装品种类

        Cbodysimu *next;     ∥指向下一待装品的指针

    };

    class Cbodysimu ∥ The class that establishes the initial linked list of items to be loaded

    {

    public:

        Cbodysimu();

        virtual~Cbodysimu();

    public:

        int prodnum; ∥ product number to be installed

        int prodtype; ∥ type of product to be installed

        Cbodysimu *next; ∥ pointer to the next object to be loaded

    };

        

并用下面的类实现p2中的令牌(待装品)按调度顺序进行排序:And use the following class to realize that the tokens (to-be-loaded items) in p2 are sorted in the scheduling order:

           
    class Cprodnode            ∥初始待装品的链表,也作为在相应工位缓冲区

                               ∥中排队等待装配的产品的链表

    {

    public:
        <!-- SIPO <DP n="19"> -->
        <dp n="d19"/>
        Cprodnode();

        virtual~Cprodnode();

    public:

        void delhead();

        Cbodysimu *GetPointNow();

        Cbodysimu *head,*now,*end;

        int count;

        void add(int prodnum,int prodtype);  ∥加入新节点

        void deleteall();                     ∥删除全部链表

    };

    class Cprodnode ∥ The linked list of the initial items to be loaded, which is also used as a buffer in the corresponding station

                               A linked list of products queued for assembly in ∥

    {

    public:
        <!-- SIPO <DP n="19"> -->
        <dp n="d19"/>
        Cprodnode();

        virtual~Cprodnode();

    public:

        void delhead();

        Cbodysimu *GetPointNow();

        Cbodysimu *head, *now, *end;

        int count;

        void add(int prodnum, int prodtype); ∥ add new node

        void deleteall(); ∥ delete all linked lists

    };

        

在ESHLEP-N启动的时候,可用上述数据结构来实现“待装品库”库所p2的初始化。同样,对于每个工位上的“排队”库所p3,也可用上述数据结构来实现。When ESHLEP-N is started, the above-mentioned data structure can be used to realize the initialization of the storehouse p 2 of the "warehouse for loading". Similarly, for the "queuing" place p 3 on each station, the above data structure can also be used to realize.

对于ESHLEP-N中的“成品库”库所p6,在仿真中用一个变量overprods来记录在装配线上已经装配完成的成品,overprods的值代表p6中令牌数量。For the "finished product warehouse" place p 6 in ESHLEP-N, a variable overprods is used in the simulation to record the finished products that have been assembled on the assembly line, and the value of overprods represents the number of tokens in p 6 .

由于有色令牌和令牌之间存在一对多的映射关系,可将有色令牌看成令牌的“视图”,所以在ESHLEP-N模型的实现过程中,并不设计专门的数据结构来保存有色令牌,只是在性能统计和ESHLEP-N图模型显示的时候,根据有色令牌和令牌之间一对多的映射关系由令牌确定有色令牌的数目、显示和分布。Since there is a one-to-many mapping relationship between colored tokens and tokens, colored tokens can be regarded as the "view" of tokens, so in the implementation of the ESHLEP-N model, no special data structure is designed to Saving colored tokens is just to determine the number, display and distribution of colored tokens according to the one-to-many mapping relationship between colored tokens and tokens when performance statistics and ESHLEP-N graphical models are displayed.

至于,变迁类可定义如下:As for, the transition class can be defined as follows:

           
    class CTransition:public CObject        ∥ESHLEP-N中的变迁类

    {

    public:

        CTransition();

        CTransition(int transition,double begin,int sta)

        {

            transitiontype=transition;

            begintime=begin;

            station=sta;

        }                                    ∥变迁构造函数

    public:

        int transitiontype;   ∥变迁种类,1:t1,2:t2,3:t3,4:t4,5:t5

        double begintime;     ∥该变迁触发的时间

        int station;          ∥变迁触发的工位0-m

    };

    class CTransition: transition class in public CObject ∥ ESHLEP-N

    {

    public:

        CTransition();

        CTransition(int transition, double begin, int sta)

        {

            transitiontype = transition;

            begintime=begin;

            station=sta;

        } ∥ transition constructor

    public:

        int transitiontype; ∥ transition type, 1: t1, 2: t2, 3: t3, 4: t4, 5: t5

        double begintime; ∥ the time when the transition is triggered

        int station; ∥ transition triggered station 0-m

    };

        

CTransition类中定义了变迁属性transitiontype,其值为1,2,3,4,5时分别代表ESHLEP-N中的变迁t1,t2,t3,t4,t5。transitiontype=1表示待装品库中有一个待装品或虚拟的待装品进入第一个工位的缓冲区等待装配。The transition attribute transitiontype is defined in the CTransition class, whose values are 1, 2, 3, 4, and 5 respectively represent transitions t 1 , t 2 , t 3 , t 4 , and t 5 in ESHLEP-N. transitiontype=1 indicates that there is an item to be loaded or a virtual item to be loaded in the item to be loaded warehouse and enters the buffer zone of the first station to wait for assembly.

CTransition类中定义了变迁属性begin和属性sta,分别代表该变迁发生的时间和发生该变迁的工位。The transition attribute begin and attribute sta are defined in the CTransition class, which respectively represent the time when the transition occurs and the station where the transition occurs.

在程序的实现中,利用MFC封装的CtypedPtrArray<CObArray,CTransition*>transitions来实现变迁的链表结构(队列)。在MFC中封装的CTypedPtrArray提供了Add(),Remove(),InsertInto()等方法,可以将CTransition*插入指针阵列transitions中,并且维护方便。所以,在程序的执行过程中,每次只要取出按时间排序最先发生的变迁,执行相关的函数,然后在指针阵列中删除就可以了。In the implementation of the program, use the CtypedPtrArray<CObArray, CTransition * >transitions encapsulated by MFC to realize the linked list structure (queue) of transition. The CTypedPtrArray encapsulated in MFC provides Add(), Remove(), InsertInto() and other methods, which can insert CTransition * into pointer array transitions, and are easy to maintain. Therefore, during the execution of the program, it is only necessary to take out the transition that occurs first in chronological order, execute related functions, and then delete it in the pointer array.

此外,在面向对象的仿真中,还必须解决仿真时间问题。在离散事件仿真中,仿真时间是一个与真实时间尺度不同的逻辑时钟,它与所有实体的活动和所有的调度都有关。仿真时间的尺度是任意选的,且独立于真实时间。每一事件通过被调度的事件时间与逻辑时钟相关联,当对应的物理事件发生时,这个事件时间就对应于物理系统的真实时间。在程序的设计中,我们在主程序的CsimulationDoc:public CDocument类中定义了属性simulationclock,用来记录仿真时间。In addition, in object-oriented simulation, the problem of simulation time must also be solved. In discrete-event simulation, simulation time is a logical clock that is different from the real time scale, and it is related to the activities of all entities and all schedules. The scale of simulation time is chosen arbitrarily and is independent of real time. Each event is associated with the logical clock through a scheduled event time, which corresponds to the real time of the physical system when the corresponding physical event occurs. In the design of the program, we defined the property simulationclock in the CsimulationDoc: public CDocument class of the main program, which is used to record the simulation time.

4.3.2变迁触发规则4.3.2 Transition trigger rules

变迁触发规则共有5类12条,每一类规则对应一种变迁的触发。具体如下,其中R加数字表示规则号,R后的第一个数字表示变迁的种类。There are 12 transition trigger rules in 5 categories, and each type of rule corresponds to a transition trigger. The details are as follows, where R plus a number indicates the rule number, and the first number after R indicates the type of transition.

R101;如果(1)装配线未阻塞,(2)装配线上的最后一个工位有一个产品完成装配,(3)库所p2中有令牌b;则变迁t1触发,即从p2中移出一个令牌b,并在p3中增加一个令牌q1R101; if (1) the assembly line is not blocked, (2) the last station on the assembly line has a product to complete assembly, (3) there is a token b in the warehouse p 2 ; then transition t 1 is triggered, that is, from p 2 Remove a token b and add a token q 1 to p 3 .

R201:如果(1)装配线未阻塞,(2)p1中有表示工位i空闲的令牌w,(3)p3中有令牌qi(表示正在等待工位i装配的在装品),则变迁t2触发,即从p1中移出一个令牌w,从p3中移出一个令牌qi,合并成一个复合令牌<w,b>加到p4中。R201: If (1) the assembly line is not blocked, (2) there is a token w in p 1 indicating that station i is free, and (3) there is a token q i in p 3 (representing the product in process waiting for assembly at station i ), then transition t 2 is triggered, that is, a token w is removed from p 1 , a token q i is removed from p 3 , combined into a compound token <w, b> and added to p 4 .

R202:如果(1)装配线阻塞,(2)p1中有表示工位i空闲的令牌w,(3)p3中有令牌qi,(4)现在阻塞的是工位i;则变迁t2触发,即从p1中移出一个令牌w,从p3中移出一个令牌qi,合并成一个复合令牌<w,b>加到p4中。如果工位i的缓冲区及工位i+1的缓冲区中的在装品总数不超过额定数量,则清除装配线和工位i的阻塞状态。R202: If (1) the assembly line is blocked, (2) there is a token w in p 1 indicating that the station i is free, (3) there is a token q i in p 3 , (4) the station i is blocked now; then Transition t 2 is triggered, that is, a token w is removed from p 1 , a token q i is removed from p 3 , combined into a compound token <w, b> and added to p 4 . If the total number of in-process items in the buffer zone of station i and the buffer zone of station i+1 does not exceed the rated quantity, clear the blocking status of the assembly line and station i.

R301:如果(1)装配线未阻塞,(2)p4中有一个表示工位i刚完成装配一个在装品b的复合令牌<w,b>,(3)工位i不是装配线上的最后一个工位;则变迁t3触发,即从p4中移出一个复合令牌<w,b>,分解成一个令牌w和一个令牌qi+1分别加到p1和p3中。R301: If (1) the assembly line is not blocked, (2) there is a composite token <w, b> in p4 indicating that station i has just finished assembling a loading item b, (3) station i is not on the assembly line The last station; then the transition t 3 is triggered, that is, a compound token <w, b> is removed from p 4 , decomposed into a token w and a token q i+1 and added to p 1 and p 3 respectively .

R302:如果(1)装配线未阻塞,(2)p4中有一个表示工位i刚完成装配一个在装品b的复合令牌<w,b>,(3)工位i是装配线上的最后一个工位;则变迁t3触发,即从p4中移出一个复合令牌<w,b>,分解成一个令牌w和一个令牌b分别加到p1和p6中。R302: If (1) the assembly line is not blocked, (2) there is a compound token <w, b> in p4 indicating that station i has just assembled a product b in progress, (3) station i is on the assembly line The last station; then transition t3 is triggered, that is, a compound token <w, b> is removed from p4 , decomposed into a token w and a token b, and added to p1 and p6 respectively.

R303:如果p3中令牌q的个数超限(即表示工位i的缓冲区及工位i+1的缓冲区中的在装品总数超过额定数量,工位i的缓冲区已满);则整条装配线进入阻塞状态。R303: If the number of token q in p 3 exceeds the limit (that is, the total number of loading items in the buffer zone of station i and the buffer zone of station i+1 exceeds the rated quantity, the buffer zone of station i is full ); then the entire assembly line enters a blocking state.

R304:如果(1)装配线阻塞,(2)p4中有一个表示工位i刚完成装配一个在装品b的复合令牌<w,b>,(3)工位i不是装配线上的最后一个工位,(4)工位i是目前的阻塞工位;则变迁t3触发,即从p4中移出一个复合令牌<w,b>,分解成一个令牌w和一个令牌qi+1分别加到p1和p3中。R304: If (1) the assembly line is blocked, (2) one of p4 indicates that station i has just finished assembling a compound token <w, b> in loading b, (3) station i is not the last on the assembly line One station, (4) station i is the current blocking station; then transition t3 is triggered, that is, a composite token <w, b> is removed from p4 and decomposed into a token w and a token q i+1 are added to p 1 and p 3 respectively.

R305:如果(1)装配线阻塞,(2)p4中有一个表示工位i刚完成装配一个在装品b的复合令牌<w,b>,(3)工位i是装配线上的最后一个工位,(4)工位i是目前的阻塞工位;则变迁t3触发,即从p4中移出一个复合令牌<w,b>,分解成一个令牌w和一个令牌b分别加到p1和p6中。R305: If (1) the assembly line is blocked, (2) one of p4 indicates that station i has just finished assembling a compound token <w, b> in loading b, (3) station i is the last on the assembly line One station, (4) station i is the current blocking station; then transition t3 is triggered, that is, a composite token <w, b> is removed from p4 and decomposed into a token w and a token b Add to p 1 and p 6 respectively.

R401:如果p1中有一个令牌w所表示的空闲工位发生故障;则变迁t4触发,即从p1中移出一个令牌w加到p5中。R401: If there is a fault in the idle station represented by a token w in p1 ; then transition t4 is triggered, that is, a token w is removed from p1 and added to p5 .

R402:如果p4中有一个复合令牌<w,b>所表示的正在进行装配的工位i发生故障;则变迁t4触发,即从p4中移出一个复合令牌<w,b>加到p5中。R402: If there is a compound token <w, b> in p 4 and the assembly station i represented by it fails; then transition t4 is triggered, that is, a compound token <w, b> is removed from p 4 Add to p 5 .

R501:如果p5中有一个令牌w所表示的工位i的故障状态消除;则变迁t5触发,即从p5中移出一个令牌w加到p1中。R501: If the fault state of station i represented by a token w in p 5 is eliminated; then transition t 5 is triggered, that is, a token w is removed from p 5 and added to p 1 .

R502:如果p5中有一个复合令牌<w,b>所表示的工位i的故障状态消除;则变迁t5触发,即从p5中移出一个复合令牌<w,b>加到p4中。R502: If there is a compound token <w, b> in p 5 and the fault status of station i is eliminated; then transition t 5 is triggered, that is, a compound token <w, b> is removed from p 5 and added to p 4 .

4.3.3变迁处理流程4.3.3 Change processing flow

在基于ESHLEP-N模型的仿真实现中,我们首先从变迁队列中取一个最先发生的变迁事件来处理,步骤是先判断装配线是否阻塞,如果阻塞就进入阻塞处理程序,如果不阻塞,就读取变迁的种类和变迁触发的工位,进入相应的变迁处理程序。变迁的触发要遵循上述变迁触发规则,下面用流程图描述其实现过程。In the simulation implementation based on the ESHLEP-N model, we first take the first transition event from the transition queue to process. The step is to judge whether the assembly line is blocked. If it is blocked, enter the blocking processing program. If it is not blocked, read Get the type of transition and the station triggered by the transition, and enter the corresponding transition processing program. The triggering of transitions should follow the above-mentioned transition triggering rules, and the following uses a flow chart to describe its implementation process.

(1)系统变迁处理的主流程(1) Main process of system transition processing

设一条混批装配线上共有33个装配工位,且一批生产计划要求装配20个产品,则ESHLEP-N模型的初始有色标识可表示成:Assuming that there are 33 assembly stations in a mixed batch assembly line, and a batch of production plans requires assembly of 20 products, then the initial colored logo of the ESHLEP-N model can be expressed as:

CM0(p1)=33w,表示所有装配工位都空闲。CM 0 (p 1 )=33w, indicating that all assembly stations are free.

CM0(p2)=20b,表示待装品库中有20个待装品。CM 0 (p 2 )=20b, indicating that there are 20 items to be loaded in the item library.

CM0(p3)=φ,表示所有工位都无产品等待装配。CM 0 (p 3 )=φ, indicating that there is no product waiting for assembly at all stations.

CM0(p4)=φ,表示没有工位正在装配产品。CM 0 (p 4 )=φ, indicating that no station is assembling products.

CM0(p5)=φ,表示没有工位出故障。CM 0 (p 5 )=φ, indicating that no station fails.

CM0(p6)=φ,表示成品库中没有装配好的成品。CM 0 (p 6 )=φ, indicating that there is no assembled finished product in the finished product warehouse.

根据上面的初始有色标识,可得系统变迁处理的主流程(即仿真软件的主程序框图)如图10所示。According to the initial colored marks above, the main process of system transition processing (that is, the main program block diagram of the simulation software) is shown in Figure 10.

(2)变迁t1的处理流程(2) Processing flow of transition t1

变迁t1的作用是使“待装品库”库所中的待装品进入装配线。该变迁发生的工位一定是装配线的最小工位,即上线工位。在处理变迁t1的时候,先判断待装品库所中是否还有令牌;如果有,则在最小工位的排队库所中加入待装品;如果没有,则在该工位的“排队”库所中加入类型为-1的虚拟待装品。其处理流程如图11所示。The function of transition t1 is to make the goods to be loaded in the warehouse of "warehouse to be loaded" enter the assembly line. The station where this change occurs must be the smallest station on the assembly line, that is, the on-line station. When processing transition t1 , it is first judged whether there are tokens in the warehouse of the goods to be loaded; if yes, add the goods to be loaded in the queuing warehouse of the smallest station; Add a virtual item of type -1 to the "queuing" storehouse. Its processing flow is shown in Figure 11.

(3)变迁t2的处理流程(3) Processing flow of transition t2

变迁t2是“开始装配”变迁,即从变迁发生工位的排队库所中取一个产品,如不为虚拟待装品则将该工位状态置成working并产生该工位的变迁t3置入变迁队列,然后完成阻塞判断等任务,其处理流程如图12所示。值得一提的是,在该处理流程中产生变迁t3时,要考虑该产品在该工位是否需要装配准备的情况,如果需要准备,则须将产品的准备时间加上其装配时间作为变迁t3的触发时间,否则将产品的装配时间作为变迁t3的触发时间。由于人工处理装配作业而使装配线具有柔性,允许在每个工位的虚拟缓冲区中设置一定数量的在装品(正在装配过程中的产品)存放位置,即允许工人在任务完成的情况下适当向前移动装配位置,在任务来不及完成的情况下适当向后移动装配位置,但受装配件所在位置的制约,工人前后移动的位置不能超过规定界限,这可通过规定每一个工位的缓冲区及其下一个工位的缓冲区中的在装品总数不超过额定数量来限制。因此,根据数据库中的工位参数设置,在仿真开始的时候就确定每个工位的缓冲区额定数量,当本工位缓冲区及其下一个工位缓冲区中的在装品总数超过额定数量时,定义本工位的缓冲区已满,且装配线发生阻塞。Transition t 2 is the transition of "start assembly", that is, take a product from the queuing warehouse of the station where the transition occurs, if it is not a virtual product to be installed, set the state of the station to working and generate the transition t 3 of the station Put it into the transition queue, and then complete tasks such as blocking judgment. The processing flow is shown in Figure 12. It is worth mentioning that when transition t3 occurs in this processing flow, it is necessary to consider whether the product needs assembly preparation at this station. If preparation is required, the preparation time of the product must be added to its assembly time as the transition The trigger time of t3 , otherwise, the assembly time of the product is taken as the trigger time of transition t3 . The assembly line is flexible due to the manual handling of the assembly work, allowing a certain number of storage locations for the product in progress (products in the assembly process) to be set in the virtual buffer zone of each station, that is, allowing the workers to properly handle the assembly when the task is completed. Move the assembly position forward, and properly move the assembly position backward when the task is too late to complete. However, due to the constraints of the position of the assembly parts, the forward and backward movement of the worker cannot exceed the specified limit. This can be achieved by specifying the buffer zone of each station. And the total number of goods in progress in the buffer zone of the next station shall not exceed the rated quantity. Therefore, according to the station parameter settings in the database, the rated quantity of the buffer zone of each station is determined at the beginning of the simulation. quantity, the buffer zone defining this station is full and the assembly line is blocked.

(4)变迁t3的处理流程(4) Processing flow of transition t3

变迁t3是“完成装配”变迁,即某一工位相应产品的装配任务完成变迁,主要处理本工位和下一工位的状态,其处理流程如图13所示。图中,工位的ready状态表示相应工位已经就绪,可以开始装配(含准备)。Transition t 3 is the transition of "complete assembly", that is, the transition of the completion of the assembly task of the corresponding product at a certain station, which mainly deals with the status of this station and the next station, and its processing flow is shown in Figure 13. In the figure, the ready state of the station indicates that the corresponding station is ready for assembly (including preparation).

(5)变迁t4的处理流程(5) Processing flow of transition t4

变迁t4是“故障发生”变迁,其处理流程相对简单,如图14所示。在该处理流程中,首先需要判断在故障发生的时候工位是否在工作,即工位上是否有在装品,如果有,则需在变迁队列中删除本工位的变迁t3。然后保存故障发生前本工位的状态信息并置本工位的状态为wrong。Transition t 4 is a "fault occurs" transition, and its processing flow is relatively simple, as shown in Figure 14. In this processing flow, it is first necessary to determine whether the station is working when the fault occurs, that is, whether there is a product in progress on the station, and if so, the transition t 3 of the station needs to be deleted in the transition queue. Then save the state information of the station before the fault occurs and set the state of the station to wrong.

(6)变迁t5的处理流程(6) Processing flow of transition t5

变迁t5是“故障结束”变迁,其处理流程如图15所示。在该处理流程中,首先需要判断本工位上是否有在装品,如果没有,则只需简单地将本工位的状态置为empty。否则需要进一步判断在故障发生前本工位是否在装配产品,如果是,则需恢复在此前触发的变迁t4的处理流程中删除的本工位的变迁t3并将t3原来的触发时间加上本故障的持续时间作为t3新的触发时间,如果不是,则生成本工位的变迁t2Transition t5 is a transition of "fault end", and its processing flow is shown in Figure 15. In this processing flow, it is first necessary to determine whether there is a product in progress at this station, and if not, simply set the status of this station to empty. Otherwise, it is necessary to further judge whether this station is assembling products before the fault occurs, and if so, it is necessary to restore the transition t3 of this station that was deleted in the processing flow of the previously triggered transition t4 and set the original trigger time of t3 Add the duration of this fault as the new trigger time of t 3 , if not, generate the transition t 2 of this station.

(7)阻塞处理流程(7) Blocking processing flow

上面的变迁t1-5处理流程是在装配线正常情况下发生的。在阻塞情况下,总的处理原则与在正常情况下大致相同,略有区别,如图16所示:当在阻塞状态下变迁t2触发时,首先需要判断变迁触发的工位是不是处于阻塞状态的工位,如果是,则清除装配线及该工位的阻塞标志,并按正常情况处理该变迁;否则不处理该变迁。同样,在处理变迁t3的时候,也要先判断变迁触发的工位是不是当前的阻塞工位,如果是,则按正常情况处理该变迁,否则不处理该变迁。所以通过处理这些在阻塞工位上触发的变迁,就可以消除装配线的阻塞。在阻塞消除之后,再处理变迁队列中所有变迁触发时间小于当前仿真时间(当前仿真时间是消除装配线阻塞的变迁触发时间)的变迁。这样做相当于在装配线阻塞的时候,其余工位上的“开始装配”及“完成装配”事件和“待装品上装配线”事件都不能发生,只有在装配线阻塞消除之后,这些事件才能发生。The above transition t 1-5 processing flow occurs under normal conditions of the assembly line. In the case of blocking, the general processing principle is roughly the same as in the normal case, with a slight difference, as shown in Figure 16: When the transition t2 is triggered in the blocked state, it is first necessary to judge whether the station triggered by the transition is blocked state, if it is, clear the assembly line and the blocking flag of the station, and process the transition as normal; otherwise, do not process the transition. Similarly, when processing transition t3 , it is also necessary to first judge whether the station triggered by the transition is the current blocked station, and if so, process the transition as normal; otherwise, do not process the transition. So by processing these transitions that are triggered at the blocking station, you can eliminate the blocking of the assembly line. After the blockage is eliminated, all transitions in the transition queue whose transition trigger time is less than the current simulation time (the current simulation time is the transition trigger time for eliminating assembly line blockage) are processed. This is equivalent to when the assembly line is blocked, the "start assembly" and "finish assembly" events and the "to-be-loaded assembly line" events on other stations cannot occur. These events can only occur after the assembly line blockage is eliminated.

4.4混批装配线生产调度仿真的实现4.4 Realization of production scheduling simulation of mixed batch assembly line

混批装配线生产调度仿真的实现是以扩展随机高级判断Petri网(ESHLEP-N)模型的实现为基础的。在前面,我们已经建立了混批装配线的ESHLEP-N的模型,并介绍了其面向对象的实现,包括库所、令牌与变迁的基于Microsoft MFC的类(class)表示,变迁队列,变迁触发规则和变迁处理流程。在此基础上,我们采用Microsoft Visual C++5.0编写了混批装配线的生产调度仿真软件。The realization of production scheduling simulation of mixed batch assembly line is based on the realization of Extended Stochastic Advanced Decision Petri Net (ESHLEP-N) model. Previously, we have established the ESHLEP-N model of the mixed-batch assembly line, and introduced its object-oriented implementation, including the Microsoft MFC-based class (class) representation of places, tokens and transitions, transition queues, and transition triggers Rules and transition processing flow. On this basis, we use Microsoft Visual C ++ 5.0 to write the production scheduling simulation software of mixed batch assembly line.

仿真过程如下:首先,根据上述嵌入式禁忌搜索仿真法、交替式禁忌搜索仿真法、或串行式禁忌搜索仿真法中给定的计划(产品种类与数量)与调度(装配顺序)来初始化“待装品库”库所,即确定待装品的种类、数量和上线装配的顺序,然后根据先到先服务规则和上述变迁触发规则,依次将在“待装品库”库所中的待装品送上装配线进行装配;待装品经上线工位装配后成为在装品,并沿着装配线依次在每个工位进行装配;在装品在每个工位完成装配后,进入下一工位的“排队”库所;每个工位的“排队”库所有一定容量,当某个工位“排队”库所中的在装品数量超过这一容量时,装配线进入阻塞状态;在装品经最后一个工位(下线工位)装配后成为成品并进入“成品库”库所;在整个仿真过程中,允许工位发生故障;当所有汽车下线后,仿真结束。为缩短仿真时间,采用可变时间流来控制仿真进程并在仿真过程中无文字和图形的动态显示,仅仅通过快速仿真计算给定调度的性能指标。The simulation process is as follows: First, initialize the " To-be-installed warehouse" warehouse, that is, to determine the type, quantity and on-line assembly sequence of the to-be-installed goods, and then according to the first-come-first-served rule and the above-mentioned transition trigger rules, sequentially place the waiting The loaded product is sent to the assembly line for assembly; the product to be loaded is assembled at the on-line station and becomes the in-process product, and is assembled at each station in turn along the assembly line; after the in-process product is assembled at each station, it enters the next The "queuing" warehouse of the station; the "queuing" warehouse of each station has a certain capacity. When the quantity of goods in progress in the "queuing" warehouse of a certain station exceeds this capacity, the assembly line enters a blocked state; in After being assembled by the last station (off-line station), the loaded product becomes a finished product and enters the "finished product warehouse" warehouse; during the whole simulation process, the station is allowed to fail; when all the cars are off-line, the simulation ends. In order to shorten the simulation time, a variable time flow is used to control the simulation process and there is no dynamic display of text and graphics during the simulation process, and only the performance index of a given schedule is calculated through fast simulation.

由于在仿真中需要很多参数,为了软件的通用性,将参数放在数据库中,并在启动仿真的时候读取这些参数。这样,在装配线的情况改变之后,只需根据提供的数据库接口修改参数,而无需修改调度仿真软件就可适应新的情况。由于使用Microsoft Visual C++5.0作为调度仿真软件的开发工具,所以可以方便地利用Microsoft提供的MFC类库来完成数据库中数据的读取。同时,我们也在VC中提供了数据库的修改接口,主要用Activex控件DBGrid和RemoteDataControl来实现数据的读取和修改。Because many parameters are needed in the simulation, for the generality of the software, the parameters are placed in the database, and these parameters are read when the simulation is started. In this way, after the situation of the assembly line changes, only the parameters need to be modified according to the database interface provided, and the scheduling simulation software can adapt to the new situation without modifying the scheduling simulation software. Since Microsoft Visual C ++ 5.0 is used as the development tool of the scheduling simulation software, the MFC class library provided by Microsoft can be used to read the data in the database conveniently. At the same time, we also provide a database modification interface in VC, mainly using Activex controls DBGrid and RemoteDataControl to realize data reading and modification.

综上所述,ESHLEP-N具有形象直观,结构简单,节点少,描述性好,决策能力强,双重令牌和双重标识等优点,非常适合混批装配线的建模和调度仿真。该调度仿真软件有两个主要用途:其一,作为快速调度仿真器(即无文字和图形的动态显示),用以计算给定调度的性能指标;其二,在获得最优生产计划和调度后,将调度仿真软件设置成动画显示(或ESHLEP-N图形显示)方式,用以观察混批装配线的最优调度过程,获取最优调度性能指标。In summary, ESHLEP-N has the advantages of intuitive image, simple structure, few nodes, good description, strong decision-making ability, double token and double identification, etc., which is very suitable for modeling and scheduling simulation of mixed batch assembly line. The scheduling simulation software has two main purposes: first, as a fast scheduling simulator (that is, dynamic display without text and graphics), to calculate the performance index of a given scheduling; second, to obtain the optimal production plan and scheduling Finally, set the scheduling simulation software to animation display (or ESHLEP-N graphic display) mode to observe the optimal scheduling process of the mixed-batch assembly line and obtain the optimal scheduling performance index.

5、混批装配线的生产计划、调度与仿真的集成优化软件5. Integrated optimization software for production planning, scheduling and simulation of mixed batch assembly line

根据上述算法1-5及其程序流程图,和混批装配线的ESHLEP-N的模型及其面向对象的实现方法,本发明者已采用Microsoft Visual C++5.0编程实现了求解上述混批装配线生产计划与调度集成优化问题的嵌入式禁忌搜索仿真法、交替式禁忌搜索仿真法、和串行式禁忌搜索仿真法,开发了混批装配线的生产计划、调度与仿真的集成优化软件,其软件结构如图17所示。该软件由订单平滑、粗生产计划、嵌入式禁忌搜索、交替式禁忌搜索、串行式禁忌搜索、动画调度仿真、参数管理和优化结果查询等8个模块组成,其中嵌入式禁忌搜索、交替式禁忌搜索和串行式禁忌搜索模块又共同调用快速调度仿真模块。图中,订单平滑模块用于平滑客户的需求;粗生产计划模块采用分枝定界法求解式(4)-(8)的混合整数线性规划模型以获取使各装配工位的准备成本和空闲时间尽可能少并尽可能满足产品需求的粗生产计划;动画调度仿真模块与快速调度仿真模块的主要区别在于仿真过程中有无动画显示;参数管理模块管理混合整数线性规划模型中的产品成本系数,产品在各工位的装配时间、准备时间和准备成本,工位空闲及故障,和算法参数;优化结果查询模块用于查询生产计划与调度集成优化的结果。According to above-mentioned algorithm 1-5 and program flowchart thereof, and the ESHLEP-N model of mixed batch assembly line and its object-oriented realization method, the present inventor has adopted Microsoft Visual C ++ 5.0 programming to realize solving above-mentioned mixed batch assembly line production Embedded tabu search simulation method, alternate tabu search simulation method, and serial tabu search simulation method for integrated optimization of planning and scheduling, developed integrated optimization software for production planning, scheduling and simulation of mixed-batch assembly line, its software structure As shown in Figure 17. The software consists of 8 modules including order smoothing, rough production planning, embedded tabu search, alternate tabu search, serial tabu search, animation scheduling simulation, parameter management and optimization result query. The tabu search and serial tabu search modules call the fast scheduling simulation module together. In the figure, the order smoothing module is used to smooth the customer's demand; the rough production planning module uses the branch and bound method to solve the mixed integer linear programming model of formula (4)-(8) to obtain the preparation cost and idle time of each assembly station A rough production plan that takes as little time as possible and meets product demand as much as possible; the main difference between the animation scheduling simulation module and the fast scheduling simulation module is whether there is animation display during the simulation process; the parameter management module manages the product cost coefficient in the mixed integer linear programming model , the assembly time, preparation time and preparation cost of the product at each station, the idleness and failure of the station, and the algorithm parameters; the optimization result query module is used to query the results of the integrated optimization of production planning and scheduling.

Claims (4)

1、一种混批装配线的集成优化控制方法,其特征在于该方法包括以下步骤:1. An integrated optimization control method for a mixed batch assembly line, characterized in that the method comprises the following steps: (1)平滑客户的产品需求;(1) Smooth customer product demand; (2)根据平滑后的产品需求,用分枝定界算法求解混批装配线的混合整数规划模型,以获得使各装配工位的准备成本和空闲时间尽可能少并尽可能满足产品需求的粗生产计划;(2) According to the smoothed product demand, the branch and bound algorithm is used to solve the mixed integer programming model of the mixed-batch assembly line, so as to obtain the rough plan that minimizes the preparation cost and idle time of each assembly station and satisfies the product demand as much as possible. Production Plan; (3)在混批装配线的生产计划与调度的集成优化模型的基础上,针对产品种类和数量的少、中、多等三个不同程度,分别用嵌入式禁忌搜索仿真法、交替式禁忌搜索仿真法、和串行式禁忌搜索仿真法来获得以粗生产计划作为初始解的混批装配线的最好生产计划即产品种类与数量,和调度即装配顺序;(3) On the basis of the integrated optimization model of production planning and scheduling of the mixed batch assembly line, aiming at three different levels of product types and quantities, such as small, medium and large, respectively use the embedded tabu search simulation method and the alternate tabu search The simulation method and the serial tabu search simulation method are used to obtain the best production plan of the mixed-batch assembly line with the rough production plan as the initial solution, that is, the product type and quantity, and the scheduling, that is, the assembly sequence; (4)通过动画调度仿真观察混批装配线的最优调度过程;(4) Observe the optimal scheduling process of the mixed-batch assembly line through animation scheduling simulation; (5)判断是否满足客户的产品需求;(5) Judging whether the product requirements of customers are met; (6)如果经过动画调度仿真,认为不满足产品需求,则可对最好计划与调度作适当修改后再仿真;(6) If after the animation scheduling simulation, it is considered that the product requirements are not met, the best plan and scheduling can be modified appropriately and then simulated; (7)如果经过动画调度仿真,认为满足产品需求,则可将其作为准备下达执行的正式计划与调度;(7) If it is considered to meet the product requirements after animation scheduling simulation, it can be used as a formal plan and scheduling to be issued for execution; (8)根据正式计划与调度,安排生产和控制待装品的上线,并根据动画调度仿真时确定的装配线移动速度控制混批装配线的运行。(8) According to the formal plan and scheduling, arrange the production and control the on-line of the products to be installed, and control the operation of the mixed-batch assembly line according to the moving speed of the assembly line determined during the animation scheduling simulation. 2、根据权利要求1所述的混批装配线的集成优化控制方法,其特征在于嵌入式禁忌搜索仿真法的主要步骤是:(1)以粗生产计划作为初始生产计划寻找一个可行计划与调度,(2)然后在计划层用禁忌搜索寻找最好的计划,(3)并对计划层生成的每个相邻计划用另一个禁忌搜索寻找经过快速仿真计算具有最好性能指标的调度,直至使生产计划与调度同时达到优化。2. The integrated optimization control method of the mixed batch assembly line according to claim 1, characterized in that the main steps of the embedded tabu search simulation method are: (1) looking for a feasible plan and scheduling with the rough production plan as the initial production plan, (2) Then use tabu search to find the best plan at the plan layer, (3) use another tabu search to find the schedule with the best performance index after fast simulation calculation for each adjacent plan generated by the plan layer, until using Production planning and scheduling are optimized at the same time. 3、根据权利要求1所述的混批装配线的集成优化控制方法,其特征在于交替式禁忌搜索仿真法的主要步骤是:(1)以粗生产计划作为初始生产计划寻找一个可行计划与调度;(2)给定调度,用禁忌搜索寻找经过快速仿真计算具有最好性能指标的计划;(3)反过来给定计划,又用另一禁忌搜索寻找经过快速仿真计算具有最好性能指标的调度;(4)交替使用(2)、(3)两步直至找到最好的计划与调度。3. The integrated optimization control method of the mixed batch assembly line according to claim 1, characterized in that the main steps of the alternate tabu search simulation method are: (1) looking for a feasible plan and scheduling with the rough production plan as the initial production plan; (2) Given the schedule, use tabu search to find the plan with the best performance index after fast simulation calculation; (3) Conversely given the plan, use another tabu search to find the schedule with the best performance index after fast simulation calculation ; (4) Alternately use (2) and (3) two steps until finding the best plan and scheduling. 4、根据权利要求1所述的混批装配线的集成优化控制方法,其特征在于串行式禁忌搜索仿真法的主要步骤是:(1)以粗生产计划作为初始生产计划并用规则调度仿真法寻找一个可行计划与调度;(2)从可行计划开始,用禁忌搜索寻找基于规则调度并经过快速仿真计算具有最好性能指标的计划;(3)对于最好的计划,使用另一禁忌搜索寻找经过快速仿真计算具有最好性能指标的调度。4. The integrated optimization control method of the mixed batch assembly line according to claim 1, characterized in that the main steps of the serial tabu search simulation method are: (1) use the rough production plan as the initial production plan and use the rule scheduling simulation method to find A feasible plan and scheduling; (2) Starting from the feasible plan, use tabu search to find the plan with the best performance index based on rule scheduling and fast simulation calculation; (3) For the best plan, use another tabu search to find the Fast simulation computes the schedule with the best performance metrics.
CNA2003101060069A 2003-10-08 2003-10-08 Integrated Optimal Control Method for Mixed Batch Assembly Line Pending CN1529209A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2003101060069A CN1529209A (en) 2003-10-08 2003-10-08 Integrated Optimal Control Method for Mixed Batch Assembly Line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2003101060069A CN1529209A (en) 2003-10-08 2003-10-08 Integrated Optimal Control Method for Mixed Batch Assembly Line

Publications (1)

Publication Number Publication Date
CN1529209A true CN1529209A (en) 2004-09-15

Family

ID=34304366

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2003101060069A Pending CN1529209A (en) 2003-10-08 2003-10-08 Integrated Optimal Control Method for Mixed Batch Assembly Line

Country Status (1)

Country Link
CN (1) CN1529209A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102402722A (en) * 2011-09-28 2012-04-04 上海交通大学 Method to improve assembly line efficiency of construction machinery products
CN102402734A (en) * 2011-10-18 2012-04-04 北京理工大学 Machining and assembly alternative mixed scheduling method under flexible path
CN101533490B (en) * 2009-04-29 2012-06-20 江南大学 Processing optimization method for processing equipment of workshop
CN106227163A (en) * 2016-07-15 2016-12-14 中国电子科技集团公司第二十八研究所 Equipment manufacturing system no-dead-time control method based on Petri network and simulated annealing
CN106980308A (en) * 2017-05-09 2017-07-25 青岛大学 The integrated dispatching method disassembled, pre-process and reassembled of remanufacturing system
CN107944720A (en) * 2017-11-30 2018-04-20 上海电机学院 A kind of fittage planing method of complex product
CN112329981A (en) * 2020-09-27 2021-02-05 广州明珞装备股份有限公司 Method, system and device for determining station optimization point and storage medium
CN115935196A (en) * 2022-11-18 2023-04-07 无锡药明生物技术股份有限公司 Calculation method, optimization method and device for matching degree of process and production line
CN119225314A (en) * 2024-09-27 2024-12-31 陕西科技大学 Machine selection buffer allocation method and system for finite buffer production line based on Petri net

Cited By (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101533490B (en) * 2009-04-29 2012-06-20 江南大学 Processing optimization method for processing equipment of workshop
CN102402722A (en) * 2011-09-28 2012-04-04 上海交通大学 Method to improve assembly line efficiency of construction machinery products
CN102402734A (en) * 2011-10-18 2012-04-04 北京理工大学 Machining and assembly alternative mixed scheduling method under flexible path
CN106227163B (en) * 2016-07-15 2019-05-03 中国电子科技集团公司第二十八研究所 Deadlock-free scheduling method for equipment manufacturing system based on Petri net and simulated annealing
CN106227163A (en) * 2016-07-15 2016-12-14 中国电子科技集团公司第二十八研究所 Equipment manufacturing system no-dead-time control method based on Petri network and simulated annealing
CN106980308A (en) * 2017-05-09 2017-07-25 青岛大学 The integrated dispatching method disassembled, pre-process and reassembled of remanufacturing system
CN106980308B (en) * 2017-05-09 2019-10-01 青岛大学 The dismantling of remanufacturing system, the integrated dispatching method for pre-processing and reassembling
CN107944720A (en) * 2017-11-30 2018-04-20 上海电机学院 A kind of fittage planing method of complex product
CN107944720B (en) * 2017-11-30 2021-12-21 上海电机学院 Assembly task planning method for complex product
CN112329981A (en) * 2020-09-27 2021-02-05 广州明珞装备股份有限公司 Method, system and device for determining station optimization point and storage medium
CN112329981B (en) * 2020-09-27 2023-10-20 广州明珞装备股份有限公司 Station optimization point determining method, system, device and storage medium
CN115935196A (en) * 2022-11-18 2023-04-07 无锡药明生物技术股份有限公司 Calculation method, optimization method and device for matching degree of process and production line
CN119225314A (en) * 2024-09-27 2024-12-31 陕西科技大学 Machine selection buffer allocation method and system for finite buffer production line based on Petri net

Similar Documents

Publication Publication Date Title
CN1122908C (en) Mathod and power management for a data processing system
CN1021489C (en) Expert system development support system and expert system
CN1027198C (en) Computing device
CN1910601A (en) Constraint condition solving method, constraint condition solving device, and constraint condition solving system
CN101034349A (en) Database application system development platform based on function design
CN100347696C (en) Method and system for enterprise business process management
CN1102720A (en) Optimization of manufacturing resource planning
CN1172239C (en) Execute the method of moving the object
CN1024954C (en) Programmable controller for elevator system
Klemmt et al. Simulation-based optimization vs. mathematical programming: A hybrid approach for optimizing scheduling problems
CN1474979A (en) Customized rule system and method for expert system
CN1388923A (en) Simulation model creation method and system, and storage medium
CN1632749A (en) Method for constructing intelligent user assistance facility
CN1276575A (en) Database access system
CN1051442A (en) fuzzy computer
CN1629867A (en) Maintenance support method, and maintenance support apparatus
CN1535442A (en) Enterprise profit improvement support system and product production business reform support system
CN101044482A (en) Entity-based configurable data archive management system and method
CN1529209A (en) Integrated Optimal Control Method for Mixed Batch Assembly Line
CN101061464A (en) Information processing device, program thereof, modular type system operation management system, and component selection method
CN1677407A (en) Marketing course quantization management system
CN101064028A (en) Products innovating design system based on QFD and TRIZ
CN1672146A (en) Simulation system and method for nonlinear dynamic systems in soft computing
CN1608260A (en) Environment assessment table, environment assessment apparatus, environment assessment system, server apparatus for environment assessment, terminal apparatus for environment assessment, auction syste
CN1444161A (en) Resolution method of material detailed list (BOM) data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication