CN113762780A - Method for processing medical waste collection problem by using improved genetic algorithm - Google Patents
Method for processing medical waste collection problem by using improved genetic algorithm Download PDFInfo
- Publication number
- CN113762780A CN113762780A CN202111057473.1A CN202111057473A CN113762780A CN 113762780 A CN113762780 A CN 113762780A CN 202111057473 A CN202111057473 A CN 202111057473A CN 113762780 A CN113762780 A CN 113762780A
- Authority
- CN
- China
- Prior art keywords
- robot
- time
- collection point
- medical waste
- collection
- 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.)
- Granted
Links
- 239000002906 medical waste Substances 0.000 title claims abstract description 54
- 238000000034 method Methods 0.000 title claims abstract description 22
- 230000002068 genetic effect Effects 0.000 title claims abstract description 20
- 239000011159 matrix material Substances 0.000 claims abstract description 5
- 230000035772 mutation Effects 0.000 claims description 4
- 230000000295 complement effect Effects 0.000 claims description 3
- 238000004904 shortening Methods 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 6
- 238000005457 optimization Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 208000015181 infectious disease Diseases 0.000 description 2
- 238000010845 search algorithm Methods 0.000 description 2
- 238000002922 simulated annealing Methods 0.000 description 2
- 238000013473 artificial intelligence Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 230000002458 infectious effect Effects 0.000 description 1
- 239000010781 infectious medical waste Substances 0.000 description 1
- 238000007726 management method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F30/00—Computer-aided design [CAD]
- G06F30/20—Design optimisation, verification or simulation
- G06F30/27—Design optimisation, verification or simulation using machine learning, e.g. artificial intelligence, neural networks, support vector machines [SVM] or training a model
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/12—Computing arrangements based on biological models using genetic models
- G06N3/126—Evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
- G06Q10/06313—Resource planning in a project environment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2111/00—Details relating to CAD techniques
- G06F2111/04—Constraint-based CAD
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Entrepreneurship & Innovation (AREA)
- Strategic Management (AREA)
- Economics (AREA)
- General Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Health & Medical Sciences (AREA)
- Biophysics (AREA)
- Operations Research (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Tourism & Hospitality (AREA)
- Quality & Reliability (AREA)
- Marketing (AREA)
- Evolutionary Biology (AREA)
- Artificial Intelligence (AREA)
- Development Economics (AREA)
- Game Theory and Decision Science (AREA)
- Bioinformatics & Computational Biology (AREA)
- Software Systems (AREA)
- General Business, Economics & Management (AREA)
- Educational Administration (AREA)
- General Engineering & Computer Science (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Medical Informatics (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Biodiversity & Conservation Biology (AREA)
- Physiology (AREA)
- Computer Hardware Design (AREA)
- Genetics & Genomics (AREA)
- Geometry (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
Abstract
本发明公开了一种使用改进遗传算法处理医疗废料收集问题的方法,通过多个机器人共同完成医疗废料收集工作,而多个机器人的调度方案通过如下步骤得到:S1、依据医院的平面图,确定图中各收集点和机器人工作站的位置,计算收集点与工作站的距离以及收集点与收集点之间的距离,得到距离矩阵,确定各收集点的医疗废料的量;S2建立用于医疗废料收集的机器人调度模型;S3、通过改进的遗传算法求解步骤S2建立的用于医疗废料收集的机器人调度模型,从而得到多个机器人的调度方案。本发明具有提高医疗废料收集的效率、提高在收集过程中的安全性和可用性、避免算法落入“极值陷阱”等优点。
The invention discloses a method for using an improved genetic algorithm to deal with the problem of medical waste collection. Multiple robots are used to jointly complete the medical waste collection work, and the scheduling scheme of the multiple robots is obtained through the following steps: S1. According to the plan of the hospital, determine the map Calculate the distance between the collection point and the workstation and the distance between the collection point and the collection point, get the distance matrix, and determine the amount of medical waste at each collection point; S2 establishes the collection point for medical waste. Robot scheduling model; S3, solving the robot scheduling model for medical waste collection established in step S2 through an improved genetic algorithm, thereby obtaining a scheduling scheme of multiple robots. The invention has the advantages of improving the efficiency of medical waste collection, improving the safety and usability in the collection process, avoiding the algorithm falling into the "extreme value trap" and the like.
Description
技术领域technical field
本发明涉及计算机、医疗废料收集、机器人路径规划的技术领域,尤其涉及到一种使用改进遗传算法处理医疗废料收集问题的方法。The invention relates to the technical fields of computers, medical waste collection and robot path planning, and in particular to a method for dealing with the problem of medical waste collection by using an improved genetic algorithm.
背景技术Background technique
随着人工智能技术的不断发展,越来越多的工作可以由机器人完成。对于大型的医疗机构,每天都会产生大量的感染性医疗废料(Infectious health care waste,IHCW),使用机器人进行医疗废物的收集,既能提高处理能力,又能规避处理人员被感染的风险。在医院内部,设置好机器人工作站后,每个收集点产生的感染性医疗废料量不同,需要寻找一条从工作站到各分散的收集点的行驶路径,并满足一定的约束。问题可以转换为经典的车辆调度问题(Vehicle Routing Problem,VRP)。With the continuous development of artificial intelligence technology, more and more jobs can be done by robots. For large medical institutions, a large amount of infectious health care waste (IHCW) is generated every day. Using robots to collect medical waste can not only improve the processing capacity, but also avoid the risk of infection of the processing personnel. Inside the hospital, after the robot workstation is set up, the amount of infectious medical waste generated by each collection point is different. It is necessary to find a driving path from the workstation to each scattered collection point and meet certain constraints. The problem can be transformed into a classic Vehicle Routing Problem (VRP).
物流运输调度问题一直以来都是作为物流配送的热点研究问题,它被广泛应用于如交通、工业管理、物流运输等领域。国内外学者分别从路径构造、局部搜索、数学规划等方向对其展开了研究。归纳起来目前求解物流配送路径优化问题较为有效的方法主要有:蚁群算法,禁忌搜索算法,模拟退火算法,遗传算法。蚁群算法本身很复杂,需要较长的搜索时间,且很容易出现停滞现象。禁忌搜索算法是单操作,搜索过程的初始解只能有一个,且对初始解有很强的依赖性。模拟退火算法收敛速度慢,执行时间长,且性能与初始值有很大的关系。The logistics transportation scheduling problem has always been a hot research problem in logistics distribution, and it is widely used in fields such as transportation, industrial management, and logistics transportation. Scholars at home and abroad have carried out research on it from the directions of path construction, local search, and mathematical programming. To sum up, the most effective methods to solve the logistics distribution path optimization problem are: ant colony algorithm, tabu search algorithm, simulated annealing algorithm, genetic algorithm. The ant colony algorithm itself is very complex, requires a long search time, and is prone to stagnation. The tabu search algorithm is a single operation, and there can only be one initial solution in the search process, and it has a strong dependence on the initial solution. Simulated annealing algorithm has slow convergence speed and long execution time, and its performance has a great relationship with the initial value.
发明内容SUMMARY OF THE INVENTION
本发明的目的在于克服现有技术的不足,提供一种使用改进遗传算法处理医疗废料收集问题的方法,既提高医疗废料收集的效率、收集过程中的安全性和可用性,又能避免算法落入“极值陷阱”等优点。The purpose of the present invention is to overcome the deficiencies of the prior art, and to provide a method for dealing with the problem of medical waste collection using an improved genetic algorithm, which not only improves the efficiency of medical waste collection, the safety and usability during the collection process, but also avoids the algorithm falling into "Extreme trap" and other advantages.
为实现上述目的,本发明所提供的技术方案为:For achieving the above object, the technical scheme provided by the present invention is:
一种使用改进遗传算法处理医疗废料收集问题的方法,通过多个机器人共同完成医疗废料收集工作,而多个机器人的调度方案通过如下步骤得到:A method for using an improved genetic algorithm to deal with the problem of medical waste collection. Multiple robots are used to jointly complete the medical waste collection work, and the scheduling scheme of the multiple robots is obtained through the following steps:
S1、依据医院的平面图,确定图中各收集点和机器人工作站的位置,计算收集点与工作站的距离以及收集点与收集点之间的距离,得到距离矩阵,确定各收集点的医疗废料的量;S1. According to the plan of the hospital, determine the location of each collection point and robot workstation in the figure, calculate the distance between the collection point and the workstation and the distance between the collection point and the collection point, obtain a distance matrix, and determine the amount of medical waste at each collection point ;
S2建立用于医疗废料收集的机器人调度模型;S2 establishes a robot scheduling model for medical waste collection;
S3、通过改进的遗传算法求解步骤S2建立的用于医疗废料收集的机器人调度模型,从而得到多个机器人的调度方案。S3. Solve the robot scheduling model for medical waste collection established in step S2 through an improved genetic algorithm, thereby obtaining scheduling schemes for multiple robots.
进一步地,所述步骤S2中,建立的用于医疗废料收集的机器人调度模型为考虑上半软时间窗的机器人调度模型,建立过程如下:Further, in the step S2, the established robot scheduling model for medical waste collection is a robot scheduling model considering the upper semi-soft time window, and the establishment process is as follows:
S2-1、半软时间窗定义,机器人可到达时间窗口之外,具体包括如下情况:S2-1. Definition of semi-soft time window, the robot can reach outside the time window, including the following situations:
当机器人在指定的时间窗口[ai,bi]到达收集点时,不会受到惩罚;When the robot reaches the collection point within the specified time window [a i , b i ], it will not be penalized;
如果机器人到达时间早于ai,不会收到惩罚,从而缩短在垃圾箱中的停留时间,但如果机器人比bi晚到,会受到惩罚;If the robot arrives earlier than a i , it will not be penalized, thus shortening its stay in the bin, but if the robot arrives later than b i , it will be penalized;
设允许到达时间为b′i(b′i>bi):Let the allowable arrival time be b′ i (b′ i >b i ):
b′i=b0-ti0 (1)b′ i =b 0 -t i0 (1)
式(1)中,b0为常数,表示机器人最终返回工作站的时间;ti0表示从收集点i到工作站的行程时间;公式约定从收集点i到工作站应预留足够的时间;In formula (1), b 0 is a constant, representing the time when the robot finally returns to the workstation; t i0 represents the travel time from the collection point i to the workstation; the formula stipulates that enough time should be reserved from the collection point i to the workstation;
S2-2、超时惩罚定义,当机器人到达时间间隔[bi,b′i]时,即服务开始时间si落在[bi,b′i],它将受到惩罚cdelay×(si-bi);S2-2. Definition of timeout penalty, when the robot arrives at the time interval [b i , b′ i ], that is, the service start time s i falls in [b i , b′ i ], it will be penalized c delay ×(s i -b i );
每个收集点i的惩罚计算如下:The penalty for each collection point i is calculated as follows:
式(2)中,si为收集点i开始的服务时间,cdelay为延迟时间的单位成本;In formula (2), s i is the service time starting from collection point i, and c delay is the unit cost of delay time;
S2-3、定义用于时间限制的每条路线的总行程时间M:S2-3. Define the total travel time M of each route for the time limit:
其中,为布尔变量,若机器人k在时间轮h中直接从收集点i移动到收集点j,则该值为1,否则,该值为0;tij为从收集点i移动到收集点j的移动时间;in, is a Boolean variable, if the robot k moves directly from the collection point i to the collection point j in the time wheel h, the value is 1, otherwise, the value is 0; t ij is the movement from the collection point i to the collection point j time;
S2-4、设定目标函数,使总成本最小化,包括机器人的启动成本、行驶距离成本和延迟时间成本:S2-4. Set the objective function to minimize the total cost, including the startup cost, travel distance cost and delay time cost of the robot:
式(3)中,为布尔变量,若机器人k在时间轮h中直接从工作站0移动到收集点i,则该值为1;否则,该值为0;cstart表示机器人的启动成本;cij为从收集点i到收集点j的移动距离;为布尔变量,若收集点i在时间轮h中由机器人k服务,则值为1,否则,该值为0;In formula (3), is a Boolean variable, if the robot k moves directly from the
约束条件:Restrictions:
(Ti-1)M≤si-bi≤TiM (13)(T i -1)M≤s i -b i ≤T i M (13)
公式(4)和(5)为度约束,约束(4)保证每个采集点只能访问一次;约束(5)保证进入弧的数量等于节点离开弧的数量;约束(6)确保每个采集点只能分配给一个机器人;约束(7)表示距离应为非负变量;约束(8)保证每条路线上的总体积不超过机器人的容量,其中第i个医疗废料收集点的医疗废料数量,Q表示机器人储存医疗废料的容量;约束(9)计算路由中每个采集点的服务开始时间;约束(10)将服务开始时间限制在其最早到达时间和最晚到达时间之间;约束(11)使服务开始时间小于每条路线的总时间;约束(12)表示服务时间应为非负变量;约束(13)确定采集点的服务开始时间是否在其相应的惩罚间隔内,即(bi,b′i];约束(14)-(16)为完整性约束。Equations (4) and (5) are degree constraints, constraint (4) ensures that each acquisition point can only be accessed once; constraint (5) ensures that the number of incoming arcs is equal to the number of nodes leaving arcs; constraint (6) ensures that each acquisition Points can only be assigned to one robot; Constraint (7) indicates that the distance should be a non-negative variable; Constraint (8) ensures that the total volume on each route does not exceed the robot's capacity, where the amount of medical waste at the ith medical waste collection point , Q represents the capacity of the robot to store medical waste; constraint (9) calculates the service start time of each collection point in the route; constraint (10) limits the service start time between its earliest and latest arrival times; constraint ( 11) Make the service start time less than the total time of each route; Constraint (12) indicates that the service time should be a non-negative variable; Constraint (13) determines whether the service start time of the collection point is within its corresponding penalty interval, i.e. (b i , b′ i ]; constraints (14)-(16) are integrity constraints.
进一步地,所述步骤S3的具体过程如下:Further, the specific process of the step S3 is as follows:
S3-1、输入参数:医疗垃圾收集需求、行程距离、行程时间、时间窗口;S3-1. Input parameters: medical waste collection requirements, travel distance, travel time, time window;
S3-2、依据机器人的数量以及医疗垃圾收集点初始化解决方案,生成多条路径,设置迭代次数,k=0;S3-2. According to the number of robots and the initialization solution of the medical waste collection point, multiple paths are generated, and the number of iterations is set, k=0;
S3-3、计算每条当前路径的适应度;S3-3. Calculate the fitness of each current path;
S3-4、依据适应度选出适应度高的初始路径;S3-4, select an initial path with high fitness according to fitness;
S3-5、将步骤S3-4得到的初始路径分成两组节点,第一组放在前面,且该第一组的起始点和终点都为0;S3-5, the initial path obtained in step S3-4 is divided into two groups of nodes, the first group is placed in the front, and the start point and the end point of the first group are both 0;
S3-6、第二组节点为第一组未经访问的节点,将该组的节点顺序排列;S3-6, the second group of nodes is the first group of unvisited nodes, and the nodes of this group are arranged in order;
S3-7、通过多次插入0,将第二组节点随机分成1到n-1条路径,计算各路径的目标函数;S3-7. By inserting 0 multiple times, the second group of nodes is randomly divided into 1 to n-1 paths, and the objective function of each path is calculated;
S3-8、对路径按目标函数从小到大进行排序,形成一个列表;S3-8. Sort the paths according to the objective function from small to large to form a list;
S3-9、选择总成本最低即目标函数最小的路线,判断其是否可行,不可行直接删除;可行的路径附加到第一组路径的后面,形成一个全新的路径,得到候选的解决方案;(步骤S3-5至S3-9可参照图3给的示例)S3-9. Select the route with the lowest total cost, that is, the smallest objective function, and judge whether it is feasible or not, and delete it directly if it is not feasible; the feasible route is attached to the back of the first group of routes to form a brand-new route, and a candidate solution is obtained; ( Steps S3-5 to S3-9 can refer to the example given in FIG. 3)
S3-10、变异算子将位翻转到互补位;S3-10, the mutation operator flips the bit to the complementary bit;
S3-11、判断目前的候选方案是否可行,若可行,则计算其目标函数,否则返回步骤S3-10;S3-11, determine whether the current candidate solution is feasible, if feasible, calculate its objective function, otherwise return to step S3-10;
S3-12、选择总成本最低即目标函数最小的候选解决方案;S3-12. Select the candidate solution with the lowest total cost, that is, the smallest objective function;
S3-13、判断k是否大于设定的迭代次数,若是,则步骤S3-12得到的候选解决方案为最终最佳的解决方案,否则,返回步骤S3-3。S3-13, determine whether k is greater than the set number of iterations, if so, the candidate solution obtained in step S3-12 is the final optimal solution, otherwise, return to step S3-3.
进一步地,所述步骤S3-3中,计算的适应度用于评估当前的解决方案,计算公式如下:Further, in the step S3-3, the calculated fitness is used to evaluate the current solution, and the calculation formula is as follows:
式(17)中,f为适应度值,Z为总成本。In formula (17), f is the fitness value, and Z is the total cost.
与现有技术相比,本方案原理及优点如下:Compared with the prior art, the principle and advantages of this scheme are as follows:
1、将医疗机构的医疗废料收集模型用改进的带半软时间窗的车辆调度问题表示,对处理医疗废料需要注意的问题进行建模上的约束,提高了在收集过程中的安全性和可用性。1. The medical waste collection model of medical institutions is represented by an improved vehicle scheduling problem with a semi-soft time window, and the constraints on the modeling of the problems that need to be paid attention to when dealing with medical wastes improve the safety and usability in the collection process. .
2、使用改进的遗传算法求解机器人调度模型,采用“顺序交叉”结合“交叉突变”策略对算法进一步优化,有效增大了算法的种群多样性,避免了算法落入“极值陷阱”。2. The improved genetic algorithm is used to solve the robot scheduling model, and the "sequential crossover" combined with "crossover mutation" strategy is used to further optimize the algorithm, which effectively increases the population diversity of the algorithm and avoids the algorithm from falling into the "extreme trap".
3、采用多个机器人共同完成工作的方式提高医疗废料收集的效率。3. Use multiple robots to work together to improve the efficiency of medical waste collection.
附图说明Description of drawings
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的服务作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the services required in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only For some embodiments of the present invention, for those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.
图1为本发明一种使用改进遗传算法处理医疗废料收集问题的方法中问题求解的原理流程图;Fig. 1 is a kind of principle flow chart of problem solving in a method of using an improved genetic algorithm to deal with the medical waste collection problem of the present invention;
图2为本发明实施例中的医疗废料收集环境示意图;2 is a schematic diagram of a medical waste collection environment in an embodiment of the present invention;
图3为遗传算法顺序交叉及可行性检测原理示意图;Figure 3 is a schematic diagram of the genetic algorithm sequence crossover and feasibility detection principle;
图4为本发明实施例中涉及到的距离矩阵示意图;4 is a schematic diagram of a distance matrix involved in an embodiment of the present invention;
图5为本发明实施例中不同收集点的医疗废料分布统计图;5 is a statistical diagram of the distribution of medical wastes at different collection points in the embodiment of the present invention;
图6为本发明实施例中改进遗传算法的输出结果图;6 is an output result diagram of an improved genetic algorithm in an embodiment of the present invention;
图7为本发明实施例中改进遗传算法的优化效果图。FIG. 7 is an optimization effect diagram of an improved genetic algorithm in an embodiment of the present invention.
具体实施方式Detailed ways
下面结合具体实施例对本发明作进一步说明:Below in conjunction with specific embodiment, the present invention will be further described:
本实施例所述的一种使用改进遗传算法处理医疗废料收集问题的方法,通过多个机器人共同完成医疗废料收集工作,而多个机器人的调度方案通过如下步骤得到:In a method for using an improved genetic algorithm to deal with the problem of medical waste collection described in this embodiment, a plurality of robots are used to jointly complete the medical waste collection work, and the scheduling scheme of the plurality of robots is obtained through the following steps:
S1、依据如图2所示的医院的平面图,确定图中各收集点和机器人工作站的位置,计算收集点与工作站的距离以及收集点与收集点之间的距离,得到如图4所示的距离矩阵,确定如图5所示的各收集点的医疗废料的量;S1. According to the plan view of the hospital as shown in Figure 2, determine the positions of the collection points and the robot workstation in the figure, calculate the distance between the collection point and the workstation and the distance between the collection point and the collection point, and obtain as shown in Figure 4 A distance matrix to determine the amount of medical waste at each collection point as shown in Figure 5;
S2、建立的用于医疗废料收集的机器人调度模型为考虑上半软时间窗的机器人调度模型,建立过程如下:S2. The established robot scheduling model for medical waste collection is a robot scheduling model considering the upper semi-soft time window. The establishment process is as follows:
S2-1、半软时间窗定义,机器人可到达时间窗口之外,具体包括如下情况:S2-1. Definition of semi-soft time window, the robot can reach outside the time window, including the following situations:
当机器人在指定的时间窗口[ai,bi]到达收集点时,不会受到惩罚;When the robot reaches the collection point within the specified time window [a i , b i ], it will not be penalized;
如果机器人到达时间早于ai,不会收到惩罚,从而缩短在垃圾箱中的停留时间,但如果机器人比bi晚到,会受到惩罚;If the robot arrives earlier than a i , it will not be penalized, thus shortening its stay in the bin, but if the robot arrives later than b i , it will be penalized;
设允许到达时间为b′i(b′i>bi):Let the allowable arrival time be b′ i (b′ i >b i ):
b′i=b0-ti0 (1)b′ i =b 0 -t i0 (1)
式(1)中,b0为常数,表示机器人最终返回工作站的时间;ti0表示从收集点i到工作站的行程时间;公式约定从收集点i到工作站应预留足够的时间;In formula (1), b 0 is a constant, representing the time when the robot finally returns to the workstation; t i0 represents the travel time from the collection point i to the workstation; the formula stipulates that enough time should be reserved from the collection point i to the workstation;
S2-2、超时惩罚定义,当机器人到达时间间隔[bi,b′i]时,即服务开始时间si落在[bi,b′i],它将受到惩罚cdelay×(si-bi);S2-2. Definition of timeout penalty, when the robot arrives at the time interval [b i , b′ i ], that is, the service start time s i falls in [b i , b′ i ], it will be penalized c delay ×(s i -b i );
每个收集点i的惩罚计算如下:The penalty for each collection point i is calculated as follows:
式(2)中,si为收集点i开始的服务时间,cdelay为延迟时间的单位成本;In formula (2), s i is the service time starting from collection point i, and c delay is the unit cost of delay time;
S2-3、定义用于时间限制的每条路线的总行程时间M:S2-3. Define the total travel time M of each route for the time limit:
其中,为布尔变量,若机器人k在时间轮h中直接从收集点i移动到收集点j,则该值为1,否则,该值为0;tij为从收集点i移动到收集点j的移动时间;in, is a Boolean variable, if the robot k moves directly from the collection point i to the collection point j in the time wheel h, the value is 1, otherwise, the value is 0; t ij is the movement from the collection point i to the collection point j time;
S2-4、设定目标函数,使总成本最小化,包括机器人的启动成本、行驶距离成本和延迟时间成本:S2-4. Set the objective function to minimize the total cost, including the startup cost, travel distance cost and delay time cost of the robot:
式(3)中,为布尔变量,若机器人k在时间轮h中直接从工作站0移动到收集点i,则该值为1;否则,该值为0;cstart表示机器人的启动成本;cij为从收集点i到收集点j的移动距离;为布尔变量,若收集点i在时间轮h中由机器人k服务,则值为1,否则,该值为0;In formula (3), is a Boolean variable, if the robot k moves directly from the
约束条件:Restrictions:
(Ti-1)M≤si-bi≤TiM (13)(T i -1)M≤s i -b i ≤T i M (13)
公式(4)和(5)为度约束,约束(4)保证每个采集点只能访问一次;约束(5)保证进入弧的数量等于节点离开弧的数量;约束(6)确保每个采集点只能分配给一个机器人;约束(7)表示距离应为非负变量;约束(8)保证每条路线上的总体积不超过机器人的容量,其中第i个医疗废料收集点的医疗废料数量,Q表示机器人储存医疗废料的容量;约束(9)计算路由中每个采集点的服务开始时间;约束(10)将服务开始时间限制在其最早到达时间和最晚到达时间之间;约束(11)使服务开始时间小于每条路线的总时间;约束(12)表示服务时间应为非负变量;约束(13)确定采集点的服务开始时间是否在其相应的惩罚间隔内,即(bi,bi];约束(14)-(16)为完整性约束。Equations (4) and (5) are degree constraints, constraint (4) ensures that each acquisition point can only be accessed once; constraint (5) ensures that the number of incoming arcs is equal to the number of nodes leaving arcs; constraint (6) ensures that each acquisition Points can only be assigned to one robot; Constraint (7) indicates that the distance should be a non-negative variable; Constraint (8) ensures that the total volume on each route does not exceed the robot's capacity, where the amount of medical waste at the ith medical waste collection point , Q represents the capacity of the robot to store medical waste; constraint (9) calculates the service start time of each collection point in the route; constraint (10) limits the service start time between its earliest and latest arrival times; constraint ( 11) Make the service start time less than the total time of each route; Constraint (12) indicates that the service time should be a non-negative variable; Constraint (13) determines whether the service start time of the collection point is within its corresponding penalty interval, i.e. (b i , b i ]; constraints (14)-(16) are integrity constraints.
S3、通过改进的遗传算法求解步骤S2建立的用于医疗废料收集的机器人调度模型,从而得到多个机器人的调度方案。S3. Solve the robot scheduling model for medical waste collection established in step S2 through an improved genetic algorithm, thereby obtaining scheduling schemes for multiple robots.
如图1所示,具体过程如下:As shown in Figure 1, the specific process is as follows:
S3-1、输入参数:医疗垃圾收集需求、行程距离、行程时间、时间窗口;S3-1. Input parameters: medical waste collection requirements, travel distance, travel time, time window;
S3-2、依据机器人的数量以及医疗垃圾收集点初始化解决方案,生成多条路径,设置迭代次数,k=0;S3-2. According to the number of robots and the initialization solution of the medical waste collection point, multiple paths are generated, and the number of iterations is set, k=0;
S3-3、计算每条当前路径的适应度;S3-3. Calculate the fitness of each current path;
计算的适应度用于评估当前的解决方案,计算公式如下:The calculated fitness is used to evaluate the current solution and is calculated as:
式(17)中,f为适应度值,Z为总成本。In formula (17), f is the fitness value, and Z is the total cost.
S3-4、依据适应度选出适应度高的初始路径;S3-4, select an initial path with high fitness according to fitness;
S3-5、将步骤S3-4得到的初始路径分成两组节点,第一组放在前面,且该第一组的起始点和终点都为0;S3-5, the initial path obtained in step S3-4 is divided into two groups of nodes, the first group is placed in the front, and the start point and the end point of the first group are both 0;
S3-6、第二组节点为第一组未经访问的节点,将该组的节点顺序排列;S3-6, the second group of nodes is the first group of unvisited nodes, and the nodes of this group are arranged in order;
S3-7、通过多次插入0,将第二组节点随机分成1到n-1条路径,计算各路径的目标函数;S3-7. By inserting 0 multiple times, the second group of nodes is randomly divided into 1 to n-1 paths, and the objective function of each path is calculated;
S3-8、对路径按目标函数从小到大进行排序,形成一个列表;S3-8. Sort the paths according to the objective function from small to large to form a list;
S3-9、选择总成本最低即目标函数最小的路线,判断其是否可行,不可行直接删除;可行的路径附加到第一组路径的后面,形成一个全新的路径,得到候选的解决方案;S3-9. Select the route with the lowest total cost, that is, the smallest objective function, and judge whether it is feasible or not, and delete it if it is not feasible; the feasible route is appended to the back of the first group of routes to form a new route, and a candidate solution is obtained;
S3-10、变异算子将位翻转到互补位;S3-10, the mutation operator flips the bit to the complementary bit;
S3-11、判断目前的候选方案是否可行,若可行,则计算其目标函数,否则返回步骤S3-10;S3-11, determine whether the current candidate solution is feasible, if feasible, calculate its objective function, otherwise return to step S3-10;
S3-12、选择总成本最低即目标函数最小的候选解决方案;S3-12. Select the candidate solution with the lowest total cost, that is, the smallest objective function;
S3-13、判断k是否大于设定的迭代次数,若是,则步骤S3-12得到的候选解决方案为最终最佳的解决方案,否则,返回步骤S3-3。S3-13, determine whether k is greater than the set number of iterations, if so, the candidate solution obtained in step S3-12 is the final optimal solution, otherwise, return to step S3-3.
如图6所示,最后输出的结果如下:As shown in Figure 6, the final output is as follows:
机器人1的路线:0-2-6-1-11-19-22-25-21-27-0;Route for robot 1: 0-2-6-1-11-19-22-25-21-27-0;
机器人2的路线:0-7-10-13-9-15-5-0;Route for robot 2: 0-7-10-13-9-15-5-0;
机器人3的路线:0-26-23-24-14-8-20-17-0;Route for robot 3: 0-26-23-24-14-8-20-17-0;
机器人4的路线:0-12-3-4-28-18-16-0。Route for Robot 4: 0-12-3-4-28-18-16-0.
优化效果如图7所示。The optimization effect is shown in Figure 7.
以上所述之实施例子只为本发明之较佳实施例,并非以此限制本发明的实施范围,故凡依本发明之形状、原理所作的变化,均应涵盖在本发明的保护范围内。The above-mentioned embodiments are only preferred embodiments of the present invention, and are not intended to limit the scope of implementation of the present invention. Therefore, any changes made according to the shape and principle of the present invention should be included within the protection scope of the present invention.
Claims (4)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111057473.1A CN113762780B (en) | 2021-09-09 | 2021-09-09 | Method for treating medical waste collection problem by using improved genetic algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111057473.1A CN113762780B (en) | 2021-09-09 | 2021-09-09 | Method for treating medical waste collection problem by using improved genetic algorithm |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113762780A true CN113762780A (en) | 2021-12-07 |
CN113762780B CN113762780B (en) | 2023-08-22 |
Family
ID=78794405
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111057473.1A Active CN113762780B (en) | 2021-09-09 | 2021-09-09 | Method for treating medical waste collection problem by using improved genetic algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113762780B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115064252A (en) * | 2022-08-17 | 2022-09-16 | 南京天溯自动化控制系统有限公司 | Medical waste sorting and transferring system |
CN115376672A (en) * | 2022-10-21 | 2022-11-22 | 安徽省伟木软件科技有限公司 | Medical waste monitoring method and system |
CN117429775A (en) * | 2023-10-24 | 2024-01-23 | 浙江臻善科技股份有限公司 | Intelligent garbage classification system based on artificial intelligence and big data technology |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120170390A1 (en) * | 2011-01-03 | 2012-07-05 | Arm Limited | Read stability of a semiconductor memory |
US20180268705A1 (en) * | 2017-03-15 | 2018-09-20 | NEC Laboratories Europe GmbH | Method for route optimization for demand responsive transportation |
CN112733272A (en) * | 2021-01-13 | 2021-04-30 | 南昌航空大学 | Method for solving vehicle path problem with soft time window |
-
2021
- 2021-09-09 CN CN202111057473.1A patent/CN113762780B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120170390A1 (en) * | 2011-01-03 | 2012-07-05 | Arm Limited | Read stability of a semiconductor memory |
US20180268705A1 (en) * | 2017-03-15 | 2018-09-20 | NEC Laboratories Europe GmbH | Method for route optimization for demand responsive transportation |
CN112733272A (en) * | 2021-01-13 | 2021-04-30 | 南昌航空大学 | Method for solving vehicle path problem with soft time window |
Non-Patent Citations (1)
Title |
---|
何兆成;曾伟良;: "变权系数遗传算法在交叉口信号控制中的应用", 公路交通科技, no. 11 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115064252A (en) * | 2022-08-17 | 2022-09-16 | 南京天溯自动化控制系统有限公司 | Medical waste sorting and transferring system |
CN115064252B (en) * | 2022-08-17 | 2022-12-06 | 南京天溯自动化控制系统有限公司 | Medical waste sorting and transferring system |
CN115376672A (en) * | 2022-10-21 | 2022-11-22 | 安徽省伟木软件科技有限公司 | Medical waste monitoring method and system |
CN115376672B (en) * | 2022-10-21 | 2023-01-31 | 安徽省伟木软件科技有限公司 | Medical waste monitoring method and system |
CN117429775A (en) * | 2023-10-24 | 2024-01-23 | 浙江臻善科技股份有限公司 | Intelligent garbage classification system based on artificial intelligence and big data technology |
Also Published As
Publication number | Publication date |
---|---|
CN113762780B (en) | 2023-08-22 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113762780B (en) | Method for treating medical waste collection problem by using improved genetic algorithm | |
CN104616498B (en) | Combination Forecasting Method of Traffic Congestion Based on Markov Chain and Neural Network | |
CN103297983B (en) | A kind of wireless sensor network node dynamic deployment method of stream Network Based | |
CN106200650A (en) | Mobile robot path planning method and system based on improved ant colony algorithm | |
CN108256969B (en) | A method of dividing the scheduling area of public bicycle rental points | |
CN102169347A (en) | Multi-robot path planning system based on cooperative co-evolution and multi-population genetic algorithm | |
JPH06251030A (en) | City lifeline operation management system | |
CN101394345A (en) | A co-evolutionary clustering method for ubiquitous computing-aware data streams | |
CN103383569A (en) | Mobile robot optimal patrol route setting method based on linear temporal logic | |
CN107591004A (en) | A kind of intelligent traffic guidance method based on bus or train route collaboration | |
CN106096881A (en) | Storage consolidating the load mode vehicle path adverse selection method of operating | |
Zhang et al. | Multi-population ant colony optimization algorithm based on congestion factor and co-evolution mechanism | |
Zeng et al. | A deep reinforcement learning approach to flexible job shop scheduling | |
Olayode et al. | Traffic flow prediction at signalized road intersections: a case of Markov chain and artificial neural network model | |
CN110674975A (en) | Spatial layout method and device for reducing carbon emission in urban planning | |
CN105913213A (en) | Reverse logistics recycling vehicle scheduling method under storage commodity collection mode | |
CN116776773B (en) | Tube type optimization system and method for straight fin tube type heat exchanger | |
Enayattabr et al. | A novel approach for solving all-pairs shortest path problem in an interval-valued fuzzy network | |
Ge et al. | Spatial scheduling strategy for irregular curved blocks based on the modified genetic ant colony algorithm (MGACA) in shipbuilding | |
Liu et al. | Research on multi-AGVs path planning and coordination mechanism | |
Tang et al. | A heuristic path planning algorithm for inspection robots | |
Chiu et al. | Robot routing using clustering-based parallel genetic algorithm with migration | |
CN110781352B (en) | Method for optimizing topological structure to realize network structure controllability at lowest cost | |
CN112163706B (en) | Hybrid optimization method for unmanned platform marshalling under search task | |
CN116435989A (en) | Novel method, device and system for predicting Internet of things state of power system equipment |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |