CN109242187B - Vehicle operation scheduling method - Google Patents
Vehicle operation scheduling method Download PDFInfo
- Publication number
- CN109242187B CN109242187B CN201811053888.XA CN201811053888A CN109242187B CN 109242187 B CN109242187 B CN 109242187B CN 201811053888 A CN201811053888 A CN 201811053888A CN 109242187 B CN109242187 B CN 109242187B
- Authority
- CN
- China
- Prior art keywords
- individuals
- individual
- vehicle
- chromosome
- population
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 44
- 210000000349 chromosome Anatomy 0.000 claims description 86
- 239000011159 matrix material Substances 0.000 claims description 32
- 230000035772 mutation Effects 0.000 claims description 23
- 230000002068 genetic effect Effects 0.000 claims description 18
- 238000003754 machining Methods 0.000 claims description 16
- 239000000470 constituent Substances 0.000 claims description 7
- 238000012163 sequencing technique Methods 0.000 claims description 2
- 238000005516 engineering process Methods 0.000 abstract description 3
- 230000006870 function Effects 0.000 description 26
- 238000010586 diagram Methods 0.000 description 8
- 239000003245 coal Substances 0.000 description 7
- 238000004590 computer program Methods 0.000 description 7
- 238000004519 manufacturing process Methods 0.000 description 6
- 238000003860 storage Methods 0.000 description 5
- 238000010276 construction Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 239000000463 material Substances 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000006467 substitution reaction Methods 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000003203 everyday effect Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/12—Computing arrangements based on biological models using genetic models
- G06N3/126—Evolutionary algorithms, e.g. genetic algorithms or genetic programming
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/04—Manufacturing
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Human Resources & Organizations (AREA)
- Theoretical Computer Science (AREA)
- Economics (AREA)
- Strategic Management (AREA)
- Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- General Business, Economics & Management (AREA)
- Tourism & Hospitality (AREA)
- Marketing (AREA)
- Entrepreneurship & Innovation (AREA)
- Bioinformatics & Computational Biology (AREA)
- General Health & Medical Sciences (AREA)
- Operations Research (AREA)
- Game Theory and Decision Science (AREA)
- Quality & Reliability (AREA)
- Evolutionary Biology (AREA)
- Development Economics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Genetics & Genomics (AREA)
- Software Systems (AREA)
- Mathematical Physics (AREA)
- General Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Molecular Biology (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Biomedical Technology (AREA)
- Artificial Intelligence (AREA)
- Physiology (AREA)
- Manufacturing & Machinery (AREA)
- Primary Health Care (AREA)
- Educational Administration (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to a vehicle operation scheduling method, which is applied to the technical field of operation scheduling and solves the problems of high error probability and long scheduling time of manual scheduling and scheduling in the related technology.
Description
Technical Field
The invention relates to the technical field of job scheduling, in particular to a vehicle job scheduling method.
Background
With the acceleration of the industrialization process, in some production line workshop operation, coal wharf unloading operation and other scenes, the vehicles and the fields of the operation are often required to be scheduled so as to ensure the orderly completion of the operation.
In the related technology, a manual mode is adopted for scheduling and scheduling production, scheduling personnel need to spend a large amount of time to schedule a scheduling operation plan every day, under the condition that vehicles are more, the vehicle plan discharged by the scheduling personnel is easy to make mistakes, the wrong scheduling operation plan can cause an operation field to be free or the vehicles to be blocked, and the production efficiency is greatly reduced.
Disclosure of Invention
In view of the above, the present invention provides a vehicle operation scheduling method, which aims to overcome the problems in the prior art that manual scheduling is prone to errors and long in scheduling time.
In order to achieve the purpose, the invention adopts the following technical scheme:
in a first aspect, a vehicle job scheduling method includes:
according to the information of the vehicles to be scheduled, two populations are constructed, each population comprises a plurality of individuals, and each individual represents a scheduling scheme to be selected;
evolving the two populations based on a genetic algorithm, wherein, during evolution, the constituent elements of each individual are distinguished into two chromosomes;
when the evolution completion condition is reached, selecting individuals meeting a preset condition from the population after evolution, and determining the selected individuals as a final scheduling scheme;
and adopting the final scheduling scheme to perform operation scheduling on the vehicle to be scheduled.
Optionally, the constructing two populations according to the information of the vehicle to be scheduled includes:
constructing an immediate front matrix according to the arrival time of the vehicle to be dispatched;
generating a plurality of individuals from the immediate prior matrix;
the plurality of individuals is divided into two populations.
Optionally, each individual is a matrix with 2 rows and N columns, where N is the number of vehicles to be scheduled, the column number of each column of the matrix is the vehicle number of each vehicle to be scheduled, the elements in the first row of the matrix are the numbers of the processing positions of the vehicles in the corresponding column, and the elements in the second row of the matrix are the processing sequence numbers of the vehicles in the corresponding column at the corresponding processing positions.
Optionally, the evolving the two populations based on the genetic algorithm includes:
respectively evolving each population based on a genetic algorithm;
selecting individuals meeting preset conditions in each population after evolution, and interacting the selected individuals between the two populations;
wherein the evolving each population comprises:
calculating the fitness of each individual according to a predetermined fitness function, and calculating the fitness proportion of each individual in each population according to the fitness of each individual;
and selecting a preset number of individuals in each population according to the fitness proportion.
Optionally, the evolving each population further includes:
in each population, performing cross operation when determining to perform cross operation on the selected individuals; and/or the presence of a gas in the gas,
in each population, carrying out mutation operation when determining the mutation operation of the selected individuals;
during the crossover operation and/or mutation operation, the constituent elements of each individual are divided into two chromosomes, and the crossover operation and/or mutation operation is respectively carried out on the two chromosomes.
Optionally, the method further includes:
constructing a vehicle dispatching objective function, wherein parameters of the objective function comprise: the system comprises a processing time parameter, a lag cost parameter, a super-inventory cost parameter and a vehicle arrangement punishment parameter which does not meet the special requirements of a client;
and determining the reciprocal of the objective function as a fitness function.
Optionally, the selecting a preset number of individuals in each population according to the fitness ratio includes:
and randomly generating a first random number in each population, accumulating the fitness proportion, determining the individuals when the sum of the accumulated fitness proportion is greater than the first random number as the individuals selected at this time, and repeating the steps until a preset number of individuals are selected.
Optionally, when determining to perform the crossover operation on the selected individuals, performing the crossover operation includes:
dividing the selected individuals into a plurality of groups, each group including two individuals;
respectively taking each group as a current group, randomly generating a second random number, and determining to carry out cross operation on the current group when the second random number is smaller than a preset cross probability;
and taking the first line element of each individual as a first chromosome and the second line element as a second chromosome, and when the current grouping is subjected to cross operation, performing cross operation on the first chromosomes of the two individuals of the current grouping and performing cross operation on the second chromosomes of the two individuals.
Optionally, the performing a crossover operation on the first chromosomes of the two individuals currently grouped includes:
chromosome crossing positions are randomly generated, and elements indicated by the chromosome crossing positions of two individuals are exchanged.
Optionally, the performing a crossover operation on the second chromosomes of the two individuals includes:
the method comprises the steps of respectively taking two individuals as a first individual and a second individual, corresponding to the first individual, randomly generating chromosome crossing positions, determining elements indicated by the chromosome crossing positions in the first individual, determining the arrangement sequence of the elements indicated by the chromosome crossing positions in the first individual in the second individual, and rearranging the elements indicated by the chromosome crossing positions in the first individual according to the arrangement sequence.
Optionally, when determining to perform mutation operation on the selected individual, performing mutation operation includes:
using the first line element of each selected individual as a first chromosome and the second line element as a second chromosome;
respectively taking each element of a first chromosome as a current element, randomly generating a third random number corresponding to the current element, determining to mutate the current element when the third random number is smaller than a preset mutation probability, randomly selecting one element in the first chromosome when the current element is mutated, and replacing the current element with the randomly selected element;
when the bus arrangement special requirements of the clients do not exist, determining not to mutate the second chromosome; or when the bus arrangement specially required by the client exists, mutation correction is carried out on the second chromosome.
Optionally, the performing variation modification on the second chromosome includes:
selecting all elements of the same processing position in a second chromosome, and resetting the element values in the order from 1 to 1 according to the order from small to large of the element values;
determining a variation value according to the special requirements of the client for the vehicle arrangement, and replacing the element value of the corresponding bit with the variation value; in the second chromosome after replacement, determining the same element value q and the number p of the same element values, constructing an interval [ q, q + p-1] according to the q and the p, selecting p elements in the interval, and respectively replacing the selected p elements corresponding to the same element values;
if the same element value still exists in the second chromosome after replacement, repeating the steps until the same element value does not exist;
if there are element values greater than the number of vehicles in the second chromosome after the replacement, the element values greater than the number of vehicles are replaced with values less than or equal to the number of vehicles and the replaced element values are not the same as the other element values.
Optionally, the cross probabilities of the two populations are different.
Optionally, the variation probabilities of the two populations are different.
Optionally, selecting, in each population after the evolution, an individual satisfying a preset condition, and interacting the selected individual between the two populations, includes:
in each population after evolution, a preset number of individuals are selected according to the sequence of the fitness proportion from large to small, and the selected individuals are mutually exchanged between the two populations.
In a second aspect, a vehicle job scheduling apparatus includes:
the system comprises a group construction module, a group selection module and a group selection module, wherein the group construction module is used for constructing two groups according to the information of vehicles to be scheduled, each group comprises a plurality of individuals, and each individual represents a scheduling scheme to be selected;
the population evolution module is used for evolving the two populations based on a genetic algorithm, wherein during evolution, the composition elements of each individual are divided into two chromosomes;
the scheduling scheme determining module is used for selecting individuals meeting preset conditions from the evolved population when the evolution completion conditions are met, and determining the selected individuals as a final scheduling scheme;
and the scheduling module is used for scheduling the operation of the vehicle to be scheduled by adopting the final scheduling scheme.
In a third aspect, a scheduling apparatus based on a genetic algorithm includes:
a processor, and a memory coupled to the processor;
the memory is used for storing a computer program;
the processor is configured to call and execute the computer program in the memory to perform the steps of the vehicle job scheduling method.
In a fourth aspect, a storage medium stores a computer program that, when executed by a processor, implements the steps of the vehicle job scheduling method.
By adopting the technical scheme, two populations are constructed according to the information of the vehicles to be scheduled, wherein each population comprises a plurality of individuals, each individual represents a scheduling scheme to be selected, the two populations are evolved based on a genetic algorithm, when the two populations reach the evolution completion condition, the individuals meeting the preset condition are selected from the evolved populations, and the selected individuals are determined as the final scheduling scheme, so that the constructed populations containing the scheduling schemes are evolved based on the genetic algorithm to obtain the final individuals meeting the preset condition, obtain the corresponding scheduling schemes, further schedule the vehicles to be scheduled, and solve the problems that scheduling and scheduling are easy to make mistakes and long in scheduling time due to manual operation in the related technology, and the production efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of a vehicle operation scheduling method according to an embodiment of the present invention.
Fig. 2 is a schematic structural diagram of a vehicle operation scheduling method according to a second embodiment of the present invention.
Fig. 3 is a schematic flowchart of another vehicle operation scheduling method according to a second embodiment of the present invention.
Fig. 4 is a schematic diagram of a crossing manner of the first chromosome of the individual in the vehicle operation scheduling method according to the second embodiment of the present invention.
Fig. 5 is a schematic diagram of a crossing manner of the second chromosome of the individual in the vehicle operation scheduling method according to the second embodiment of the present invention.
Fig. 6 is a schematic structural diagram of a vehicle operation scheduling device according to a third embodiment of the present invention.
Fig. 7 is a schematic structural diagram of a vehicle operation scheduling apparatus according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
Example one
Fig. 1 is a vehicle operation scheduling method according to an embodiment of the present invention. As shown in fig. 1, the present embodiment provides a vehicle job scheduling method, including:
102, evolving the two populations based on a genetic algorithm, wherein during evolution, the constituent elements of each individual are divided into two chromosomes;
103, when the evolution completion condition is reached, selecting individuals meeting a preset condition from the evolved population, and determining the selected individuals as a final scheduling scheme;
and step 104, adopting a final scheduling scheme to perform operation scheduling on the vehicle to be scheduled.
In the embodiment, two populations are constructed according to information of vehicles to be scheduled, wherein each population comprises a plurality of individuals, each individual represents a scheduling scheme to be selected, the two populations are evolved based on a genetic algorithm, when the two populations reach evolution completion conditions, individuals meeting preset conditions are selected from the evolved populations, and the selected individuals are determined as a final scheduling scheme.
Example two
An embodiment of the present application provides another vehicle operation scheduling method, with reference to fig. 1, 2, and 3, including:
specifically, the step 101 includes:
in this step, in order to quickly generate a feasible initial population, an immediately preceding sequence matrix of each vehicle to be scheduled arriving at a station may be constructed, specifically, an n-order matrix of sparse 0-1 is constructed first according to the arrival time sequence of the train, an element at each position of the matrix is 0 or 1, when the u-th train arrives immediately following the v-th train, an element at a (u, v) position of the matrix is made to be 1, otherwise, the element is set to be 0, and thus an immediately preceding sequence sparse matrix is formed. For example, if there are 4 vehicles to be scheduled, which are numbered as No. 1, No. 2, No. 3, and No. 4, and 4 vehicles are ordered as No. 1, No. 2, No. 3, and No. 4 according to arrival, the immediate relation matrix is:
in fact, when a vehicle works, the arrival time of the vehicle is in a certain sequence, and generally, the scheduling of the vehicle needs to meet the queue relationship of first-in first-out service and first-in first-out service, namely, the vehicle to be scheduled has certain constraint of the immediate relationship, and the scheduling is required to be carried out according to the immediate relationship. If the immediate relationship constraint is not satisfied, the waiting time is often long, which results in a long hold-off time in the objective function.
based on the embodiment of the immediate preceding matrix, a train is selected from all zero columns of the sparse matrix, processing stations are arranged, the corresponding rows of the sparse matrix are set to be zero, and the steps are repeated to form the final initial individuals of two rows and n columns. Specifically, referring to the matrix, since the first column is all zero columns, and the vehicle number 1 arrives at the station first, the vehicle number 1 is arranged at any processing station, for example, at the station number 1, the sequence is 1, and the first row is set to zero,
namely:
since the first row has been arranged with vehicle number 1, the second row is now an all zero row, and therefore vehicles are arranged in the second row in the same manner as described above. Repeating the above steps to form the initial individuals in the final two rows and n columns, for example, having 3 processing positions, the matrix arrangement of the individuals may be:
Each individual is a matrix with 2 rows and N columns, wherein N is the number of vehicles to be dispatched, the column number of each column of the matrix is the vehicle number of each vehicle to be dispatched, the elements of the first row of the matrix are the numbers of the processing positions of the vehicles in the corresponding column, and the elements of the second row of the matrix are the processing sequence numbers of the vehicles in the corresponding column on the corresponding processing positions.
The generated individuals can be generated according to actual conditions, in this embodiment, 200 individuals are generated in total, and each population has 100 individuals.
102, evolving the two populations based on a genetic algorithm, wherein during evolution, the constituent elements of each individual are divided into two chromosomes;
further, two populations were evolved based on genetic algorithms, including:
301, respectively evolving each population based on a genetic algorithm;
specifically, the method comprises the following steps:
calculating the fitness of each individual according to a predetermined fitness function;
wherein the predetermined fitness function is:
1) constructing a vehicle dispatching objective function, wherein parameters of the objective function comprise: the system comprises a processing time parameter, a lag cost parameter, a super-inventory cost parameter and a vehicle arrangement punishment parameter which does not meet the special requirements of a client;
specifically, the machining time parameter may be expressed as:
max(1<j<m)tj
in the formula:m represents the total number of machining positions, j represents the jth machining position, tjRepresents the machining time at the machining position j; (ii) a
The hysteresis cost parameter can be expressed as:
max(0,∑it(k(j,i),j)-d(k(j,i)))
in the formula: i represents the number of operations, k represents the work vehicle, k (i, j) represents the vehicle operated at the ith operation at the processing position j, t (k (j, i), j) represents the processing time of the vehicle k (i, j), and d (k (j, i)) represents the delivery time parameter of the vehicle operated at the ith operation at the processing position j; wherein the delivery time is a vehicle specified completion time.
The overstock cost parameter may be expressed as:
max(0,∑it(k(j,i),j)-d(k(j,i))-tb(k(j,i)))
in the formula: t is tb(k (j, i)) represents a stock time parameter of the vehicle of the i-th operation of the machining position j, wherein the stock time is the stay time of the vehicle;
the platoon penalty parameter that does not meet the customer specific requirements can be expressed as:
in the formula: gamma, delta, epsilon indicate the predetermined sequence of operation of the vehicle into the processing station, CkA constant representing a penalty factor for the kth vehicle not being ranked as required;
thus, the objective function can be expressed as:
in the formula: a is1Representing the cost per unit time of processing, a2Represents the unit time cost of the lag, a3Represents the cost per unit time of the overstocked product;
furthermore, in order to facilitate the subsequent algorithm solution, the expression of the objective function is simplified, and a is made1At 1, the objective function can be expressed as:
f=Flag+max(i<j<m)tj+∑k(j,i)βmax(0,∑it(k(j,i),j)-d(k(j,i)))+γmax(0,∑it(k(j,i),j)-d(k(j,i))-tb(k(j,i)))
in the formula: beta represents a1And a2Gamma represents a1And a3Ratio of
2) And determining the reciprocal of the objective function as a fitness function.
According to the expression of the objective function, the fitness function is determined to be expressed as:
as can be seen from the expression of the objective function, the larger the value of the objective function is, the longer the total work time is, and therefore, the higher the fitness is by taking the inverse of the objective function as the fitness function so that the shorter the work time of the vehicle is.
Secondly, calculating the fitness proportion of each individual in each population according to the fitness of each individual;
the fitness proportion of the individuals is the ratio of the fitness of each individual to the fitness of all the individuals in the population.
And (III) selecting a preset number of individuals in each population according to the fitness proportion.
In each population, randomly generating a first random number each time, accumulating the fitness proportion, determining an individual with the accumulated fitness proportion sum larger than the first random number as the selected individual, and repeating the steps until a preset number of individuals are selected.
The first random number can be generated through an instruction of a computer, and the value of the first random number is greater than 0 and less than 1; the selected preset number of individuals can be set according to actual conditions.
And (IV) performing cross operation when determining to perform cross operation on the selected individuals in each population. Wherein the cross probabilities of the two populations are different.
Specifically, the method comprises the following steps:
1) dividing the selected individuals into a plurality of groups, each group including two individuals;
2) respectively taking each group as a current group, randomly generating a second random number, and determining to carry out cross operation on the current group when the second random number is smaller than a preset cross probability;
the second random number can also be generated by an instruction of a computer, and the value of the second random number is greater than 0 and less than 1; the preset cross probability can be set according to the actual situation.
3) And taking the first line element of each individual as a first chromosome and the second line element as a second chromosome, and when the current grouping is subjected to cross operation, performing cross operation on the first chromosomes of the two individuals of the current grouping and performing cross operation on the second chromosomes of the two individuals.
Further, the first chromosomes of the two individuals of the current group are subjected to a crossover operation, specifically, chromosome crossover positions are randomly generated, and elements indicated by the chromosome crossover positions of the two individuals are exchanged.
Referring to fig. 4, for example, the first chromosomes of two individuals are 2211321 and 1121331, respectively, the random crossing positions are selected as the third position, the fourth position and the fifth position, and after the elements indicated by the crossing positions of the two individuals are crossed, the first chromosomes of the two individuals are 2221321 and 1111331, respectively.
Further, performing a crossover operation on a second chromosome of the two individuals, including:
and respectively taking the two individuals as a first individual and a second individual, corresponding to the first individual, randomly generating chromosome crossing positions, determining elements indicated by the chromosome crossing positions in the first individual, determining the arrangement sequence of the elements indicated by the chromosome crossing positions in the first individual in the second individual, and rearranging the elements indicated by the chromosome crossing positions in the first individual according to the arrangement sequence.
Referring to fig. 5, for example, the second chromosomes of the first individual and the second individual are 1234567 and 2137654 respectively, the element indicated by the middle chromosome crossing position of the first individual is 345, the arrangement order of 345 in the second individual is determined to be 354, and the element indicated by the chromosome crossing position is rearranged in the first individual according to the order in the second individual, that is, the second chromosomes of the first individual and the second individual after crossing are 1235467 and 2137654 respectively.
Fifthly, carrying out mutation operation on the selected individuals in each population when the mutation operation is determined;
wherein the mutation probabilities of the two populations are different.
The method specifically comprises the following steps:
1) using the first line element of each selected individual as a first chromosome and the second line element as a second chromosome;
2) respectively taking each element of the first chromosome as a current element, randomly generating a third random number corresponding to the current element, determining to mutate the current element when the third random number is smaller than a preset mutation probability, randomly selecting one element in the first chromosome when the current element is mutated, and replacing the current element with the randomly selected element;
the third random number can be generated through instructions of a computer, and the value of the third random number is greater than 0 and less than 1; the preset variation probability can be set according to the actual situation.
4) When the bus arrangement special for the client exists, determining to perform variation on the second chromosome; when the bus arrangement special requirements of the clients do not exist, determining not to mutate the second chromosome; or when the bus arrangement specially required by the client exists, mutation correction is carried out on the second chromosome.
In this embodiment, if there is a car-arranging situation specifically requested by the customer, the second chromosome is mutated, so as to obtain more car-arranging ways.
Further, performing mutation correction on the second chromosome, including:
1. selecting all elements of the same processing position in a second chromosome, and resetting the element values in the order from 1 to 1 according to the order from small to large of the element values;
all elements at the same processing position should be sequentially reset to be incremental, for example, 1234.
2. Determining a variation value according to the special requirements of the client for the vehicle arrangement, and replacing the element value of the corresponding bit with the variation value; for example, if 2 of the second bit is changed to 3, the sequence order becomes 1334.
3. In the second chromosome after replacement, determining the same element value q and the number p of the same element values, constructing an interval [ q, q + p-1] according to q and p, selecting p elements in the interval, and respectively replacing the selected p elements corresponding to the same element values;
based on the above embodiment, q is 3, p is 2, then q and p construct an interval [ q, q + p-1] as [3,4], 2 elements in the interval are selected as 3,4, and 3,4 are substituted for 3, then the sequence is changed to 1344.
4. If the same element value still exists in the second chromosome after replacement, repeating the steps until the same element value does not exist;
in the previous step, the same element 4 still exists, and if the above 3 steps are repeated, the sequence thereof becomes 1345, and it is apparent that the value 5 of the element after replacement exceeds the maximum value 4 among all elements of the machining position, so the following steps are performed.
4. If there are element values greater than the number of vehicles in the second chromosome after the replacement, the element values greater than the number of vehicles are replaced with values less than or equal to the number of vehicles and the replaced element values are not the same as the other element values.
Since the element value 5 in the second chromosome after the substitution is larger than the number of vehicles, the element value 5 is substituted with the element value 2 which is different from both the element values 134, and therefore the sequence after the mutation is 1342.
specifically, in each population after evolution, a preset number of individuals are selected according to the sequence of the fitness proportion from large to small, and the selected individuals are exchanged between the two populations.
The fitness proportion can be calculated by referring to the method in the embodiment, and the preset number of the selected individuals can be set according to the actual situation.
Based on the above embodiment, the interaction of the populations is to ensure the diversity among the populations, and avoid falling into the local optimal solution as much as possible while accelerating the evolution. In the scheme, the crossing speed and the variation speed of the two populations are different, the two populations are respectively a first population and a second population, wherein the first population adopts larger crossing probability and variation probability to ensure the speed of evolution, and the second population adopts smaller crossing probability and variation probability to ensure the stability of evolution and avoid trapping in local optimal solution.
103, when the evolution completion condition is reached, selecting individuals meeting a preset condition from the evolved population, and determining the selected individuals as a final scheduling scheme;
the condition for completing the evolution can be that iteration of preset iteration steps is completed, or that the average fitness of the population is not changed any more.
Generally, after the population is completely evolved, individuals in the population can be evolved into the same scheduling scheme, and therefore, any individual can be used as a final scheduling scheme. And if the population is not completely evolved, sequencing the individuals according to the fitness function value, and selecting the individual with the maximum fitness function value as a final scheduling scheme.
And step 104, adopting a final scheduling scheme to perform operation scheduling on the vehicle to be scheduled.
In this step, the specific contents of the scheduling scheme, such as the processing location, the vehicle number, and the like, can be obtained by decoding the matrix corresponding to the selected individual.
Based on the related embodiment, the invention adopts the parallel evolution mode of double chromosome double populations to complete the iteration of the genetic algorithm, and can be applied to the scene of vehicle operation scheduling, in particular to a multi-station parallel scheduling mode. For example, the dispatch of a coal terminal train station may be used. In a coal yard train station, the arrival time of a train is usually fixed, the train completes the operation by unloading, and the unloading time of the train can be evaluated according to the statistical data of the coal yard to obtain a time matrix table. The bichromosome double-population cross evolution genetic algorithm designed for coal wharf multi-machine parallel production can meet the scheduling requirement of a train lane line of a coal wharf, shorten the train scheduling time of the coal wharf and schedule production according to the special requirements of clients.
Further, after the scheduling scheme is decoded, a corresponding display interface can be programmed to visually display the scheduling result, specifically including the unloading position, the unloading total time and the unloading sequence of the train.
EXAMPLE III
Fig. 6 is a schematic structural diagram of a vehicle operation scheduling device according to an embodiment of the present application. Referring to fig. 6, an embodiment of the present application provides a vehicle operation scheduling apparatus, including:
the group construction module 601 is configured to construct two groups according to information of vehicles to be scheduled, where each group includes a plurality of individuals, and each individual represents a scheduling scheme to be selected;
a population evolution module 602, configured to evolve two populations based on a genetic algorithm, wherein, during the evolution, a constituent element of each individual is divided into two chromosomes;
a scheduling scheme determining module 603, configured to select, when an evolution completion condition is reached, an individual that meets a preset condition from the evolved population, and determine the selected individual as a final scheduling scheme;
and the scheduling module 604 is configured to perform job scheduling on the vehicle to be scheduled by using the final scheduling scheme.
For a specific implementation of this embodiment, reference may be made to the related descriptions in the vehicle operation scheduling method and method embodiments described in the first embodiment and the second embodiment, and details are not described here again.
Example four
Fig. 7 is a schematic structural diagram of a vehicle operation scheduling apparatus according to an embodiment of the present application. Referring to fig. 7, an embodiment of the present application provides a vehicle operation scheduling apparatus, including:
a processor 701, and a memory 702 coupled to the processor;
the memory is used for storing a computer program for at least executing the steps of the vehicle job scheduling method;
the processor is used to call and execute the computer program in the memory.
For a specific implementation of this embodiment, reference may be made to the related descriptions in the vehicle operation scheduling method and method embodiments described in the first embodiment and the second embodiment, and details are not described here again.
EXAMPLE five
Embodiments of the present invention provide a storage medium, which stores a computer program, and when the computer program is executed by a processor, the steps in the vehicle operation scheduling method are implemented.
For a specific implementation of this embodiment, reference may be made to the related description in the foregoing vehicle operation scheduling method embodiment, and details are not described here.
It is understood that the same or similar parts in the above embodiments may be mutually referred to, and the same or similar parts in other embodiments may be referred to for the content which is not described in detail in some embodiments.
It should be noted that the terms "first," "second," and the like in the description of the present invention are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Further, in the description of the present invention, the meaning of "a plurality" means at least two unless otherwise specified.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by suitable instruction execution devices. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware related to instructions of a program, which may be stored in a computer readable storage medium, and when the program is executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made to the above embodiments by those of ordinary skill in the art within the scope of the present invention.
Claims (6)
1. A vehicle job scheduling method, comprising:
according to the information of the vehicles to be scheduled, two populations are constructed, each population comprises a plurality of individuals, and each individual represents a scheduling scheme to be selected;
evolving the two populations based on a genetic algorithm, wherein, during evolution, the constituent elements of each individual are distinguished into two chromosomes;
when the evolution completion condition is reached, selecting individuals meeting a preset condition from the population after evolution, and determining the selected individuals as a final scheduling scheme;
the condition of evolution completion is that iteration of preset iteration steps is completed or the average fitness of the population is not changed any more;
if the population is not completely evolved, sequencing the individuals according to the fitness function value, and selecting the individual with the maximum fitness function value as a final scheduling scheme;
adopting the final scheduling scheme to perform operation scheduling on the vehicle to be scheduled; decoding the matrix corresponding to the selected individual to obtain specific contents of the scheduling scheme, such as a processing position and a vehicle number;
according to the information of the vehicles to be dispatched, two groups are constructed, including: constructing an immediate front matrix according to the arrival time of the vehicle to be dispatched; generating a plurality of individuals from the immediate prior matrix; dividing the plurality of individuals into two groups, wherein each individual is a matrix with 2 rows and N columns, N is the number of vehicles to be dispatched, the column number of each column of the matrix is the vehicle number of each vehicle to be dispatched, the elements of the first row of the matrix are the numbers of the processing positions of the vehicles in the corresponding column, and the elements of the second row of the matrix are the processing sequence numbers of the vehicles in the corresponding column on the corresponding processing positions;
the evolving the two populations based on genetic algorithms includes:
respectively evolving each population based on a genetic algorithm;
selecting individuals meeting preset conditions in each population after evolution, and interacting the selected individuals between the two populations;
wherein the evolving each population comprises:
calculating the fitness of each individual according to a predetermined fitness function, and calculating the fitness proportion of each individual in each population according to the fitness of each individual;
selecting a preset number of individuals in each population according to the fitness proportion;
constructing a vehicle dispatching objective function, wherein parameters of the objective function comprise: the system comprises a processing time parameter, a lag cost parameter, a super-inventory cost parameter and a vehicle arrangement punishment parameter which does not meet the special requirements of a client;
determining the reciprocal of the objective function as a fitness function;
wherein the fitness function is fitness ═ 1/f, where f is the objective function:
a1representing the cost per unit time of processing, a2Represents the unit time cost of the lag, a3Represents the cost per unit time of the overstocked product;
flag is a vehicle-arranging punishment parameter which does not meet the special requirements of the client, gamma, delta and epsilon respectively represent the operation sequence of the vehicles entering the processing station which is specified in advance, CkA constant representing a penalty factor for the kth vehicle not being ranked as required;
max(1<j<m)tjfor the machining time parameter, m represents the total number of machining positions, j represents the jth machining position, tjRepresents the machining time at the machining position j;
max(0,∑it(k (j, i), j) -d (k (j, i))) is a lag cost parameter, i represents the number of operations, k represents the work vehicle, k (i, j) represents the vehicle operated at the ith operation at the machining position j, t (k (j, i), j) represents the machining time of the vehicle k (i, j), and d (k (j, i)) represents a delivery time parameter of the vehicle operated at the ith operation at the machining position j; wherein the delivery time is a vehicle specified completion time;
max(0,∑it(k (j, i), j) -d (k (j, i)) -tb (k (j, i))) is a super-inventory cost parameter, and t (j, i))) is a cost per unit areab(k (j, i)) represents a stock time parameter of the vehicle of the i-th operation at the machining position j, wherein the stock time is a stay time of the vehicle.
2. The method of claim 1, wherein evolving each population further comprises: in each population, performing cross operation when determining to perform cross operation on the selected individuals; and/or performing mutation operation when determining the mutation operation of the selected individuals in each population;
during the crossover operation and/or mutation operation, the constituent elements of each individual are divided into two chromosomes, and the crossover operation and/or mutation operation is respectively carried out on the two chromosomes.
3. The method of claim 2, wherein determining the crossover operation for the selected individuals comprises performing the crossover operation by:
dividing the selected individuals into a plurality of groups, each group including two individuals;
respectively taking each group as a current group, randomly generating a second random number, and determining to carry out cross operation on the current group when the second random number is smaller than a preset cross probability;
and taking the first line element of each individual as a first chromosome and the second line element as a second chromosome, and when the current grouping is subjected to cross operation, performing cross operation on the first chromosomes of the two individuals of the current grouping and performing cross operation on the second chromosomes of the two individuals.
4. The method of claim 3, wherein the crossing the first chromosomes of the two individuals currently grouped comprises:
chromosome crossing positions are randomly generated, and elements indicated by the chromosome crossing positions of two individuals are exchanged.
5. The method of claim 3, wherein the performing the crossover operation on the second chromosomes of the two individuals comprises:
the method comprises the steps of respectively taking two individuals as a first individual and a second individual, corresponding to the first individual, randomly generating chromosome crossing positions, determining elements indicated by the chromosome crossing positions in the first individual, determining the arrangement sequence of the elements indicated by the chromosome crossing positions in the first individual in the second individual, and rearranging the elements indicated by the chromosome crossing positions in the first individual according to the arrangement sequence.
6. The method of claim 1, wherein the performing mutation operations when determining mutation operations for the selected individuals comprises:
using the first line element of each selected individual as a first chromosome and the second line element as a second chromosome; randomly generating a third random number corresponding to each element of the first chromosome as a current element, wherein the third random number is generated at the position
When the third random number is smaller than a preset mutation probability, determining to mutate the current element, and when the current element is mutated, randomly selecting an element in the first chromosome and replacing the current element with the randomly selected element;
when the bus arrangement special requirements of the clients do not exist, determining not to mutate the second chromosome; or when the bus arrangement specially required by the client exists, mutation correction is carried out on the second chromosome.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811053888.XA CN109242187B (en) | 2018-09-11 | 2018-09-11 | Vehicle operation scheduling method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811053888.XA CN109242187B (en) | 2018-09-11 | 2018-09-11 | Vehicle operation scheduling method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109242187A CN109242187A (en) | 2019-01-18 |
CN109242187B true CN109242187B (en) | 2021-06-18 |
Family
ID=65067535
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811053888.XA Active CN109242187B (en) | 2018-09-11 | 2018-09-11 | Vehicle operation scheduling method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109242187B (en) |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111291969B (en) * | 2020-01-14 | 2023-04-25 | 东南大学 | Automobile reordering method based on genetic algorithm |
CN111340289B (en) * | 2020-02-25 | 2022-06-14 | 杭州电子科技大学 | Genetic algorithm-based bus departure and speed adjustment optimization method and system |
CN111966447B (en) * | 2020-07-08 | 2024-04-09 | 华南理工大学 | Container placement method based on double-row genetic algorithm |
CN113159399A (en) * | 2021-04-01 | 2021-07-23 | 华南农业大学 | Agricultural machinery scheduling optimization method and system considering field transfer and operation planning |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103279857A (en) * | 2013-06-13 | 2013-09-04 | 南京航空航天大学 | Numerically controlled workshop automatic delivery vehicle scheduling method |
-
2018
- 2018-09-11 CN CN201811053888.XA patent/CN109242187B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103279857A (en) * | 2013-06-13 | 2013-09-04 | 南京航空航天大学 | Numerically controlled workshop automatic delivery vehicle scheduling method |
Non-Patent Citations (1)
Title |
---|
应用多种群遗传算法求解动态车间调度问题;王锐;《中国优秀硕士学位论文全文数据库信息科技辑》;20100715;第I140-57页 * |
Also Published As
Publication number | Publication date |
---|---|
CN109242187A (en) | 2019-01-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109242187B (en) | Vehicle operation scheduling method | |
CN107766994B (en) | Shared bicycle scheduling method and scheduling system | |
CN111539610A (en) | Production management system, method, device, equipment and medium for assembly workshop | |
CN103439886B (en) | A kind of semiconductor production line self-adaptation dynamic scheduler | |
CN109002902A (en) | Subregion multistage fresh agricultural products dynamic vehicle method for optimizing route | |
CN109919532B (en) | Logistics node determining method and device | |
CN110059926A (en) | Sort dispatching method, device, warehousing system and readable storage medium storing program for executing | |
CN107305577B (en) | K-means-based appropriate address data processing method and system | |
CN110503225B (en) | Order dispatching and distributing method | |
CN107909228B (en) | Dynamic vehicle goods receiving and dispatching path planning method and device based on modular factor calculation | |
CN113033895A (en) | Multi-source multi-point path planning method, equipment and storage medium | |
CN105320105A (en) | Optimal scheduling method of parallel batch processing machines | |
CN111461402B (en) | Logistics scheduling optimization method and device, computer-readable storage medium and terminal | |
Berghida et al. | EBBO: an enhanced biogeography-based optimization algorithm for a vehicle routing problem with heterogeneous fleet, mixed backhauls, and time windows | |
CN115952896A (en) | Flexible job shop scheduling method based on material process alignment | |
CN102298737A (en) | Customer commitment-oriented order management system and method thereof | |
CN113792989B (en) | Demand-driven parallel optimization scheduling method between shared sightseeing vehicle areas | |
CN112200460A (en) | Full-automatic multi-working-mode combined scheduling method | |
CN115375024A (en) | Method and system for predicting and reminding purchasing based on bom material loss | |
US10824970B1 (en) | Materials handling facility pick rate allocation | |
Hao et al. | Introduction to the dynamic pickup and delivery problem benchmark--ICAPS 2021 competition | |
CN113807560A (en) | Logistics cost prediction method and device, electronic equipment and storage medium | |
CN109740938A (en) | Net based on order distribution density about goods vehicle platform Transport capacity dispatching system and method | |
CN108898891B (en) | Decision support system for terminal area tail interval approach management | |
CN116451936A (en) | Scheduling method, system and storage medium based on genetic algorithm |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |