[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN117707083A - Scheduling method, terminal equipment and storage medium for distributed assembly line shop - Google Patents

Scheduling method, terminal equipment and storage medium for distributed assembly line shop Download PDF

Info

Publication number
CN117707083A
CN117707083A CN202311755105.3A CN202311755105A CN117707083A CN 117707083 A CN117707083 A CN 117707083A CN 202311755105 A CN202311755105 A CN 202311755105A CN 117707083 A CN117707083 A CN 117707083A
Authority
CN
China
Prior art keywords
workpiece
factory
assembly
processing
workpieces
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
CN202311755105.3A
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.)
Kunming University of Science and Technology
Original Assignee
Kunming University of Science and Technology
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 Kunming University of Science and Technology filed Critical Kunming University of Science and Technology
Priority to CN202311755105.3A priority Critical patent/CN117707083A/en
Publication of CN117707083A publication Critical patent/CN117707083A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • G05B19/41865Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM] characterised by job scheduling, process planning, material flow
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/30Nc systems
    • G05B2219/32Operator till task planning
    • G05B2219/32252Scheduling production, machining, job shop

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • General Factory Administration (AREA)

Abstract

The invention discloses a scheduling method, terminal equipment and storage medium of a distributed assembly flow shop, and belongs to the technical field of scheduling problems of flexible distributed assembly flow workshops.

Description

分布式装配流水车间的调度方法、终端设备及存储介质Scheduling methods, terminal equipment and storage media for distributed assembly flow workshops

技术领域Technical field

本发明涉及柔性分布式装配流水车间调度问题技术领域,尤其涉及一种分布式装配流水车间的调度方法、终端设备及存储介质。The invention relates to the technical field of flexible distributed assembly flow shop scheduling issues, and in particular to a scheduling method, terminal equipment and storage medium for a distributed assembly flow shop.

背景技术Background technique

随着工业4.0的最新发展,智能制造正在推动制造自动化的变革,使生产模式变得更加灵活、智能和高度集成化。作为智能制造管理决策的核心,车间调度能够整合生产计划的物理和决策方面,推动分散供应链系统中的自主制造。然而,随着全球化的深入发展,传统的单一工厂生产已无法满足全球市场需求的快速变化。在汽车、钢铁、电力、服装、液晶显示、化工加工等行业,多工厂化生产或分布式生产成为流行的生产方式,因此在现代制造环境中,分布式车间调度备受关注。此外,由于能源问题日益突出,节能调度也受到关注。在此背景下,研究考虑能效的节能型分布式生产调度问题具有重要的现实意义和工程应用价值。With the latest development of Industry 4.0, smart manufacturing is driving changes in manufacturing automation, making the production model more flexible, intelligent and highly integrated. As the core of intelligent manufacturing management decision-making, shop floor scheduling can integrate the physical and decision-making aspects of production planning and promote autonomous manufacturing in decentralized supply chain systems. However, with the deepening development of globalization, traditional single factory production can no longer meet the rapid changes in global market demand. In industries such as automobiles, steel, electric power, clothing, LCD, chemical processing, etc., multi-factory production or distributed production has become a popular production method. Therefore, in modern manufacturing environments, distributed workshop scheduling has attracted much attention. In addition, as energy issues become increasingly prominent, energy-saving dispatch has also received attention. In this context, studying the energy-saving distributed production scheduling problem considering energy efficiency has important practical significance and engineering application value.

在当前备受关注的分布式调度问题中,分布式装配换流水车间调度问题(Distributed Assembly Permutation Flow-Shop Scheduling Problem,DAPFSP)是一种在先进制造系统和现代供应链中广泛存在的问题。许多制造企业面临的实际调度问题可以被归纳为DAPFSP的模型。例如,在国内制造私人电脑的大中型企业中,每台私人电脑的所有零部件,如CPU、电池、散热器等,首先各零部件会在不同的工厂或流水车间生产加工,然后这些零部件将配送到装配工厂中装配组成私人电脑。Among the distributed scheduling problems that have attracted much attention at present, the Distributed Assembly Permutation Flow-Shop Scheduling Problem (DAPFSP) is a problem that widely exists in advanced manufacturing systems and modern supply chains. Many practical scheduling problems faced by manufacturing companies can be summarized as the DAPFSP model. For example, in large and medium-sized domestic companies that manufacture personal computers, all the components of each personal computer, such as CPU, battery, radiator, etc., will first be produced and processed in different factories or flow workshops. Will be delivered to the assembly factory to assemble into a personal computer.

但是DAPFSP在装配阶段假设只有一台装配机器这限制了分布式生产的灵活性。若采用多台装配机器装配则可以提高生产率和装配效率,进而致使分布式装配换流水车间调度问题演变为更复杂的柔性分布式装配流水车间调度问题(Distributed Flow-Shop WithFlexible Assembly Scheduling Problem,DFFASP),进而需要提出一种能够解决柔性分布式装配流水车间调度问题的调度方法,从而提高生产效率和装配效率。However, DAPFSP assumes only one assembly machine during the assembly stage, which limits the flexibility of distributed production. If multiple assembly machines are used for assembly, productivity and assembly efficiency can be improved, thereby causing the distributed assembly flow shop scheduling problem to evolve into a more complex flexible distributed assembly flow shop scheduling problem (Distributed Flow-Shop WithFlexible Assembly Scheduling Problem, DFFASP) , and then it is necessary to propose a scheduling method that can solve the scheduling problem of flexible distributed assembly flow shop, thereby improving production efficiency and assembly efficiency.

上述内容仅用于辅助理解本发明的技术方案,并不代表承认上述内容是现有技术。The above content is only used to assist in understanding the technical solution of the present invention, and does not represent an admission that the above content is prior art.

发明内容Contents of the invention

本发明实施例通过提供一种分布式装配流水车间的调度方法、终端设备及计算机可读存储介质,达成解决柔性分布式装配流水车间调度问题的目的,从而提高生产效率和装配效率。Embodiments of the present invention achieve the purpose of solving the scheduling problem of flexible distributed assembly flow workshops by providing a scheduling method, terminal equipment and computer-readable storage medium for a distributed assembly flow workshop, thereby improving production efficiency and assembly efficiency.

为实现上述目的,本发明实施例提供一种分布式装配流水车间的调度方法,所述分布式装配流水车间的调度方法包括以下:To achieve the above objectives, embodiments of the present invention provide a scheduling method for a distributed assembly flow shop. The scheduling method for a distributed assembly flow shop includes the following:

根据柔性分布式装配流水车间的工艺参数,构建能耗约束下的柔性分布式装配流水车间调度问题的数学模型,所述数学模型包括目标函数和约束条件;According to the process parameters of the flexible distributed assembly flow shop, construct a mathematical model for the scheduling problem of the flexible distributed assembly flow shop under energy consumption constraints. The mathematical model includes an objective function and constraints;

基于工件的加工时间对工件进行聚类,确定各个工厂对应的目标工件;Cluster the workpieces based on their processing time and determine the target workpieces corresponding to each factory;

根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间;According to the improved DRL algorithm model, determine the processing sequence of the target workpiece corresponding to each of the factories and the maximum completion time of the processing sequence corresponding to each of the factories;

获取各个所述工厂内待生产产品的生产子计划,根据所述生产子计划确定各个所述工厂对应的装配子计划;Obtain the production sub-plan of the products to be produced in each of the factories, and determine the assembly sub-plan corresponding to each of the factories according to the production sub-plan;

根据各个所述工厂的加工序列和所述装配子计划,确定所述目标函数值;Determine the objective function value according to the processing sequence of each factory and the assembly sub-plan;

在不满足迭代次数时,继续执行所述根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间的步骤;在满足迭代次数时,输出满足预设条件的所述目标函数值对应的调度方案。When the number of iterations is not satisfied, continue to execute the step of determining the processing sequence of the target workpiece corresponding to each factory and the maximum completion time of the processing sequence corresponding to each factory according to the improved DRL algorithm model; in When the number of iterations is met, a scheduling plan corresponding to the objective function value that meets the preset conditions is output.

可选地,所述目标函数为:最小化最大完工时间和在整个制造期内的总能耗;其中,所述总能耗,包括4个部分:第一部分为机器处于加工状态时的能耗,第二部分为运输时的能耗,第三部分为机器处于待机时的能耗,第四部分为机器处于序相关设置的能耗;所述约束条件为:每个工作必须只分配给一个工厂,每个工作必须在生产中有序处理,每个生产机器一次只能处理一个工作,每个产品必须只在一台装配机器上处理,每个产品只有在所有相关工作都完成并运送到相应装配机器上时才能装配,每个装配机器一次只能处理一个产品,每台装配机器一次只能加工一个产品。Optionally, the objective function is: minimizing the maximum completion time and the total energy consumption during the entire manufacturing period; wherein the total energy consumption includes 4 parts: the first part is the energy consumption when the machine is in the processing state. , the second part is the energy consumption during transportation, the third part is the energy consumption when the machine is in standby, and the fourth part is the energy consumption when the machine is in sequence-related settings; the constraints are: each job must be assigned to only one Factory, each job must be processed in an orderly manner in production, each production machine can only process one job at a time, each product must be processed on only one assembly machine, each product must be processed only after all related work has been completed and shipped to It can only be assembled when the corresponding assembly machine is on. Each assembly machine can only process one product at a time, and each assembly machine can only process one product at a time.

可选地,所述根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间的步骤,包括:Optionally, the step of determining the processing sequence of the target workpiece corresponding to each factory and the maximum completion time of the processing sequence corresponding to each factory according to the improved DRL algorithm model includes:

对所述工厂内的各个所述目标工件的加工时间建模,将各个所述目标工件在所有机器上的加工时间编码转换成一个固定维数的第一向量;Model the processing time of each target workpiece in the factory, and convert the processing time encoding of each target workpiece on all machines into a first vector with a fixed dimension;

对所述第一向量建模,编码转换成第二向量;Model the first vector and convert the encoding into a second vector;

将所述第二向量输入预先基于RNN和Attention机制构建的解码网络,生成所述工厂对应的所述目标工件的加工序列。The second vector is input into a decoding network built in advance based on RNN and Attention mechanisms to generate a processing sequence of the target workpiece corresponding to the factory.

可选地,所述根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间的步骤之后,包括:Optionally, after the step of determining the processing sequence of the target workpiece corresponding to each factory and the maximum completion time of the processing sequence corresponding to each factory according to the improved DRL algorithm model, the step includes:

获取当前所述DRL算法模型的网络模型参数和关键工厂以及具有最小化最大完工时间的目标工厂;Obtain the network model parameters and key factories of the current DRL algorithm model and the target factory with minimized maximum completion time;

将所述关键工厂的所述加工序列内的最后一个工件分配至所述目标工厂,并将所述网络模型参数作为所述DRL算法模型的初始网络模型参数,然后继续执行所述根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间的步骤。Allocate the last workpiece in the processing sequence of the key factory to the target factory, and use the network model parameters as the initial network model parameters of the DRL algorithm model, and then continue to execute the improved DRL Algorithm model, step of determining the processing sequence of the target workpiece corresponding to each of the factories and the maximum completion time of the processing sequence corresponding to each of the factories.

可选地,基于预设搜索算法训练所述DRL算法模型;其中,所述预设搜索算法包括:Optionally, train the DRL algorithm model based on a preset search algorithm; wherein the preset search algorithm includes:

关键工厂内的插入邻域操作,随机选择一个关键工件,将所述关键工件插入到所有的非关键工件的前面与后面;The insertion neighborhood operation in the key factory randomly selects a key workpiece and inserts the key workpiece in front and behind all non-critical workpieces;

关键工厂内的交换邻域操作,随机选择一个关键工件和其余所有的非关键工件进行交换;The exchange neighborhood operation in the key factory randomly selects a key workpiece and exchanges it with all other non-critical workpieces;

在关键工厂内随机选择一个关键工件和将所述关键工件与各个非关键工厂内的非关键工件交换位置;Randomly selecting a critical workpiece within the critical plant and swapping locations of the critical workpiece with non-critical workpieces within each non-critical plant;

关键工厂和非关键工厂间的插入邻域操作,随机选择一个关键工件,将所述关键工件插入到各个个非关键工厂内的各个非关键工件的前面与后面;The insertion neighborhood operation between key factories and non-critical factories randomly selects a key workpiece and inserts the key workpiece into the front and back of each non-critical workpiece in each non-critical factory;

在装配机器上选择一个加工总时间最大的产品,然后将所述关键工件分配给另一个随机选择的装配机器;Select a product with the largest total processing time on the assembly machine, and then assign the critical workpiece to another randomly selected assembly machine;

选择两个具有最大完工时间差的相邻产品,然后随机交换它们相关联的工件;Select two adjacent products with the largest makespan difference and then randomly exchange their associated workpieces;

交换两个具有最大完工时间差的相邻产品;Swap two adjacent products with the largest makespan difference;

在装配机器上选择一个能量消耗最大的产品,然后将所述关键工件分配给另一个随机选择的装配机器。A product with the highest energy consumption is selected on the assembly machine and then the critical workpiece is assigned to another randomly selected assembly machine.

可选地,所述工件的加工时间包括:工件所有加工操作的平均加工时间、工件的第一次加工的加工时间、工件最后一次加工的加工时间、所有工件的加工时间标准差;所述基于工件的加工时间对工件进行聚类,确定各个工厂对应的目标工件的步骤,包括:Optionally, the processing time of the workpiece includes: the average processing time of all processing operations of the workpiece, the processing time of the first processing of the workpiece, the processing time of the last processing of the workpiece, and the standard deviation of the processing time of all workpieces; the based on The steps to cluster the workpieces based on their processing time and determine the target workpieces corresponding to each factory include:

将所述工件的加工时间作为聚类标准,构建各个工件对应的工件特征集;Use the processing time of the workpiece as a clustering criterion to construct a workpiece feature set corresponding to each workpiece;

通过K-means算法将所述工件特征集划分为K个集群,其中所述K的值根据误差平方和确定;The workpiece feature set is divided into K clusters through the K-means algorithm, where the value of K is determined based on the sum of squared errors;

从第一个所述集群开始,工件作为最后一个工件依次分配给各个工厂,直到所有工件都被分配到各个工厂,从而确定各个所述工厂对应的所述目标工件。Starting from the first cluster, the workpiece is assigned to each factory in sequence as the last workpiece until all workpieces are assigned to each factory, thereby determining the target workpiece corresponding to each factory.

可选地,所述获取各个所述工厂内待生产产品的生产子计划,根据所述生产子计划确定各个所述工厂对应的装配子计划的步骤,包括:Optionally, the step of obtaining the production sub-plan of the product to be produced in each of the factories and determining the assembly sub-plan corresponding to each of the factories according to the production sub-plan includes:

根据所述生产子计划,确定每个所述待生产产品的相关工作以及每个所述待生产产品的所述相关工作的完成时间;According to the production sub-plan, determine the relevant work of each of the products to be produced and the completion time of the relevant work of each of the products to be produced;

按照非降序规则对每个所述待生产产品的所述完成时间排序,获得待生产产品的优先级序列;Sort the completion time of each product to be produced according to non-descending rules to obtain a priority sequence of products to be produced;

根据所述优先级序列的顺序依次取出每个所述待生产产品分配到能够最早完成其装配操作的装配机器上,从而确定各个所述工厂对应的所述装配子计划。According to the order of the priority sequence, each product to be produced is sequentially taken out and assigned to the assembly machine that can complete its assembly operation earliest, thereby determining the assembly sub-plan corresponding to each of the factories.

此外,本发明为实现上述目的,本发明还提供一种终端设备,所述终端设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的分布式装配流水车间的调度程序,所述分布式装配流水车间的调度程序被所述处理器执行时实现如上所述的分布式装配流水车间的调度方法的步骤。In addition, in order to achieve the above object, the present invention also provides a terminal device. The terminal device includes: a memory, a processor, and a distributed assembly flow workshop stored on the memory and capable of running on the processor. When the scheduler of the distributed assembly flow shop is executed by the processor, the steps of the scheduling method of the distributed assembly flow shop as described above are implemented.

此外,本发明为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有分布式装配流水车间的调度程序,所述分布式装配流水车间的调度程序被处理器执行时实现如上所述的分布式装配流水车间的调度方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a scheduling program for a distributed assembly flow workshop. The scheduling program for a distributed assembly flow workshop When executed by the processor, the steps of implementing the above-mentioned scheduling method for a distributed assembly flow shop are implemented.

本发明第一实施例提出的一种分布式装配流水车间的调度方法,终端设备及计算机可读存储介质,通过根据柔性分布式装配流水车间的工艺参数,构建能耗约束下的柔性分布式装配流水车间调度问题的数学模型,数学模型包括目标函数和约束条件,基于工件的加工时间对工件进行聚类,确定各个工厂对应的目标工件,根据改进的DRL算法模型,确定各个工厂对应的目标工件的加工序列以及各个工厂对应加工序列的最大完工时间,获取各个工厂内待生产产品的生产子计划,根据生产子计划确定各个工厂对应的装配子计划,根据各个工厂的加工序列和装配子计划,确定目标函数值,进而在满足迭代次数时,输出满足预设条件的目标函数值对应的调度方案,在不满足迭代次数时,继续执行所述根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间的步骤,达成求解柔性分布式装配流水车间调度问题的目的,提高了车间调度的效率,缩短总完工时间的同时降低生产全程流程的能耗,合理平衡了多个调度目标。The first embodiment of the present invention proposes a scheduling method for a distributed assembly flow shop, terminal equipment and a computer-readable storage medium, and constructs a flexible distributed assembly under energy consumption constraints based on the process parameters of the flexible distributed assembly flow shop. A mathematical model for flow shop scheduling problems. The mathematical model includes objective functions and constraints. The workpieces are clustered based on their processing time to determine the target workpieces corresponding to each factory. Based on the improved DRL algorithm model, the target workpieces corresponding to each factory are determined. The processing sequence and the maximum completion time of the corresponding processing sequence of each factory are obtained, and the production sub-plan of the products to be produced in each factory is obtained. According to the production sub-plan, the corresponding assembly sub-plan of each factory is determined. According to the processing sequence and assembly sub-plan of each factory, Determine the objective function value, and then output the scheduling plan corresponding to the objective function value that meets the preset conditions when the number of iterations is met. When the number of iterations is not met, continue to execute the improved DRL algorithm model to determine the corresponding schedule for each factory. The processing sequence of the target workpiece and the steps of the maximum completion time of each factory corresponding to the processing sequence are achieved to achieve the purpose of solving the flexible distributed assembly flow workshop scheduling problem, improve the efficiency of workshop scheduling, and shorten the total completion time. At the same time, the energy consumption of the entire production process is reduced, and multiple scheduling objectives are reasonably balanced.

附图说明Description of the drawings

图1为本发明分布式装配流水车间的调度方法的第一实施例的流程示意图;Figure 1 is a schematic flow chart of the first embodiment of the scheduling method for a distributed assembly flow workshop of the present invention;

图2为本发明涉及的柔性分布式装配流水车间的调度流程示意图;Figure 2 is a schematic diagram of the scheduling process of the flexible distributed assembly flow workshop involved in the present invention;

图3为本发明涉及的DRL算法模型的网络结构图;Figure 3 is a network structure diagram of the DRL algorithm model involved in the present invention;

图4为本发明涉及的DRL算法模型的模型甘特图;Figure 4 is a model Gantt chart of the DRL algorithm model involved in the present invention;

图5为本发明分布式装配流水车间的调度方法的第二实施例中步骤S4的细化流程图;Figure 5 is a detailed flow chart of step S4 in the second embodiment of the scheduling method for a distributed assembly flow workshop of the present invention;

图6为本发明涉及的预设搜索算法的局部操作示意图;Figure 6 is a partial operation diagram of the preset search algorithm involved in the present invention;

图7为本发明涉及的右移节能策略示意图;Figure 7 is a schematic diagram of the right-shift energy-saving strategy involved in the present invention;

图8为本发明涉及的分布式装配流水车间的调度方法的总流程示意图;Figure 8 is a schematic diagram of the overall flow of the scheduling method of the distributed assembly flow shop involved in the present invention;

图9是本发明实施例方案涉及的硬件运行环境的终端结构示意图。Figure 9 is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.

本发明目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization of the purpose, functional features and advantages of the present invention will be further described with reference to the embodiments and the accompanying drawings.

具体实施方式Detailed ways

应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。It should be understood that the specific embodiments described here are only used to explain the present invention and are not intended to limit the present invention.

由于在相关技术中,DAPFSP在装配阶段假设只有一台装配机器这限制了分布式生产的灵活性。若采用多台装配机器装配则可以提高生产率和装配效率,进而致使分布式装配换流水车间调度问题演变为更复杂的柔性分布式装配流水车间调度问题(DistributedFlow-Shop With Flexible Assembly Scheduling Problem,DFFASP),进而需要提出一种能够解决柔性分布式装配流水车间调度问题的调度方法,从而提高生产效率和装配效率。Since in the related technology, DAPFSP assumes only one assembly machine during the assembly stage, which limits the flexibility of distributed production. If multiple assembly machines are used for assembly, productivity and assembly efficiency can be improved, thereby causing the distributed assembly flow shop scheduling problem to evolve into a more complex flexible distributed assembly flow shop scheduling problem (Distributed Flow-Shop With Flexible Assembly Scheduling Problem, DFFASP) , and then it is necessary to propose a scheduling method that can solve the scheduling problem of flexible distributed assembly flow shop, thereby improving production efficiency and assembly efficiency.

为解决相关技术中的上述缺陷,本发明提出一种分布式装配流水车间的调度方法,其主要解决步骤包括以下:In order to solve the above-mentioned defects in related technologies, the present invention proposes a scheduling method for distributed assembly flow workshops. Its main solution steps include the following:

通过根据柔性分布式装配流水车间的工艺参数,构建能耗约束下的柔性分布式装配流水车间调度问题的数学模型,数学模型包括目标函数和约束条件,基于工件的加工时间对工件进行聚类,确定各个工厂对应的目标工件,根据改进的DRL算法模型,确定各个工厂对应的目标工件的加工序列以及各个工厂对应加工序列的最大完工时间,获取各个工厂内待生产产品的生产子计划,根据生产子计划确定各个工厂对应的装配子计划,根据各个工厂的加工序列和装配子计划,确定目标函数值,进而在满足迭代次数时,输出满足预设条件的目标函数值对应的调度方案,在不满足迭代次数时,继续执行所述根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间的步骤,达成求解柔性分布式装配流水车间调度问题的目的,提高了车间调度的效率,缩短总完工时间的同时降低生产全程流程的能耗,合理平衡了多个调度目标。By constructing a mathematical model of the flexible distributed assembly flow shop scheduling problem under energy consumption constraints based on the process parameters of the flexible distributed assembly flow shop, the mathematical model includes the objective function and constraints, and clusters the workpieces based on their processing time. Determine the target workpieces corresponding to each factory. According to the improved DRL algorithm model, determine the processing sequence of the target workpieces corresponding to each factory and the maximum completion time of the corresponding processing sequence of each factory. Obtain the production sub-plan of the products to be produced in each factory. According to the production The sub-plan determines the assembly sub-plan corresponding to each factory, determines the objective function value based on the processing sequence and assembly sub-plan of each factory, and then outputs the scheduling plan corresponding to the objective function value that meets the preset conditions when the number of iterations is met. When the number of iterations is met, continue to execute the step of determining the processing sequence of the target workpiece corresponding to each factory and the maximum completion time of the processing sequence corresponding to each factory according to the improved DRL algorithm model, so as to achieve the solution flexibility The purpose of the distributed assembly flow workshop scheduling problem is to improve the efficiency of workshop scheduling, shorten the total completion time while reducing the energy consumption of the entire production process, and reasonably balance multiple scheduling objectives.

为了更好地理解上述技术方案,下面将参照附图更详细地描述本发明的示例性实施例。虽然附图中显示了本发明的示例性实施例,然而应当理解,可以以各种形式实现本发明而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本发明,并且能够将本发明的范围完整地传达给本领域的技术人员。In order to better understand the above technical solutions, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a thorough understanding of the invention, and to fully convey the scope of the invention to those skilled in the art.

DAPFSP已被证明是具有NP-hard属性的优化问题,而柔性分布式装配流水车间调度问题(简称DFFASP)比DAPFSP更复杂,这意味着DFFASP也是强NP-hard问题。通常数学规划方法需要遍历或部分遍历问题的解空间,这使得这类方法在求解中大规模优化问题时运行时间较长,导致了一定的局限性。近年来提出了一系列智能优化算法,包括游泳进化计算算法、基于eda的模因算法、基于混合生物地理学的优化算法、回溯搜索以及构造启发式和混合变量邻域搜索以及混合粒子缝优化算法均取得不错的效果。DAPFSP has been proven to be an optimization problem with NP-hard properties, while the distributed flexible assembly flow shop scheduling problem (DFFASP for short) is more complex than DAPFSP, which means that DFFASP is also a strongly NP-hard problem. Usually mathematical programming methods need to traverse or partially traverse the solution space of the problem, which makes this type of method take a long time to solve medium and large-scale optimization problems, resulting in certain limitations. In recent years, a series of intelligent optimization algorithms have been proposed, including swimming evolutionary calculation algorithm, EDA-based memetic algorithm, hybrid biogeography-based optimization algorithm, backtracking search and construction heuristic and hybrid variable neighborhood search, and hybrid particle seam optimization algorithm. All achieved good results.

现有优化方法存在以下问题:Existing optimization methods have the following problems:

首先,尽管智能优化算法在多个调度问题上展现出令人满意的性能,但这些算法的迭代搜索过程往往耗费相当长的时间。First, although intelligent optimization algorithms exhibit satisfactory performance on multiple scheduling problems, the iterative search process of these algorithms often takes a considerable time.

其次,考虑能效的柔性分布式装配流水车间调度问题(Energy-aware DFFASP,EADFFASP)比DFFASP更复杂,因此,EADFFASP也是强NP-hard问题。Secondly, the flexible distributed assembly flow shop scheduling problem (Energy-aware DFFASP, EADFFASP) considering energy efficiency is more complex than DFFASP. Therefore, EADFFASP is also a strong NP-hard problem.

参照图1,在本发明分布式装配流水车间的调度方法的第一实施例中,所述一种分布式装配流水车间的调度方法包括以下步骤:Referring to Figure 1, in the first embodiment of the scheduling method of a distributed assembly flow shop of the present invention, the scheduling method of a distributed assembly flow shop includes the following steps:

步骤S1:根据柔性分布式装配流水车间的工艺参数,构建能耗约束下的柔性分布式装配流水车间调度问题的数学模型,所述数学模型包括目标函数和约束条件;Step S1: Construct a mathematical model of the flexible distributed assembly flow shop scheduling problem under energy consumption constraints based on the process parameters of the flexible distributed assembly flow shop. The mathematical model includes an objective function and constraints;

柔性分布式装配流水车间调度问题的生产包括两个生产阶段,即多个流水车间的分布式生产阶段和柔性装配阶段;生产阶段由F个包含m个相同数量不同功能的异构机器组成,每个工厂视为一个流水车间,每个工件确定好加工工厂后,每道工序必须按照加工路线和预定的处理时间在机器上一次加工,并且无论机器处于加工状态、待机状态还是序相关设置状态,都会产生相应的能耗,且当工件在当前机器加工完成后,运输到下一台机器进行加工时会产生相应能耗;装配阶段有多台装配机,一旦特定产品的所有工件在生产阶段处理完毕,就会运输到对应的装配机上进行装配。可参照图2,图2为本发明涉及的柔性分布式装配流水车间的调度流程示意图。其中,Job Set表示工件集合,记录工艺参数;Ji表示工件。Production Stage表示生产阶段,factory i表示工厂,Mi表示加工机器。AssemblyStage表示装配阶段,AMi表示装配机器。Pruduct Set表示由工件组装而成的产品集合。The production of flexible distributed assembly flow shop scheduling problem includes two production stages, namely the distributed production stage of multiple flow workshops and the flexible assembly stage; the production stage consists of F containing m heterogeneous machines with the same number of different functions, each A factory is regarded as a flow workshop. After the processing factory is determined for each workpiece, each process must be processed on the machine at one time according to the processing route and scheduled processing time, and regardless of whether the machine is in processing state, standby state or sequence-related setting state, Corresponding energy consumption will be generated, and corresponding energy consumption will be generated when the workpiece is transported to the next machine for processing after the current machine is processed; there are multiple assembly machines in the assembly stage, once all workpieces of a specific product are processed in the production stage After completion, it will be transported to the corresponding assembly machine for assembly. Reference may be made to FIG. 2 , which is a schematic diagram of the scheduling process of the flexible distributed assembly flow workshop involved in the present invention. Among them, Job Set represents the workpiece set and records the process parameters; Ji represents the workpiece. Production Stage represents the production stage, factory i represents the factory, and Mi represents the processing machine. AssemblyStage represents the assembly stage, and AMi represents the assembly machine. Pruduct Set represents a collection of products assembled from workpieces.

在本实施例中,获取的柔性分布式装配流水车间的工艺参数,具体包括:工件的数量、产品的数量、机器的数量、工厂的数量、工件与产品的从属关系、工件的分配方式、产品的加工顺序、工件的加工路线、工件在机器上的加工时间、工件从当前加工机器到下一个加工机器的运输时间、运输时的能量消耗、机器处于加工状态或待机状态下的单位时间能耗、机器序相关设置能耗。In this embodiment, the obtained process parameters of the flexible distributed assembly flow workshop specifically include: the number of workpieces, the number of products, the number of machines, the number of factories, the affiliation between workpieces and products, the distribution method of workpieces, products The processing sequence, the processing route of the workpiece, the processing time of the workpiece on the machine, the transportation time of the workpiece from the current processing machine to the next processing machine, the energy consumption during transportation, the energy consumption per unit time when the machine is in processing state or standby state , Machine program related settings energy consumption.

设置目标函数为:最小化最大完工时间和在整个制造期内的总能耗。其中,所设置的总能耗,包括4个部分:第一部分为机器处于加工状态时的能耗,第二部分为运输时的能耗,第三部分为机器处于待机时的能耗,第四部分为机器处于序相关设置的能耗。The objective function is set as: minimizing the maximum completion time and the total energy consumption during the entire manufacturing period. Among them, the set total energy consumption includes four parts: the first part is the energy consumption when the machine is in processing state, the second part is the energy consumption during transportation, the third part is the energy consumption when the machine is in standby, and the fourth part is the energy consumption when the machine is in standby. Part of this is the energy consumption of the machine in program-related settings.

设置约束条件为:每个工作必须只分配给一个工厂,每个工作必须在生产中有序处理,每个生产机器一次只能处理一个工作,每个产品必须只在一台装配机器上处理,每个产品只有在所有相关工作都完成并运送到相应装配机器上时才能装配,每个装配机器一次只能处理一个产品,每台装配机器一次只能加工一个产品。The constraints are set as follows: each job must be assigned to only one factory, each job must be processed in production in an orderly manner, each production machine can only process one job at a time, each product must be processed on only one assembly machine, Each product can only be assembled when all related work has been completed and transported to the corresponding assembly machine. Each assembly machine can only process one product at a time, and each assembly machine can only process one product at a time.

所述约束条件可表示为:The constraints can be expressed as:

Min(Cmax,TEC) (15)Min(C max ,TEC) (15)

TEC=Eb+Ei+Est+Etr (16)TEC=E b +E i +E st +E tr (16)

Cmax 0,Cj,i 0,Sj,i 0,ACk,s 0,ASk,s 0,k,j,i,s (18)C max 0,C j,i 0,S j,i 0,AC k,s 0,AS k,s 0,k,j,i,s (18)

其中,公式(1)确保每个工作必须只分配给一个工厂,公式(2)确保每个工作必须在生产中有序处理,公式(3-4)确保每个生产机器一次只能处理一个工作,公式(5)确定所有工作的完成时间,公式(6)确保每个产品必须只在一台装配机上处理,公式(7)确保每个产品只有在所有相关工作都完成并运送到相应装配机上时才能装配,公式(8-9)确保每个装配机一次只能处理一个产品,公式(10)确定所有产品的完成时间。(8-9)确保每台装配机一次只能加工一个产品,公式(10)确定了所有产品的完成时间,公式(11-14)分别计算了加工、设置、运输和闲置能耗,公式(15)是为了使总交货时间和总能耗最小,公式(16)确定了总能耗,公式(17)确定了总完工時間,公式(18-19)表示二元决策变量和连续变量。上述约束条件的表示公式对应的参数和符号表示,可参照表1。Among them, formula (1) ensures that each job must be assigned to only one factory, formula (2) ensures that each job must be processed in order in production, and formula (3-4) ensures that each production machine can only process one job at a time , Formula (5) determines the completion time of all work, Formula (6) ensures that each product must be processed on only one assembly machine, and Formula (7) ensures that each product must be processed only when all related work is completed and shipped to the corresponding assembly machine. time to assemble, formula (8-9) ensures that each assembly machine can only process one product at a time, and formula (10) determines the completion time of all products. (8-9) ensures that each assembly machine can only process one product at a time. Formula (10) determines the completion time of all products. Formula (11-14) calculates the processing, setup, transportation and idle energy consumption respectively. Formula ( 15) is to minimize the total delivery time and total energy consumption. Formula (16) determines the total energy consumption, formula (17) determines the total completion time, and formula (18-19) represents binary decision variables and continuous variables. The parameters and symbols corresponding to the expression formulas of the above constraints can be found in Table 1.

表1Table 1

步骤S2:基于工件的加工时间对工件进行聚类,确定各个工厂对应的目标工件;Step S2: Cluster the workpieces based on their processing time and determine the target workpieces corresponding to each factory;

在本实施例中,工件的加工时间包括:工件所有加工操作的平均加工时间、工件的第一次加工的加工时间、工件最后一次加工的加工时间、所有工件的加工时间标准差。通过将工件的加工时间作为聚类标准,构建各个工件对应的工件特征集,然后通过K-means算法将工件特征集划分为K个集群,其中K的值根据误差平方和确定,从第一个集群开始,工件作为最后一个工件依次分配给各个工厂,直到所有工件都被分配到各个工厂,从而确定各个所述工厂对应的目标工件,实现工件的分配,达成平衡各个工厂的工作量的目的。In this embodiment, the processing time of the workpiece includes: the average processing time of all processing operations of the workpiece, the processing time of the first processing of the workpiece, the processing time of the last processing of the workpiece, and the standard deviation of the processing time of all workpieces. By using the processing time of the workpiece as a clustering criterion, a workpiece feature set corresponding to each workpiece is constructed, and then the workpiece feature set is divided into K clusters through the K-means algorithm, where the value of K is determined based on the sum of squared errors, starting from the first When the cluster starts, the workpiece is assigned to each factory in turn as the last workpiece until all workpieces are assigned to each factory, thereby determining the target workpiece corresponding to each factory, realizing the distribution of workpieces, and achieving the purpose of balancing the workload of each factory.

所述工件所有加工操作的平均加工时间可表示为:The average processing time of all processing operations of the workpiece can be expressed as:

其中,pj,i表示工件j在加工机器i上的加工时间,m表示每个工件加工工厂内的机器数量。Among them, p j,i represents the processing time of workpiece j on processing machine i, and m represents the number of machines in each workpiece processing factory.

所述工件的第一次加工的加工时间可表示为:pj,1The processing time of the first processing of the workpiece can be expressed as: pj ,1 .

所述工件最后一次加工的加工时间可表示为:pj,mThe processing time of the last processing of the workpiece can be expressed as: p j,m .

所述所有工件的加工时间标准差可表示为:The standard deviation of the processing time of all workpieces can be expressed as:

因此,得到工件特征集可表示为所有工件特征集可组成总的特征集/>进而聚类时,是将特征集C内的各个工件特征集划分至对应的集群中。Therefore, the obtained workpiece feature set can be expressed as All workpiece feature sets can form a total feature set/> When performing further clustering, each workpiece feature set in feature set C is divided into corresponding clusters.

步骤S3:根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间;Step S3: According to the improved DRL algorithm model, determine the processing sequence of the target workpiece corresponding to each of the factories and the maximum completion time of the processing sequence corresponding to each of the factories;

在本实施例中,通过对工厂内的各个目标工件的加工时间建模,将各个目标工件在所有机器上的加工时间编码转换成一个固定维数的第一向量,然后对第一向量建模,编码转换成第二向量,最终将第二向量输入预先基于RNN和Attention机制构建的解码网络,生成工厂对应的目标工件的加工序列。In this embodiment, by modeling the processing time of each target workpiece in the factory, the processing time encoding of each target workpiece on all machines is converted into a first vector with a fixed dimension, and then the first vector is modeled , the encoding is converted into a second vector, and finally the second vector is input into the decoding network built in advance based on RNN and Attention mechanisms to generate the processing sequence of the target workpiece corresponding to the factory.

具体地,可参照图3和图4,图3为本发明涉及的DRL算法模型的网络结构图,图4为本发明涉及的DRL算法模型的模型甘特图。目标工件在所有机器上的加工时间表示为pj,i,第一向量表示为pj,第二向量表示为P。Specifically, reference can be made to Figures 3 and 4. Figure 3 is a network structure diagram of the DRL algorithm model involved in the present invention, and Figure 4 is a model Gantt chart of the DRL algorithm model involved in the present invention. The processing time of the target workpiece on all machines is represented by p j,i , the first vector is represented by p j , and the second vector is represented by P.

针对工件的pj,i建模流程如下:The modeling process for p j,i of the workpiece is as follows:

将pj,i输入嵌入层,获得输出yj,i=WB·pj,i,然后将yj,1与h0输入第一个RNN,得到隐藏层输出hj,1=f(yj,1,h0;U,W,b),将hj,i-1与yj,i输入第一个RNN,得到隐藏层输出hj,i=f(yj,i,hj,i-1;U,W,b),i=2,3,…,m,最后得到pj=hj,m。其中WB,hj,i,h0均为k维向量,h0,U,b,W,WB为网络参数,f()为RNN输入到隐藏层输出的映射。Input p j,i into the embedding layer to obtain the output y j,i =W B ·p j,i , then input y j,1 and h 0 into the first RNN to obtain the hidden layer output h j,1 =f ( y j,1 ,h 0 ;U,W,b), input h j,i-1 and y j,i into the first RNN, and get the hidden layer output h j,i =f(y j,i ,h j,i-1 ;U,W,b), i=2,3,…,m, and finally p j =h j,m is obtained. Where W B , h j,i , h 0 are all k-dimensional vectors, h 0 , U, b, W, W B are network parameters, and f() is the mapping from RNN input to hidden layer output.

对所有的向量pj进行建模流程如下:The modeling process for all vectors p j is as follows:

将pj输入第二个RNN,得到隐藏层输出/>然后将/>与pj输入第二个RNN,得到隐藏层输出/>最7zhon得到/>其中/>为d维向量,/>为网络参数。Convert p j to Input the second RNN and get the hidden layer output/> Then add/> Enter the second RNN with p j and get the hidden layer output/> The most 7zhon gets/> Among them/> is a d-dimensional vector,/> are network parameters.

采用RNN和Attention机制构建解码网络,生成每个工厂的工件序列πf={π1,…,πj}的具体流程如下:The RNN and Attention mechanisms are used to build a decoding network and generate the workpiece sequence π f ={π 1 ,...,π j } for each factory. The specific process is as follows:

将g和P输入解码网络RNN,得到隐藏层输出其中g为k维参数向量,表示解码网络开始的输入。然后计算p(π1<1,s)=softmax(u1), 为第二个编码RNN的隐藏层输出,然后采用轮盘赌方式确定π1,将/>和d1输入解码RNN,得到隐藏层输出/>之后将其对应参数代入p(π2<2,s)的计算公式,从而计算获得p(π2<2,s),然后采用轮盘赌方式确定π2,重复以上步骤得到每个工厂完整的工件加工序列πf。其中g,/>v,W1,W2为待训练参数。Input g and P into the decoding network RNN to get the hidden layer output Where g is a k-dimensional parameter vector, representing the input at the beginning of the decoding network. Then calculate p(π 1<1 ,s)=softmax(u 1 ), For the hidden layer output of the second encoding RNN, and then use roulette to determine π 1 , // and d 1 input decoding RNN to get the hidden layer output/> Then substitute the corresponding parameters into the calculation formula of p(π 2<2 ,s) to calculate p(π 2<2 ,s). Then use the roulette method to determine π 2 and repeat the above steps to get The complete workpiece processing sequence π f for each factory. Among them g,/> v, W 1 and W 2 are parameters to be trained.

以第一个工厂、5个工件、m台机器的PFSP(Partially Flexible Shop SchedulingProblem,部分可变车间调度问题)为例。首先对5个工件的加工信息依次建模,得到5个k维向量pi,i=1,2,...,5,进而将pi,i=1,2,…,5依次输入第二个RNN得到P。然后将P与g一起输入解码网络,得到d1和p(π1<1,s),采用轮盘赌方式确定π1(假设π1=4);再将p4与d1一起输入得d2和p(π2<2,s),并令p(π21=4,s)=0,再采用轮盘赌方式确定π2(假设π2=2),依据上述方式,最终获得工件序列π1=(4,2,5,3,1),即一个编码后的调度方案。Take the PFSP (Partially Flexible Shop Scheduling Problem) of the first factory, 5 workpieces, and m machines as an example. First, the processing information of the five workpieces is modeled sequentially to obtain five k-dimensional vectors p i , i = 1, 2,..., 5, and then p i , i = 1, 2,..., 5 are input into the third Two RNNs get P. Then input P and g together into the decoding network to obtain d 1 and p (π 1<1 ,s), and use roulette method to determine π 1 (assuming π 1 = 4); then p 4 and d 1 together Input d 2 and p(π 2<2 ,s), and let p(π 21 =4,s)=0, and then use the roulette method to determine π 2 (assuming π 2 =2) , according to the above method, the workpiece sequence π 1 = (4,2,5,3,1) is finally obtained, that is, an encoded scheduling plan.

步骤S4:获取各个所述工厂内待生产产品的生产子计划,根据所述生产子计划确定各个所述工厂对应的装配子计划;Step S4: Obtain the production sub-plan of the product to be produced in each of the factories, and determine the assembly sub-plan corresponding to each of the factories according to the production sub-plan;

在本实施例中,根据生产子计划,确定每个待生产产品的相关工作以及每个待生产产品的所述相关工作的完成时间,然后按照非降序规则对每个所述待生产产品的完成时间排序,获得待生产产品的优先级序列,根据优先级序列的顺序依次取出每个待生产产品分配到能够最早完成其装配操作的装配机器上,从而确定各个工厂对应的装配子计划,采用装配调度启发式算法(ASH)对上一步得到的装配子计划进行解码,获得具体的装配子计划的装配方案。In this embodiment, according to the production sub-plan, the related work of each product to be produced and the completion time of the related work of each product to be produced are determined, and then the completion time of each product to be produced is determined according to the non-descending order rule. Time sorting, obtain the priority sequence of the products to be produced, and take out each product to be produced according to the order of the priority sequence and assign it to the assembly machine that can complete its assembly operation at the earliest, thereby determining the assembly sub-plan corresponding to each factory, using assembly The scheduling heuristic algorithm (ASH) decodes the assembly subplan obtained in the previous step and obtains the specific assembly plan of the assembly subplan.

可以理解的是,非降序规则是指在排序或排列过程中,元素的顺序保持不下降的规则。具体来说,对于一组元素,如果按照非降序规则进行排序或排列,那么元素的值将逐个增加或保持不变。在非降序规则下,元素从左到右排列时,每个元素都不小于或等于它之前的元素。这种规则确保了元素按照递增的方式进行排列,且不允许出现逆序情况。It can be understood that the non-descending order rule refers to the rule that the order of elements does not decrease during the sorting or arrangement process. Specifically, for a set of elements, if they are sorted or arranged according to non-descending rules, the values of the elements will increase one by one or remain unchanged. Under the non-descending order rule, when elements are arranged from left to right, each element is not less than or equal to the element before it. This rule ensures that the elements are arranged in increasing order and does not allow reverse order.

步骤S5:根据各个所述工厂的加工序列和所述装配子计划,确定所述目标函数值;Step S5: Determine the objective function value according to the processing sequence of each factory and the assembly sub-plan;

在本实施例中,在确定各个工厂的加工序列和装配子计划后,即可计算在该加工序列和装配子计划下对应的目标函数值。In this embodiment, after determining the processing sequence and assembly sub-plan of each factory, the corresponding objective function value under the processing sequence and assembly sub-plan can be calculated.

步骤S6:在满足迭代次数时,输出满足预设条件的所述目标函数值对应的调度方案;Step S6: When the number of iterations is met, output the scheduling plan corresponding to the objective function value that meets the preset conditions;

步骤S7:在不满足迭代次数时,继续执行所述根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间的步骤。Step S7: When the number of iterations is not satisfied, continue to execute the improved DRL algorithm model to determine the processing sequence of the target workpiece corresponding to each factory and the maximum completion time of the processing sequence corresponding to each factory. step.

在本实施例中,每次确定目标函数值后,若不满足迭代次数或者不满足终止条件,则继续进行迭代,直至满足迭代次数或者终止条件时,将具有最优解的调度方案输出。预设条件可为目标函数值小于预设阈值,即将小于预设阈值的目标函数值对应的调度方案输出,作为最优解。In this embodiment, every time after the objective function value is determined, if the number of iterations or the termination condition is not met, the iteration will continue until the number of iterations or the termination condition is met, and the scheduling plan with the optimal solution will be output. The preset condition may be that the objective function value is less than the preset threshold, that is, the scheduling plan corresponding to the objective function value less than the preset threshold is output as the optimal solution.

在本实施例提供的技术方案中,通过根据柔性分布式装配流水车间的工艺参数,构建能耗约束下的柔性分布式装配流水车间调度问题的数学模型,数学模型包括目标函数和约束条件,基于工件的加工时间对工件进行聚类,确定各个工厂对应的目标工件,根据改进的DRL算法模型,确定各个工厂对应的目标工件的加工序列以及各个工厂对应加工序列的最大完工时间,获取各个工厂内待生产产品的生产子计划,根据生产子计划确定各个工厂对应的装配子计划,根据各个工厂的加工序列和装配子计划,确定目标函数值,进而在满足迭代次数时,输出满足预设条件的目标函数值对应的调度方案,在不满足迭代次数时,继续执行所述根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间的步骤,达成求解柔性分布式装配流水车间调度问题的目的,提高了车间调度的效率,缩短总完工时间的同时降低生产全程流程的能耗,合理平衡了多个调度目标。In the technical solution provided by this embodiment, a mathematical model of the flexible distributed assembly flow shop scheduling problem under energy consumption constraints is constructed based on the process parameters of the flexible distributed assembly flow shop. The mathematical model includes an objective function and constraints, based on The processing time of the workpieces is used to cluster the workpieces and determine the target workpieces corresponding to each factory. According to the improved DRL algorithm model, the processing sequence of the target workpieces corresponding to each factory and the maximum completion time of the corresponding processing sequence of each factory are determined to obtain the information in each factory. For the production sub-plan of the product to be produced, the assembly sub-plan corresponding to each factory is determined based on the production sub-plan. According to the processing sequence and assembly sub-plan of each factory, the objective function value is determined, and then when the number of iterations is met, output that meets the preset conditions The scheduling plan corresponding to the objective function value, when the number of iterations is not satisfied, continues to execute the improved DRL algorithm model to determine the processing sequence of the target workpiece corresponding to each of the factories and the processing sequence corresponding to each of the factories. The maximum completion time step achieves the purpose of solving the flexible distributed assembly flow workshop scheduling problem, improves the efficiency of workshop scheduling, shortens the total completion time and reduces the energy consumption of the entire production process, and reasonably balances multiple scheduling objectives.

参照图5,在第二实施例中,基于第一实施例,所述步骤S4之前,还包括:Referring to Figure 5, in the second embodiment, based on the first embodiment, before step S4, it also includes:

步骤S8:获取当前所述DRL算法模型的网络模型参数和关键工厂以及具有最小化最大完工时间的目标工厂;Step S8: Obtain the network model parameters and key factories of the current DRL algorithm model and the target factory that minimizes the maximum completion time;

在本实施例中,关键工厂是最早完成工件加工的工厂。In this embodiment, the key factory is the first factory to complete the workpiece processing.

步骤S9:将所述关键工厂的所述加工序列内的最后一个工件分配至所述目标工厂,并将所述网络模型参数作为所述DRL算法模型的初始网络模型参数,然后继续执行所述根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间的步骤。Step S9: Assign the last workpiece in the processing sequence of the key factory to the target factory, use the network model parameters as the initial network model parameters of the DRL algorithm model, and then continue to execute the The improved DRL algorithm model is a step of determining the processing sequence of the target workpiece corresponding to each factory and the maximum completion time of the processing sequence corresponding to each factory.

在本实施例中,可通过保存训练模型,记录当前关键工厂f*和Cmax最小的工厂f。然后将关键工厂f*加工的最后一个工件取出放入f中,利用保存的网络模型参数重新生成调度方案。重复这个过程,直到产生满意的调度方案。In this embodiment, by saving the training model, the current key factory f * and the factory f with the smallest C max can be recorded. Then take out the last workpiece processed by the key factory f * and put it into f, and use the saved network model parameters to regenerate the scheduling plan. This process is repeated until a satisfactory schedule is produced.

AC网络(Actor-Critic Network)用于学习和优化调度策略。AC网络由两个子网络组成:策略网络(Actor Network)和价值网络(Critic Network)。AC Network (Actor-Critic Network) is used to learn and optimize scheduling strategies. The AC network consists of two sub-networks: Policy Network (Actor Network) and Value Network (Critic Network).

策略网络(Actor Network)负责生成决策和选择动作的概率分布,即在给定当前状态下,根据学习到的策略,输出选择各个动作的概率。策略网络的目标是通过优化策略参数,使得生成的动作能够最大化预期的累积奖励。The policy network (Actor Network) is responsible for generating the probability distribution of decisions and selected actions, that is, under a given current state, based on the learned strategy, it outputs the probability of selecting each action. The goal of the policy network is to optimize the policy parameters so that the generated actions can maximize the expected cumulative reward.

价值网络(Critic Network)负责对状态的价值进行估计,用于评估当前状态的好坏程度。价值网络的目标是学习一个基于基线的估计值,通常使用状态值函数或状态-动作值函数来表示。其输出的估计值可以被用作评估策略和指导策略的改进。The value network (Critic Network) is responsible for estimating the value of the state and is used to evaluate the quality of the current state. The goal of a value network is to learn a baseline-based estimate, typically represented using a state-value function or a state-action value function. The estimates it outputs can be used to evaluate strategies and guide strategy improvements.

本发明采用AC网络学习和优化调度策略。其中,对于策略网络的所有参数θ的训练方法,本发明使用强化学习的策略梯度算法。其中,策略网络的输入是各个工件在所在工厂内所有机器上的加工时间,输出为加工的工件序列The present invention adopts AC network learning and optimization scheduling strategies. Among them, for the training method of all parameters θ of the policy network, the present invention uses the policy gradient algorithm of reinforcement learning. Among them, the input of the policy network is the processing time of each workpiece on all machines in the factory, and the output is the sequence of processed workpieces.

具体地,设某调度问题s的加工时间服从分布S,记为s~S,通过网络生成的工件序列πf服从分布πf~p(·|s);下面两个公式分别表示最小化的训练目标函数J(θ),以及对调度问题s网络输出的加工序列的Cmax的期望J(θ|s)。其中Cmax(π|s)表示针对调度问题s网络输出的加工序列πf采用NEH方法,得到的Cmax。NEN方法基本思想是不断插入作业到已有作业序列中,并选择使得总完成时间最小的插入位置,直到所有作业都被插入为止。该方法在每次插入作业后都重新计算各个作业的完成时间,最终得到一个最优的作业序列,即对应本发明的预设搜索算法。Specifically, assume that the processing time of a certain scheduling problem s obeys the distribution S, denoted as s~S, and the workpiece sequence π f generated through the network obeys the distribution π f ~p(·|s); the following two formulas respectively represent the minimized The training objective function J(θ), and the expectation J(θ|s) of the C max of the processing sequence output by the scheduling problem s network. Among them, C max (π|s) represents the C max obtained by using the NEH method for the processing sequence π f output by the network for scheduling problem s. The basic idea of the NEN method is to continuously insert jobs into the existing job sequence and select the insertion position that minimizes the total completion time until all jobs are inserted. This method recalculates the completion time of each job after each job is inserted, and finally obtains an optimal job sequence, which corresponds to the preset search algorithm of the present invention.

J(θ)=Es~SJ(θ|s)J(θ)=E s~S J(θ|s)

根据梯度策略,梯度如下表示:According to the gradient strategy, the gradient is expressed as follows:

其中b(s)是随πf变化的基准线,表示对问题s的Cmax的估计,用以减小训练方差。in b(s) is the baseline that changes with π f , which represents the estimate of C max of problem s to reduce the training variance.

在每次迭代从分布S中采样生成B个独立同分布的si,即s1,s2,…,sB~S,针对si采样生成工件加工序列则可获得目标函数关于θ的近似梯度:In each iteration, B independent and identically distributed s i are sampled from the distribution S, that is, s 1 , s 2 ,..., s B ~S, and the workpiece processing sequence is generated for s i sampling. Then the approximate gradient of the objective function with respect to θ can be obtained:

其中,基准线进而采用Adam优化算法对网络参数进行迭代优化。Among them, the baseline Then the Adam optimization algorithm is used to iteratively optimize the network parameters.

对于生成的每个工厂的解的领域和解的选择策略,本发明采用Tchebycheff(TCH)分解方法,具体定义如下:For the selection strategy of the generated solution domain and solution for each plant, the present invention adopts the Tchebycheff (TCH) decomposition method, which is specifically defined as follows:

参考点RP(Cmaxmin,TECmin)定义为整个搜索过程中Cmax和TEC的最小值,权值向量在区间[0,1]均匀分布,/>PS为种群大小。然后将每个解和ηb关联,定义其目标函数/>其中fr(xb)是xb的第r次目标值,z*是标准化RP。因此xb的邻域是那些与基于NS欧氏距离的最近权重向量相关联的解,包括其自身。The reference point RP (C maxmin , TEC min ) is defined as the minimum value of C max and TEC during the entire search process, the weight vector Uniformly distributed in the interval [0, 1], /> PS is the population size. Then associate each solution with eta b and define its objective function/> where f r (x b ) is the rth target value of x b and z * is the normalized RP. Therefore the neighborhood of x b is those solutions associated with the nearest weight vector based on NS Euclidean distance, including itself.

根据上述TCH分解,在设计的DRL算法中,解决方案更新策略按如下方式实施并协同使用:According to the above TCH decomposition, in the designed DRL algorithm, the solution update strategy is implemented and used collaboratively as follows:

如果xb和新生成的解x'b满足g(xbb,z*)≥g(x'bb,z*),则用x'b替代xb,否则不变。在用x′b更新xb的邻域时。如果对于x′b的每个邻域xa,满足g(xaa,z*)≥g(x'bb,z*),则用x'b来替换xa,反之,xa保持不变。If x b and the newly generated solution x' b satisfy g(x bb ,z * )≥g(x' bb ,z * ), then replace x b with x' b , otherwise it remains unchanged. When updating the neighborhood of x b with x′ b . If for each neighborhood x a of x′ b , g(x aa ,z * )≥g(x' bb ,z * ) is satisfied, then replace x a with x' b , and vice versa , x a remains unchanged.

可选地,参照图6,图6为本发明涉及的预设搜索算法的局部操作示意图。可基于预设搜索算法训练所述DRL算法模型;其中,所述预设搜索算法包括:Optionally, refer to FIG. 6 , which is a partial operation diagram of the preset search algorithm involved in the present invention. The DRL algorithm model can be trained based on a preset search algorithm; wherein the preset search algorithm includes:

关键工厂内的插入邻域操作,随机选择一个关键工件,将所述关键工件插入到所有的非关键工件的前面与后面;The insertion neighborhood operation in the key factory randomly selects a key workpiece and inserts the key workpiece in front and behind all non-critical workpieces;

关键工厂内的交换邻域操作,随机选择一个关键工件和其余所有的非关键工件进行交换;The exchange neighborhood operation in the key factory randomly selects a key workpiece and exchanges it with all other non-critical workpieces;

在关键工厂内随机选择一个关键工件和将所述关键工件与各个非关键工厂内的非关键工件交换位置;Randomly selecting a critical workpiece within the critical plant and swapping locations of the critical workpiece with non-critical workpieces within each non-critical plant;

关键工厂和非关键工厂间的插入邻域操作,随机选择一个关键工件,将所述关键工件插入到各个个非关键工厂内的各个非关键工件的前面与后面;The insertion neighborhood operation between key factories and non-critical factories randomly selects a key workpiece and inserts the key workpiece into the front and back of each non-critical workpiece in each non-critical factory;

在装配机器上选择一个加工总时间最大的产品,然后将所述关键工件分配给另一个随机选择的装配机器;Select a product with the largest total processing time on the assembly machine, and then assign the critical workpiece to another randomly selected assembly machine;

选择两个具有最大完工时间差的相邻产品,然后随机交换它们相关联的工件;Select two adjacent products with the largest makespan difference and then randomly exchange their associated workpieces;

交换两个具有最大完工时间差的相邻产品;Swap two adjacent products with the largest makespan difference;

在装配机器上选择一个能量消耗最大的产品,然后将所述关键工件分配给另一个随机选择的装配机器。A product with the highest energy consumption is selected on the assembly machine and then the critical workpiece is assigned to another randomly selected assembly machine.

可选地,作为可选实施方式,对于一个完整的调度,TEC包含了加工、设置、运输和闲置能源消耗,每台机器上的闲置时间可以通过延迟某些操作的过程来减少,而不会增加所有产品的完工时间。为此,本发明设计了一种右移节能策略,具体为在工厂中的关键路径后,在不改变最大完工时间的前提下将其他非关键路径的工件加工时间延迟即向右移动。可参照图7,图7为本发明涉及的右移节能策略示意图,显示了用右移策略修改的调度。其中,(a)为右移策略的原调度方案,(b)为右移修改调度。显然,修改后的计划比原计划有更短的总空闲时间,从而使得TEC更小。Optionally, as an optional implementation, for a complete schedule, TEC includes processing, setup, transportation and idle energy consumption, and the idle time on each machine can be reduced by delaying the process of certain operations without Increased make time for all products. To this end, the present invention designs a right-shift energy-saving strategy, specifically, after the critical path in the factory, the workpiece processing time of other non-critical paths is delayed or moved to the right without changing the maximum completion time. Reference may be made to FIG. 7 , which is a schematic diagram of the right-shift energy-saving strategy involved in the present invention, showing the schedule modified by the right-shift strategy. Among them, (a) is the original scheduling plan of the right shift strategy, and (b) is the right shift modified schedule. Obviously, the revised plan has a shorter total idle time than the original plan, thus making the TEC smaller.

可参照图8,图8为本发明涉及的分布式装配流水车间的调度方法的总流程示意图。需要说明的是,附图8中的局部强化是指局部搜索,局部搜索对应的局部操作可参考附图6。Reference may be made to FIG. 8 , which is a schematic diagram of the overall flow of the scheduling method of the distributed assembly flow shop according to the present invention. It should be noted that the local enhancement in Figure 8 refers to local search, and the local operations corresponding to the local search can be referred to Figure 6 .

为了有效地评估算法的性能,从现有的数据集中随机选择示例。为保证测试结果的客观性,采用每批实验处理的所有工件的最大完工时间作为评价指标,值越小调度效果越好。我们采用了五种广泛使用的调度规则(FCFS、STPT、LTPT、SI、LI)与我们的DRL算法进行比较,实验结果表2所示。实验结果表明,DRL在各种大小的实例中都优于调度规则,并且随着问题规模的增加,DRL获得的优势更大。此外,训练后的DRL模型比比较方法解决问题的速度更快,并且可以快速生成多个大小实例的调度方案。To effectively evaluate the performance of the algorithm, examples are randomly selected from existing datasets. In order to ensure the objectivity of the test results, the maximum completion time of all workpieces processed in each batch of experiments is used as the evaluation index. The smaller the value, the better the scheduling effect. We adopted five widely used scheduling rules (FCFS, STPT, LTPT, SI, LI) to compare with our DRL algorithm, and the experimental results are shown in Table 2. Experimental results show that DRL outperforms scheduling rules in instances of various sizes, and as the problem size increases, DRL gains greater advantages. Furthermore, the trained DRL model solves the problem faster than the compared methods and can quickly generate scheduling solutions for multiple large and small instances.

表2Table 2

规模(n,m,F,t)Scale(n,m,F,t) FCFSFCFS STPTSTPT LTPTLTPT SISI LILI DRLDRL 20,5,2,220,5,2,2 821821 848848 782782 752752 954954 737737 20,5,2,420,5,2,4 12461246 12241224 11791179 11421142 13941394 11031103 20,10,2,420,10,2,4 16821682 18671867 17031703 16071607 19471947 14761476 50,10,2,250,10,2,2 24832483 22892289 22762276 22282228 24082408 21722172 100,5,2,2100,5,2,2 31633163 33103310 30383038 30073007 36683668 26452645 100,5,2,4100,5,2,4 36473647 36023602 36853685 34673467 39653965 29872987

进一步的,为了评估提出的强化算法解决问题的有效性,将本发明的DRL算法与IG和GA这两种算法进行了比较。所有算法都由Python3.8编码,并在相同的环境下进行。以CPU最大运行时间n×m×F×t(秒)作为所有实验的停止条件。每个测试问题进行了10次独立实验,每个问题的最优结果如表3中粗体所示。根据表3,我们可以看到,在一些小规模的实例情况下,IG偶尔会呈现出更好的结果。然而,在耗时更长的大规模实例上,DRL表现出更好的性能。通过重复实验得到的每个实例的平均makespan也证实了DRL在算法的稳定性上有更好的表现。一般来说,DRL算法在大多数测试问题上都优于IG和GA,这表明DRL是解决EADFFASP的有效算法。Further, in order to evaluate the effectiveness of the proposed enhanced algorithm in solving the problem, the DRL algorithm of the present invention was compared with the two algorithms IG and GA. All algorithms are coded by Python3.8 and performed in the same environment. The maximum CPU running time n×m×F×t (seconds) is used as the stopping condition for all experiments. Ten independent experiments were conducted for each test problem, and the optimal results for each problem are shown in bold in Table 3. According to Table 3, we can see that in some small-scale instance cases, IG occasionally presents better results. However, DRL shows better performance on large-scale instances that take longer. The average makespan of each instance obtained through repeated experiments also confirms that DRL has better performance in the stability of the algorithm. Generally speaking, the DRL algorithm outperforms IG and GA on most test problems, which indicates that DRL is an effective algorithm for solving EADFFASP.

表3table 3

参照图9,图9为本发明实施例方案涉及的硬件运行环境的终端结构示意图。Referring to FIG. 9 , FIG. 9 is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.

如图9所示,该终端可以包括:处理器1001,例如CPU,网络接口1004,用户接口1003,存储器1005,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard)、鼠标等,可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储设备。As shown in Figure 9, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize connection communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard, a mouse, etc. The optional user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.

本领域技术人员可以理解,图9中示出的终端结构并不构成对终端的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。Those skilled in the art can understand that the terminal structure shown in FIG. 9 does not limit the terminal, and may include more or fewer components than shown, or combine certain components, or arrange different components.

如图9所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及分布式装配流水车间的调度程序。As shown in Figure 9, memory 1005, which is a computer storage medium, may include an operating system, a network communication module, a user interface module, and a scheduler for a distributed assembly flow workshop.

在图9所示的终端中,网络接口1004主要用于连接后台服务器,与后台服务器进行数据通信;处理器1001可以用于调用存储器1005中存储的分布式装配流水车间的调度程序,并执行以下操作:In the terminal shown in Figure 9, the network interface 1004 is mainly used to connect to the backend server and communicate with the backend server; the processor 1001 can be used to call the scheduling program of the distributed assembly flow workshop stored in the memory 1005, and execute the following operate:

根据柔性分布式装配流水车间的工艺参数,构建能耗约束下的柔性分布式装配流水车间调度问题的数学模型,所述数学模型包括目标函数和约束条件;According to the process parameters of the flexible distributed assembly flow shop, construct a mathematical model for the scheduling problem of the flexible distributed assembly flow shop under energy consumption constraints. The mathematical model includes an objective function and constraints;

基于工件的加工时间对工件进行聚类,确定各个工厂对应的目标工件;Cluster the workpieces based on their processing time and determine the target workpieces corresponding to each factory;

根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间;According to the improved DRL algorithm model, determine the processing sequence of the target workpiece corresponding to each of the factories and the maximum completion time of the processing sequence corresponding to each of the factories;

获取各个所述工厂内待生产产品的生产子计划,根据所述生产子计划确定各个所述工厂对应的装配子计划;Obtain the production sub-plan of the products to be produced in each of the factories, and determine the assembly sub-plan corresponding to each of the factories according to the production sub-plan;

根据各个所述工厂的加工序列和所述装配子计划,确定所述目标函数值;Determine the objective function value according to the processing sequence of each factory and the assembly sub-plan;

在不满足迭代次数时,继续执行所述根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间的步骤;在满足迭代次数时,输出满足预设条件的所述目标函数值对应的调度方案。When the number of iterations is not satisfied, continue to execute the step of determining the processing sequence of the target workpiece corresponding to each factory and the maximum completion time of the processing sequence corresponding to each factory according to the improved DRL algorithm model; in When the number of iterations is met, a scheduling plan corresponding to the objective function value that meets the preset conditions is output.

进一步地,处理器1001可以调用存储器1005中存储的分布式装配流水车间的调度程序,还执行以下操作:Further, the processor 1001 can call the scheduler of the distributed assembly flow shop stored in the memory 1005, and also perform the following operations:

对所述工厂内的各个所述目标工件的加工时间建模,将各个所述目标工件在所有机器上的加工时间编码转换成一个固定维数的第一向量;Model the processing time of each target workpiece in the factory, and convert the processing time encoding of each target workpiece on all machines into a first vector with a fixed dimension;

对所述第一向量建模,编码转换成第二向量;Model the first vector and convert the encoding into a second vector;

将所述第二向量输入预先基于RNN和Attention机制构建的解码网络,生成所述工厂对应的所述目标工件的加工序列。The second vector is input into a decoding network built in advance based on RNN and Attention mechanisms to generate a processing sequence of the target workpiece corresponding to the factory.

获取当前所述DRL算法模型的网络模型参数和关键工厂以及具有最小化最大完工时间的目标工厂;Obtain the network model parameters and key factories of the current DRL algorithm model and the target factory with minimized maximum completion time;

将所述关键工厂的所述加工序列内的最后一个工件分配至所述目标工厂,并将所述网络模型参数作为所述DRL算法模型的初始网络模型参数。The last workpiece in the processing sequence of the key factory is assigned to the target factory, and the network model parameters are used as the initial network model parameters of the DRL algorithm model.

进一步地,处理器1001可以调用存储器1005中存储的分布式装配流水车间的调度程序,还执行以下操作:Further, the processor 1001 can call the scheduler of the distributed assembly flow shop stored in the memory 1005, and also perform the following operations:

关键工厂内的插入邻域操作,随机选择一个关键工件,将所述关键工件插入到所有的非关键工件的前面与后面;The insertion neighborhood operation in the key factory randomly selects a key workpiece and inserts the key workpiece in front and behind all non-critical workpieces;

关键工厂内的交换邻域操作,随机选择一个关键工件和其余所有的非关键工件进行交换;The exchange neighborhood operation in the key factory randomly selects a key workpiece and exchanges it with all other non-critical workpieces;

在关键工厂内随机选择一个关键工件和将所述关键工件与各个非关键工厂内的非关键工件交换位置;Randomly selecting a critical workpiece within the critical plant and swapping locations of the critical workpiece with non-critical workpieces within each non-critical plant;

关键工厂和非关键工厂间的插入邻域操作,随机选择一个关键工件,将所述关键工件插入到各个个非关键工厂内的各个非关键工件的前面与后面;The insertion neighborhood operation between key factories and non-critical factories randomly selects a key workpiece and inserts the key workpiece into the front and back of each non-critical workpiece in each non-critical factory;

在装配机器上选择一个加工总时间最大的产品,然后将所述关键工件分配给另一个随机选择的装配机器;Select a product with the largest total processing time on the assembly machine, and then assign the critical workpiece to another randomly selected assembly machine;

选择两个具有最大完工时间差的相邻产品,然后随机交换它们相关联的工件;Select two adjacent products with the largest makespan difference and then randomly exchange their associated workpieces;

交换两个具有最大完工时间差的相邻产品;Swap two adjacent products with the largest makespan difference;

在装配机器上选择一个能量消耗最大的产品,然后将所述关键工件分配给另一个随机选择的装配机器。A product with the highest energy consumption is selected on the assembly machine and then the critical workpiece is assigned to another randomly selected assembly machine.

进一步地,处理器1001可以调用存储器1005中存储的分布式装配流水车间的调度程序,还执行以下操作:Further, the processor 1001 can call the scheduler of the distributed assembly flow shop stored in the memory 1005, and also perform the following operations:

将所述工件的加工时间作为聚类标准,构建各个工件对应的工件特征集;Use the processing time of the workpiece as a clustering criterion to construct a workpiece feature set corresponding to each workpiece;

通过K-means算法将所述工件特征集划分为K个集群,其中所述K的值根据误差平方和确定;The workpiece feature set is divided into K clusters through the K-means algorithm, where the value of K is determined based on the sum of squared errors;

从第一个所述集群开始,工件作为最后一个工件依次分配给各个工厂,直到所有工件都被分配到各个工厂,从而确定各个所述工厂对应的所述目标工件。Starting from the first cluster, the workpiece is assigned to each factory in sequence as the last workpiece until all workpieces are assigned to each factory, thereby determining the target workpiece corresponding to each factory.

进一步地,处理器1001可以调用存储器1005中存储的分布式装配流水车间的调度程序,还执行以下操作:Further, the processor 1001 can call the scheduler of the distributed assembly flow shop stored in the memory 1005, and also perform the following operations:

根据所述生产子计划,确定每个所述待生产产品的相关工作以及每个所述待生产产品的所述相关工作的完成时间;According to the production sub-plan, determine the relevant work of each of the products to be produced and the completion time of the relevant work of each of the products to be produced;

按照非降序规则对每个所述待生产产品的所述完成时间排序,获得待生产产品的优先级序列;Sort the completion time of each product to be produced according to non-descending rules to obtain a priority sequence of products to be produced;

根据所述优先级序列的顺序依次取出每个所述待生产产品分配到能够最早完成其装配操作的装配机器上,从而确定各个所述工厂对应的所述装配子计划。According to the order of the priority sequence, each product to be produced is sequentially taken out and assigned to the assembly machine that can complete its assembly operation earliest, thereby determining the assembly sub-plan corresponding to each of the factories.

此外,本发明为实现上述目的,本发明还提供一种终端设备,所述终端设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的分布式装配流水车间的调度程序,所述分布式装配流水车间的调度程序被所述处理器执行时实现如上所述的分布式装配流水车间的调度方法的步骤。In addition, in order to achieve the above object, the present invention also provides a terminal device. The terminal device includes: a memory, a processor, and a distributed assembly flow workshop stored on the memory and capable of running on the processor. When the scheduler of the distributed assembly flow shop is executed by the processor, the steps of the scheduling method of the distributed assembly flow shop as described above are implemented.

此外,本发明为实现上述目的,本发明还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有分布式装配流水车间的调度程序,所述分布式装配流水车间的调度程序被处理器执行时实现如上所述的分布式装配流水车间的调度方法的步骤。In addition, in order to achieve the above object, the present invention also provides a computer-readable storage medium. The computer-readable storage medium stores a scheduling program for a distributed assembly flow workshop. The scheduling program for a distributed assembly flow workshop When executed by the processor, the steps of implementing the above-mentioned scheduling method for a distributed assembly flow shop are implemented.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者系统不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者系统所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者系统中还存在另外的相同要素。It should be noted that, as used herein, the terms "include", "comprising" or any other variation thereof are intended to cover a non-exclusive inclusion, such that a process, method, article or system that includes a list of elements not only includes those elements, but It also includes other elements not expressly listed or that are inherent to the process, method, article or system. Without further limitation, an element defined by the statement "comprises a..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.

上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。The above serial numbers of the embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在如上所述的一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机、电脑)执行本发明各个实施例所述的方法。Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better. implementation. Based on this understanding, the technical solution of the present invention can be embodied in the form of a software product that is essentially or contributes to the existing technology. The computer software product is stored in a storage medium (such as ROM/RAM) as mentioned above. , magnetic disk, optical disk), including several instructions to cause a terminal device (which can be a mobile phone or a computer) to execute the methods described in various embodiments of the present invention.

以上仅为本发明的优选实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above are only preferred embodiments of the present invention, and do not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the description and drawings of the present invention may be directly or indirectly used in other related technical fields. , are all similarly included in the scope of patent protection of the present invention.

Claims (9)

1.一种分布式装配流水车间的调度方法,其特征在于,所述分布式装配流水车间的调度方法包括:1. A scheduling method for a distributed assembly flow shop, characterized in that the scheduling method for a distributed assembly flow shop includes: 根据柔性分布式装配流水车间的工艺参数,构建能耗约束下的柔性分布式装配流水车间调度问题的数学模型,所述数学模型包括目标函数和约束条件;According to the process parameters of the flexible distributed assembly flow shop, construct a mathematical model for the scheduling problem of the flexible distributed assembly flow shop under energy consumption constraints. The mathematical model includes an objective function and constraints; 基于工件的加工时间对工件进行聚类,确定各个工厂对应的目标工件;Cluster the workpieces based on their processing time and determine the target workpieces corresponding to each factory; 根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间;According to the improved DRL algorithm model, determine the processing sequence of the target workpiece corresponding to each of the factories and the maximum completion time of the processing sequence corresponding to each of the factories; 获取各个所述工厂内待生产产品的生产子计划,根据所述生产子计划确定各个所述工厂对应的装配子计划;Obtain the production sub-plan of the products to be produced in each of the factories, and determine the assembly sub-plan corresponding to each of the factories according to the production sub-plan; 根据各个所述工厂的加工序列和所述装配子计划,确定所述目标函数值;Determine the objective function value according to the processing sequence of each factory and the assembly sub-plan; 在不满足迭代次数时,继续执行所述根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间的步骤;When the number of iterations is not satisfied, continue to execute the step of determining the processing sequence of the target workpiece corresponding to each factory and the maximum completion time of the processing sequence corresponding to each factory according to the improved DRL algorithm model; 在满足迭代次数时,输出满足预设条件的所述目标函数值对应的调度方案。When the number of iterations is met, a scheduling plan corresponding to the objective function value that meets the preset conditions is output. 2.如权利要求1所述的方法,其特征在于,所述目标函数为:最小化最大完工时间和在整个制造期内的总能耗;其中,所述总能耗,包括4个部分:第一部分为机器处于加工状态时的能耗,第二部分为运输时的能耗,第三部分为机器处于待机时的能耗,第四部分为机器处于序相关设置的能耗;所述约束条件为:每个工作必须只分配给一个工厂,每个工作必须在生产中有序处理,每个生产机器一次只能处理一个工作,每个产品必须只在一台装配机器上处理,每个产品只有在所有相关工作都完成并运送到相应装配机器上时才能装配,每个装配机器一次只能处理一个产品,每台装配机器一次只能加工一个产品。2. The method of claim 1, wherein the objective function is: minimizing the maximum completion time and the total energy consumption during the entire manufacturing period; wherein the total energy consumption includes 4 parts: The first part is the energy consumption when the machine is in processing state, the second part is the energy consumption during transportation, the third part is the energy consumption when the machine is in standby, and the fourth part is the energy consumption when the machine is in sequence-related settings; the constraints The conditions are: each job must be assigned to only one factory, each job must be processed in production in an orderly manner, each production machine can only process one job at a time, each product must be processed on only one assembly machine, each Products can only be assembled when all related work has been completed and shipped to the corresponding assembly machines. Each assembly machine can only process one product at a time, and each assembly machine can only process one product at a time. 3.如权利要求1所述的方法,其特征在于,所述根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间的步骤,包括:3. The method of claim 1, wherein the processing sequence of the target workpiece corresponding to each factory and the maximum processing sequence corresponding to each factory are determined according to the improved DRL algorithm model. Completion time steps include: 对所述工厂内的各个所述目标工件的加工时间建模,将各个所述目标工件在所有机器上的加工时间编码转换成一个固定维数的第一向量;Model the processing time of each target workpiece in the factory, and convert the processing time encoding of each target workpiece on all machines into a first vector with a fixed dimension; 对所述第一向量建模,编码转换成第二向量;Model the first vector and convert the encoding into a second vector; 将所述第二向量输入预先基于RNN和Attention机制构建的解码网络,生成所述工厂对应的所述目标工件的加工序列。The second vector is input into a decoding network built in advance based on RNN and Attention mechanisms to generate a processing sequence of the target workpiece corresponding to the factory. 4.如权利要求3所述的方法,其特征在于,所述继续根据改进的DRL算法模型,确定各个所述工厂对应的所述目标工件的加工序列以及各个所述工厂对应所述加工序列的最大完工时间的步骤之前,包括:4. The method of claim 3, wherein the step of determining the processing sequence of the target workpiece corresponding to each factory and the processing sequence of the target workpiece corresponding to each factory is based on the improved DRL algorithm model. The steps before maximum makespan include: 获取当前所述DRL算法模型的网络模型参数和关键工厂以及具有最小化最大完工时间的目标工厂;Obtain the network model parameters and key factories of the current DRL algorithm model and the target factory with minimized maximum completion time; 将所述关键工厂的所述加工序列内的最后一个工件分配至所述目标工厂,并将所述网络模型参数作为所述DRL算法模型的初始网络模型参数。The last workpiece in the processing sequence of the key factory is assigned to the target factory, and the network model parameters are used as the initial network model parameters of the DRL algorithm model. 5.如权利要求4所述的方法,其特征在于,基于预设搜索算法训练所述DRL算法模型;其中,所述预设搜索算法包括:5. The method of claim 4, wherein the DRL algorithm model is trained based on a preset search algorithm; wherein the preset search algorithm includes: 关键工厂内的插入邻域操作,随机选择一个关键工件,将所述关键工件插入到所有的非关键工件的前面与后面;The insertion neighborhood operation in the key factory randomly selects a key workpiece and inserts the key workpiece in front and behind all non-critical workpieces; 关键工厂内的交换邻域操作,随机选择一个关键工件和其余所有的非关键工件进行交换;The exchange neighborhood operation in the key factory randomly selects a key workpiece and exchanges it with all other non-critical workpieces; 在关键工厂内随机选择一个关键工件和将所述关键工件与各个非关键工厂内的非关键工件交换位置;Randomly selecting a critical workpiece within the critical plant and swapping locations of the critical workpiece with non-critical workpieces within each non-critical plant; 关键工厂和非关键工厂间的插入邻域操作,随机选择一个关键工件,将所述关键工件插入到各个个非关键工厂内的各个非关键工件的前面与后面;The insertion neighborhood operation between key factories and non-critical factories randomly selects a key workpiece and inserts the key workpiece into the front and back of each non-critical workpiece in each non-critical factory; 在装配机器上选择一个加工总时间最大的产品,然后将所述关键工件分配给另一个随机选择的装配机器;Select a product with the largest total processing time on the assembly machine, and then assign the critical workpiece to another randomly selected assembly machine; 选择两个具有最大完工时间差的相邻产品,然后随机交换它们相关联的工件;Select two adjacent products with the largest makespan difference and then randomly exchange their associated workpieces; 交换两个具有最大完工时间差的相邻产品;Swap two adjacent products with the largest makespan difference; 在装配机器上选择一个能量消耗最大的产品,然后将所述关键工件分配给另一个随机选择的装配机器。A product with the highest energy consumption is selected on the assembly machine and then the critical workpiece is assigned to another randomly selected assembly machine. 6.如权利要求1所述的方法,其特征在于,所述工件的加工时间包括:工件所有加工操作的平均加工时间、工件的第一次加工的加工时间、工件最后一次加工的加工时间、所有工件的加工时间标准差;所述基于工件的加工时间对工件进行聚类,确定各个工厂对应的目标工件的步骤,包括:6. The method of claim 1, wherein the processing time of the workpiece includes: the average processing time of all processing operations of the workpiece, the processing time of the first processing of the workpiece, the processing time of the last processing of the workpiece, The standard deviation of the processing time of all workpieces; the steps of clustering the workpieces based on the processing time of the workpieces and determining the target workpieces corresponding to each factory include: 将所述工件的加工时间作为聚类标准,构建各个工件对应的工件特征集;Use the processing time of the workpiece as a clustering criterion to construct a workpiece feature set corresponding to each workpiece; 通过K-means算法将所述工件特征集划分为K个集群,其中所述K的值根据误差平方和确定;The workpiece feature set is divided into K clusters through the K-means algorithm, where the value of K is determined based on the sum of squared errors; 从第一个所述集群开始,工件作为最后一个工件依次分配给各个工厂,直到所有工件都被分配到各个工厂,从而确定各个所述工厂对应的所述目标工件。Starting from the first cluster, the workpiece is assigned to each factory in sequence as the last workpiece until all workpieces are assigned to each factory, thereby determining the target workpiece corresponding to each factory. 7.如权利要求1所述的方法,其特征在于,所述获取各个所述工厂内待生产产品的生产子计划,根据所述生产子计划确定各个所述工厂对应的装配子计划的步骤,包括:7. The method according to claim 1, characterized in that the step of obtaining the production sub-plan of the products to be produced in each of the factories and determining the assembly sub-plan corresponding to each of the factories according to the production sub-plan, include: 根据所述生产子计划,确定每个所述待生产产品的相关工作以及每个所述待生产产品的所述相关工作的完成时间;According to the production sub-plan, determine the relevant work of each of the products to be produced and the completion time of the relevant work of each of the products to be produced; 按照非降序规则对每个所述待生产产品的所述完成时间排序,获得待生产产品的优先级序列;Sort the completion time of each product to be produced according to non-descending rules to obtain a priority sequence of products to be produced; 根据所述优先级序列的顺序依次取出每个所述待生产产品分配到能够最早完成其装配操作的装配机器上,从而确定各个所述工厂对应的所述装配子计划。According to the order of the priority sequence, each product to be produced is sequentially taken out and assigned to the assembly machine that can complete its assembly operation earliest, thereby determining the assembly sub-plan corresponding to each of the factories. 8.一种终端设备,其特征在于,所述终端设备包括:存储器、处理器及存储在所述存储器上并可在所述处理器上运行的分布式装配流水车间的调度程序,所述分布式装配流水车间的调度程序被所述处理器执行时实现如权利要求1至7中任一项所述的分布式装配流水车间的调度方法的步骤。8. A terminal device, characterized in that the terminal device includes: a memory, a processor and a scheduler of a distributed assembly flow shop stored on the memory and executable on the processor, the distributed assembly flow workshop When the scheduling program of the distributed assembly flow shop is executed by the processor, the steps of the scheduling method of the distributed assembly flow shop according to any one of claims 1 to 7 are implemented. 9.一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有分布式装配流水车间的调度程序,所述分布式装配流水车间的调度程序被处理器执行时实现如权利要求1至7中任一项所述的分布式装配流水车间的调度方法的步骤。9. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a scheduling program for a distributed assembly flow shop. When the scheduler for a distributed assembly flow shop is executed by a processor, the following is implemented: The steps of the scheduling method of a distributed assembly flow shop according to any one of claims 1 to 7.
CN202311755105.3A 2023-12-20 2023-12-20 Scheduling method, terminal equipment and storage medium for distributed assembly line shop Pending CN117707083A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311755105.3A CN117707083A (en) 2023-12-20 2023-12-20 Scheduling method, terminal equipment and storage medium for distributed assembly line shop

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311755105.3A CN117707083A (en) 2023-12-20 2023-12-20 Scheduling method, terminal equipment and storage medium for distributed assembly line shop

Publications (1)

Publication Number Publication Date
CN117707083A true CN117707083A (en) 2024-03-15

Family

ID=90163460

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311755105.3A Pending CN117707083A (en) 2023-12-20 2023-12-20 Scheduling method, terminal equipment and storage medium for distributed assembly line shop

Country Status (1)

Country Link
CN (1) CN117707083A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118605429A (en) * 2024-08-08 2024-09-06 天翼物联科技有限公司 Production line scheduling method, device, equipment and medium based on heuristic algorithm

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118605429A (en) * 2024-08-08 2024-09-06 天翼物联科技有限公司 Production line scheduling method, device, equipment and medium based on heuristic algorithm

Similar Documents

Publication Publication Date Title
Wang et al. A cooperative memetic algorithm with learning-based agent for energy-aware distributed hybrid flow-shop scheduling
CN113159383B (en) Manufacturing resource reconstruction scheduling method and system for multi-machine cooperation processing workshop
CN116774651B (en) Distributed flexible flow shop scheduling method and system with time-of-use electricity price constraint
CN107230023B (en) Based on the production and transportation coordinated dispatching method and system for improving harmony search
CN110288185A (en) A Distributed Flexible Pipeline Scheduling Method
CN117707083A (en) Scheduling method, terminal equipment and storage medium for distributed assembly line shop
CN115145235A (en) A multi-objective intelligent scheduling method for the whole casting process
Gu Application research for multiobjective low-carbon flexible job-shop scheduling problem based on hybrid artificial bee colony algorithm
Wang et al. A knowledge-driven cooperative coevolutionary algorithm for integrated distributed production and transportation scheduling problem
Wang et al. A feedback learning-based memetic algorithm for energy-aware distributed flexible job-shop scheduling with transportation constraints
Gu et al. An improved memetic algorithm to solve the energy-efficient distributed flexible job shop scheduling problem with transportation and start-stop constraints
CN111652392A (en) A low-carbon and high-efficiency dismantling line balance optimization method for waste mobile terminals
CN118536723A (en) Dynamic multi-target flexible workshop job scheduling method based on deep Q learning
CN115496322A (en) Distributed flow shop scheduling method and device
CN114415615B (en) Mixed flow assembly line balanced distribution method and device under uncertain demand
CN118941039A (en) Dynamic flexible job shop scheduling method based on auxiliary task collaborative optimization algorithm
Yu et al. Double-learning-strategy-based evolutionary algorithm for scheduling multiobjective distributed assembly permutation flowshops with setup time
CN117333084A (en) An energy-saving distributed assembly zero-wait flow shop scheduling method and system based on hyper-heuristic multi-dimensional distribution estimation
Feng et al. A two-stage individual feedback NSGA-III for dynamic many-objective flexible job shop scheduling problem
CN117540990A (en) Production line scheduling method based on deep reinforcement learning and multi-objective optimization
CN116300763B (en) Mathematical heuristic scheduling method and system for hybrid flow shop considering machine configuration
CN117132181A (en) A distributed flexible production and transportation collaborative scheduling method
CN111665799A (en) Time constraint type parallel machine energy-saving scheduling method based on collaborative algorithm
CN117519051A (en) Scheduling method, terminal equipment and storage medium for distributed assembly job shop
CN116859832A (en) Dynamic flexible workshop scheduling optimization method for ship segmented manufacturing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination