[go: up one dir, main page]

CN119378931B - Method and device for realizing intelligent cable distribution based on genetic algorithm and priority queue - Google Patents

Method and device for realizing intelligent cable distribution based on genetic algorithm and priority queue Download PDF

Info

Publication number
CN119378931B
CN119378931B CN202411935060.2A CN202411935060A CN119378931B CN 119378931 B CN119378931 B CN 119378931B CN 202411935060 A CN202411935060 A CN 202411935060A CN 119378931 B CN119378931 B CN 119378931B
Authority
CN
China
Prior art keywords
current
cable
priority queue
population
preset
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.)
Active
Application number
CN202411935060.2A
Other languages
Chinese (zh)
Other versions
CN119378931A (en
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.)
Wuchan Zhongda Yuantong Industrial Corp
Original Assignee
Wuchan Zhongda Yuantong Industrial Corp
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 Wuchan Zhongda Yuantong Industrial Corp filed Critical Wuchan Zhongda Yuantong Industrial Corp
Priority to CN202411935060.2A priority Critical patent/CN119378931B/en
Publication of CN119378931A publication Critical patent/CN119378931A/en
Application granted granted Critical
Publication of CN119378931B publication Critical patent/CN119378931B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06316Sequencing of tasks or work
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06315Needs-based resource requirements planning or analysis
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/06Energy or water supply
    • 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
    • Y04INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
    • Y04SSYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
    • Y04S10/00Systems supporting electrical power generation, transmission or distribution
    • Y04S10/50Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications

Landscapes

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

Abstract

本发明公开了基于遗传算法和优先队列的电缆智能配货实现方法及装置,方法是先确定当前订单信息中包括电缆分段需求信息,基于其与电缆库存数据确定搜索空间参数;若确定搜索空间参数超出预设搜索空间参数阈值,则基于电缆分段需求信息生成当前初始种群,并结合价值评估策略及电缆库存数据确定当前优先队列;基于遗传算法模型对当前初始种群进行预设目标轮数的迭代得到当前目标种群并获取对应的当前目标优先队列;基于当前目标优先队列生成与当前订单信息对应的当前电缆配货信息。本发明实施例通过结合遗传算法和优先队列的方式确定及推荐最优配货方案,并使用优先队列维护最优配货方案集合,可以有效提高电缆配货方案的输出效率。

The present invention discloses a method and device for realizing intelligent cable distribution based on genetic algorithm and priority queue, wherein the method is to first determine that the current order information includes cable segmentation demand information, and determine the search space parameter based on the cable segmentation demand information and the cable inventory data; if it is determined that the search space parameter exceeds the preset search space parameter threshold, then generate the current initial population based on the cable segmentation demand information, and determine the current priority queue in combination with the value assessment strategy and the cable inventory data; iterate the current initial population for a preset target number of rounds based on the genetic algorithm model to obtain the current target population and obtain the corresponding current target priority queue; generate the current cable distribution information corresponding to the current order information based on the current target priority queue. The embodiment of the present invention determines and recommends the optimal distribution plan by combining the genetic algorithm and the priority queue, and uses the priority queue to maintain the optimal distribution plan set, which can effectively improve the output efficiency of the cable distribution plan.

Description

Intelligent cable distribution realization method and device based on genetic algorithm and priority queue
Technical Field
The invention relates to the technical field of genetic algorithms of artificial intelligence, in particular to a method and a device for realizing intelligent cable distribution based on a genetic algorithm and a priority queue.
Background
The rapid development of information technology brings new development opportunities to the traditional manufacturing industry. In recent years, digitization and intelligent transformation in the cable industry have been attracting attention. For example, in the current research of cables, designers are provided with (1) a cable collision detection method based on a distance field and a sweeping and pruning algorithm, (2) a cable path planning method based on an improved ant colony algorithm, (3) practical application of a particle swarm algorithm in common problems of curve fitting, equation solving, optimization and the like in the cable industry, (4) on the problems of low manual detection efficiency and high omission rate of cable surface defects, on-line high-speed detection based on machine vision is provided, (5) a discrete Jaya algorithm is provided for the cable production scheduling optimization problem, maximum working time minimization is achieved based on a single-column coding mode and a left-shift coding strategy, and (6) a comprehensive solution for intelligent cable arrangement detection based on machine vision is provided.
However, the existing research is mainly focused on links such as cable design, production, detection and the like, and the research on cable distribution automation is still in a starting stage. At present, the traditional manual distribution mode is still commonly adopted in the industry, and is limited by the data retrieval and processing capacity of operators, so that distribution becomes one of key bottleneck links of cable sales and inventory optimization management, cable enterprises have stronger actual demands on improving distribution efficiency and optimizing distribution schemes, and the intelligent distribution system is developed.
Disclosure of Invention
The embodiment of the invention provides a method and a device for realizing intelligent cable distribution based on a genetic algorithm and a priority queue, and aims to solve the problems that in the prior art, a traditional manual distribution mode is still commonly adopted for cable distribution, so that the automation degree of acquiring cable distribution information based on order information is low and the efficiency is low.
In a first aspect, an embodiment of the present invention provides a method for implementing intelligent cable allocation based on a genetic algorithm and a priority queue, including:
Responding to an intelligent cable allocation instruction, and acquiring current order information corresponding to the intelligent cable allocation instruction;
If the cable segment demand information in the current order information is not null, determining search space parameters based on the cable segment demand information and the acquired cable inventory data;
If the search space parameter is determined to exceed a preset search space parameter threshold, generating a current initial population corresponding to the current order information based on cable segment demand information and a preset initial population generation strategy included in the current order information;
Determining a current priority queue corresponding to the current initial population based on a preset value evaluation strategy and the cable inventory data;
Performing iteration of a preset target round number on the current initial population based on a preset genetic algorithm model to obtain a current target population, determining a current priority queue corresponding to the current target population based on the value evaluation strategy and the cable inventory data in each iteration, and obtaining preferred population individuals in all population individuals for all iterative rounds after each iteration is finished, until the iteration of the preset target round number is finished, and obtaining the current priority queue as a current target priority queue, wherein the total number of the population individuals in the current priority queue is the total number of preset queue elements;
and generating current cable allocation information corresponding to the current order information based on the current target priority queue.
In a second aspect, an embodiment of the present invention further provides a device for implementing intelligent cable shipment based on a genetic algorithm and a priority queue, including:
the system comprises a current order information acquisition unit, a control unit and a control unit, wherein the current order information acquisition unit is used for responding to a cable intelligent goods allocation instruction and acquiring current order information corresponding to the cable intelligent goods allocation instruction;
The search space parameter acquisition unit is used for determining search space parameters based on the cable segment demand information and the acquired cable inventory data if the cable segment demand information in the current order information is determined to be not null;
The current initial population generation unit is used for generating a current initial population corresponding to the current order information based on the cable segment demand information and a preset initial population generation strategy included in the current order information if the search space parameter exceeds a preset search space parameter threshold;
A current priority queue obtaining unit, configured to determine a current priority queue corresponding to the current initial population based on a preset value evaluation policy and the cable inventory data;
The genetic iteration unit is used for carrying out iteration of a preset target round number on the current initial population to obtain a current target population, determining a current priority queue corresponding to the current target population based on the value evaluation strategy and the cable inventory data in each iteration, and obtaining preferred population individuals in all population individuals for all current iterated rounds after each iteration is finished, until the iteration of the preset target round number is finished, stopping iteration, and obtaining the current priority queue as a current target priority queue, wherein the total number of the population individuals in the current priority queue is the total number of preset queue elements;
And the current cable allocation information generating unit is used for generating current cable allocation information corresponding to the current order information based on the current target priority queue.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the method described in the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium storing a computer program comprising program instructions which, when executed by a processor, implement the method of the first aspect.
The embodiment of the invention provides a cable intelligent cargo allocation implementation method and device based on a genetic algorithm and a priority queue, the method comprises the steps of responding to a cable intelligent cargo allocation instruction, obtaining current order information corresponding to the cable intelligent cargo allocation instruction, determining search space parameters based on cable segmentation demand information and obtained cable inventory data if the current order information comprises the cable segmentation demand information, generating a current initial population corresponding to the current order information based on the cable segmentation demand information and a preset initial population generation strategy if the search space parameters are determined to exceed a preset search space parameter threshold value, determining a current priority queue corresponding to the current initial population based on the preset value evaluation strategy and the cable inventory data, performing iteration of a preset target round number on the current initial population based on a preset genetic algorithm model to obtain a current target population, determining a current priority queue corresponding to the current target population based on the value evaluation strategy and the cable inventory data in each iteration, obtaining preferred population individuals in all individuals based on the current iteration round until the preset target round is completed, and obtaining the current iteration number corresponding to the current priority queue based on the current priority queue after the current iteration is completed, and generating the current priority queue corresponding to the current target cargo allocation information. The embodiment of the invention determines and recommends the optimal distribution scheme by combining the genetic algorithm and the priority queue, and maintains the optimal distribution scheme set by using the priority queue, so that the output efficiency of the cable distribution scheme can be effectively improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of an application scenario of a method for implementing intelligent cable distribution based on a genetic algorithm and a priority queue according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method for implementing intelligent distribution of cables based on genetic algorithm and priority queue according to an embodiment of the present invention;
FIG. 3 is a schematic sub-flowchart of a method for implementing intelligent distribution of cables based on genetic algorithm and priority queue according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of another sub-flow of the implementation method of intelligent cable shipment based on genetic algorithm and priority queue according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of another sub-flow of the implementation method of intelligent distribution of cables based on genetic algorithm and priority queue according to the embodiment of the present invention;
FIG. 6 is a schematic diagram of another sub-flow of the implementation method of intelligent cable distribution based on genetic algorithm and priority queue according to the embodiment of the present invention;
FIG. 7 is a schematic block diagram of a device for realizing intelligent distribution of cables based on genetic algorithm and priority queue according to an embodiment of the present invention;
fig. 8 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Referring to fig. 1 and fig. 2 simultaneously, fig. 1 is a schematic view of a scenario of a method for implementing intelligent cable allocation based on a genetic algorithm and a priority queue according to an embodiment of the present invention, and fig. 2 is a schematic flow chart of a method for implementing intelligent cable allocation based on a genetic algorithm and a priority queue according to an embodiment of the present invention. As shown in fig. 1, the method for implementing intelligent cable allocation based on genetic algorithm and priority queue according to the embodiment of the present invention is applied to a server 10, where the server 10 is communicatively connected with a user terminal 20.
As shown in fig. 2, the method includes the following steps S110 to S160.
S110, responding to the intelligent cable distribution instruction, and acquiring current order information corresponding to the intelligent cable distribution instruction.
In this embodiment, the technical scheme is described by using a server as an execution body. A user with the cable intelligent goods allocation requirement can establish communication connection with the server by using the user terminal, and after logging in the cable intelligent goods allocation realization system in the server, the user terminal can trigger to generate a cable intelligent goods allocation instruction and send the cable intelligent goods allocation instruction to the server, and simultaneously send current order information corresponding to the cable intelligent goods allocation instruction.
The current order information at least comprises information such as the specification model number, the required length, the segmentation requirement and the like of the required cable, and the current order information is noted that the segmentation requirement is the information such as the specific segmentation segment number, the segmentation length of each segmentation and the like if the segmentation requirement is specific, and the segmentation requirement is null if the segmentation requirement is not specific. When the server receives the current order information, the intelligent cable distribution processing process can be performed based on the intelligent cable distribution realizing system in the server, and a final cable distribution processing result is obtained.
And S120, if the cable segment demand information in the current order information is determined to be not null, determining search space parameters based on the cable segment demand information and the acquired cable inventory data.
In this embodiment, if it is determined that the cable segment demand information in the current order information is not null, it indicates that the current order has a segment demand, and then the search space parameter corresponding to the cable segment demand information may be determined by combining the cable inventory data acquired and stored in the server. The cable inventory data comprises a plurality of pieces of cable inventory sub-data, and each piece of cable inventory sub-data at least comprises information such as specification model numbers, cable lengths, manufacturing dates, warehouses and the like of cables.
In one embodiment, as shown in fig. 3, determining the search space parameter based on the cable segment requirement information and the acquired cable inventory data in step S120 includes:
S121, sorting all cable inventory sub-data in the cable inventory data according to the ascending order of the cable length to obtain sorted cable inventory data;
S122, acquiring the ith segmentation requirement sub-information in the cable segmentation requirement information, wherein the initial value of i is 1;
s123, determining an ith candidate cable inventory sub-data set corresponding to the ith segmentation requirement sub-information according to the sequenced cable inventory data, determining an ith segmentation requirement index range corresponding to the ith candidate cable inventory sub-data set, and correspondingly determining the available inventory quantity of the ith segmentation based on the ith segmentation requirement index range;
S124, if it is determined that i does not exceed N and the obtained i-1 th search space parameter does not exceed a preset search space parameter threshold, multiplying the i-1 th search space parameter by the i-1 th available segment inventory quantity to obtain the i-th search space parameter, adding 1 to the i to update the value of i, and returning to execute the step of obtaining the i-th segment demand sub-information in the cable segment demand information, wherein N is the total number of the segment demand sub-information included in the cable segment demand information, the i-1 th search space parameter is a result obtained by continuously multiplying the 1-th available segment inventory quantity to the i-1 th available segment inventory quantity, and the 0 th search space parameter is equal to 1;
S125, if it is determined that i exceeds N and the obtained i-1 th search space parameter does not exceed the preset search space parameter threshold, obtaining the Nth search space parameter and taking the Nth search space parameter as the search space parameter;
s126, if it is determined that i does not exceed N and the obtained i-1 th search space parameter exceeds the preset search space parameter threshold, increasing i by 1 to update the value of i, and returning to execute the step of obtaining the i-th segment demand sub-information in the cable segment demand information;
s127, if it is determined that i exceeds N and the acquired historical search space parameter exceeds the preset search space parameter threshold, taking the historical search space parameter as the search space parameter, wherein the historical search space parameter is the search space parameter which exceeds the preset search space parameter threshold for the first time.
In this embodiment, when a segment requirement exists in a cable purchasing object corresponding to the current order information, a plurality of candidate cable inventory sub-data meeting the requirement of the specification model and having a cable length greater than or equal to the shortest required segment length can be rapidly determined in the cable inventory data by taking the specification model and the required length of the specification model cable as search conditions.
For example, the cable stock data includes cable stock sub-data for the cables with the same specification and model, for example, the lengths of the cables corresponding to 7 pieces of cable stock sub-data included in the cable stock data are 100, 5, 200, 3, 500,1000 and 1 (each unit is m), and the cables are sorted according to the ascending order of the lengths of the cables, so as to obtain sorted cable stock data of 1,3, 5,100,200,500 and 1000. Taking the 1 st segment demand sub-information to the 4 th segment demand sub-information in the cable segment demand information as an example, the obtained 1 st segment demand sub-information corresponds to 2m, the 1 st candidate cable inventory sub-data set determined by the sorted cable inventory data and the 1 st segment demand sub-information is {3,5,100,200,500,1000}, the 1 st segment demand index range is [1,6] (determined by taking the index value of 1 in the sorted cable inventory data as 0 as a standard), and the 1 st available inventory number is 6. Similarly, referring to the above procedure, the 2 nd candidate cable inventory sub-data set {100,200,500,1000}, the 2 nd segment demand index range [3,6] and the 2 nd available inventory number is 4, the 3 rd candidate cable inventory sub-data set {100,200,500,1000}, the 3 rd segment demand index range [3,6] and the 3 rd available inventory number is 4, the 4 th candidate cable inventory sub-data set {500,1000}, the 4 th segment demand index range [5,6] and the 4 th available inventory number is 2 are obtained when the 2 nd segment demand sub-information corresponds to 50 m. For example, after the 4 th available inventory count is 2, the 3 rd search space parameter is determined to be 6x4x4=96 based on the 1 st available inventory count to the 3 rd available inventory count and by continuous multiplication, where the 3 rd search space parameter 96 may be multiplied by the 4 th available inventory count 2 to obtain the 4 th search space parameter 192 after the 3 rd search space parameter 96 is determined not to exceed the preset search space parameter threshold. For another example, after the number of available inventory of the 4 th segment is 2, the 3 rd search space parameter is determined to be 6x4x4=96 based on the number of available inventory of the 1 st segment to the number of available inventory of the 3 rd segment and multiplied continuously, at this time, after the 3 rd search space parameter 96 is determined to exceed the preset search space parameter threshold value, no new search space parameter is obtained at this time, and the next segment requirement sub-information in the cable segment requirement information is directly obtained and the corresponding segment requirement index range and the segment available inventory number are determined. Of course, the above examples are only for explaining the process of acquiring the search space parameter, and the cable stock sub-data in the cable stock data and the segment requirement sub-information included in the cable segment requirement information are not limited to the data in the above examples. It can be seen that the overall search amount of the current order information in the cable inventory data can be quickly determined in the above manner, so as to determine whether to determine the final target population and the corresponding priority queue for the current order information by using the genetic algorithm model.
And S130, if the search space parameter exceeds a preset search space parameter threshold, generating a current initial population corresponding to the current order information based on the cable segment demand information and a preset initial population generation strategy included in the current order information.
In this embodiment, if it is determined that the search space parameter exceeds the preset search space parameter threshold, it indicates that the overall search amount of the current order information in the cable inventory data is larger, and if it is further based on the conventional evaluation method, the amount of data processing and the time complexity required by the system are larger. In order to improve the data processing efficiency, a genetic algorithm model can be used for determining a final target population and a corresponding priority queue for the current order information. Specifically, a corresponding current initial population is generated based on the cable segment demand information and a preset initial population generation strategy included in the current order information. For example, still referring to the above example, after determining the 1 st candidate cable inventory sub-data set to the nth candidate cable inventory sub-data set for the cable segment requirement information and correspondingly determining the 1 st segment requirement index range to the nth segment requirement index range, one index value may be respectively selected from the 1 st segment requirement index range to the nth segment requirement index range to form a population individual, and then multiple population individuals may be generated again according to the initial population generation strategy to form the current initial population. It can be seen that, based on the above manner, the current initial population can be quickly generated based on the cable segment demand information included in the current order information.
In one embodiment, as shown in fig. 4, step S130 includes:
s131, obtaining a population size value corresponding to the initial population generation strategy;
S132, generating the current initial population based on the initial population generation strategy and the 1 st to nth segment demand index ranges corresponding to the cable segment demand information, wherein the total number of population individuals included in the current initial population is the same as the population size value, and when generating a population individual based on the initial population generation strategy, randomly selecting one index value from the 1 st to nth segment demand index ranges respectively and forming the population individual.
In this embodiment, still referring to the above example, after determining the 1 st segment demand index range of [1,6], the 2 nd segment demand index range of [3,6], the 3 rd segment demand index range of [3,6], the 4 th segment demand index range of [5,6], randomly selecting the index value 1 from the 1 st segment demand index range, randomly selecting the index value 4 from the 2 nd segment demand index range, randomly selecting the index value 5 from the 3 rd segment demand index range, randomly selecting the index value 6 from the 4 th segment demand index range, the population individuals may be composed of the 4 index values and be [1, 4, 5,6]. And (3) referring to the mode of generating one population individual, generating (population size value-1) population individuals again to form the current initial population. Therefore, the current initial population can be quickly determined based on the initial population generation strategy and the cable segment demand information.
And S140, determining a current priority queue corresponding to the current initial population based on a preset value evaluation strategy and the cable inventory data.
In this embodiment, when a value evaluation policy preset in the cable intelligent distribution implementation system is combined, each time a value evaluation value corresponding to one population individual in the current initial population is determined, whether repeated judgment exists in the current priority queue or not and comparison of the value evaluation value with each population individual stored in the current priority queue are performed, and then whether the current priority queue is added to the current priority queue or not is determined to update the current priority queue. Because the total capacity (i.e. the total number of preset queue elements) of the population individuals contained in the current priority queue is preset, after the current priority queue is initialized and established, population individuals which are not repeated mutually are firstly obtained from the current initial population based on the capacity storage fullness corresponding to the total number of preset queue elements, if the total number of preset queue elements is 10, at least the first 10 population individuals are firstly obtained from the current initial population, after the situation that the distribution schemes corresponding to the existing population individuals in the current priority queue are different is judged in sequence, and the value evaluation value of each population individual is calculated, the corresponding population individual is directly added into the current priority queue, after the 10 population individuals are stored in the current priority queue, whether the population individuals to be judged are repeatedly judged and the various population individuals stored in the current priority queue are compared with the value evaluation value of the current priority queue, and whether the population individuals to be judged are added into the current priority queue is determined to update the current priority queue. When the new population individuals do not have repetition in the current priority queue and the corresponding value evaluation value is smaller than the value evaluation value of the population individuals in the current priority queue, the new population individuals are needed to replace the population individuals with the maximum value evaluation value in the current priority queue, so that the current priority queue is updated in time. The value evaluation strategy is used for determining a value evaluation value corresponding to each population of individuals in the current initial population. When judging whether two population individuals respectively correspond to the same allocation scheme, for example, one population individual corresponds to [1, 4, 5,6], the other population individual corresponds to [1, 5, 4,6], the 2 nd segment demand sub-information and the 3 rd segment demand sub-information both correspond to 50m, the 2 nd segment demand sub-information corresponds to index value 4 of the first population individual and the 2 nd segment demand sub-information corresponds to index value 5 of the second population individual, the 3 rd segment demand sub-information corresponds to index value 5 of the first population individual and the 3 rd segment demand sub-information corresponds to index value 4 of the second population individual, and the allocation schemes corresponding to the two population individuals can be regarded as the same allocation scheme.
In one embodiment, as shown in fig. 5, step S140 includes:
s141, creating a current priority queue based on the corresponding initialization of the total number of the preset queue elements, wherein the number of the population individuals stored in the current priority queue created by the initialization is 0, and the upper limit number of the storable population individuals in the current priority queue is the total number of the preset queue elements;
S142, obtaining individuals in a jth population in the current initial population, wherein the initial value of j is 1;
s143, inputting a candidate cargo allocation scheme corresponding to the jth population individual into a value evaluation value calculation model corresponding to the value evaluation strategy to obtain a value evaluation value corresponding to the jth population individual;
s144, if it is determined that j does not exceed the total number of the preset queue elements and population individuals which are the same as the corresponding allocation scheme of the j-th population individuals do not exist in the current priority queue, increasing the j-th population individuals to the corresponding queue positions of the current priority queue based on the corresponding value evaluation values so as to update the current priority queue;
s145, if it is determined that j does not exceed the total number of the preset queue elements, and population individuals with the same allocation scheme as the jth population individuals exist in the current priority queue, executing a step of automatically increasing j by 1 to update the value of j;
S146, if it is determined that j exceeds the total number of the preset queue elements, the population individuals which are the same as the assignment scheme corresponding to the jth population individuals do not exist in the current priority queue, and if it is determined that the value evaluation value corresponding to the population individuals exists in the current priority queue and is greater than the value evaluation value corresponding to the jth population individuals, the population individuals with the largest value evaluation value in the current priority queue are removed from the current priority queue, and the jth population individuals are added to the current priority queue to update the current priority queue;
S147, if it is determined that j exceeds the total number of the preset queue elements and population individuals with the same distribution scheme as the j-th population individuals exist in the current priority queue, executing a step of automatically increasing j by 1 to update the value of j;
S148, automatically increasing j by 1 to update the value of j;
S149, if j is determined not to exceed P, returning to execute the step of acquiring the j-th population individuals in the current initial population, wherein P is a population size value corresponding to the initial population generation strategy;
S1410, if it is determined that the exceeding j exceeds P, the current priority queue is obtained.
In this embodiment, still referring to the above example, as the 1 st population individual in the current initial population, the corresponding candidate cable inventory sub-data is determined from the sorted cable inventory data in combination with the 4 index values included in the population individual, for example, the index value 1 corresponds to the candidate cable inventory sub-data sorted by the 2 nd bit in the sorted cable inventory data, the index value 4 corresponds to the candidate cable inventory sub-data sorted by the 5 th bit in the sorted cable inventory data, the index value 5 corresponds to the candidate cable inventory sub-data sorted by the 6 th bit in the sorted cable inventory data, and the index value 6 corresponds to the candidate cable inventory sub-data sorted by the 7 th bit in the sorted cable inventory data. After determining each candidate cable inventory sub-data of the 4 candidate cable inventory sub-data, the information such as the specification model number, the cable length, the manufacturing date and the warehouse where the cable is located, which are specifically included in each candidate cable inventory sub-data, can be specifically obtained. At this time, the following formula corresponding to the value evaluation strategy is obtained:
(1)
Wherein, in formula (1), F Quantity of warehouse represents a warehouse dimensional value evaluation value corresponding to a current population individual to be evaluated in the current initial population (for example, in step S141, the j-th population individual in the current initial population has been obtained, F Quantity of warehouse represents a warehouse dimensional value evaluation value of the j-th population individual), and at this time, F Quantity of warehouse Quantity of warehouse may be determined by F Quantity of warehouse Quantity of warehouse x (number of warehouses-1) as a first preset weight coefficient with a value greater than 0, where the number of warehouses is the number of warehouses obtained by counting the warehouses corresponding to candidate cable inventory sub-data corresponding to each index value in the current population individual to be evaluated;
F Number of cables represents an evaluation value of the cable number dimension value corresponding to one population individual to be evaluated currently in the current initial population, and F Number of cables = α Number of cables is (cable number-1), α Number of cables is a second preset weight coefficient (which is greater than 0), the cable number is obtained by performing statistics after de-duplication of the total data number of candidate cable stock sub-data corresponding to each index value in the population individual to be evaluated currently, where if the 4 index values in the population individuals [1, 4, 5,6] are all different, the cable number=4, and if the cable number=3 is another population individual [1, 4,6 ].
F Date of manufacture represents a manufacturing date dimension value evaluation value corresponding to a current population individual to be evaluated in a current initial population, F Date of manufacture = -α Date of manufacture represents an average age of the libraries, alpha Date of manufacture is a third preset weight coefficient (which is larger than 0), the average age of the libraries is obtained by firstly obtaining candidate cable inventory sub-data corresponding to each index value in the current population individual to be evaluated after de-duplication (for example, at least two index values in the current population individual to be evaluated are the same, the same inventory cable is represented, at this time, de-duplication processing is only carried out by keeping candidate cable inventory sub-data corresponding to one index value), then average age of the candidate cable inventory sub-data in the candidate cable inventory sub-data set is calculated, for example, the candidate cable inventory sub-data corresponding to one index value in the current population individual to be evaluated is known, and the corresponding manufacturing date is also known, then one library age corresponding to the index value can be obtained by subtracting the manufacturing date from the current system date, the average age of the libraries can be obtained by referring to the average age of the population corresponding to each index value in the population individual;
F Length of represents a cable length dimension value evaluation value corresponding to a population individual to be evaluated currently in a current initial population, F Length of i= α Length of i* g(Li),F Length of =F Length of 1+F Length of 2+……+ F Length of N, represents that the value range of i is 1 to N (N represents the total number of index values included in a population individual), when determining a Length of i, firstly judging whether the index values in the population individual correspond to the same stock cable (namely, whether a plurality of index values in the population individual to be evaluated currently are equal to the same index value) or not, if the index values are equal to the same index value, combining the stock cables corresponding to the same index values to obtain a combined stock cable (F Length of i corresponding to the same index values is combined to be calculated), summing the required cable lengths corresponding to the same index values respectively, subtracting the cable lengths in candidate cable stock sub-data corresponding to the same index values to obtain a current length difference value, setting a Length of i corresponding to the combined stock cable to be a great positive value when judging that the current length difference is greater than 0, setting a Length of i corresponding to the combined stock cable to be a great positive value when judging that the current length difference is smaller than 0, and setting a preset length difference value to be equal to a great value to a preset value of a value of the rest value and setting a value to be equal to zero; when it is determined that the current length difference is less than 0 and the absolute value of the current length difference does not belong to the preset remaining cable zero line length interval, a Length of i is set to a small positive value), when the current length difference value is equal to 0, setting alpha Length of i corresponding to the combined stock cable as a preset weight coefficient with a negative value, wherein g (Li) =1; for the situation that each index value of the population individuals corresponds to different inventory cables, the acquisition process of alpha Length of i corresponding to each index value is similar to the process, and the duplicate removal process is omitted, when the length difference value is not 0, g (Li) is obtained by subtracting the length of a cable required corresponding to the ith index value in the current population individuals to be evaluated from the length of the cable in the candidate cable inventory sub-data corresponding to the ith index value all the time;
Fitness represents a value evaluation value corresponding to a current population individual to be evaluated in the current initial population, and after determining a value evaluation value corresponding to the population individual, such as a value evaluation value corresponding to a jth population individual, based on the above formula (1), it is determined whether a repeated judgment exists in the current priority queue and whether the value evaluation value is compared with the population individual currently having the largest value evaluation value in the current priority queue, and then whether the value evaluation value is added to the current priority queue to update the current priority queue. Therefore, in each iteration process, as long as new population individuals do not have repetition in the current priority queue and the corresponding value evaluation value is smaller than the corresponding value evaluation value of the population individuals with the maximum value evaluation value in the current priority queue, the corresponding population individuals in the current priority queue need to be replaced by the new population individuals, so that the current priority queue is updated in time. The method comprises the steps of evaluating each population individual from four sub-dimensions of a warehouse dimension, a cable quantity dimension, a manufacturing date dimension and a cable length dimension, and then calculating by combining a formula (1) to obtain a value evaluation value of each population individual. The smaller the value evaluation value of the population individuals is, the better the cable allocation scheme corresponding to the population individuals is, in particular, the smaller the value evaluation value of the warehouse dimension in the value evaluation value of the population individuals is, the more convenient the allocation scheduling is, the smaller the value evaluation value of the cable number dimension is, the same stock cable is used as preferentially as possible in the cable allocation scheme to facilitate the picking, the smaller the value evaluation value of the manufacturing date dimension is, the longer stock cable is used preferentially in the cable allocation scheme, the stock backlog of long stock is avoided, the smaller the value evaluation value of the cable length dimension is, the short stock is used preferentially in the cable allocation scheme to avoid the long order backlog, and meanwhile, the zero line is required to be avoided as much as possible.
In addition, in the present application, a data structure in the form of a priority queue is used to store population individuals meeting the conditions (one population individual corresponds to one cable distribution scheme), and the time complexity of the insertion and deletion operations is O (logKK 1), where KK1 is the number of elements in the queue. The time complexity of using the priority queue is O (MM 1logKK 2) and the time complexity of direct ordering is O (MM 1log MM 1) when looking for the largest or smallest KK2 elements in the list of length MM1 (e.g., MM1 equals nttotal in the above example), and the efficiency of adopting the data structure in the form of the priority queue is higher when KK2 is much smaller than MM 1. Wherein, KK1, KK2 and MM1 are all positive integers.
S150, carrying out iteration of a preset target round number on the current initial population based on a preset genetic algorithm model to obtain a current target population, determining a current priority queue corresponding to the current target population based on the value evaluation strategy and the cable inventory data in each iteration, obtaining preferred population individuals in all population individuals for all current iterated rounds after each iteration is finished, stopping iteration until the iteration of the preset target round number is finished, and obtaining the current priority queue as a current target priority queue.
The total number of the population individuals included in the current priority queue is the total number of the preset queue elements.
In this embodiment, after step S140 or steps S141-S1410 corresponding to the specific embodiment thereof are performed, it is considered that a current priority queue corresponding to the current initial population is determined in the first round of the whole iteration process (where the maximum total number of population individuals stored is the total number of the preset queue elements, the current priority queue has an initialized condition only in the first round of process, in the subsequent iteration process, the population individuals in the current priority queue are continuously updated based on a deduplication principle and a value evaluation value comparison principle), it cannot be directly used for determining current cable cargo allocation information, and further, it is required to iterate the current initial population by combining with a genetic algorithm model to obtain a current target population, and in the process of each round of iteration, population individuals included in the current priority queue are continuously updated based on a new round of current target population, and the update principle is that in the current priority queue, there is no individual with the same population as the new population individual, and it is determined that the current priority value evaluation value corresponding to the population individual is greater than the new population, and then the current individuals in the current priority queue are preferentially added to the current priority queue, and the current target population is not preferentially added to the current priority queue in the current iteration process.
In one embodiment, as shown in fig. 6, step S150 includes:
s151, acquiring a genetic operator of the genetic algorithm model and a K-1 current target population, and carrying out corresponding selection, crossing and mutation treatment on the K-1 current target population according to the genetic operator of the genetic algorithm model to obtain a K current target population, wherein the initial value of K is 1, and the 0 current target population is the current initial population;
S152, determining a Kth current priority queue corresponding to the Kth current target population based on a preset value evaluation strategy, a Kth-1 current priority queue and the cable inventory data, wherein the 0 th current priority queue is a current priority queue corresponding to the current initial population;
S153, increasing K by 1 to update the value of K;
S154, if the fact that K does not exceed DD is determined, returning to execute the genetic operator for acquiring the genetic algorithm model and the K-1 current target population, and carrying out corresponding selection, crossing and mutation treatment on the K-1 current target population according to the genetic operator of the genetic algorithm model to obtain the K current target population, wherein DD represents the preset target number;
S155, if the fact that K exceeds the preset target number is determined, acquiring a DD current priority queue and taking the DD current priority queue as the current target priority queue.
In this embodiment, the genetic algorithm model is adopted to iterate the preset target number of rounds on the current initial population, so that natural selection and genetic mechanism can be simulated, and the current target population with better fitness is iterated and evolved from the current initial population. In the current target population obtained by each iteration, not only the value evaluation value of the population individuals can be evaluated according to the value evaluation strategy, but also a new population can be generated through operations such as selection, intersection, mutation and the like.
When a kth current priority queue corresponding to the kth current target population is determined based on a preset value evaluation strategy, a kth-1 current priority queue and the cable inventory data, the same population individuals as a new population individual corresponding allocation scheme do not exist in the kth-1 current priority queue, and the value evaluation value corresponding to the population individuals in the kth-1 current priority queue is determined to be larger than the value evaluation value corresponding to the new population individual, new population individuals in the kth current target population are added into the kth-1 current priority queue, population individuals with the largest value evaluation value in the kth-1 current priority queue are removed from the current priority queue, and a final kth current priority queue is obtained after the completion of the kth round of iteration, so that the current priority queue is continuously updated in the process of generating the current target population through multiple rounds of iteration.
And S160, generating current cable distribution information corresponding to the current order information based on the current target priority queue.
In this embodiment, after the preset target round number iteration is performed on the current initial population based on the genetic algorithm model and the current target priority queue is determined, each population individual in the current target priority queue represents a cable allocation scheme, candidate cable inventory sub-data corresponding to each index value in each population individual is also known, and after each population individual included in the current target priority queue and candidate cable inventory sub-data corresponding to each population individual are obtained, the candidate cable inventory sub-data is displayed in a tabular manner, so that a plurality of current cable allocation information corresponding to the current order information can be formed. Therefore, based on the mode, the current cable distribution information convenient for visual display can be rapidly obtained.
In one embodiment, after step S110, the method further includes:
if the cable segment demand information in the current order information is determined to be empty, determining a first current target priority queue based on a corresponding ascending sequencing result of a difference value between the cable length of each candidate cable inventory sub-data in the cable inventory data and the cable required length in the current order information; the cable length of the candidate cable stock sub-data corresponding to the current order information in the cable stock data is larger than or equal to the cable required length in the current order information; if the cable length of the plurality of candidate cable stock sub-data is the same as the difference value of the cable required length in the current order information, sorting the cable length of the plurality of candidate cable stock sub-data according to the manufacturing date ascending sequence of the plurality of candidate cable stock sub-data in the first current target priority queue, if the difference value of the cable length of the candidate cable stock sub-data and the cable required length in the current order information belongs to a preset residual cable length interval and the number of the stored candidate cable stock sub-data in the first current target priority queue is the preset total number of queue elements, not adding the corresponding candidate cable stock sub-data into the first current target priority queue, and if the difference value of the cable length of the candidate cable stock sub-data and the cable required length in the current order information belongs to the preset residual cable length interval and the number of the stored candidate cable stock sub-data in the first current target priority queue does not exceed the preset total number of queue elements, adding the corresponding candidate cable stock sub-data into the first current target priority queue;
And generating current cable allocation information corresponding to the current order information based on the first current target priority queue.
In this embodiment, if it is determined that the cable segment requirement information in the current order information is empty, it indicates that the cable purchasing object corresponding to the current order information does not have a segment requirement, and at this time, the first current target priority queue is determined directly by combining the cable inventory data in the server. For example, taking a specification model and a required length of a cable with the specification model in the current order information as search conditions, obtaining a plurality of candidate cable inventory sub-data meeting the specification model requirement and having a cable length greater than or equal to the required length in the cable inventory data, subtracting the required length of the cable corresponding to the current order information from the cable length (i.e. the cable inventory length) of each candidate cable inventory sub-data in the cable inventory data, thereby determining the remaining cable length of each candidate cable inventory sub-data relative to the required length of the cable, sorting the candidate cable inventory sub-data in an ascending order according to the corresponding remaining cable length, selecting a corresponding number of candidate cable inventory sub-data from the sorting results by combining the total number of candidate cable inventory sub-data which can be accommodated by the current target priority queue, obtaining the first current target priority queue, and avoiding long order shortage, and combining the order of the plurality of candidate cable inventory sub-data with the order in which the remaining cable length obtained by subtracting the required length of the cable corresponding to the current order information is the cable length is the same, wherein the sorting of the candidate cable inventory sub-data is ordered earlier in the order of manufacturing date. It should be noted that if the remaining cable length obtained by subtracting the cable required length corresponding to the current order information from the cable length of the candidate cable stock sub-data belongs to a preset remaining cable length section (the preset remaining cable length section can be flexibly set according to the actual requirement of the user), the value of the remaining cable length is small but the remaining cable length is regarded as generating a zero line, and the candidate cable stock sub-data is directly arranged to the rear of the sorting result. And after the sorting is completed, obtaining a first current target priority sub-queue corresponding to the current order information.
Thereafter, the current cable shipment information corresponding to the current order information is generated based on the first current target priority queue, and reference may be made to a process of generating the current cable shipment information corresponding to the current order information based on the current target priority queue, which is not described herein. Therefore, based on the above mode, when the current order information does not include the cable segment demand information, the current cable distribution information can be obtained quickly by combining the cable required length and the cable inventory data in the current order information.
In one embodiment, after step S120, the method further includes:
If the search space parameter is determined not to exceed a preset search space parameter threshold, determining a second current target priority queue corresponding to the current order information based on the cable segment demand information, the value evaluation strategy and the cable inventory data included in the current order information;
And generating current cable allocation information corresponding to the current order information based on the second current target priority queue.
In this embodiment, if it is determined that the search space parameter does not exceed the preset search space parameter threshold, it indicates that the overall search amount of the current order information in the cable inventory data is not large, and when the value evaluation policy and the cable inventory data are combined to obtain the second current target priority queue corresponding to the cable segment demand information included in the current order information, the specific process is similar to the process of obtaining the current priority queue in step S140, except that it is not necessary to generate a current initial population based on the cable segment demand information initially, but a manner of traversing all individuals is adopted.
And then generating current cable allocation information corresponding to the current order information based on the second current target priority queue, reference may be made to a process of generating current cable allocation information corresponding to the current order information based on the current target priority queue, which will not be described herein. Therefore, based on the above manner, when the search space parameter does not exceed the preset search space parameter threshold, the current cable distribution information can be obtained quickly by combining the cable segmentation demand information, the value evaluation strategy and the cable inventory data included in the current order information.
Therefore, the embodiment of the method can effectively improve the output efficiency of the cable distribution scheme by determining and recommending the optimal distribution scheme in a mode of combining a genetic algorithm and a priority queue and maintaining the optimal distribution scheme set by using the priority queue.
Fig. 7 is a schematic block diagram of a cable intelligent cargo allocation implementing device based on a genetic algorithm and a priority queue according to an embodiment of the present invention. As shown in fig. 7, the present invention also provides a device 100 for implementing intelligent cable shipment based on genetic algorithm and priority queue, corresponding to the above method for implementing intelligent cable shipment based on genetic algorithm and priority queue. The genetic algorithm and priority queue based cable intelligent shipment implementation apparatus 100 includes means for performing the genetic algorithm and priority queue based cable intelligent shipment implementation method described above. Referring to fig. 7, the genetic algorithm and priority queue based cable intelligent cargo allocation implementing apparatus 100 includes a current order information acquiring unit 110, a search space parameter acquiring unit 120, a current initial population generating unit 130, a current priority queue acquiring unit 140, a genetic iteration unit 150, and a current cable cargo allocation information generating unit 160.
The current order information obtaining unit 110 is configured to obtain current order information corresponding to a cable intelligent distribution instruction in response to the cable intelligent distribution instruction.
The search space parameter obtaining unit 120 is configured to determine a search space parameter based on the cable segment demand information and the obtained cable inventory data if it is determined that the cable segment demand information in the current order information is not null.
The current initial population generation unit 130 is configured to generate a current initial population corresponding to the current order information based on the cable segment demand information and a preset initial population generation policy included in the current order information if it is determined that the search space parameter exceeds a preset search space parameter threshold.
The current priority queue obtaining unit 140 is configured to determine a current priority queue corresponding to the current initial population based on a preset value evaluation policy and the cable inventory data.
The genetic iteration unit 150 is configured to iterate the current initial population by a preset target round number based on a preset genetic algorithm model to obtain a current target population, determine a current priority queue corresponding to the current target population based on the value evaluation policy and the cable inventory data in each iteration, and obtain preferred population individuals in all population individuals for all current iterated rounds after each iteration is completed, until the iteration of the preset target round number is completed, and obtain the current priority queue as the current target priority queue.
A current cable shipment information generating unit 160, configured to generate current cable shipment information corresponding to the current order information based on the current target priority queue.
It should be noted that, as those skilled in the art can clearly understand, the specific implementation process of the cable intelligent distribution implementation device and each unit based on the genetic algorithm and the priority queue may refer to the corresponding description in the foregoing method embodiment, and for convenience and brevity of description, the description is omitted here.
Therefore, the embodiment of the device determines and recommends the optimal distribution scheme by combining the genetic algorithm and the priority queue, and maintains the optimal distribution scheme set by using the priority queue, so that the output efficiency of the cable distribution scheme can be effectively improved.
The cable intelligent distribution realizing device based on the genetic algorithm and the priority queue can be realized in the form of a computer program, and the computer program can be run on a computer device as shown in fig. 8.
Referring to fig. 8, fig. 8 is a schematic block diagram of a computer device according to an embodiment of the present invention. The computer equipment integrates any one of the intelligent cable distribution realizing devices based on the genetic algorithm and the priority queue provided by the embodiment of the invention.
With reference to fig. 8, the computer device includes a processor 402, a memory, and a network interface 405, which are connected by a system bus 401, wherein the memory may include a storage medium 403 and an internal memory 404.
The storage medium 403 may store an operating system 4031 and a computer program 4032. The computer program 4032 includes program instructions that, when executed, cause the processor 402 to perform a method of implementing intelligent cable shipment based on genetic algorithms and priority queues.
The processor 402 is used to provide computing and control capabilities to support the operation of the overall computer device.
The internal memory 404 provides an environment for the execution of a computer program 4032 in the storage medium 403, which computer program 4032, when executed by the processor 402, causes the processor 402 to perform the genetic algorithm and priority queue based cable intelligent distribution implementation method described above.
The network interface 405 is used for network communication with other devices. It will be appreciated by those skilled in the art that the structure shown in FIG. 8 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
Wherein the processor 402 is configured to execute the computer program 4032 stored in the memory to implement the genetic algorithm and priority queue based cable intelligent distribution implementation method as described in any of the above examples.
It should be appreciated that in embodiments of the present invention, the Processor 402 may be a central processing unit (Central Processing Unit, CPU), the Processor 402 may also be other general purpose processors, digital signal processors (DIGITAL SIGNAL processors, DSPs), application SPECIFIC INTEGRATED Circuits (ASICs), off-the-shelf Programmable gate arrays (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that all or part of the flow in a method embodying the above described embodiments may be accomplished by computer programs instructing the relevant hardware. The computer program comprises program instructions, and the computer program can be stored in a storage medium, which is a computer readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a computer-readable storage medium. The computer readable storage medium stores a computer program, wherein the computer program includes program instructions. The program instructions, when executed by a processor, cause the processor to perform the genetic algorithm and priority queue based cable intelligent shipment implementation method as described in any of the examples above.
The storage medium may be a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, or other various computer-readable storage media that can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be combined, divided and deleted according to actual needs. In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The integrated unit may be stored in a storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a terminal, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (10)

1. The method for realizing intelligent cable distribution based on the genetic algorithm and the priority queue is characterized by comprising the following steps:
Responding to an intelligent cable allocation instruction, and acquiring current order information corresponding to the intelligent cable allocation instruction;
If the cable segment demand information in the current order information is not null, determining search space parameters based on the cable segment demand information and the acquired cable inventory data;
If the search space parameter is determined to exceed a preset search space parameter threshold, generating a current initial population corresponding to the current order information based on cable segment demand information and a preset initial population generation strategy included in the current order information;
Determining a current priority queue corresponding to the current initial population based on a preset value evaluation strategy and the cable inventory data;
Performing iteration of a preset target round number on the current initial population based on a preset genetic algorithm model to obtain a current target population, determining a current priority queue corresponding to the current target population based on the value evaluation strategy and the cable inventory data in each iteration, and obtaining preferred population individuals in all population individuals for all iterative rounds after each iteration is finished, until the iteration of the preset target round number is finished, and obtaining the current priority queue as a current target priority queue, wherein the total number of the population individuals in the current priority queue is the total number of preset queue elements;
and generating current cable allocation information corresponding to the current order information based on the current target priority queue.
2. The method of claim 1, wherein determining search space parameters based on the cable segment demand information and the acquired cable inventory data comprises:
sequencing all cable inventory sub-data in the cable inventory data according to the ascending sequence of the cable length to obtain sequenced cable inventory data;
Acquiring the ith segmentation requirement sub-information in the cable segmentation requirement information, wherein the initial value of i is 1;
Determining an ith candidate cable inventory sub-data set corresponding to the ith segmentation requirement sub-information according to the sequenced cable inventory data, determining an ith segmentation requirement index range corresponding to the ith candidate cable inventory sub-data set, and correspondingly determining the available inventory quantity of the ith segmentation based on the ith segmentation requirement index range;
If it is determined that i does not exceed N and the obtained i-1 th search space parameter does not exceed a preset search space parameter threshold, multiplying the i-1 th search space parameter by the i-1 th available segment inventory quantity to obtain an i-th search space parameter, automatically increasing i by 1 to update the value of i, and returning to execute the step of obtaining the i-th segment demand sub-information in the cable segment demand information, wherein N is the total number of the segment demand sub-information included in the cable segment demand information, the i-1 th search space parameter is a result obtained by continuously multiplying the 1 st available segment inventory quantity to the i-1 th available segment inventory quantity, and the 0 th search space parameter is equal to 1;
if it is determined that i exceeds N and the obtained i-1 th search space parameter does not exceed the preset search space parameter threshold, obtaining an Nth search space parameter and taking the Nth search space parameter as the search space parameter;
if it is determined that i does not exceed N and the obtained i-1 th search space parameter exceeds the preset search space parameter threshold, increasing i by 1 to update the value of i, and returning to execute the step of obtaining the i-th segment demand sub-information in the cable segment demand information;
And if the i exceeds N and the acquired historical search space parameter exceeds the preset search space parameter threshold, taking the historical search space parameter as the search space parameter, wherein the historical search space parameter is the search space parameter which exceeds the preset search space parameter threshold for the first time.
3. The method according to claim 2, wherein the generating a current initial population corresponding to the current order information based on the cable segment demand information included in the current order information and a preset initial population generation policy includes:
Acquiring a population size value corresponding to the initial population generation strategy;
Generating the current initial population based on the initial population generation strategy and the 1 st to nth segment demand index ranges corresponding to the cable segment demand information, wherein the total number of population individuals included in the current initial population is the same as the population size value, and when generating a population individual based on the initial population generation strategy, randomly selecting one index value from the 1 st to nth segment demand index ranges in sequence and forming the population individual.
4. The method of claim 2, wherein determining a current priority queue corresponding to the current initial population based on the preset value assessment policy and the cable inventory data comprises:
Initializing and creating a current priority queue based on the total number of the preset queue elements, wherein the number of the population individuals stored in the current priority queue created by initialization is 0, and the upper limit number of the storable population individuals in the current priority queue is the total number of the preset queue elements;
acquiring individuals in a jth population in the current initial population, wherein the initial value of j is 1;
Inputting a candidate cargo allocation scheme corresponding to the jth population individual into a value evaluation value calculation model corresponding to the value evaluation strategy to obtain a value evaluation value corresponding to the jth population individual;
If j is determined not to exceed the total number of the preset queue elements, and the population individuals which are the same as the corresponding allocation scheme of the population individuals at j do not exist in the current priority queue, increasing the value evaluation value of the population individuals at j to the corresponding queue position of the current priority queue based on the corresponding value evaluation value so as to update the current priority queue;
if it is determined that j does not exceed the total number of the preset queue elements and population individuals which are the same as the corresponding allocation scheme of the jth population individuals exist in the current priority queue, executing a step of automatically increasing j by 1 to update the value of j;
If j is determined to exceed the total number of the elements of the preset queue, the current priority queue does not have the population individuals with the same allocation scheme as the j-th population individuals, and the current priority queue has the value evaluation value corresponding to the population individuals larger than the value evaluation value corresponding to the j-th population individuals, the population individuals with the largest value evaluation value in the current priority queue are moved out of the current priority queue, and the j-th population individuals are added to the current priority queue to update the current priority queue;
if j is determined to exceed the total number of the preset queue elements, and population individuals which are the same as the corresponding cargo allocation scheme of the jth population individuals exist in the current priority queue, executing the step of automatically increasing j by 1 to update the value of j;
Adding 1 to the j to update the value of j;
If the j is determined not to exceed P, returning to the step of acquiring the j-th population individuals in the current initial population, wherein P is a population size value corresponding to the initial population generation strategy;
and if the j exceeds P, acquiring the current priority queue.
5. The method according to claim 2, wherein the iterating the current initial population for a preset target round number based on a preset genetic algorithm model to obtain a current target population, determining a current priority queue corresponding to the current target population based on the value evaluation strategy and the cable inventory data in each iteration, and obtaining preferred population individuals in all population individuals for all iterated rounds after each iteration is finished, stopping iterating until the iteration for the preset target round number is completed, and obtaining the current priority queue as the current target priority queue, including:
Acquiring a genetic operator of the genetic algorithm model and a K-1 current target population, and carrying out corresponding selection, crossing and mutation treatment on the K-1 current target population according to the genetic operator of the genetic algorithm model to obtain a K current target population, wherein the initial value of K is 1, and the 0 current target population is the current initial population;
Determining a K current priority queue corresponding to the K current target population based on a preset value evaluation strategy, a K-1 current priority queue and the cable inventory data, wherein the 0 current priority queue is a current priority queue corresponding to the current initial population;
Increasing K by 1 to update the value of K;
If the K is determined not to exceed the DD, returning to execute the genetic operator and the K-1 current target population for acquiring the genetic algorithm model, and carrying out corresponding selection, crossing and mutation treatment on the K-1 current target population according to the genetic operator of the genetic algorithm model to obtain the K current target population, wherein the DD represents the preset target number;
and if the K is determined to exceed the preset target number, acquiring a DD current priority queue and taking the DD current priority queue as the current target priority queue.
6. The method of claim 1, wherein after the step of obtaining current order information corresponding to the cable intelligent shipment instruction in response to the cable intelligent shipment instruction, the method further comprises:
if the cable segment demand information in the current order information is determined to be empty, determining a first current target priority queue based on a corresponding ascending sequencing result of a difference value between the cable length of each candidate cable inventory sub-data in the cable inventory data and the cable required length in the current order information; the cable length of the candidate cable stock sub-data corresponding to the current order information in the cable stock data is larger than or equal to the cable required length in the current order information; if the cable length of the plurality of candidate cable stock sub-data is the same as the difference value of the cable required length in the current order information, sorting the cable length of the plurality of candidate cable stock sub-data according to the manufacturing date ascending sequence of the plurality of candidate cable stock sub-data in the first current target priority queue, if the difference value of the cable length of the candidate cable stock sub-data and the cable required length in the current order information belongs to a preset residual cable length interval and the number of the stored candidate cable stock sub-data in the first current target priority queue is the preset total number of queue elements, not adding the corresponding candidate cable stock sub-data into the first current target priority queue, and if the difference value of the cable length of the candidate cable stock sub-data and the cable required length in the current order information belongs to the preset residual cable length interval and the number of the stored candidate cable stock sub-data in the first current target priority queue does not exceed the preset total number of queue elements, adding the corresponding candidate cable stock sub-data into the first current target priority queue;
And generating current cable allocation information corresponding to the current order information based on the first current target priority queue.
7. The method of claim 1, wherein after the step of determining search space parameters based on the cable segment demand information and the acquired cable inventory data if it is determined that the cable segment demand information is not null in the current order information, the method further comprises:
If the search space parameter is determined not to exceed a preset search space parameter threshold, determining a second current target priority queue corresponding to the current order information based on the cable segment demand information, the value evaluation strategy and the cable inventory data included in the current order information;
And generating current cable allocation information corresponding to the current order information based on the second current target priority queue.
8. The utility model provides a cable intelligence allocation realization device based on genetic algorithm and priority queue which characterized in that includes:
the system comprises a current order information acquisition unit, a control unit and a control unit, wherein the current order information acquisition unit is used for responding to a cable intelligent goods allocation instruction and acquiring current order information corresponding to the cable intelligent goods allocation instruction;
The search space parameter acquisition unit is used for determining search space parameters based on the cable segment demand information and the acquired cable inventory data if the cable segment demand information in the current order information is determined to be not null;
The current initial population generation unit is used for generating a current initial population corresponding to the current order information based on the cable segment demand information and a preset initial population generation strategy included in the current order information if the search space parameter exceeds a preset search space parameter threshold;
A current priority queue obtaining unit, configured to determine a current priority queue corresponding to the current initial population based on a preset value evaluation policy and the cable inventory data;
The genetic iteration unit is used for carrying out iteration of a preset target round number on the current initial population to obtain a current target population, determining a current priority queue corresponding to the current target population based on the value evaluation strategy and the cable inventory data in each iteration, and obtaining preferred population individuals in all population individuals for all current iterated rounds after each iteration is finished, until the iteration of the preset target round number is finished, stopping iteration, and obtaining the current priority queue as a current target priority queue, wherein the total number of the population individuals in the current priority queue is the total number of preset queue elements;
And the current cable allocation information generating unit is used for generating current cable allocation information corresponding to the current order information based on the current target priority queue.
9. A computer device, characterized in that the computer device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method for implementing intelligent cable distribution based on genetic algorithm and priority queue according to any one of claims 1-7 when executing the computer program.
10. A computer readable storage medium, characterized in that it stores a computer program comprising program instructions that, when executed by a processor, implement the genetic algorithm and priority queue based cable intelligent distribution implementation method according to any of claims 1-7.
CN202411935060.2A 2024-12-26 2024-12-26 Method and device for realizing intelligent cable distribution based on genetic algorithm and priority queue Active CN119378931B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411935060.2A CN119378931B (en) 2024-12-26 2024-12-26 Method and device for realizing intelligent cable distribution based on genetic algorithm and priority queue

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411935060.2A CN119378931B (en) 2024-12-26 2024-12-26 Method and device for realizing intelligent cable distribution based on genetic algorithm and priority queue

Publications (2)

Publication Number Publication Date
CN119378931A CN119378931A (en) 2025-01-28
CN119378931B true CN119378931B (en) 2025-05-09

Family

ID=94339510

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411935060.2A Active CN119378931B (en) 2024-12-26 2024-12-26 Method and device for realizing intelligent cable distribution based on genetic algorithm and priority queue

Country Status (1)

Country Link
CN (1) CN119378931B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN119784107B (en) * 2025-03-10 2025-06-13 江苏火凤凰线缆系统技术股份有限公司 Intelligent control method and system for production speed of moving cable based on automation
CN120124992B (en) * 2025-05-13 2025-08-12 物产中大数字安全科技(浙江)有限公司 A cable distribution method and device based on genetic algorithm

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111985797A (en) * 2020-08-08 2020-11-24 王康 Cable process flow card generation method and device and computer readable storage medium
CN115935828A (en) * 2023-01-05 2023-04-07 北京志翔科技股份有限公司 Method, device and electronic equipment for determining parameters of electric energy meter line loss model

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113254810B (en) * 2021-06-17 2021-10-29 浙江口碑网络技术有限公司 Search result output method and device, computer equipment and readable storage medium
CN118373113B (en) * 2024-03-08 2024-12-10 北京博渤文创科技有限公司 A warehouse management method based on cloud platform
CN117952397B (en) * 2024-03-21 2024-05-31 深圳市快金数据技术服务有限公司 Logistics order analysis method, device, equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111985797A (en) * 2020-08-08 2020-11-24 王康 Cable process flow card generation method and device and computer readable storage medium
CN115935828A (en) * 2023-01-05 2023-04-07 北京志翔科技股份有限公司 Method, device and electronic equipment for determining parameters of electric energy meter line loss model

Also Published As

Publication number Publication date
CN119378931A (en) 2025-01-28

Similar Documents

Publication Publication Date Title
CN119378931B (en) Method and device for realizing intelligent cable distribution based on genetic algorithm and priority queue
Zhao et al. Learning practically feasible policies for online 3D bin packing
US7987143B2 (en) Methods and systems for multi-objective evolutionary algorithm based engineering desgin optimization
Boyabatli et al. Parameter selection in genetic algorithms
CN116934220A (en) Intelligent warehouse layout method based on intelligent data analysis and algorithm optimization
CN113805545B (en) Flexible flow shop combined scheduling rule generation method considering batch processing
CN110598920A (en) Multi-objective optimization method and system for main production plan of casting parallel workshop
CN113792924A (en) A single job shop scheduling method based on Deep Q-network deep reinforcement learning
Lo et al. A genetic algorithm with new local operators for multiple traveling salesman problems
US20170169353A1 (en) Systems and Methods for Multi-Objective Evolutionary Algorithms with Soft Constraints
US20200311581A1 (en) High quality pattern mining model and method based on improved multi-objective evolutionary algorithm
Azadeh et al. Optimum estimation of missing values in randomized complete block design by genetic algorithm
Garcia-Capulin et al. A hierarchical genetic algorithm approach for curve fitting with B-splines
CN110825707B (en) Data compression method
CN118552063B (en) A heating furnace energy-saving benefit management method based on comprehensive fuel consumption
WO2025091797A1 (en) Server hardware exception early warning method and apparatus, device and storage medium
Bidyuk et al. An approach to identifying and filling data gaps in machine learning procedures
CN115018387A (en) Order kneading management method, system, equipment and storage medium
CN118469525A (en) Grain surface multi-inspection robot cooperative task allocation method based on improved NSGA-II
CN117592597A (en) Grouped two-dimensional binning optimization method and device based on deep reinforcement learning
CN116841707A (en) Sensor resource scheduling method based on HDABC algorithm
CN111310122A (en) Model data processing method, electronic device and storage medium
Falcone et al. Supply chain optimisation using evolutionary algorithms
CN115392616A (en) Knowledge mining and genetic algorithm combined multi-target discrete workshop scheduling method
CN119515155A (en) A method and system for automatic assessment of personnel capabilities based on attention neural network

Legal Events

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