CN115034466A - Mushroom reciprocating pushing nondestructive picking mode and path planning method thereof - Google Patents

Mushroom reciprocating pushing nondestructive picking mode and path planning method thereof Download PDF

Info

Publication number
CN115034466A
CN115034466A CN202210630037.7A CN202210630037A CN115034466A CN 115034466 A CN115034466 A CN 115034466A CN 202210630037 A CN202210630037 A CN 202210630037A CN 115034466 A CN115034466 A CN 115034466A
Authority
CN
China
Prior art keywords
mushroom
mushrooms
picking
neighborhood
target
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
CN202210630037.7A
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.)
University of Shanghai for Science and Technology
Original Assignee
University of Shanghai for 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 University of Shanghai for Science and Technology filed Critical University of Shanghai for Science and Technology
Priority to CN202210630037.7A priority Critical patent/CN115034466A/en
Publication of CN115034466A publication Critical patent/CN115034466A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • AHUMAN NECESSITIES
    • A01AGRICULTURE; FORESTRY; ANIMAL HUSBANDRY; HUNTING; TRAPPING; FISHING
    • A01GHORTICULTURE; CULTIVATION OF VEGETABLES, FLOWERS, RICE, FRUIT, VINES, HOPS OR SEAWEED; FORESTRY; WATERING
    • A01G18/00Cultivation of mushrooms
    • A01G18/70Harvesting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/004Artificial life, i.e. computing arrangements simulating life
    • G06N3/006Artificial life, i.e. computing arrangements simulating life based on simulated virtual individual or collective life forms, e.g. social simulations or particle swarm optimisation [PSO]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/12Computing arrangements based on biological models using genetic models
    • G06N3/126Evolutionary algorithms, e.g. genetic algorithms or genetic programming
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Business, Economics & Management (AREA)
  • Biophysics (AREA)
  • Human Resources & Organizations (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Evolutionary Biology (AREA)
  • Economics (AREA)
  • General Health & Medical Sciences (AREA)
  • Strategic Management (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Game Theory and Decision Science (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Physiology (AREA)
  • Genetics & Genomics (AREA)
  • Mycology (AREA)
  • Environmental Sciences (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种蘑菇往复推动无损采摘方式及其路径规划方法,包括如下步骤:A.设计蘑菇与培养基分离的往复推动采摘方式;B.成熟蘑菇无损采摘最优推动方向的确定方法;C.考虑无损采摘推动方向及最优路径的双目标优化成熟蘑菇采摘路径规划算法。本发明方法对蘑菇采摘路径问题进行了优化。本发明实现了对蘑菇往复推动采摘与最优路径结合后的多目标问题的优化,通过无损采摘方向的确定和采摘路径规划,很好的避免采摘蘑菇时对当前待采摘蘑菇及其周围蘑菇的损伤,从而有效提高了蘑菇无损采摘的成功率,并提高了采摘效率。本发明不仅限于蘑菇、草菇等食用菌的采摘,还适用于其它类圆球丛生类果实的有向采摘及其轨迹规划。

Figure 202210630037

The invention discloses a method for reciprocating nondestructive picking of mushrooms and a path planning method thereof, comprising the following steps: A. designing a reciprocating picking method for separating mushrooms from culture medium; B. determining an optimal driving direction for nondestructive picking of mature mushrooms; C. A dual-objective optimal mature mushroom picking path planning algorithm considering the non-destructive picking driving direction and optimal path. The method of the invention optimizes the mushroom picking path problem. The invention realizes the optimization of the multi-objective problem after the mushrooms reciprocatingly promote picking and the optimal path. Through the determination of the non-destructive picking direction and the picking path planning, it is very good to avoid the current mushrooms to be picked and the surrounding mushrooms when picking mushrooms. damage, thereby effectively improving the success rate of non-destructive mushroom picking and improving the picking efficiency. The invention is not limited to the picking of edible fungi such as mushrooms and straw mushrooms, and is also applicable to the directional picking of other spherical cluster fruits and their trajectory planning.

Figure 202210630037

Description

一种蘑菇往复推动无损采摘方式及其路径规划方法A kind of mushroom reciprocating promoting non-destructive picking method and its path planning method

技术领域technical field

本发明涉及采摘机械技术领域,尤其是蘑菇采摘领域,具体涉及一种蘑菇往复推动无损采摘方式及其路径规划方法。The invention relates to the technical field of picking machinery, in particular to the field of mushroom picking, and in particular relates to a non-destructive picking method for reciprocating mushrooms and a path planning method thereof.

背景技术Background technique

随着蘑菇栽培技术的不断发展,蘑菇栽培已经形成工厂化生产。由于蘑菇采摘作业周期长,需长时间投入大量劳动力来保证适时收获,因而蘑菇采摘作业是整个生产链中耗时最长、最辛苦的环节。人工作业是目前最主要的采摘方式。蘑菇采摘劳动强度大且环境潮湿,长时间的采摘会对采摘人员的体力造成大量的消耗,健康造成一定的影响。同时,由于农村青壮劳力较为短缺,传统蘑菇人工采摘的生产方式已经成为制约蘑菇种植产业发展的重要瓶颈。因此蘑菇采摘迫切需要尽快实现自动化。With the continuous development of mushroom cultivation technology, mushroom cultivation has formed factory production. Mushroom picking is the longest and most laborious link in the entire production chain due to the long cycle of mushroom picking and the need to invest a lot of labor for a long time to ensure timely harvesting. Manual work is currently the main method of picking. Mushroom picking is labor-intensive and the environment is humid. Long-term picking will consume a lot of physical strength of the pickers and have a certain impact on their health. At the same time, due to the shortage of young and young labor in rural areas, the traditional production method of manual mushroom picking has become an important bottleneck restricting the development of the mushroom planting industry. Therefore, mushroom picking urgently needs to be automated as soon as possible.

在现有的蘑菇自动化采摘方式中,蘑菇采摘主要是通过末端执行器吸住或夹持菌盖后旋转来完成子实体与培养基的分离。但是经现场实验表明,一方面这种旋转分离采摘的方式在子实体与培养基结合力较大的情况下容易产生菌柄与菌帽之间的分离(即断根损伤),另一方面由于蘑菇生长具有各向异性、密疏不均等差异,一个蘑菇周围可能会有多个蘑菇附着黏连。在这种情况下,通过抓取或旋转的方式进行采摘很难适应聚集生长的蘑菇,而且容易对周围的蘑菇造成损伤,严重影响采摘质量。In the existing automatic mushroom picking method, the mushroom picking is mainly accomplished by the end effector sucking or holding the mushroom cap and then rotating to complete the separation of the fruit body and the culture medium. However, field experiments have shown that, on the one hand, this method of rotary separation and picking is prone to separation between the stipe and the fungus cap (ie, root damage) when the fruiting body has a strong binding force to the medium. The growth is anisotropic and the density is not equal, and there may be multiple mushrooms attached and adhered around a mushroom. In this case, picking by grabbing or rotating is difficult to adapt to the mushrooms that grow together, and it is easy to cause damage to the surrounding mushrooms, which seriously affects the picking quality.

因此,蘑菇的智能化无损采摘已经成为果蔬采摘机器人亟待解决的关键技术问题。有必要提出一种蘑菇往复推动无损采摘方式及其路径规划方法。Therefore, the intelligent and non-destructive picking of mushrooms has become a key technical problem to be solved urgently by fruit and vegetable picking robots. It is necessary to propose a non-destructive picking method for mushroom reciprocation and its path planning method.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于为解决上述现有蘑菇自动化智能采摘技术中存在的子实体采摘损伤率较高问题,提供一种蘑菇往复推动无损采摘方式及其路径规划方法,既有效提高了成熟蘑菇特别是聚集蘑菇实现无损采摘的成功率又优化了采摘路径长度而提高了采摘效率,从而在实现蘑菇无损采摘的同时获得采摘最优路径。The purpose of the present invention is to solve the problem that the fruiting body picking damage rate is high in the above-mentioned existing mushroom automatic intelligent picking technology, and provide a kind of mushroom reciprocating nondestructive picking method and its path planning method, which effectively improves mature mushrooms, especially The success rate of gathering mushrooms to achieve non-destructive picking also optimizes the length of the picking path and improves the picking efficiency, so as to obtain the optimal picking path while realizing the non-destructive picking of mushrooms.

为了达到上述目的,本发明技术方案如下:In order to achieve the above object, the technical scheme of the present invention is as follows:

一种蘑菇往复推动无损采摘方式及其路径规划方法,主要包括:A mushroom reciprocating nondestructive picking method and a path planning method thereof, mainly comprising:

A:设计蘑菇与培养基分离的往复推动采摘方式;A: Design the method of reciprocating and promoting the separation of mushrooms and culture medium;

B:成熟蘑菇无损采摘最优推动方向的确定方法;B: The method for determining the optimal driving direction for non-destructive picking of mature mushrooms;

C:考虑无损采摘推动方向及最优路径的双目标优化成熟蘑菇采摘路径规划算法。C: A dual-objective optimized mature mushroom picking path planning algorithm considering the non-destructive picking driving direction and optimal path.

优选地,一种蘑菇往复推动无损采摘方式及其路径规划方法,具体包括:Preferably, a mushroom reciprocating non-destructive picking method and a path planning method thereof specifically include:

A:设计蘑菇与培养基分离的往复推动采摘方式;A: Design the method of reciprocating and promoting the separation of mushrooms and culture medium;

步骤A1:利用末端执行器对蘑菇进行夹持或吸附;Step A1: Use the end effector to clamp or adsorb the mushroom;

步骤A2:沿蘑菇最优推动方向往复推动蘑菇实现蘑菇与培养基的分离;Step A2: push the mushroom back and forth along the optimal pushing direction of the mushroom to realize the separation of the mushroom and the culture medium;

B:成熟蘑菇无损采摘最优推动方向的确定方法;B: The method for determining the optimal driving direction for non-destructive picking of mature mushrooms;

步骤B1:获取蘑菇分布图像中蘑菇中心坐标、蘑菇菇帽半径以及蘑菇高度数据,以上数据作为蘑菇数据特征保存;Step B1: Obtain the mushroom center coordinates, mushroom cap radius and mushroom height data in the mushroom distribution image, and save the above data as mushroom data features;

步骤B2:利用蘑菇数据特征搜索出目标蘑菇周围的邻域蘑菇以及次邻域蘑菇;Step B2: Use the mushroom data features to search out the neighborhood mushrooms and the sub-neighborhood mushrooms around the target mushroom;

步骤B3:计算邻域蘑菇解集、次邻域蘑菇解集并确定蘑菇最优推动方向;Step B3: Calculate the neighborhood mushroom solution set and the sub-neighborhood mushroom solution set and determine the optimal pushing direction of the mushroom;

C:考虑无损采摘推动方向及最优路径的双目标优化成熟蘑菇采摘路径规划算法;C: A dual-objective optimized mature mushroom picking path planning algorithm considering the driving direction and optimal path of non-destructive picking;

步骤C1:构建蘑菇采摘路径的多目标优化模型:Step C1: Build a multi-objective optimization model for mushroom picking paths:

步骤C1.1:构建蘑菇往复推动采摘失败率函数,计算采摘序列的采摘失败率;Step C1.1: Construct the mushroom reciprocatingly push the picking failure rate function, and calculate the picking failure rate of the picking sequence;

步骤C1.1.1:目标蘑菇的往复推动采摘判断;Step C1.1.1: Judgment of the reciprocating push of the target mushroom to pick;

步骤C1.1.2:计算蘑菇采摘序列的采摘失败率;Step C1.1.2: Calculate the picking failure rate of the mushroom picking sequence;

步骤C1.2:构建蘑菇路径长度计算函数,计算采摘序列的路径长度;Step C1.2: Build a mushroom path length calculation function to calculate the path length of the picking sequence;

步骤C1.3:根据建立的蘑菇往复推动采摘失败率函数,路径长度函数建立多目标优化模型;Step C1.3: establish a multi-objective optimization model according to the established mushroom reciprocating push picking failure rate function and path length function;

步骤C2:在步骤C1的模型构建完成后,使用改进的NSGA-II算法求解该模型,得到Pareto非支配集;Step C2: After the model construction of Step C1 is completed, use the improved NSGA-II algorithm to solve the model to obtain the Pareto non-dominated set;

步骤C2.1:种群个体染色体编码;Step C2.1: Chromosome coding of population individuals;

步骤C2.2:初始化种群;Step C2.2: Initialize the population;

步骤C2.3:初始种群中注入单目标采摘路径长度的极值并计算种群中全部个体的pfailure、distsum函数值;Step C2.3: Inject the extreme value of the single-target picking path length into the initial population and calculate the p failure and dist sum function values of all individuals in the population;

步骤C2.4:精英策略选出父代种群;Step C2.4: The elite strategy selects the parent population;

步骤C2.5:选择、交叉、变异操作:Step C2.5: Selection, crossover, mutation operations:

步骤C2.6:父子代种群合并及去重操作;Step C2.6: merge and deduplicate the parent-child population;

步骤C2.7:采用加入循环拥挤排序算法的精英策略选出子代种群;Step C2.7: Select the offspring population by the elite strategy of adding the cyclic crowding sorting algorithm;

步骤C2.7.1:将非支配层级中两个边界个体1d、nd的拥挤度设为inf,按拥挤度从高到低对非支配层级中的个体进排序,删除拥挤度最小的个体;Step C2.7.1: Set the crowding degree of the two boundary individuals 1 d and n d in the non-dominated hierarchy as inf, sort the individuals in the non-dominated hierarchy according to the crowding degree from high to low, and delete the individual with the smallest crowding degree;

步骤C2.7.2:重新计算该层级中剩余个体的拥挤度,再次将其中拥挤度最小的个体删除;Step C2.7.2: Recalculate the crowding degree of the remaining individuals in the hierarchy, and delete the individual with the smallest crowding degree again;

步骤C2.7.3:依次迭代,直到筛选至剩余指定数量的解为止。Step C2.7.3: Iterate sequentially until the specified number of solutions remain.

步骤C2.8:重复所述步骤C2.5~C2.8至目标遗传代数后跳出当前循环;Step C2.8: Repeat the steps C2.5 to C2.8 to the target genetic algebra and then jump out of the current loop;

步骤C2.9:根据权重系数,从非支配解集中选择出最优解并输出。Step C2.9: According to the weight coefficient, select the optimal solution from the non-dominated solution set and output it.

优选地,所述步骤A具体包括:Preferably, the step A specifically includes:

步骤A1:利用末端执行器对蘑菇进行夹持或吸附;Step A1: Use the end effector to clamp or adsorb the mushroom;

步骤A2:沿蘑菇最优推动方向往复推动蘑菇实现蘑菇与培养基的分离。Step A2: Push the mushroom back and forth along the optimal pushing direction of the mushroom to separate the mushroom from the culture medium.

优选地,所述步骤A2中成熟蘑菇最优推动方向是基于步骤B成熟蘑菇无损采摘最优推动方向的确定方法来确定的,该方法具体包括:Preferably, the optimal pushing direction of the mature mushroom in the step A2 is determined based on the method for determining the optimal pushing direction of the nondestructive picking of the mature mushroom in the step B, and the method specifically includes:

步骤B1:获取蘑菇分布图像中蘑菇中心坐标、菇帽半径以及蘑菇高度数据,以上数据作为蘑菇数据特征保存;Step B1: Obtain mushroom center coordinates, mushroom cap radius and mushroom height data in the mushroom distribution image, and save the above data as mushroom data features;

步骤B2:利用蘑菇数据特征搜索出目标蘑菇周围的邻域蘑菇以及次邻域蘑菇;与目标蘑菇相交或相切的蘑菇称为邻域蘑菇,与目标蘑菇相离但依然会对目标蘑菇的往复推动空间造成干涉的蘑菇称为次邻域蘑菇;Step B2: Use the mushroom data features to search for the neighborhood mushrooms and sub-neighborhood mushrooms around the target mushroom; the mushrooms that intersect or are tangent to the target mushroom are called neighborhood mushrooms, which are far away from the target mushroom but still reciprocate the target mushroom. Mushrooms that push space to cause interference are called subneighborhood mushrooms;

判断可疑蘑菇为邻域蘑菇的评价指标,其确定形式如下:The evaluation index for judging suspicious mushrooms as neighborhood mushrooms is as follows:

0<aoi≤roi 0<a oi ≤r oi

其中aoi代表目标蘑菇与第i个可疑蘑菇之间的中心距;roi代表目标与第i个可疑蘑菇的菇帽半径和;i∈[1,…,n-1],n为蘑菇总数;where a oi represents the center distance between the target mushroom and the ith suspicious mushroom; ro oi represents the sum of the cap radius of the target and the ith suspicious mushroom; i∈[1,…,n-1], n is the total number of mushrooms ;

判断可疑蘑菇为次邻域蘑菇的评价指标,其确定形式如下:The evaluation index for judging suspicious mushrooms as sub-neighborhood mushrooms is as follows:

roi<aoi≤do+ri r oi <a oi ≤d o +r i

其中ri为可疑蘑菇的菇帽半径,do代表目标蘑菇的往复推动范围,公式如下:where ri is the radius of the mushroom cap of the suspicious mushroom, and do is the reciprocating push range of the target mushroom . The formula is as follows:

Figure BDA0003678953750000031
Figure BDA0003678953750000031

式中ho与ro分别代表目标蘑菇的高度与菇帽半径,k为推动采摘范围系数,k∈(0,1];In the formula, h o and r o represent the height of the target mushroom and the radius of the mushroom cap respectively, k is the coefficient of pushing the picking range, k∈(0,1];

步骤B3:计算邻域蘑菇解集、次邻域蘑菇解集并确定蘑菇最优推动方向;目标蘑菇是否被其邻域蘑菇包围类比为点与多边型的关系,利用改进的叉乘判别法来判断点与多边形的的关系从而确定目标蘑菇是否被其邻域蘑菇包围;假设邻域蘑菇个数为m,在目标蘑菇质点po与每个邻域蘑菇质点pi之间做向量

Figure BDA0003678953750000032
其中,i∈[1,2,3,…,m],m为邻域蘑菇总数;选择其中任一条向量如选
Figure BDA0003678953750000033
作为基向量,剩余其他向量称为邻域向量,邻域向量与基向量依次做叉乘与点乘运算,具体公式如下:Step B3: Calculate the neighborhood mushroom solution set, the sub-neighborhood mushroom solution set, and determine the optimal pushing direction of the mushroom; whether the target mushroom is surrounded by its neighborhood mushrooms is analogous to the relationship between points and polygons, and the improved cross-product discrimination method is used to determine Judging the relationship between points and polygons to determine whether the target mushroom is surrounded by its neighbor mushrooms; assuming that the number of neighbor mushrooms is m, make a vector between the target mushroom particle p o and each neighbor mushroom particle p i
Figure BDA0003678953750000032
Among them, i∈[1,2,3,…,m], m is the total number of mushrooms in the neighborhood; choose any one of the vectors if you choose
Figure BDA0003678953750000033
As a basis vector, the remaining other vectors are called neighborhood vectors, and the neighborhood vectors and basis vectors perform cross product and dot product operations in turn. The specific formula is as follows:

Figure BDA0003678953750000034
Figure BDA0003678953750000034

Figure BDA0003678953750000041
Figure BDA0003678953750000041

其中f为方向系数,θ2,i为带有方向的向量夹角;Where f is the direction coefficient, θ 2, i is the vector angle with direction;

所有邻域向量与基向量依次进行叉乘、点乘运算后得到的结果进行升序排列,选择出结果中的最大值θmax与最小值θmin;判断点与多边形关系的具体公式如下:The results obtained after all the neighborhood vectors and the basis vectors are cross-multiplied and dot-multiplied in turn are arranged in ascending order, and the maximum value θ max and the minimum value θ min in the results are selected; the specific formula for judging the relationship between the point and the polygon is as follows:

Figure BDA0003678953750000042
Figure BDA0003678953750000042

当点在多边形上和外时,均视为目标蘑菇未被其邻域蘑菇包围;记录下邻域蘑菇解集A,具体表达形式如下:When the point is on and outside the polygon, it is considered that the target mushroom is not surrounded by its neighbor mushrooms; the neighborhood mushroom solution set A is recorded, and the specific expression is as follows:

A=360°-(|θmax|+|θmin|)A=360°-(|θ max |+|θ min |)

利用内公切线定理计算目标蘑菇与某一个次邻域蘑菇之间的内公切角的计算公式如下:Using the inner common tangent theorem to calculate the inner common tangent angle between the target mushroom and a certain sub-neighborhood mushroom is as follows:

Figure BDA0003678953750000043
Figure BDA0003678953750000043

其中n为次邻域蘑菇个数,αoi为目标蘑菇与次邻域蘑菇所成内公切线夹角,αoi为目标蘑菇与次邻域蘑菇中心距,ro,ri分别为目标蘑菇菇帽半径和次邻域蘑菇菇帽半径;where n is the number of mushrooms in the sub-neighborhood, α oi is the angle formed by the common tangent between the target mushroom and the sub-neighborhood mushroom, α oi is the center distance between the target mushroom and the sub-neighborhood mushroom, r o , ri are the target mushroom, respectively Mushroom cap radius and sub-neighborhood mushroom cap radius;

该内公切角在0-360°范围内的补角βoi称为次邻域蘑菇个体解集;补角βoi计算公式如下:The supplementary angle β oi of the internal common tangent angle within the range of 0-360° is called the sub-neighborhood mushroom individual solution set; the calculation formula of the supplementary angle β oi is as follows:

βoi=360°-αoi,i∈[1,…,n]β oi =360°-α oi , i∈[1,...,n]

被摘的目标蘑菇周围邻域蘑菇、次邻域蘑菇的存在情况主要分为三种情况:The existence of the neighborhood mushrooms and the sub-neighborhood mushrooms around the picked target mushroom is mainly divided into three situations:

1)目标蘑菇周围不存在邻域蘑菇、次邻域蘑菇;1) There are no neighborhood mushrooms and sub-neighborhood mushrooms around the target mushroom;

2)目标蘑菇周围既存在邻域蘑菇也存在次邻域蘑菇;2) There are both neighborhood mushrooms and sub-neighborhood mushrooms around the target mushroom;

3)目标蘑菇周围只存在邻域蘑菇、次邻域蘑菇中的一种;3) There is only one of the neighborhood mushrooms and the sub-neighborhood mushrooms around the target mushroom;

对于第一种情况,为了避免无效的计算,默认这种情况的目标蘑菇的采摘推动方向为180°;对于第二种情况,应使邻域蘑菇解集A依次与次邻域蘑菇个体解集βoi进行取交集操作,如若出现交集为空集

Figure BDA0003678953750000044
的情况,则视为目标蘑菇往复推动采摘失败,退出可摘算法判断;若所有取交集操作完成后交集不为空集,则保留该交集并将该交集用于确定可行推动方向;对于第三种情况,当目标蘑菇周围仅存在邻域蘑菇时,将目标蘑菇与邻域蘑菇关系判断中获得的邻域蘑菇解集用于确定可行推动方向;当目标蘑菇周围仅存在次邻域蘑菇时,所有次邻域蘑菇个体解集βoi的交集便为该目标蘑菇被所有次邻域蘑菇干涉后的最终可行推动方向解集称为次邻域蘑菇解集B,具体表达形式如下:For the first case, in order to avoid invalid calculation, the default pushing direction of the target mushroom picking in this case is 180°; for the second case, the solution set A of the neighborhood mushrooms should be solved in turn with the individual solution set of the sub-neighborhood mushrooms β oi performs the intersection operation, if the intersection appears to be an empty set
Figure BDA0003678953750000044
In the case of , it is considered that the target mushroom has failed to reciprocately push the picking, and the judgment of the picking algorithm is exited; if the intersection is not an empty set after all the intersection operations are completed, the intersection is retained and used to determine the feasible pushing direction; for the third In this case, when there are only neighboring mushrooms around the target mushroom, the neighborhood mushroom solution set obtained in the judgment of the relationship between the target mushroom and the neighboring mushrooms is used to determine the feasible driving direction; when there are only sub-neighborhood mushrooms around the target mushroom, The intersection of the individual solution sets β oi of all the sub-neighborhood mushrooms is the final feasible pushing direction solution set after the target mushroom is interfered by all the sub-neighborhood mushrooms, which is called the sub-neighborhood mushroom solution set B, and the specific expression is as follows:

Figure BDA0003678953750000051
Figure BDA0003678953750000051

当次邻域蘑菇解集B为空集时,目标蘑菇不进行往复推动采摘,视为采摘失败,当次邻域蘑菇解集B不为空集时,目标蘑菇进行往复推动采摘,视为采摘成功;When the sub-neighborhood mushroom solution set B is an empty set, the target mushroom does not reciprocately promote the picking, which is regarded as a failure to pick. success;

从获得的可行推动方向解集中选择角度范围最大的解集作为最优推动方向的求解集;最优推动方向求解公式:Select the solution set with the largest angle range from the obtained feasible pushing direction solution set as the optimal pushing direction solution set; the optimal pushing direction solution formula:

Figure BDA0003678953750000052
Figure BDA0003678953750000052

其中θdown、θup分别为求解集的下界和上界。where θ down and θ up are the lower and upper bounds of the solution set, respectively.

优选地,尤其对于蘑菇聚集生长这一实际情况,为实现其中成熟蘑菇的无损采摘,结合步骤B,步骤C具体包括以下步骤:Preferably, especially for the actual situation of the growth of mushrooms, in order to achieve the non-destructive picking of mature mushrooms, in conjunction with step B, step C specifically includes the following steps:

步骤C1:构建蘑菇往复推动采摘路径的多目标优化模型:Step C1: Construct a multi-objective optimization model of mushrooms reciprocatingly push the picking path:

步骤C2:在步骤C1的模型构建完成后,使用改进的NSGA-II算法求解该模型,得到Pareto非支配集;Step C2: After the model construction of Step C1 is completed, use the improved NSGA-II algorithm to solve the model to obtain the Pareto non-dominated set;

步骤C3:根据步骤C2得到的结果,对得到的Pareto非支配集进行基于用于权值的排序。Step C3: According to the result obtained in Step C2, the obtained Pareto non-dominated set is sorted based on the weights.

优选地,所述步骤C1具体包括以下步骤:Preferably, the step C1 specifically includes the following steps:

步骤C1.1:构建蘑菇往复推动采摘失败率函数,计算采摘序列的采摘失败率;Step C1.1: Construct the mushroom reciprocatingly push the picking failure rate function, and calculate the picking failure rate of the picking sequence;

利用步骤B搜索出一条完整采摘序列中采摘失败蘑菇的总数并进行记录;计算蘑菇采摘序列的采摘失败率,其确定形式如下:Use step B to search and record the total number of failed mushrooms in a complete picking sequence; calculate the picking failure rate of the mushroom picking sequence, and its determination form is as follows:

Figure BDA0003678953750000053
Figure BDA0003678953750000053

其中nfailure代表该采摘路径下往复推动采摘失败的成熟蘑菇总数,nsum为成熟蘑菇总数;Among them, n failure represents the total number of mature mushrooms that fail to reciprocate in the picking path, and n sum is the total number of mature mushrooms;

步骤C1.2:构建蘑菇路径长度计算函数,计算采摘序列的路径长度;路径长度计算函数具体形式如下:Step C1.2: Build a mushroom path length calculation function to calculate the path length of the picking sequence; the specific form of the path length calculation function is as follows:

Figure BDA0003678953750000054
Figure BDA0003678953750000054

其中n为成熟蘑菇总数,x、y分别为蘑菇的横坐标、纵坐标;Among them, n is the total number of mature mushrooms, and x and y are the horizontal and vertical coordinates of the mushrooms, respectively;

步骤C1.3:根据建立的蘑菇往复推动采摘失败率函数,路径长度函数建立多目标优化模型;所述多目标优化模型的优化目标为:Step C1.3: establish a multi-objective optimization model according to the established mushroom reciprocating push-picking failure rate function and the path length function; the optimization objectives of the multi-objective optimization model are:

Figure BDA0003678953750000055
Figure BDA0003678953750000055

多目标优化模型设置了两个优化目标,第一个目标是最小化采摘失败率,第二个目标是最小化采摘路径长度。The multi-objective optimization model sets two optimization objectives, the first objective is to minimize the picking failure rate, and the second objective is to minimize the picking path length.

优选地,所述步骤C2中,基于NSGA-II法对多目标优化模型求解过程具体包括以下步骤:Preferably, in the step C2, the process of solving the multi-objective optimization model based on the NSGA-II method specifically includes the following steps:

步骤C2.1:种群个体染色体编码;Step C2.1: Chromosome coding of population individuals;

步骤C2.2:初始化种群并计算种群中个体的pfailure、distsum函数值;Step C2.2: Initialize the population and calculate the p failure and dist sum function values of individuals in the population;

步骤C2.3:初始种群中注入单目标采摘路径长度的极值;Step C2.3: Inject the extreme value of the single-target picking path length into the initial population;

步骤C2.4:精英策略选出父代种群;Step C2.4: The elite strategy selects the parent population;

步骤C2.5:选择、交叉、变异操作;Step C2.5: selection, crossover and mutation operations;

步骤C2.6:父子代种群合并及去重操作;Step C2.6: merge and deduplicate the parent-child population;

步骤C2.7:采用加入循环拥挤排序算法的精英策略选出子代种群;Step C2.7: Select the offspring population by the elite strategy of adding the cyclic crowding sorting algorithm;

步骤C2.8:重复所述步骤C2.5~C2.7至目标遗传代数后跳出当前循环;Step C2.8: repeating the steps C2.5 to C2.7 to the target genetic algebra and then jumping out of the current loop;

步骤C2.9:根据权重系数,从非支配解集中选择出最优解并输出。Step C2.9: According to the weight coefficient, select the optimal solution from the non-dominated solution set and output it.

优选地,所述步骤C2.7中,循环拥挤排序算法主要步骤如下:Preferably, in the step C2.7, the main steps of the cyclic congestion sorting algorithm are as follows:

步骤C2.7.1:将非支配层级中两个边界个体1d、nd的拥挤度设为inf,按拥挤度从高到低对非支配层级中的个体进排序,删除拥挤度最小的个体;Step C2.7.1: Set the crowding degree of the two boundary individuals 1 d and n d in the non-dominated hierarchy as inf, sort the individuals in the non-dominated hierarchy according to the crowding degree from high to low, and delete the individual with the smallest crowding degree;

步骤C2.7.2:重新计算该层级中剩余个体的拥挤度,再次将其中拥挤度最小的个体删除;Step C2.7.2: Recalculate the crowding degree of the remaining individuals in the hierarchy, and delete the individual with the smallest crowding degree again;

步骤C2.7.3:依次迭代,直到筛选至剩余指定数量的解为止。Step C2.7.3: Iterate sequentially until the specified number of solutions remain.

进一步的技术方案,所述步骤A中步骤A2:沿蘑菇最优推动方向往复推动蘑菇实现蘑菇与培养基的分离中的最优推动方向是利用步骤B:成熟蘑菇无损采摘最优推动方向的确定方法来确定的。A further technical solution, step A2 in the step A: push the mushroom back and forth along the optimal pushing direction of the mushroom to realize the optimal pushing direction in the separation of the mushroom and the culture medium is to use step B: the determination of the optimal pushing direction for the nondestructive picking of mature mushrooms method to determine.

进一步的技术方案,所述步骤C1.1下步骤C1.1.1:目标蘑菇的往复推动采摘判断依据如下:A further technical scheme, the step C1.1.1 under the step C1.1: the reciprocating push of the target mushroom is based on the following judgment:

利用B.成熟蘑菇最优推动方向的确定方法来确定目标蘑菇是否可以进行往复推动采摘。Use the method for determining the optimal pushing direction of B. mature mushrooms to determine whether the target mushrooms can be picked by reciprocating push.

进一步的技术方案,所述步骤C2下步骤C2.1中种群个体染色体编码的具体方式如下:A further technical scheme, the specific manner of the chromosome coding of the individual population in step C2.1 under the step C2 is as follows:

编码采用整数排列编码方法。若共筛选出M个成熟蘑菇则染色体分为M段,其中每一段为对应一个成熟蘑菇的编号,当对10个成熟蘑菇{1,2,3,4,5,6,7,8,9,10},则{10,5,3,4,7,6,9,8,2,1}就是一个合法的染色体。The encoding adopts the integer permutation encoding method. If a total of M mature mushrooms are screened out, the chromosomes are divided into M segments, and each segment is the number corresponding to a mature mushroom. When 10 mature mushrooms {1,2,3,4,5,6,7,8,9 ,10}, then {10,5,3,4,7,6,9,8,2,1} is a legal chromosome.

进一步的技术方案,所述步骤C2下步骤C2.3中粒子群算法的交叉方式的具体描述如下:In a further technical solution, the specific description of the crossover mode of the particle swarm algorithm in step C2.3 under step C2 is as follows:

粒子群算法的交叉方式采用顺序交叉(OX),即在两个父代染色体中随机选择起始和结束位置,将父代染色体1该区域内的基因复制到子代1相同位置上,再在父代染色体2上将子代1中缺少的基因按照顺序填入。另一个子代以类似方式得到。The crossover method of particle swarm optimization adopts sequential crossover (OX), that is, the starting and ending positions are randomly selected in the two parent chromosomes, and the genes in this region of parent chromosome 1 are copied to the same position of child 1, and then placed in the same position of child 1. The genes missing in offspring 1 are filled in sequence on parent chromosome 2. Another progeny was obtained in a similar manner.

进一步技术方案,所述步骤C2下步骤C2.4中精英策略选择父代种群主要是以非支配层级和拥挤度这两项作为选择的依据。按顺序将优先级较高的个体选入,并在同级个体中采用拥挤度进行选择。拥挤度的计算公式如下:In a further technical solution, the elite strategy in step C2.4 under step C2 selects the parent population mainly on the basis of non-dominant level and crowding degree. Individuals with higher priority are selected in order, and the crowding degree is used to select among the same-level individuals. The formula for calculating crowding degree is as follows:

Figure BDA0003678953750000071
Figure BDA0003678953750000071

其中n为当前层级中个体数,fm(i)表示当前层级中的第i个染色体的第m个目标函数值,

Figure BDA0003678953750000072
分别为当前层级中的第m个目标函数的最大与最小值;where n is the number of individuals in the current level, f m (i) represents the m-th objective function value of the i-th chromosome in the current level,
Figure BDA0003678953750000072
are the maximum and minimum values of the mth objective function in the current level, respectively;

进一步技术方案,所述步骤C2下步骤C2.6中分阶段调整交叉概率具体公式如下:In a further technical solution, the specific formula for adjusting the crossover probability by stages in step C2.6 under step C2 is as follows:

Figure BDA0003678953750000073
Figure BDA0003678953750000073

其中,T为最大进化代数,T1=αT,T2=(1-α)T,通常α取0.382或0.258;β为进化后期交叉概率的调节系数,β∈(0,1],该系数的设置可以保证交叉概率在进化后期渐近于不为0的值。Among them, T is the maximum evolutionary generation, T 1 =αT, T 2 =(1-α)T, usually α is 0.382 or 0.258; β is the adjustment coefficient of the crossover probability in the later stage of evolution, β∈(0,1], the coefficient The setting of can guarantee that the crossover probability asymptotically approaches a value other than 0 in the later stages of evolution.

进一步技术方案,所述步骤C2下步骤C2.7中重复个体控制策略的详细描述如下:A further technical solution, the detailed description of the repeated individual control strategy in step C2.7 under step C2 is as follows:

在NSGA-Ⅱ算法中,新的种群S(t)产生是通过对父代种群P(t)与子代种群R(t)合并后的种群使用精英策略得到的。在父代种群P(t)经过选择、交叉、变异的过程中,当交叉、变异概率不为1时,总有一些个体没有交叉、变异。因此在父、子代种群合并后,就会有重复的个体出现。随后对新的种群S(t)进行非支配排序的时候,这些重复个体是不会互相支配的,部分重复的个体会被选入新的父代种群P(t+1)。这样多代之后,新的父代被越来越多的重复解占据,导致最后的Pareto解集中的非支配解十分的少。In the NSGA-II algorithm, the new population S(t) is generated by using the elite strategy for the population after the parent population P(t) and the child population R(t) are merged. In the process of selection, crossover and mutation of the parent population P(t), when the probability of crossover and mutation is not 1, there are always some individuals without crossover and mutation. Therefore, after the parent and child populations merge, there will be duplicate individuals. When the new population S(t) is subsequently non-dominated, these duplicate individuals will not dominate each other, and some duplicate individuals will be selected into the new parent population P(t+1). After so many generations, the new parent generation is occupied by more and more repeated solutions, resulting in very few non-dominated solutions in the final Pareto solution set.

重复个体控制策略具体步骤如下:The specific steps for repeating the individual control strategy are as follows:

(1)删除父代P(t)和子代R(t)合并后种群S(t)中的重复个体;(1) Delete the duplicate individuals in the population S(t) after the parent generation P(t) and the child generation R(t) are merged;

(2)判断去重后种群中个数是否小于种群P(t)的个数,若小于,继续进行锦标赛选择、交叉、变异、合并种群,返回(1),否则对该种群进行快速非支配排序,选出N个个体作为新的父代种群P(t+1)。(2) Judging whether the number of the population after deduplication is less than the number of the population P(t), if it is less than, continue to perform championship selection, crossover, mutation, and merge the population, and return to (1), otherwise the population will be quickly non-dominated Sort and select N individuals as the new parent population P(t+1).

与现有技术相比,本发明技术方案具有突出的实质性特点和显著的优点:Compared with the prior art, the technical solution of the present invention has outstanding substantive features and significant advantages:

1.为实现蘑菇的无损采摘,本发明提出了一种往复推动无损采摘方法,特别是针对密集蘑菇,提出了一种适合蘑菇往复推动无损采摘的最优推动方向确定和采摘顺序的轨迹规划方法;1. In order to realize the non-destructive picking of mushrooms, the present invention proposes a method for reciprocating non-destructive picking, especially for dense mushrooms, a trajectory planning method for determining the optimal driving direction and picking sequence suitable for mushroom reciprocating and non-destructive picking is proposed. ;

2.本发明利用图论中点与多边形的关系类比在实际生长环境中被摘蘑菇与其周围蘑菇的关系,并利用改进的叉乘判别法以及内公切线定理计算出来的结果来确定被摘蘑菇是否可进行往复推动采摘以及在可以采摘时的最优推动方向,再通过改进的NSGA-Ⅱ算法优化成熟蘑菇采摘路径的无损采摘成功率以及路径长度;2. The present invention uses the relationship between points and polygons in graph theory to analogize the relationship between the picked mushrooms and their surrounding mushrooms in the actual growth environment, and uses the results calculated by the improved cross-product discrimination method and the inner common tangent theorem to determine the picked mushrooms Whether reciprocating push picking is possible and the optimal pushing direction when picking is possible, and then optimize the non-destructive picking success rate and path length of the mature mushroom picking path through the improved NSGA-II algorithm;

3.本发明为了提高算法优化效率,采取对初始种群进行种群质量提升操作以及初始种群注入单目标极值等方法,有效提高了算法的收敛性和解集分布性,使算法能在保证收敛到真实Pareto前沿的同时,获得分布更均匀、覆盖范围更广的近似Pareto最优解集;3. In order to improve the optimization efficiency of the algorithm, the present invention adopts methods such as performing a population quality improvement operation on the initial population and injecting a single target extremum into the initial population, which effectively improves the convergence of the algorithm and the distribution of the solution set, so that the algorithm can be guaranteed to converge to the true value. At the same time as the Pareto frontier, the approximate Pareto optimal solution set with more uniform distribution and wider coverage is obtained;

4.本发明实现了对蘑菇往复推动采摘与最优路径结合后的多目标问题的优化,克服了现有采摘技术中菇帽、菇茎分离的现象,又通过无损采摘方向的确定和采摘路劲规划,很好的避免采摘蘑菇时对其他蘑菇的损伤,从而有效提高了蘑菇无损采摘的成功率;4. The present invention realizes the optimization of the multi-objective problem after the combination of the mushroom reciprocating and picking and the optimal path, overcomes the phenomenon of separation of the mushroom cap and the mushroom stem in the existing picking technology, and also determines the non-destructive picking direction and the picking path. Strong planning can avoid damage to other mushrooms when picking mushrooms, thus effectively improving the success rate of mushroom picking without damage;

5.本发明本方法不仅限于蘑菇、草菇等食用菌的采摘,还适用于其它类圆球丛生类果实的有向采摘及其轨迹规划。5. The method of the present invention is not limited to the picking of edible fungi such as mushrooms and straw mushrooms, but is also applicable to the directional picking of other globular-like cluster fruits and their trajectory planning.

附图说明Description of drawings

图1为本发明方法优选实施例的流程图。FIG. 1 is a flow chart of a preferred embodiment of the method of the present invention.

图2为本发明实施例二的往复推动采摘示意图。FIG. 2 is a schematic diagram of the reciprocating push picking according to the second embodiment of the present invention.

图3为本发明实施例二的成熟蘑菇可摘判断的流程图。FIG. 3 is a flow chart of judging that the ripe mushroom can be picked according to the second embodiment of the present invention.

图4为本发明实施例三的蘑菇采摘路径规划算法的流程图。FIG. 4 is a flowchart of a mushroom picking path planning algorithm according to Embodiment 3 of the present invention.

图5为实施例三的蘑菇实际分布图像。FIG. 5 is an image of the actual distribution of mushrooms in the third embodiment.

图6为实施例三的成熟蘑菇最优采摘路径图。Fig. 6 is the optimal picking path diagram of mature mushrooms in the third embodiment.

图7为实施例三的成熟蘑菇采摘推动方向示意图。FIG. 7 is a schematic diagram of the pushing direction of picking mature mushrooms in Embodiment 3. FIG.

具体实施方式Detailed ways

为了更好的理解本发明,下面结合附图和实例对本发明进行详细描述。For better understanding of the present invention, the present invention will be described in detail below with reference to the accompanying drawings and examples.

实施例一Example 1

在本实施例中,参见图1,一种蘑菇往复推动无损采摘方式及其路径规划方法,具体包括:In the present embodiment, referring to FIG. 1 , a non-destructive picking method of mushroom reciprocating push and a path planning method thereof, specifically include:

A:设计蘑菇与培养基分离的往复推动采摘方式;A: Design the method of reciprocating and promoting the separation of mushrooms and culture medium;

步骤A1:利用末端执行器对蘑菇进行夹持或吸附;Step A1: Use the end effector to clamp or adsorb the mushroom;

步骤A2:沿蘑菇最优推动方向往复推动蘑菇实现蘑菇与培养基的分离;Step A2: push the mushroom back and forth along the optimal pushing direction of the mushroom to realize the separation of the mushroom and the culture medium;

B:成熟蘑菇无损采摘最优推动方向的确定方法;B: The method for determining the optimal driving direction for non-destructive picking of mature mushrooms;

步骤B1:获取蘑菇分布图像中蘑菇中心坐标、蘑菇菇帽半径以及蘑菇高度数据,以上数据作为蘑菇数据特征保存;Step B1: Obtain the mushroom center coordinates, mushroom cap radius and mushroom height data in the mushroom distribution image, and save the above data as mushroom data features;

步骤B2:利用蘑菇数据特征搜索出目标蘑菇周围的邻域蘑菇以及次邻域蘑菇;Step B2: Use the mushroom data features to search out the neighborhood mushrooms and the sub-neighborhood mushrooms around the target mushroom;

步骤B3:计算邻域蘑菇解集、次邻域蘑菇解集并确定蘑菇最优推动方向;Step B3: Calculate the neighborhood mushroom solution set and the sub-neighborhood mushroom solution set and determine the optimal pushing direction of the mushroom;

C:考虑无损采摘推动方向及最优路径的双目标优化成熟蘑菇采摘路径规划算法;C: A dual-objective optimized mature mushroom picking path planning algorithm considering the driving direction and optimal path of non-destructive picking;

步骤C1:构建蘑菇采摘路径的多目标优化模型:Step C1: Build a multi-objective optimization model for mushroom picking paths:

步骤C1.1:构建蘑菇往复推动采摘失败率函数,计算采摘序列的采摘失败率;Step C1.1: Construct the mushroom reciprocatingly push the picking failure rate function, and calculate the picking failure rate of the picking sequence;

步骤C1.1.1:目标蘑菇的往复推动采摘判断;Step C1.1.1: Judgment of the reciprocating push of the target mushroom to pick;

步骤C1.1.2:计算蘑菇采摘序列的采摘失败率;Step C1.1.2: Calculate the picking failure rate of the mushroom picking sequence;

步骤C1.2:构建蘑菇路径长度计算函数,计算采摘序列的路径长度;Step C1.2: Build a mushroom path length calculation function to calculate the path length of the picking sequence;

步骤C1.3:根据建立的蘑菇往复推动采摘失败率函数,路径长度函数建立多目标优化模型;Step C1.3: establish a multi-objective optimization model according to the established mushroom reciprocating push picking failure rate function and path length function;

步骤C2:在步骤C1的模型构建完成后,使用改进的NSGA-II算法求解该模型,得到Pareto非支配集;Step C2: After the model construction of Step C1 is completed, use the improved NSGA-II algorithm to solve the model to obtain the Pareto non-dominated set;

步骤C2.1:种群个体染色体编码;Step C2.1: Chromosome coding of population individuals;

步骤C2.2:初始化种群;Step C2.2: Initialize the population;

步骤C2.3:初始种群中注入单目标采摘路径长度的极值并计算种群中全部个体的pfailure、distsum函数值;Step C2.3: Inject the extreme value of the single-target picking path length into the initial population and calculate the p failure and dist sum function values of all individuals in the population;

步骤C2.4:精英策略选出父代种群;Step C2.4: The elite strategy selects the parent population;

步骤C2.5:选择、交叉、变异操作:Step C2.5: Selection, crossover, mutation operations:

步骤C2.6:父子代种群合并及去重操作;Step C2.6: merge and deduplicate the parent-child population;

步骤C2.7:采用加入循环拥挤排序算法的精英策略选出子代种群;Step C2.7: Select the offspring population by the elite strategy of adding the cyclic crowding sorting algorithm;

步骤C2.7.1:将非支配层级中两个边界个体1d、nd的拥挤度设为inf,按拥挤度从高到低对非支配层级中的个体进排序,删除拥挤度最小的个体;Step C2.7.1: Set the crowding degree of the two boundary individuals 1 d and n d in the non-dominated hierarchy as inf, sort the individuals in the non-dominated hierarchy according to the crowding degree from high to low, and delete the individual with the smallest crowding degree;

步骤C2.7.2:重新计算该层级中剩余个体的拥挤度,再次将其中拥挤度最小的个体删除;Step C2.7.2: Recalculate the crowding degree of the remaining individuals in the hierarchy, and delete the individual with the smallest crowding degree again;

步骤C2.7.3:依次迭代,直到筛选至剩余指定数量的解为止。Step C2.7.3: Iterate sequentially until the specified number of solutions remain.

步骤C2.8:重复所述步骤C2.5~C2.8至目标遗传代数后跳出当前循环;Step C2.8: Repeat the steps C2.5 to C2.8 to the target genetic algebra and then jump out of the current loop;

步骤C2.9:根据权重系数,从非支配解集中选择出最优解并输出。Step C2.9: According to the weight coefficient, select the optimal solution from the non-dominated solution set and output it.

本实施例蘑菇往复推动无损采摘方式及其路径规划方法,既有效提高了成熟蘑菇特别是聚集蘑菇实现无损采摘的成功率又优化了采摘路径长度而提高了采摘效率,从而在实现蘑菇无损采摘的同时获得采摘最优路径。The non-destructive mushroom picking method and its path planning method in this embodiment not only effectively improve the success rate of non-destructive picking of mature mushrooms, especially aggregated mushrooms, but also optimize the length of the picking path and improve the picking efficiency, so as to realize the non-destructive mushroom picking. At the same time, the optimal path for picking is obtained.

实施例二Embodiment 2

本实施例与上述实施例基本相同,特别之处在于:This embodiment is basically the same as the above-mentioned embodiment, and the special features are:

在本实施例中,如图1-图3所示,所述步骤A2中成熟蘑菇最优推动方向是基于步骤B成熟蘑菇无损采摘最优推动方向的确定方法来确定的,该方法具体包括:In this embodiment, as shown in Figures 1 to 3, the optimal pushing direction of the mature mushrooms in the step A2 is determined based on the method for determining the optimal pushing direction of the nondestructive picking of the mature mushrooms in the step B, and the method specifically includes:

步骤B1:获取蘑菇分布图像中蘑菇中心坐标、菇帽半径以及蘑菇高度数据,以上数据作为蘑菇数据特征保存;Step B1: Obtain mushroom center coordinates, mushroom cap radius and mushroom height data in the mushroom distribution image, and save the above data as mushroom data features;

步骤B2:利用蘑菇数据特征搜索出目标蘑菇周围的邻域蘑菇以及次邻域蘑菇;与目标蘑菇相交或相切的蘑菇称为邻域蘑菇,与目标蘑菇相离但依然会对目标蘑菇的往复推动空间造成干涉的蘑菇称为次邻域蘑菇;Step B2: Use the mushroom data features to search for the neighborhood mushrooms and sub-neighborhood mushrooms around the target mushroom; the mushrooms that intersect or are tangent to the target mushroom are called neighborhood mushrooms, which are far away from the target mushroom but still reciprocate the target mushroom. Mushrooms that push space to cause interference are called subneighborhood mushrooms;

判断可疑蘑菇为邻域蘑菇的评价指标,其确定形式如下:The evaluation index for judging suspicious mushrooms as neighborhood mushrooms is as follows:

0<aoi≤roi 0<a oi ≤r oi

其中aoi代表目标蘑菇与第i个可疑蘑菇之间的中心距;roi代表目标与第i个可疑蘑菇的菇帽半径和;i∈[1,…,n-1],n为蘑菇总数;where a oi represents the center distance between the target mushroom and the ith suspicious mushroom; ro oi represents the sum of the cap radius of the target and the ith suspicious mushroom; i∈[1,…,n-1], n is the total number of mushrooms ;

判断可疑蘑菇为次邻域蘑菇的评价指标,其确定形式如下:The evaluation index for judging suspicious mushrooms as sub-neighborhood mushrooms is as follows:

roi<aoi≤do+ri r oi <a oi ≤d o +r i

其中ri为可疑蘑菇的菇帽半径,do代表目标蘑菇的往复推动范围,公式如下:where ri is the radius of the mushroom cap of the suspicious mushroom, and do is the reciprocating push range of the target mushroom . The formula is as follows:

Figure BDA0003678953750000101
Figure BDA0003678953750000101

式中ho与ro分别代表目标蘑菇的高度与菇帽半径,k为推动采摘范围系数,k∈(0,1];In the formula, h o and r o represent the height of the target mushroom and the radius of the mushroom cap respectively, k is the coefficient of pushing the picking range, k∈(0,1];

步骤B3:计算邻域蘑菇解集、次邻域蘑菇解集并确定蘑菇最优推动方向;目标蘑菇是否被其邻域蘑菇包围类比为点与多边型的关系,利用改进的叉乘判别法来判断点与多边形的的关系从而确定目标蘑菇是否被其邻域蘑菇包围;假设邻域蘑菇个数为m,在目标蘑菇质点po与每个邻域蘑菇质点pi之间做向量

Figure BDA0003678953750000102
其中,i∈[1,2,3,…,m],m为邻域蘑菇总数;选择其中任一条向量如选
Figure BDA0003678953750000103
作为基向量,剩余其他向量称为邻域向量,邻域向量与基向量依次做叉乘与点乘运算,具体公式如下:Step B3: Calculate the neighborhood mushroom solution set, the sub-neighborhood mushroom solution set, and determine the optimal pushing direction of the mushroom; whether the target mushroom is surrounded by its neighborhood mushrooms is analogous to the relationship between points and polygons, and the improved cross-product discrimination method is used to determine Judging the relationship between points and polygons to determine whether the target mushroom is surrounded by its neighbor mushrooms; assuming that the number of neighbor mushrooms is m, make a vector between the target mushroom particle p o and each neighbor mushroom particle p i
Figure BDA0003678953750000102
Among them, i∈[1,2,3,…,m], m is the total number of mushrooms in the neighborhood; choose any one of the vectors if you choose
Figure BDA0003678953750000103
As a basis vector, the remaining other vectors are called neighborhood vectors, and the neighborhood vectors and basis vectors perform cross product and dot product operations in turn. The specific formula is as follows:

Figure BDA0003678953750000104
Figure BDA0003678953750000104

Figure BDA0003678953750000105
Figure BDA0003678953750000105

其中f为方向系数,θ2,i为带有方向的向量夹角;Where f is the direction coefficient, θ 2, i is the vector angle with direction;

所有邻域向量与基向量依次进行叉乘、点乘运算后得到的结果进行升序排列,选择出结果中的最大值θmax与最小值θmin;判断点与多边形关系的具体公式如下:The results obtained after all the neighborhood vectors and the basis vectors are cross-multiplied and dot-multiplied in turn are arranged in ascending order, and the maximum value θ max and the minimum value θ min in the results are selected; the specific formula for judging the relationship between the point and the polygon is as follows:

Figure BDA0003678953750000111
Figure BDA0003678953750000111

当点在多边形上和外时,均视为目标蘑菇未被其邻域蘑菇包围;记录下邻域蘑菇解集A,具体表达形式如下:When the point is on and outside the polygon, it is considered that the target mushroom is not surrounded by its neighbor mushrooms; the neighborhood mushroom solution set A is recorded, and the specific expression is as follows:

A=360°-(|θmax|+|θmin|)A=360°-(|θ max |+|θ min |)

利用内公切线定理计算目标蘑菇与某一个次邻域蘑菇之间的内公切角的计算公式如下:Using the inner common tangent theorem to calculate the inner common tangent angle between the target mushroom and a certain sub-neighborhood mushroom is as follows:

Figure BDA0003678953750000112
Figure BDA0003678953750000112

其中n为次邻域蘑菇个数,αoi为目标蘑菇与次邻域蘑菇所成内公切线夹角,aoi为目标蘑菇与次邻域蘑菇中心距,ro,ri分别为目标蘑菇菇帽半径和次邻域蘑菇菇帽半径;where n is the number of mushrooms in the sub-neighborhood, α oi is the inner common tangent angle formed by the target mushroom and the sub-neighborhood mushroom, a oi is the center distance between the target mushroom and the sub-neighborhood mushroom, r o , ri are the target mushroom, respectively Mushroom cap radius and sub-neighborhood mushroom cap radius;

该内公切角在0-360°范围内的补角βoi称为次邻域蘑菇个体解集;补角βoi计算公式如下:The supplementary angle β oi of the internal common tangent angle within the range of 0-360° is called the sub-neighborhood mushroom individual solution set; the calculation formula of the supplementary angle β oi is as follows:

βoi=360°-αoi,i∈[1,…,n]β oi =360°-α oi , i∈[1,...,n]

被摘的目标蘑菇周围邻域蘑菇、次邻域蘑菇的存在情况主要分为三种情况:The existence of the neighborhood mushrooms and the sub-neighborhood mushrooms around the picked target mushroom is mainly divided into three situations:

1)目标蘑菇周围不存在邻域蘑菇、次邻域蘑菇;1) There are no neighborhood mushrooms and sub-neighborhood mushrooms around the target mushroom;

2)目标蘑菇周围既存在邻域蘑菇也存在次邻域蘑菇;2) There are both neighborhood mushrooms and sub-neighborhood mushrooms around the target mushroom;

3)目标蘑菇周围只存在邻域蘑菇、次邻域蘑菇中的一种;3) There is only one of the neighborhood mushrooms and the sub-neighborhood mushrooms around the target mushroom;

对于第一种情况,为了避免无效的计算,默认这种情况的目标蘑菇的采摘推动方向为180°;对于第二种情况,应使邻域蘑菇解集A依次与次邻域蘑菇个体解集βoi进行取交集操作,如若出现交集为空集

Figure BDA0003678953750000113
的情况,则视为目标蘑菇往复推动采摘失败,退出可摘算法判断;若所有取交集操作完成后交集不为空集,则保留该交集并将该交集用于确定可行推动方向;对于第三种情况,当目标蘑菇周围仅存在邻域蘑菇时,将目标蘑菇与邻域蘑菇关系判断中获得的邻域蘑菇解集用于确定可行推动方向;当目标蘑菇周围仅存在次邻域蘑菇时,所有次邻域蘑菇个体解集βoi的交集便为该目标蘑菇被所有次邻域蘑菇干涉后的最终可行推动方向解集称为次邻域蘑菇解集B,具体表达形式如下:For the first case, in order to avoid invalid calculation, the default pushing direction of the target mushroom picking in this case is 180°; for the second case, the solution set A of the neighborhood mushrooms should be solved in turn with the individual solution set of the sub-neighborhood mushrooms β oi performs the intersection operation, if the intersection appears to be an empty set
Figure BDA0003678953750000113
In the case of , it is considered that the target mushroom has failed to reciprocately push the picking, and the judgment of the picking algorithm is exited; if the intersection is not an empty set after all the intersection operations are completed, the intersection is retained and used to determine the feasible pushing direction; for the third In this case, when there are only neighboring mushrooms around the target mushroom, the neighborhood mushroom solution set obtained in the judgment of the relationship between the target mushroom and the neighboring mushrooms is used to determine the feasible driving direction; when there are only sub-neighborhood mushrooms around the target mushroom, The intersection of the individual solution sets β oi of all the sub-neighborhood mushrooms is the final feasible pushing direction solution set after the target mushroom is interfered by all the sub-neighborhood mushrooms, which is called the sub-neighborhood mushroom solution set B, and the specific expression is as follows:

Figure BDA0003678953750000114
Figure BDA0003678953750000114

当次邻域蘑菇解集B为空集时,目标蘑菇不进行往复推动采摘,视为采摘失败,当次邻域蘑菇解集B不为空集时,目标蘑菇进行往复推动采摘,视为采摘成功;When the sub-neighborhood mushroom solution set B is an empty set, the target mushroom does not reciprocately promote the picking, which is regarded as a failure to pick. success;

从获得的可行推动方向解集中选择角度范围最大的解集作为最优推动方向的求解集;最优推动方向求解公式:Select the solution set with the largest angle range from the obtained feasible pushing direction solution set as the optimal pushing direction solution set; the optimal pushing direction solution formula:

Figure BDA0003678953750000121
Figure BDA0003678953750000121

其中θdown、θup分别为求解集的下界和上界。where θ down and θ up are the lower and upper bounds of the solution set, respectively.

为实现蘑菇的无损采摘,本实施例利用往复推动无损采摘方法,利用图论中点与多边形的关系类比在实际生长环境中被摘蘑菇与其周围蘑菇的关系,并利用改进的叉乘判别法以及内公切线定理计算出来的结果来确定被摘蘑菇是否可进行往复推动采摘以及在可以采摘时的最优推动方向,本实施例方法实现了蘑菇无损采摘方向的确定,很好的避免采摘蘑菇时对当前待采摘蘑菇及其周围蘑菇的损伤,从而有效提高了蘑菇无损采摘的成功率,并提高了采摘效率。In order to realize the non-destructive picking of mushrooms, this embodiment uses the reciprocating non-destructive picking method, uses the relationship between points and polygons in graph theory to compare the relationship between the picked mushrooms and their surrounding mushrooms in the actual growth environment, and uses the improved cross-product discrimination method and The result calculated by the internal common tangent theorem is used to determine whether the picked mushrooms can be reciprocatingly pushed for picking and the optimal pushing direction when they can be picked. The damage to the current mushroom to be picked and its surrounding mushrooms can effectively improve the success rate of non-destructive mushroom picking and improve picking efficiency.

实施例三Embodiment 3

本实施例与上述实施例基本相同,特别之处在于:This embodiment is basically the same as the above-mentioned embodiment, and the special features are:

在本实施例中,如图4-图7所示,在所述步骤C中,考虑无损采摘推动方向及最优路径,采用双目标优化成熟蘑菇采摘路径规划算法。In this embodiment, as shown in FIGS. 4 to 7 , in the step C, considering the non-destructive picking driving direction and the optimal path, a dual-objective optimized mature mushroom picking path planning algorithm is adopted.

为实现其中成熟蘑菇的无损采摘,结合步骤B,步骤C具体包括以下步骤:In order to realize the non-destructive picking of mature mushrooms, in conjunction with step B, step C specifically includes the following steps:

步骤C1:构建蘑菇采摘路径的多目标优化模型:Step C1: Build a multi-objective optimization model for mushroom picking paths:

步骤C1.1:构建蘑菇往复推动采摘失败率函数,计算采摘序列的采摘失败率;Step C1.1: Construct the mushroom reciprocatingly push the picking failure rate function, and calculate the picking failure rate of the picking sequence;

这里,步骤C1.1具体包括以下步骤:Here, step C1.1 specifically includes the following steps:

步骤C1.1.1:目标蘑菇的往复推动采摘判断Step C1.1.1: Judgment of the reciprocating push of the target mushroom to pick

根据从蘑菇分布图中获得的蘑菇数据特征搜索出目标蘑菇周围的邻域蘑菇以及次邻域蘑菇。According to the mushroom data features obtained from the mushroom distribution map, the neighborhood mushrooms and the sub-neighborhood mushrooms around the target mushroom are searched.

判断可疑蘑菇为邻域蘑菇的评价指标,其确定形式如下:The evaluation index for judging suspicious mushrooms as neighborhood mushrooms is as follows:

0<a0i≤roi 0<a 0i ≤r oi

其中aoi代表目标蘑菇与第i个蘑菇之间的中心距;roi代表目标与第i个蘑菇的菇帽半径和;i∈(1,...,n-1),n为蘑菇总数。where a oi represents the center distance between the target mushroom and the ith mushroom; ro oi represents the sum of the cap radius of the target and the ith mushroom; i∈(1,...,n-1), n is the total number of mushrooms .

判断可疑蘑菇为次邻域蘑菇的评价指标,其确定形式如下:The evaluation index for judging suspicious mushrooms as sub-neighborhood mushrooms is as follows:

roi<a0i≤do+ri ro oi <a 0i ≤d o +r i

其中ri为可疑蘑菇的菇帽半径,do代表目标蘑菇的推动范围,公式如下:where ri is the radius of the mushroom cap of the suspicious mushroom, and do is the pushing range of the target mushroom . The formula is as follows:

Figure BDA0003678953750000122
Figure BDA0003678953750000122

式中ho与ro分别代表目标蘑菇的高度与菇帽半径,k为推动采摘范围系数,k∈(0,1]。In the formula, h o and ro o represent the height of the target mushroom and the radius of the mushroom cap respectively, k is the coefficient of pushing the picking range, k∈(0,1].

利用点与多边形的关系判断目标蘑菇是否被其邻域蘑菇包围,将目标蘑菇以及其邻域蘑菇简化为一个个质点,蘑菇的中心坐标便是质点的位置。除目标蘑菇外,邻域蘑菇依次顺时针两两相连,形成一个封闭的多边形。从而将目标蘑菇是否被邻域蘑菇包围的问题抽象为图论中点与多边形关系的问题。利用改进的叉乘判别法来判断点与多边形的的关系。将被判别点po与多边型的每个顶点pi之间做向量

Figure BDA0003678953750000131
m为邻域蘑菇总数),选择其中任一条向量如选
Figure BDA0003678953750000132
作为基向量,剩余其他向量称为邻域向量,邻域向量与基向量依次做叉乘与点乘运算,具体公式如下:Use the relationship between points and polygons to determine whether the target mushroom is surrounded by its neighbor mushrooms, simplify the target mushroom and its neighbor mushrooms into mass points, and the center coordinate of the mushroom is the position of the mass point. Except for the target mushroom, the neighboring mushrooms are connected in turn clockwise two by two, forming a closed polygon. Therefore, the problem of whether the target mushroom is surrounded by the neighboring mushrooms is abstracted into the problem of the relationship between points and polygons in graph theory. The relationship between points and polygons is judged by the improved cross-product discrimination method. Make a vector between the discriminant point p o and each vertex p i of the polygon
Figure BDA0003678953750000131
m is the total number of mushrooms in the neighborhood), choose any one of the vectors if you choose
Figure BDA0003678953750000132
As a basis vector, the remaining other vectors are called neighborhood vectors, and the neighborhood vectors and basis vectors perform cross product and dot product operations in turn. The specific formula is as follows:

Figure BDA0003678953750000133
Figure BDA0003678953750000133

Figure BDA0003678953750000134
Figure BDA0003678953750000134

其中f为方向系数,θ2,i为带有方向的向量夹角。Where f is the direction coefficient, θ 2, i is the vector angle with direction.

所有邻域向量与基向量依次进行叉乘、点乘运算后得到的结果进行升序排列,选择出最大值θmax与最小值θmin。如果最大值θmax的绝对值与最小值θmin的绝对值进行加法运算后其值大于180°,则表明点在多边形内,小于180°时,点在多边形外,等于180°时,点在多边形上。其具体形式如下:All the neighborhood vectors and the basis vectors are cross-multiplied and dot-multiplied in sequence and the results obtained are arranged in ascending order, and the maximum value θ max and the minimum value θ min are selected. If the absolute value of the maximum value θ max and the absolute value of the minimum value θ min are added, the value is greater than 180°, it indicates that the point is inside the polygon, when it is less than 180°, the point is outside the polygon, and when it is equal to 180°, the point is within the polygon on the polygon. Its specific form is as follows:

Figure BDA0003678953750000135
Figure BDA0003678953750000135

当点在多边形上和外时,均视为目标蘑菇未被其邻域蘑菇包围。记录下邻域蘑菇解集A,具体表达形式如下:When the point is on and outside the polygon, it is considered that the target mushroom is not surrounded by its neighbor mushrooms. Record the neighborhood mushroom solution set A, the specific expression is as follows:

A=360°-(|θmax|+|θmin|)A=360°-(|θ max |+|θ min |)

利用内公切线定理计算出目标蘑菇与次邻域蘑菇之间的内公切角。假设次邻域蘑菇个数为n个,内公切线定理计算目标蘑菇与次邻域蘑菇之间的内公切角的计算公式如下:Using the inner common tangent theorem to calculate the inner common tangent angle between the target mushroom and the sub-neighborhood mushroom. Assuming that the number of mushrooms in the sub-neighborhood is n, the internal common tangent theorem calculates the internal common tangent angle between the target mushroom and the sub-neighborhood mushroom as follows:

Figure BDA0003678953750000136
Figure BDA0003678953750000136

其中αoi为目标蘑菇与次邻域蘑菇所成内公切线夹角,aoi为目标蘑菇与次邻域蘑菇中心距,ro,ri分别为目标蘑菇菇帽半径和次邻域蘑菇菇帽半径。where α oi is the inner common tangent angle formed by the target mushroom and the sub-neighborhood mushroom, a oi is the center distance between the target mushroom and the sub-neighborhood mushroom, r o , ri are the target mushroom cap radius and the sub-neighborhood mushroom, respectively cap radius.

该内公切角在0-360°范围内的补角βoi称为次邻域蘑菇个体解集。补角βoi计算公式如下:The supplementary angle β oi of the internal common chamfering angle in the range of 0-360° is called the sub-neighborhood mushroom individual solution set. The formula for calculating the supplementary angle β oi is as follows:

βoi=360°-αoi,i∈[1,…,n]β oi =360°-α oi , i∈[1,...,n]

被摘的目标蘑菇周围邻域蘑菇、次邻域蘑菇的存在情况主要分为三种情况:The existence of the neighborhood mushrooms and the sub-neighborhood mushrooms around the picked target mushroom is mainly divided into three situations:

1)目标蘑菇周围不存在邻域蘑菇、次邻域蘑菇;1) There are no neighborhood mushrooms and sub-neighborhood mushrooms around the target mushroom;

2)目标蘑菇周围既存在邻域蘑菇也存在次邻域蘑菇;2) There are both neighborhood mushrooms and sub-neighborhood mushrooms around the target mushroom;

3)目标蘑菇周围只存在邻域蘑菇、次邻域蘑菇中的一种。3) There is only one of the neighborhood mushrooms and the sub-neighborhood mushrooms around the target mushroom.

对于第一种情况,为了避免无效的计算,默认这种情况的目标蘑菇的采摘推动方向为180°。For the first case, in order to avoid invalid calculations, the default push direction of the target mushroom picking in this case is 180°.

对于第二种情况,应使邻域蘑菇解集A依次与次邻域蘑菇个体解集βoi进行取交集操作,如若出现交集为空集

Figure BDA0003678953750000145
的情况,则视为目标蘑菇往复推动采摘失败,退出可摘算法判断。若所有取交集操作完成后交集不为空集,则保留该交集并将该交集用于确定可行推动方向。For the second case, the neighborhood mushroom solution set A should be intersected with the sub-neighborhood mushroom individual solution set β oi in turn, if the intersection is an empty set
Figure BDA0003678953750000145
In the case of , it is considered that the target mushroom has failed to reciprocate the picking, and the judgment of the picking algorithm is withdrawn. If the intersection is not an empty set after all the intersection operations are completed, the intersection is retained and used to determine the feasible pushing direction.

对于第三种情况,当目标蘑菇周围仅存在邻域蘑菇时,将目标蘑菇与邻域蘑菇关系判断中获得的邻域蘑菇解集用于确定可行推动方向;当目标蘑菇周围仅存在次邻域蘑菇时,所有次邻域蘑菇个体解集βoi的交集便为该目标蘑菇被所有次邻域蘑菇干涉后的最终可行推动方向解集称为次邻域蘑菇解集B,具体表达形式如下:For the third case, when there are only neighborhood mushrooms around the target mushroom, the neighborhood mushroom solution set obtained in the judgment of the relationship between the target mushroom and the neighborhood mushrooms is used to determine the feasible pushing direction; when there are only sub-neighborhoods around the target mushroom In the case of mushrooms, the intersection of the individual solution sets β oi of all sub-neighborhood mushrooms is the final feasible pushing direction solution set after the target mushroom is interfered by all the sub-neighborhood mushrooms, which is called the sub-neighborhood mushroom solution set B, and the specific expression is as follows:

Figure BDA0003678953750000141
Figure BDA0003678953750000141

当次邻域蘑菇解集B为空集时,目标蘑菇不可进行往复推动采摘,视为采摘失败,当次邻域蘑菇解集B不为空集时,目标蘑菇可进行往复推动采摘,视为采摘成功。When the sub-neighborhood mushroom solution set B is an empty set, the target mushroom cannot be picked by reciprocating push, which is regarded as a failure to pick. Picking was successful.

从获得的可行推动方向解集中选择角度范围最大的解集作为最优推动方向的求解集。最优推动方向求解公式:Select the solution set with the largest angle range as the solution set of the optimal pushing direction from the obtained feasible pushing direction solution set. The optimal driving direction solution formula:

Figure BDA0003678953750000142
Figure BDA0003678953750000142

其中θdown、θup分别为求解集的下界和上界。where θ down and θ up are the lower and upper bounds of the solution set, respectively.

对一条完整采摘序列中蘑菇推动方向以及往复推动采摘失败的蘑菇个数进行记录。Record the direction of mushroom pushing and the number of mushrooms that fail to be picked back and forth in a complete picking sequence.

步骤C1.1.2:计算蘑菇采摘序列的采摘失败率,其确定形式如下:Step C1.1.2: Calculate the picking failure rate of the mushroom picking sequence, and its determination form is as follows:

Figure BDA0003678953750000143
Figure BDA0003678953750000143

其中nfailure代表该路径下往复推动采摘失败的蘑菇总数,nsum为成熟蘑菇总数。Among them, n failure represents the total number of mushrooms that fail to be picked up and down in this path, and n sum is the total number of mature mushrooms.

步骤C1.2:构建蘑菇路径长度计算函数,计算采摘序列的路径长度;路径长度计算函数,其具体形式如下:Step C1.2: Build a mushroom path length calculation function to calculate the path length of the picking sequence; the path length calculation function, its specific form is as follows:

Figure BDA0003678953750000144
Figure BDA0003678953750000144

其中n为成熟蘑菇总数,x、y分别为蘑菇的横坐标、纵坐标。Among them, n is the total number of mature mushrooms, and x and y are the horizontal and vertical coordinates of the mushrooms, respectively.

步骤C1.3:根据建立的蘑菇往复推动采摘失败率函数,路径长度函数建立多目标优化模型;Step C1.3: establish a multi-objective optimization model according to the established mushroom reciprocating push picking failure rate function and path length function;

多目标优化模型设置了两个优化目标,第一个优化目标是最小化采摘失败率,第二个优化目标是最小化采摘路径长度;所述多目标优化模型的优化目标为:The multi-objective optimization model sets two optimization objectives, the first optimization objective is to minimize the picking failure rate, and the second optimization objective is to minimize the length of the picking path; the optimization objectives of the multi-objective optimization model are:

Figure BDA0003678953750000151
Figure BDA0003678953750000151

步骤C2:在步骤C1的模型构建完成后,使用改进的NSGA-Ⅱ算法求解该模型,进化指定代数后得到Pareto非支配集;Step C2: After the model construction of Step C1 is completed, use the improved NSGA-II algorithm to solve the model, and obtain the Pareto non-dominated set after evolving the specified algebra;

步骤C2.1:种群个体染色体编码;采用固定长度的不重复整数编码方式对种群中每个个体进行编码,每个染色体基因代表对应位置成熟蘑菇,染色体长度M为28;Step C2.1: Chromosome coding of individual population; use a fixed-length non-repetitive integer coding method to encode each individual in the population, each chromosomal gene represents a mature mushroom at the corresponding position, and the chromosome length M is 28;

步骤C2.2初始化种群并计算种群中每个个体的pfailure、distsum函数值,采用随机方式产生规模为2N-1的初始种群,其中N=100;Step C2.2 Initialize the population and calculate the p failure and dist sum function values of each individual in the population, and use a random method to generate an initial population with a scale of 2N-1, where N=100;

在算法开始迭代开始之前,采用随机方式初始化两倍种群规模的初始种群,并且计算种群中每个个体的pfailure、distsum目标函数值。这样做的目的是通过之后的快速非支配排序以及精英策略的方式优选出种群规模大小的初代种群以提升初代种群中个体的质量,加快算法的收敛速度。Before the algorithm starts to iterate, initialize the initial population of twice the population size in a random way, and calculate the p failure and dist sum objective function values of each individual in the population. The purpose of this is to optimize the initial population with the size of the population through the subsequent fast non-dominated sorting and the elite strategy, so as to improve the quality of individuals in the initial population and speed up the convergence speed of the algorithm.

步骤C2.3初始种群中注入单目标采摘路径长度的极值,利用粒子群算法搜索出路径长度最优的个体采摘序列,并将该个体注入到步骤C2.2中规模为2N-1(199)的初始种群中。在多目标优化的初始化种群中,注入每个目标的极值可以加快算法的收敛速度,由于蘑菇采摘路径优化问题中,降低采摘失败率比优化采摘路径长度更容易实现,对于这种不平衡的多目标优化问题,仅注入蘑菇采摘路径长度的极值以加快算法的收敛速度。Step C2.3 injects the extreme value of the single-target picking path length into the initial population, uses the particle swarm algorithm to search for the individual picking sequence with the optimal path length, and injects the individual into the step C2.2 with a scale of 2N-1 (199 ) in the initial population. In the initialization population of multi-objective optimization, injecting the extreme value of each objective can speed up the convergence speed of the algorithm. Because in the optimization problem of mushroom picking path, it is easier to reduce the picking failure rate than optimizing the picking path length. For multi-objective optimization problems, only the extremum of the mushroom picking path length is injected to speed up the convergence of the algorithm.

步骤C2.4:精英策略选出父代种群;对步骤C2.3生成的规模为2N(200)的初始种群计算其中所有个体的pfailure、distsum目标函数值并进行快速非支配排序,同时对每个非支配层中的个体进行拥挤度计算;根据精英策略,选取较优的个体组成规模为N(100)的父代种群;Step C2.4: The elite strategy selects the parent population; for the initial population with a size of 2N(200) generated in step C2.3, calculate the p failure and dist sum objective function values of all individuals, and perform fast non-dominated sorting. Calculate the crowding degree of the individuals in each non-dominated layer; according to the elite strategy, select the better individuals to form a parent population with a size of N(100);

步骤C2.5:选择、交叉、变异操作;根据步骤C2.4生成的初始种群,通过锦标赛选择确定繁殖的父代;采取有放回的随机方式从初始种群中取出4个个体,根据非支配层级以及个体的拥挤度从4个个体中优选出1个个体作为待繁殖个体,另一个待繁殖个体同样以此法选出。为了防止同一个个体被选为待繁殖个体,要求两个待繁殖个体应为不同个体。按照交叉(pc)、变异(pm)概率进行交叉、变异等遗传操作,产生子代种群,种群的变异方式采用单点变异的方式;种群的交叉方式采用两点交叉的方式并根据进化阶段自适应调整交叉概率,分阶段调整交叉概率具体公式如下:Step C2.5: selection, crossover and mutation operations; according to the initial population generated in step C2.4, the parent generation for reproduction is selected through the championship; 4 individuals are taken out from the initial population in a random way with replacement, according to the non-dominant method. The level and the crowding degree of individuals are selected from 4 individuals as the individual to be reproduced, and the other individual to be reproduced is also selected in this way. In order to prevent the same individual from being selected as the individual to be bred, it is required that the two individuals to be bred should be different individuals. Carry out genetic operations such as crossover and mutation according to the probability of crossover (p c ) and mutation (p m ) to generate offspring populations. The mutation mode of the population adopts the method of single-point mutation; The crossover probability is adaptively adjusted in stages, and the specific formula for adjusting the crossover probability in stages is as follows:

Figure BDA0003678953750000161
Figure BDA0003678953750000161

其中,T为最大进化代数,R1=αT,T2=(1-α)T;β为进化后期交叉概率的调节系数,β∈(0,1],该系数的设置可以保证交叉概率在进化后期渐近于不为0的值。本实例中α取0.382,β取值0.4。Among them, T is the maximum evolutionary algebra, R 1 =αT, T 2 =(1-α)T; β is the adjustment coefficient of the crossover probability in the later stage of evolution, β∈(0,1], the setting of this coefficient can ensure that the crossover probability is within Late evolution is asymptotic to a value other than 0. In this example, α is 0.382, and β is 0.4.

步骤C2.6:父子代种群合并及去重操作,生成规模为2N(200)个染色体的种群,采取重复个体控制策略对合并种群进行去除重复个体操作以提高种群个体的多样性。重复个体控制策略具体步骤如下:Step C2.6: Merge and deduplicate the parent and child populations to generate a population with a scale of 2N (200) chromosomes, and adopt the duplicate individual control strategy to remove duplicate individuals from the merged population to improve the diversity of population individuals. The specific steps for repeating the individual control strategy are as follows:

(1)删除父代P(t)和子代R(t)合并后种群S(t)中的重复个体;(1) Delete the duplicate individuals in the population S(t) after the parent generation P(t) and the child generation R(t) are merged;

(2)判断去重后的种群规模是否小于种群P(t)的种群规模N(100),若小于,继续进行锦标赛选择、交叉、变异、合并种群,返回(1),否则对去重后合并种群中的个体计算pfailure、distsum目标函数值,根据目标函数值对去重后的合并种群进行快速非支配排序和拥挤度计算。(2) Determine whether the population size after deduplication is smaller than the population size N(100) of the population P(t), if it is smaller, continue to perform championship selection, crossover, mutation, and merge populations, and return to (1), otherwise, after deduplication Individuals in the merged population calculate p failure and dist sum objective function values, and perform fast non-dominated sorting and crowding degree calculation on the deduplicated merged population according to the objective function values.

步骤C2.7:采用加入循环拥挤排序算法的精英策略选出子代种群,将去重后合并种群中的个体按Pareto等级由高到低依次将非支配集F1,F2,…,Fm放入新的父代种群P(t+1)中,当新的父代种群的大小超出N(100)时,采用循环拥挤排序算法剔除Fm中的个体直到Fm中剩余个体数与已经存入新的父代种群中的个体数之和等于N时停止;Step C2.7: Adopt the elite strategy of adding the cyclic crowding sorting algorithm to select the sub-generation population, and divide the individuals in the merged population after deduplication into the non-dominated sets F 1 , F 2 ,...,F according to the Pareto level from high to low. m is put into the new parent population P(t+1), when the size of the new parent population exceeds N(100), the cyclic crowding sorting algorithm is used to eliminate the individuals in F m until the number of remaining individuals in F m is equal to Stop when the sum of the number of individuals that have been deposited into the new parent population is equal to N;

这里,步骤C2.7具体包括以下步骤:Here, step C2.7 specifically includes the following steps:

步骤C2.7.1:将非支配层级中两个边界个体1d、nd的拥挤度设为inf,拥挤度的计算公式如下:Step C2.7.1: Set the crowding degree of the two boundary individuals 1 d and n d in the non-dominated hierarchy as inf, and the calculation formula of the crowding degree is as follows:

Figure BDA0003678953750000162
Figure BDA0003678953750000162

其中n为当前层级中个体数,fm(i)表示当前层级中的第i个染色体的第m个目标函数值,

Figure BDA0003678953750000163
分别为当前层级中的第m个目标函数的最大与最小值;where n is the number of individuals in the current level, f m (i) represents the m-th objective function value of the i-th chromosome in the current level,
Figure BDA0003678953750000163
are the maximum and minimum values of the mth objective function in the current level, respectively;

按拥挤度从高到低对非支配层级中的个体进排序,删除拥挤度最小的个体;Sort the individuals in the non-dominated hierarchy in descending order of crowding degree, and delete the individual with the least crowding degree;

步骤C2.7.2:重新计算该层级中剩余个体的拥挤度,再次将其中拥挤度最小的个体删除;Step C2.7.2: Recalculate the crowding degree of the remaining individuals in the hierarchy, and delete the individual with the smallest crowding degree again;

步骤C2.7.3:依次迭代,直到筛选至剩余指定数量的解为止。Step C2.7.3: Iterate sequentially until the specified number of solutions remain.

步骤C2.8:重复所述步骤C2.5~C2.7,若当前遗传代数达到指定目标遗传代数则跳出当前循环。Step C2.8: Repeat steps C2.5 to C2.7, and jump out of the current loop if the current genetic algebra reaches the specified target genetic algebra.

步骤C2.9:根据权重系数,从非支配解集中选择出最优解并输出。Step C2.9: According to the weight coefficient, select the optimal solution from the non-dominated solution set and output it.

为实现蘑菇的无损采摘,本实施例往复推动无损采摘方法,特别是针对密集蘑菇,利用适合蘑菇往复推动无损采摘的最优推动方向确定和采摘顺序的轨迹规划方法。为了提高算法优化效率,采取对初始种群进行种群质量提升操作以及初始种群注入单目标极值等方法,有效提高了算法的收敛性和解集分布性,使算法能在保证收敛到真实Pareto前沿的同时,获得分布更均匀、覆盖范围更广的近似Pareto最优解集。本方法不仅限于蘑菇、草菇等食用菌的采摘,还适用于其它类圆球丛生类果实的有向采摘及其轨迹规划。In order to realize the nondestructive picking of mushrooms, the method for reciprocating nondestructive picking in this embodiment, especially for dense mushrooms, uses a trajectory planning method suitable for determining the optimal driving direction and picking sequence for mushroom reciprocating nondestructive picking. In order to improve the optimization efficiency of the algorithm, methods such as improving the population quality of the initial population and injecting the single-objective extremum into the initial population are adopted, which effectively improves the convergence of the algorithm and the distribution of the solution set, so that the algorithm can converge to the real Pareto frontier at the same time. , to obtain the approximate Pareto optimal solution set with more uniform distribution and wider coverage. The method is not limited to the picking of edible fungi such as mushrooms and straw mushrooms, but is also applicable to the directional picking and trajectory planning of other globular-like cluster fruits.

本发明上述实施例蘑菇往复推动无损采摘方式及其路径规划方法,先利用蘑菇与培养基分离的往复推动采摘方式;然后实施成熟蘑菇无损采摘最优推动方向的确定方法;考虑无损采摘推动方向及最优路径,利用双目标优化成熟蘑菇采摘路径规划算法;上述实施例采用往复推动采摘的具体形式,上述实施例为往复推动采摘确定了最优推动方向,这种带有最优推动方向的往复推动采摘可以大幅提高蘑菇无损采摘的成功率。并通过上述实施例方法对蘑菇采摘路径问题进行了优化。本发明上述实施例实现了对蘑菇往复推动采摘与最优路径结合后的多目标问题的优化,通过无损采摘方向的确定和采摘路径规划,很好的避免采摘蘑菇时对当前待采摘蘑菇及其周围蘑菇的损伤,从而有效提高了蘑菇无损采摘的成功率,并提高了采摘效率。In the above-mentioned embodiment of the present invention, the method for reciprocating nondestructive picking of mushrooms and the path planning method thereof, firstly utilize the reciprocating propulsion picking method in which the mushrooms are separated from the culture medium; then implement the method for determining the optimal driving direction for nondestructive picking of mature mushrooms; Optimal path, using dual-objective optimization of mature mushroom picking path planning algorithm; the above embodiment adopts the specific form of reciprocating pushing picking, and the above embodiment determines the optimal pushing direction for the reciprocating pushing picking, this kind of reciprocating with the optimal pushing direction Pushing to pick can greatly increase the success rate of mushroom picking without damage. And the mushroom picking path problem is optimized by the above embodiment method. The above-mentioned embodiments of the present invention realize the optimization of the multi-objective problem after the combination of the mushroom reciprocating picking and the optimal path, and through the determination of the non-destructive picking direction and the picking path planning, it is very good to avoid the current mushrooms to be picked and its characteristics when picking mushrooms. The damage of the surrounding mushrooms can effectively improve the success rate of non-destructive mushroom picking and improve the picking efficiency.

上述实施例只为说明本发明的技术构思及特点,其目的在于让熟悉此项技术的人士能够了解本发明的内容并据以实施,并不能以此限制本发明的保护范围。凡根据本发明精神实质所作的等效变化或修饰,都应涵盖在本发明的保护范围之内。The above-mentioned embodiments are only intended to illustrate the technical concept and characteristics of the present invention, and the purpose thereof is to enable those who are familiar with the art to understand the content of the present invention and implement them accordingly, and cannot limit the protection scope of the present invention. All equivalent changes or modifications made according to the spirit of the present invention should be included within the protection scope of the present invention.

Claims (7)

1.一种蘑菇往复推动无损采摘方式及其路径规划方法,其特征在于,包括如下步骤:1. a mushroom reciprocatingly promotes a lossless picking method and a path planning method thereof, is characterized in that, comprises the steps: A.设计蘑菇与培养基分离的往复推动采摘方式;A. Design the method of reciprocating and promoting the separation of mushrooms and culture medium; B.成熟蘑菇无损采摘最优推动方向的确定方法;B. The method for determining the optimal driving direction for non-destructive picking of mature mushrooms; C.考虑无损采摘推动方向及最优路径的双目标优化成熟蘑菇采摘路径规划算法。C. A dual-objective optimal mature mushroom picking path planning algorithm considering the non-destructive picking driving direction and optimal path. 2.根据权利要求1所述一种蘑菇往复推动无损采摘方式及其路径规划方法,其特征在于,所述步骤A具体包括:2. a kind of mushroom reciprocating non-destructive picking method and path planning method thereof according to claim 1, is characterized in that, described step A specifically comprises: 步骤A1:利用末端执行器对蘑菇进行夹持或吸附;Step A1: Use the end effector to clamp or adsorb the mushroom; 步骤A2:沿蘑菇最优推动方向往复推动蘑菇实现蘑菇与培养基的分离。Step A2: Push the mushroom back and forth along the optimal pushing direction of the mushroom to separate the mushroom from the culture medium. 3.根据权利要求1所述一种蘑菇往复推动无损采摘方式及其路径规划方法,其特征在于,所述步骤A2中成熟蘑菇最优推动方向是基于步骤B成熟蘑菇无损采摘最优推动方向的确定方法来确定的,该方法具体包括:3. a kind of mushroom reciprocating promoting non-destructive picking method and path planning method thereof according to claim 1, is characterized in that, in described step A2, the optimal driving direction of mature mushroom is based on the optimal driving direction of step B mature mushroom non-destructive picking. Determined by a method, the method specifically includes: 步骤B1:获取蘑菇分布图像中蘑菇中心坐标、菇帽半径以及蘑菇高度数据,以上数据作为蘑菇数据特征保存;Step B1: Obtain mushroom center coordinates, mushroom cap radius and mushroom height data in the mushroom distribution image, and save the above data as mushroom data features; 步骤B2:利用蘑菇数据特征搜索出目标蘑菇周围的邻域蘑菇以及次邻域蘑菇;与目标蘑菇相交或相切的蘑菇称为邻域蘑菇,与目标蘑菇相离但依然会对目标蘑菇的往复推动空间造成干涉的蘑菇称为次邻域蘑菇;Step B2: Use the mushroom data features to search for the neighborhood mushrooms and sub-neighborhood mushrooms around the target mushroom; the mushrooms that intersect or are tangent to the target mushroom are called neighborhood mushrooms, which are far away from the target mushroom but still reciprocate the target mushroom. Mushrooms that push space to cause interference are called subneighborhood mushrooms; 判断可疑蘑菇为邻域蘑菇的评价指标,其确定形式如下:The evaluation index for judging suspicious mushrooms as neighborhood mushrooms is as follows: 0<aoi≤roi 0<a oi ≤r oi 其中aoi代表目标蘑菇与第i个可疑蘑菇之间的中心距;roi代表目标与第i个可疑蘑菇的菇帽半径和;i∈[1,...,n-1],n为蘑菇总数;where a oi represents the center distance between the target mushroom and the ith suspicious mushroom; ro oi represents the sum of the cap radius of the target and the ith suspicious mushroom; i∈[1,...,n-1], n is total number of mushrooms; 判断可疑蘑菇为次邻域蘑菇的评价指标,其确定形式如下:The evaluation index for judging suspicious mushrooms as sub-neighborhood mushrooms is as follows: roi<aoi≤do+ri r oi <a oi ≤d o +r i 其中ri为可疑蘑菇的菇帽半径,do代表目标蘑菇的往复推动范围,公式如下:where ri is the radius of the mushroom cap of the suspicious mushroom, and do is the reciprocating push range of the target mushroom . The formula is as follows:
Figure FDA0003678953740000011
Figure FDA0003678953740000011
式中ho与ro分别代表目标蘑菇的高度与菇帽半径,k为推动采摘范围系数,k∈(0,1];In the formula, h o and r o represent the height of the target mushroom and the radius of the mushroom cap respectively, k is the coefficient of pushing the picking range, k ∈ (0, 1]; 步骤B3:计算邻域蘑菇解集、次邻域蘑菇解集并确定蘑菇最优推动方向;目标蘑菇是否被其邻域蘑菇包围类比为点与多边型的关系,利用改进的叉乘判别法来判断点与多边形的的关系从而确定目标蘑菇是否被其邻域蘑菇包围;假设邻域蘑菇个数为m,在目标蘑菇质点po与每个邻域蘑菇质点pi之间做向量
Figure FDA0003678953740000012
其中,i∈[1,2,3,...,m],m为邻域蘑菇总数;选择其中任一条向量如选
Figure FDA0003678953740000013
作为基向量,剩余其他向量称为邻域向量,邻域向量与基向量依次做叉乘与点乘运算,具体公式如下:
Step B3: Calculate the neighborhood mushroom solution set, the sub-neighborhood mushroom solution set, and determine the optimal pushing direction of the mushroom; whether the target mushroom is surrounded by its neighborhood mushrooms is analogous to the relationship between points and polygons, and the improved cross-product discrimination method is used to determine Judging the relationship between points and polygons to determine whether the target mushroom is surrounded by its neighbor mushrooms; assuming that the number of neighbor mushrooms is m, make a vector between the target mushroom particle p o and each neighbor mushroom particle p i
Figure FDA0003678953740000012
Among them, i∈[1, 2, 3, ..., m], m is the total number of mushrooms in the neighborhood; choose any one of the vectors if you choose
Figure FDA0003678953740000013
As a basis vector, the remaining other vectors are called neighborhood vectors, and the neighborhood vectors and basis vectors perform cross product and dot product operations in turn. The specific formula is as follows:
Figure FDA0003678953740000021
Figure FDA0003678953740000021
Figure FDA0003678953740000022
Figure FDA0003678953740000022
其中f为方向系数,θ2,i为带有方向的向量夹角;Where f is the direction coefficient, θ 2, i is the vector angle with direction; 所有邻域向量与基向量依次进行叉乘、点乘运算后得到的结果进行升序排列,选择出结果中的最大值θmax与最小值θmin;判断点与多边形关系的具体公式如下:The results obtained after all the neighborhood vectors and the basis vectors are cross-multiplied and dot-multiplied in turn are arranged in ascending order, and the maximum value θ max and the minimum value θ min in the results are selected; the specific formula for judging the relationship between the point and the polygon is as follows:
Figure FDA0003678953740000023
Figure FDA0003678953740000023
当点在多边形上和外时,均视为目标蘑菇未被其邻域蘑菇包围;记录下邻域蘑菇解集A,具体表达形式如下:When the point is on and outside the polygon, it is considered that the target mushroom is not surrounded by its neighbor mushrooms; the neighborhood mushroom solution set A is recorded, and the specific expression is as follows: A=360°-(|θmax|+|θmin|)A=360°-(|θ max |+|θ min |) 利用内公切线定理计算目标蘑菇与某一个次邻域蘑菇之间的内公切角的计算公式如下:Using the inner common tangent theorem to calculate the inner common tangent angle between the target mushroom and a certain sub-neighborhood mushroom is as follows:
Figure FDA0003678953740000024
Figure FDA0003678953740000024
其中n为次邻域蘑菇个数,αoi为目标蘑菇与次邻域蘑菇所成内公切线夹角,aoi为目标蘑菇与次邻域蘑菇中心距,ro,ri分别为目标蘑菇菇帽半径和次邻域蘑菇菇帽半径;where n is the number of mushrooms in the sub-neighborhood, α oi is the inner common tangent angle formed by the target mushroom and the sub-neighborhood mushroom, a oi is the center distance between the target mushroom and the sub-neighborhood mushroom, r o , ri are the target mushroom, respectively Mushroom cap radius and sub-neighborhood mushroom cap radius; 该内公切角在0-360°范围内的补角βoi称为次邻域蘑菇个体解集;补角βoi计算公式如下:The supplementary angle β oi of the internal common tangent angle within the range of 0-360° is called the sub-neighborhood mushroom individual solution set; the calculation formula of the supplementary angle β oi is as follows: βoi=360°-αoi,i∈[1,...,n]β oi =360°-α oi , i∈[1,...,n] 被摘的目标蘑菇周围邻域蘑菇、次邻域蘑菇的存在情况主要分为三种情况:The existence of the neighborhood mushrooms and the sub-neighborhood mushrooms around the picked target mushroom is mainly divided into three situations: 1)目标蘑菇周围不存在邻域蘑菇、次邻域蘑菇;1) There are no neighborhood mushrooms and sub-neighborhood mushrooms around the target mushroom; 2)目标蘑菇周围既存在邻域蘑菇也存在次邻域蘑菇;2) There are both neighborhood mushrooms and sub-neighborhood mushrooms around the target mushroom; 3)目标蘑菇周围只存在邻域蘑菇、次邻域蘑菇中的一种;3) There is only one of the neighborhood mushrooms and the sub-neighborhood mushrooms around the target mushroom; 对于第一种情况,为了避免无效的计算,默认这种情况的目标蘑菇的采摘推动方向为180°;对于第二种情况,应使邻域蘑菇解集A依次与次邻域蘑菇个体解集βoi进行取交集操作,如若出现交集为空集
Figure FDA0003678953740000025
的情况,则视为目标蘑菇往复推动采摘失败,退出可摘算法判断;若所有取交集操作完成后交集不为空集,则保留该交集并将该交集用于确定可行推动方向;对于第三种情况,当目标蘑菇周围仅存在邻域蘑菇时,将目标蘑菇与邻域蘑菇关系判断中获得的邻域蘑菇解集用于确定可行推动方向;当目标蘑菇周围仅存在次邻域蘑菇时,所有次邻域蘑菇个体解集βoi的交集便为该目标蘑菇被所有次邻域蘑菇干涉后的最终可行推动方向解集称为次邻域蘑菇解集B,具体表达形式如下:
For the first case, in order to avoid invalid calculation, the default pushing direction of the target mushroom picking in this case is 180°; for the second case, the solution set A of the neighborhood mushrooms should be solved in turn with the individual solution set of the sub-neighborhood mushrooms β oi performs the intersection operation, if the intersection appears to be an empty set
Figure FDA0003678953740000025
In the case of , it is considered that the target mushroom has failed to reciprocately push the picking, and the judgment of the picking algorithm is exited; if the intersection is not an empty set after all the intersection operations are completed, the intersection is retained and used to determine the feasible pushing direction; for the third In this case, when there are only neighboring mushrooms around the target mushroom, the neighborhood mushroom solution set obtained in the judgment of the relationship between the target mushroom and the neighboring mushrooms is used to determine the feasible pushing direction; when there are only sub-neighborhood mushrooms around the target mushroom, The intersection of all sub-neighborhood mushroom individual solution sets β oi is the final feasible pushing direction solution set after the target mushroom is interfered by all sub-neighborhood mushrooms, which is called sub-neighborhood mushroom solution set B, and the specific expression is as follows:
Figure FDA0003678953740000031
Figure FDA0003678953740000031
当次邻域蘑菇解集B为空集时,目标蘑菇不进行往复推动采摘,视为采摘失败,当次邻域蘑菇解集B不为空集时,目标蘑菇进行往复推动采摘,视为采摘成功;When the sub-neighborhood mushroom solution set B is an empty set, the target mushroom does not reciprocately promote the picking, which is regarded as a failure to pick. success; 从获得的可行推动方向解集中选择角度范围最大的解集作为最优推动方向的求解集;最优推动方向求解公式:Select the solution set with the largest angle range from the obtained feasible pushing direction solution set as the optimal pushing direction solution set; the optimal pushing direction solution formula:
Figure FDA0003678953740000032
Figure FDA0003678953740000032
其中θdown、θup分别为求解集的下界和上界。where θ down and θ up are the lower and upper bounds of the solution set, respectively.
4.根据权利要求1所述一种蘑菇往复推动无损采摘方式及其路径规划方法,其特征在于,尤其对于蘑菇聚集生长这一实际情况,为实现其中成熟蘑菇的无损采摘,结合步骤B,步骤C具体包括以下步骤:4. a kind of mushroom reciprocating non-destructive picking method and path planning method thereof according to claim 1, is characterized in that, especially for the actual situation of mushroom gathering growth, in order to realize the non-destructive picking of mature mushrooms, in conjunction with step B, step C specifically includes the following steps: 步骤C1:构建蘑菇往复推动采摘路径的多目标优化模型:Step C1: Construct a multi-objective optimization model of mushrooms reciprocatingly push the picking path: 步骤C2:在步骤C1的模型构建完成后,使用改进的NSGA-II算法求解该模型,得到Pareto非支配集;Step C2: After the model construction of Step C1 is completed, use the improved NSGA-II algorithm to solve the model to obtain the Pareto non-dominated set; 步骤C3:根据步骤C2得到的结果,对得到的Pareto非支配集进行基于用于权值的排序。Step C3: According to the result obtained in Step C2, the obtained Pareto non-dominated set is sorted based on the weights. 5.根据权利要求4所述一种蘑菇往复推动无损采摘方式及其路径规划方法,其特征在于,所述步骤C1具体包括以下步骤:5. A kind of mushroom reciprocating non-destructive picking method and path planning method thereof according to claim 4, is characterized in that, described step C1 specifically comprises the following steps: 步骤C1.1:构建蘑菇往复推动采摘失败率函数,计算采摘序列的采摘失败率;Step C1.1: Construct the mushroom reciprocatingly push the picking failure rate function, and calculate the picking failure rate of the picking sequence; 利用步骤B搜索出一条完整采摘序列中采摘失败蘑菇的总数并进行记录;计算蘑菇采摘序列的采摘失败率,其确定形式如下:Use step B to search and record the total number of failed mushrooms in a complete picking sequence; calculate the picking failure rate of the mushroom picking sequence, and its determination form is as follows:
Figure FDA0003678953740000033
Figure FDA0003678953740000033
其中nfailure代表该采摘路径下往复推动采摘失败的成熟蘑菇总数,nsum为成熟蘑菇总数;Among them, n failure represents the total number of mature mushrooms that fail to reciprocate in the picking path, and n sum is the total number of mature mushrooms; 步骤C1.2:构建蘑菇路径长度计算函数,计算采摘序列的路径长度;路径长度计算函数具体形式如下:Step C1.2: Build a mushroom path length calculation function to calculate the path length of the picking sequence; the specific form of the path length calculation function is as follows:
Figure FDA0003678953740000034
Figure FDA0003678953740000034
其中n为成熟蘑菇总数,x、y分别为蘑菇的横坐标、纵坐标;Among them, n is the total number of mature mushrooms, and x and y are the horizontal and vertical coordinates of the mushrooms, respectively; 步骤C1.3:根据建立的蘑菇往复推动采摘失败率函数,路径长度函数建立多目标优化模型;所述多目标优化模型的优化目标为:Step C1.3: establish a multi-objective optimization model according to the established mushroom reciprocating push-picking failure rate function and the path length function; the optimization objectives of the multi-objective optimization model are:
Figure FDA0003678953740000041
Figure FDA0003678953740000041
多目标优化模型设置了两个优化目标,第一个目标是最小化采摘失败率,第二个目标是最小化采摘路径长度。The multi-objective optimization model sets two optimization objectives, the first objective is to minimize the picking failure rate, and the second objective is to minimize the picking path length.
6.根据权利要求4所述一种蘑菇往复推动无损采摘方式及其路径规划方法,其特征在于,所述步骤C2中,基于NSGA-II法对多目标优化模型求解过程具体包括以下步骤:6. a kind of mushroom reciprocatingly pushes the non-destructive picking method and path planning method thereof according to claim 4, it is characterized in that, in described step C2, specifically comprises the following steps to multi-objective optimization model solving process based on NSGA-II method: 步骤C2.1:种群个体染色体编码;Step C2.1: Chromosome coding of population individuals; 步骤C2.2:初始化种群并计算种群中个体的Pfailure、distsum函数值;Step C2.2: Initialize the population and calculate the P failure and dist sum function values of individuals in the population; 步骤C2.3:初始种群中注入单目标采摘路径长度的极值;Step C2.3: Inject the extreme value of the single-target picking path length into the initial population; 步骤C2.4:精英策略选出父代种群;Step C2.4: The elite strategy selects the parent population; 步骤C2.5:选择、交叉、变异操作;Step C2.5: selection, crossover and mutation operations; 步骤C2.6:父子代种群合并及去重操作;Step C2.6: merge and deduplicate the parent-child population; 步骤C2.7:采用加入循环拥挤排序算法的精英策略选出子代种群;Step C2.7: Select the offspring population by the elite strategy of adding the cyclic crowding sorting algorithm; 步骤C2.8:重复所述步骤C2.5~C2.7至目标遗传代数后跳出当前循环;Step C2.8: repeating the steps C2.5 to C2.7 to the target genetic algebra and then jumping out of the current loop; 步骤C2.9:根据权重系数,从非支配解集中选择出最优解并输出。Step C2.9: According to the weight coefficient, select the optimal solution from the non-dominated solution set and output it. 7.根据权利要求6所述一种蘑菇往复推动无损采摘方式及其路径规划方法,其特征在于,所述步骤C2.7中,循环拥挤排序算法主要步骤如下:7. a kind of mushroom reciprocating promoting non-destructive picking method and path planning method thereof according to claim 6, is characterized in that, in described step C2.7, the main steps of cyclic crowding sorting algorithm are as follows: 步骤C2.7.1:将非支配层级中两个边界个体1d、nd的拥挤度设为inf,按拥挤度从高到低对非支配层级中的个体进排序,删除拥挤度最小的个体;Step C2.7.1: Set the crowding degree of the two boundary individuals 1 d and n d in the non-dominated hierarchy as inf, sort the individuals in the non-dominated hierarchy according to the crowding degree from high to low, and delete the individual with the smallest crowding degree; 步骤C2.7.2:重新计算该层级中剩余个体的拥挤度,再次将其中拥挤度最小的个体删除;Step C2.7.2: Recalculate the crowding degree of the remaining individuals in the hierarchy, and delete the individual with the smallest crowding degree again; 步骤C2.7.3:依次迭代,直到筛选至剩余指定数量的解为止。Step C2.7.3: Iterate sequentially until the specified number of solutions remain.
CN202210630037.7A 2022-06-06 2022-06-06 Mushroom reciprocating pushing nondestructive picking mode and path planning method thereof Pending CN115034466A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210630037.7A CN115034466A (en) 2022-06-06 2022-06-06 Mushroom reciprocating pushing nondestructive picking mode and path planning method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210630037.7A CN115034466A (en) 2022-06-06 2022-06-06 Mushroom reciprocating pushing nondestructive picking mode and path planning method thereof

Publications (1)

Publication Number Publication Date
CN115034466A true CN115034466A (en) 2022-09-09

Family

ID=83123869

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210630037.7A Pending CN115034466A (en) 2022-06-06 2022-06-06 Mushroom reciprocating pushing nondestructive picking mode and path planning method thereof

Country Status (1)

Country Link
CN (1) CN115034466A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115486329A (en) * 2022-10-24 2022-12-20 江西华香食品有限公司 Frame is planted to fungus mushroom convenient to gather
CN119540731A (en) * 2025-01-17 2025-02-28 上海恒泽辅汇智能科技有限公司 Edible mushroom bud detection and collection system, method, medium and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115486329A (en) * 2022-10-24 2022-12-20 江西华香食品有限公司 Frame is planted to fungus mushroom convenient to gather
CN119540731A (en) * 2025-01-17 2025-02-28 上海恒泽辅汇智能科技有限公司 Edible mushroom bud detection and collection system, method, medium and device

Similar Documents

Publication Publication Date Title
CN115034466A (en) Mushroom reciprocating pushing nondestructive picking mode and path planning method thereof
CN108919641B (en) Unmanned aerial vehicle flight path planning method based on improved goblet sea squirt algorithm
CN109164810A (en) It is a kind of based on the adaptive dynamic path planning method of ant colony-clustering algorithm robot
CN111065103A (en) Multi-objective optimization wireless sensor network node deployment method
CN112462803B (en) Unmanned aerial vehicle path planning method based on improved NSGA-II
CN109945881A (en) A mobile robot path planning method based on ant colony algorithm
CN111780759B (en) A mobile robot path planning method based on improved genetic algorithm
CN108803332A (en) Based on the paths planning method for improving biogeography
CN109829549A (en) Hash learning method and its unsupervised online Hash learning method based on the tree that develops
CN114640594A (en) Internet of things topology optimization method with hierarchical cooperation mechanism
CN116540552A (en) Control parameter optimization method for EMS (electromagnetic mode) magnetic levitation train
CN103249179A (en) Multi-objective mother foraging algorithm based optimization method for relay node deployment in wireless sensor network
CN113917925A (en) Mobile robot path planning method based on improved genetic algorithm
CN112287480B (en) A Method of Mechanical Structure Topology Optimization Based on Multi-Population Genetic Algorithm
CN110288074A (en) An Improved Search Algorithm Based on Surrounding Mechanism
CN114911233A (en) Football robot path planning method based on multi-optimization rapid expansion random tree
CN117764290A (en) BIM model data management method for hydraulic engineering construction
CN116737336A (en) Multi-unmanned ship task allocation method and system based on clustering genetic algorithm
Nabizadeh et al. A multi-swarm cellular PSO based on clonal selection algorithm in dynamic environments
CN116341860A (en) Vehicle dispatching optimization method based on improved NSGA-II algorithm
CN118674902A (en) Simplified fidelity evaluation and optimization method for digital twin geometric model of manufacturing equipment
CN117313973A (en) Container terminal outlet box position distribution method based on hybrid genetic algorithm
CN114240091A (en) Flexible job shop scheduling method based on self-adaptive layering strategy
CN108416474A (en) The refined Hook Jeeves algorighm being layered based on virtual fitness and Pareto disaggregation
CN118780575A (en) A reservoir group optimization scheduling method and system based on improved whale algorithm

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