JPH07230443A - Method and device for assigning chromosome - Google Patents

Method and device for assigning chromosome

Info

Publication number
JPH07230443A
JPH07230443A JP2076594A JP2076594A JPH07230443A JP H07230443 A JPH07230443 A JP H07230443A JP 2076594 A JP2076594 A JP 2076594A JP 2076594 A JP2076594 A JP 2076594A JP H07230443 A JPH07230443 A JP H07230443A
Authority
JP
Japan
Prior art keywords
chromosome
amount
request
elements
processing
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.)
Withdrawn
Application number
JP2076594A
Other languages
Japanese (ja)
Inventor
Mamoru Kunimoto
衛 国本
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.)
Nippon Steel Corp
Original Assignee
Nippon Steel 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 Nippon Steel Corp filed Critical Nippon Steel Corp
Priority to JP2076594A priority Critical patent/JPH07230443A/en
Publication of JPH07230443A publication Critical patent/JPH07230443A/en
Withdrawn legal-status Critical Current

Links

Abstract

PURPOSE:To provide the chromosome assigning method and device which sufficiently speeds up convergence on an optimum solution when a combinational problem is solved by genetic algorithm. CONSTITUTION:When the correspondence relation between request elements (distribution destination) having request quantities respectively and process elements (truck) whose processable quantities (maximum loading capacity) are defined is represented in a chromosome 30, the operation numbers of the tracks are allocated as values of respective genetic seats 31 of the chromosome 30 without overlapping. Then the tracks are assigned from the 1st distribution destination in order until the request quantity of the distribution destination is satisfied. In this case, the tracks are assigned by the distribution destinations by searching for genetic seats 31 in order from one end side of the chromosome 30 until the sum of the maximum loading quantities exceeds the request quantity of the distribution destination and reading the maximum loading capacity of the track corresponding to the value of each genetic seat 31 out of a maximum loading capacity table 11.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、遺伝的アルゴリズムを
使用して組み合わせ問題を解決する場合における、染色
体の割当て方法および装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and apparatus for allocating chromosomes when solving a combination problem using a genetic algorithm.

【0002】[0002]

【従来の技術】組み合わせ問題は最適化問題の1種であ
って、変数や要素の組み合わせによって値が定まる目的
関数(評価関数)が与えられたとき、所定の制約条件の
下でこの目的関数の値を最大あるいは最小とする組み合
わせを見つけ出そうとするものである。代表的な例とし
て、複数の都市を各1回ずつ訪れる場合に最短の移動距
離となるような訪問順を求める巡回セールスマン問題
や、それぞれ重量と価値が定められている複数の品物が
ある場合に所定の総重量の範囲内で価値の和が最大とな
るように品物を選択するナップザック問題などがある。
通信ネットワークの設計、ジョブスケジューリング、図
形の配置などの問題も、この組み合わせ問題を解くこと
に帰着する場合が多い。組み合わせ問題は、多くの場
合、数学的に解こうとすると総当たりで場合を調べる必
要に迫られるなど、必ずしも短時間かつ少ない計算量で
解決できるものではない。
2. Description of the Related Art A combination problem is a kind of optimization problem, and when an objective function (evaluation function) whose value is determined by a combination of variables and elements is given, the objective function of the objective function is given under a predetermined constraint condition. It tries to find a combination with the maximum or minimum value. A typical example is the case of a traveling salesman problem that seeks the order of visits that results in the shortest travel distance when visiting multiple cities once each, or when there are multiple items with different weights and values. There is a knapsack problem in which an item is selected so that the sum of values is maximized within a predetermined total weight range.
Problems such as communication network design, job scheduling, and graphic placement often result in solving this combination problem. In many cases, combinatorial problems cannot always be solved in a short time and with a small amount of calculation, for example, when trying to solve mathematically, it is necessary to check the case by brute force.

【0003】近年、遺伝的アルゴリズムという解探索手
法が開発されている。遺伝的アルゴリズムは、確率的探
索法の一手法であって、生物の進化過程(選択淘汰、突
然変異)をモデルとしたものである。図1(a)は、遺伝
的アルゴリズムの概要を説明する図、(b)は染色体にお
ける配座例を示す図である。以下、遺伝的アルゴリズム
の概要について説明する。
In recent years, a solution search method called a genetic algorithm has been developed. The genetic algorithm is one of the probabilistic search methods, and is modeled on the evolution process (selection and mutation) of living things. FIG. 1 (a) is a diagram for explaining the outline of the genetic algorithm, and FIG. 1 (b) is a diagram showing an example of conformation on a chromosome. The outline of the genetic algorithm will be described below.

【0004】まず、複数の遺伝子座を有し、各変数ある
いは各要素がそれぞれ遺伝子座に割り付けられた「染色
体(遺伝子)200」を考え、このような染色体を複数
本発生させて(ステップ201)、第1世代の個体群2
02とする。各染色体200は、それぞれ、その含まれ
る変数あるいは要素によって決定される特定の組み合わ
せに対応する。第1世代に属する染色体は、乱数を用い
て生成するのが一般的であるが、予め定めた初期値を用
いるようにしてもよい。
First, consider a "chromosome (gene) 200" having a plurality of loci and each variable or each element assigned to each locus, and generating a plurality of such chromosomes (step 201). , First generation population 2
02. Each chromosome 200 corresponds to a particular combination determined by the variables or elements contained therein. The chromosomes belonging to the first generation are generally generated using random numbers, but a predetermined initial value may be used.

【0005】次に、第1世代の個体群202について、
目的関数の値に応じた適応度を各染色体200ごとに算
出し、適応度の高い染色体を選択し、さらにこの選択さ
れた染色体に交差(生物相同染色体間の交差に対応す
る)や突然変異(一定の確率でランダムに遺伝子座にマ
ッピングされた変数あるいは要素を変化させる)といっ
た操作を加え(ステップ203)、第2世代の個体群2
04を生成する。この過程で、適応度の小さい染色体
(個体)は淘汰される。なお、交差や突然変異で生成す
る新たな染色体の数は、淘汰された染色体の数と同じに
なるようにし、全体としての個体数が一定に維持される
ようにするのが一般的である。そして第2世代の個体群
204に対しても、選択、交差(交配)、突然変異、淘
汰などからなる同様の進化プロセスを施して第3世代の
個体群を生成し、以下、進化プロセスを繰り返して次世
代の個体群を順次生成することにより、第n世代の個体
群205が生成する。
Next, regarding the first generation population 202,
The fitness according to the value of the objective function is calculated for each chromosome 200, a chromosome having a high fitness is selected, and further, the selected chromosome is crossed (corresponding to crossing between biologous homologous chromosomes) or mutation ( An operation such as changing a variable or an element randomly mapped to a locus with a certain probability) is added (step 203), and the second generation population 2 is added.
04 is generated. In this process, chromosomes (individuals) with low fitness are eliminated. The number of new chromosomes generated by crossing or mutation is generally the same as the number of selected chromosomes, so that the total number of individuals is generally kept constant. The same evolution process including selection, crossover (mating), mutation, and selection is applied to the second-generation population 204 to generate a third-generation population, and the evolution process is repeated. By sequentially generating the next-generation population, the population 205 of the nth generation is generated.

【0006】進化プロセスにおいて適応度の小さい個体
が淘汰されているので、第1世代の個体群202に比
べ、第n世代の個体群205は適応度の高い染色体から
構成されていることになる。このようにして世代を追う
ごとに適応度のより高い染色体が得られることになり、
上述のように各染色体はそれぞれ組み合わせに対応して
いるので、より最適に近い組み合わせが見つけられるこ
とになる。また、この遺伝的アルゴリズムでは、進化の
過程で突然変異が加えられていることにより解空間の中
をくまなく探索することになるので、大域的最適解に的
確に到達することが可能となる。現実の多くの問題で
は、遺伝的アルゴリズムを用いることにより、総当たり
で探索する場合に比べ、はるかに短い時間で最適解に到
達できることが知られている(実例としては、「遺伝的
アルゴリズム」、北野宏明編、産業図書、1993年(I
SBN4-7828-5136-7)を参照)。
Since individuals having a low fitness are eliminated in the evolution process, the population 205 of the nth generation is composed of chromosomes having a high fitness as compared with the population 202 of the first generation. In this way, a higher fitness chromosome will be obtained for each generation,
As described above, since each chromosome corresponds to each combination, a more optimal combination can be found. Also, in this genetic algorithm, since the mutation is added during the evolution process, the solution space is searched throughout, so that the global optimum solution can be accurately reached. In many real-world problems, it is known that the optimal solution can be reached in a much shorter time by using the genetic algorithm than in the case of performing a brute force search (as an example, “genetic algorithm”, Hiroaki Kitano, Industrial Books, 1993 (I
SBN4-7828-5136-7)).

【0007】ここで、染色体の構成について説明する。
図1(b)は、トラックの配車計画の作成に遺伝的アルゴ
リズムを適用した場合の染色体200の構成例を示すも
のである。ここでは、25台のトラックを使用して22
箇所の配送先(A社〜V社)に荷物を配送する場合を考
える。トラックごとに規定積載量が定められ、配送先ご
とに荷物の量が定められ、各トラックはそれぞれ1日に
3往復できるものとする。なお、ある配送先への荷物の
量はトラック1回で運べる量であるとは限らず、このよ
うな場合には何台ものトラック(同一のトラックが複数
回往復してもよい)を用いて輸送するものとする。ちな
みに、待機することも考慮して組み合わせの数を計算す
ると、全体で75(=25×3)往復であって、各往復
ごとに22箇所の配送先のいずれかあるいは待機の計2
3通りの場合があるから、単純に計算すれば、23
75(≒1.35×10102)通りとなる。
Here, the constitution of the chromosome will be described.
FIG. 1B shows an example of the configuration of the chromosome 200 when the genetic algorithm is applied to create a truck allocation plan. Here, using 25 trucks, 22
Consider a case where a package is delivered to a delivery destination (company A to company V). It is assumed that the specified load capacity is set for each truck, the amount of luggage is set for each delivery destination, and each truck can make three round trips per day. It should be noted that the amount of luggage to a certain delivery destination is not always the amount that can be carried in one truck, and in such a case, a number of trucks (the same truck may make multiple round trips) may be used. Shall be transported. By the way, when the number of combinations is calculated in consideration of waiting, the total is 75 (= 25 × 3) round trips, and each round trip has one of 22 delivery destinations or a total of 2 waiting spots.
There are three cases, so if you simply calculate,
There are 75 (≈ 1.35 × 10 102 ) ways.

【0008】染色体200は、それぞれのトラックの各
回の往復での行き先を示すものであって、染色体200
上には75個の遺伝子座210が設けられている。ま
た、各遺伝子座210に付与された数字は配送先の番号
を表わし、番号0は待機を表わしている。すなわち、第
m番目(1≦m≦25)のトラックの第n回目(1≦n
≦3)の往復での行き先は、3m+n−3番目の遺伝子
座によって表わされる。図1(b)に例示した染色体20
0では、1番目のトラックは、1回目に8番の配送先
(H社)へ行き、2回目は待機、3回目に22番の配送
先(V社)へ行くこととなり、25番目のトラックは、
1回目、2回目とも10番の配送先(J社)へ行き、3
回目は待機ということになる。
The chromosome 200 indicates the destination of each truck in each round trip.
75 loci 210 are provided on the top. Further, the number assigned to each locus 210 represents the number of the delivery destination, and the number 0 represents the standby. That is, the m-th (1 ≦ m ≦ 25) th track of the n-th track (1 ≦ n
The round trip destination of ≤3) is represented by the 3m + n-3rd locus. Chromosome 20 illustrated in FIG. 1 (b)
With 0, the 1st truck will go to the 8th delivery destination (Company H) at the first time, the second will wait and the 22nd delivery destination (Company V) will go to the 3rd time, and the 25th truck Is
First and second time, go to No. 10 delivery destination (company J) and
The second time is waiting.

【0009】このように設計された染色体を用い、遺伝
的アルゴリズムにより最適な組み合わせ(=最適な配車
計画)を求めるためには、各遺伝子座210にランダム
に配送先(待機も含む)を設定して第1世代の個体群を
形成し、例えば、下記式で表わされるような評価関数f
を用いて選択を行なうようにすればよい。この評価関数
fでは、値が小さいほど優れているすなわち適応度が高
くなっている。
In order to obtain the optimum combination (= optimum vehicle allocation plan) by the genetic algorithm using the chromosomes designed in this way, a delivery destination (including waiting) is randomly set at each locus 210. Form a first-generation population, and, for example, an evaluation function f represented by the following equation
Selection may be performed using. In this evaluation function f, the smaller the value, the better, that is, the higher the fitness.

【0010】[0010]

【数1】 もちろん、各配送先への荷物が全て配送されることが前
提(制約条件)なので、各トラックの規定積載量を考慮
して配送先ごとに実際に配送され得る荷物の量を計算
し、計算された荷物の量が配送先ごとに設定された荷物
の量より多いかどうかをチェックし、この条件を満たさ
ない染色体については、淘汰されるべきものとして、極
端に大きな値を評価関数fに与えるすなわち極端に悪い
適応度を与えるようにすればよい。
[Equation 1] Of course, it is a prerequisite (restriction condition) that all the packages will be delivered to each delivery destination, so the amount of packages that can be actually delivered is calculated for each delivery destination in consideration of the specified loading capacity of each truck. It is checked whether the amount of the package is larger than the amount of package set for each delivery destination, and for the chromosomes that do not satisfy this condition, an extremely large value is given to the evaluation function f as something to be removed. It should be given an extremely bad fitness.

【0011】[0011]

【発明が解決しようとする課題】遺伝的アルゴリズムを
用いて組み合わせ問題を解決しようとする場合、染色体
の設計の良否が、最適解への収束の速さや計算量を規定
する重要な要素となっている。同一の問題を解く場合で
あっても、染色体の設計次第で最適解への収束速度が何
桁も異なる場合もある。極端な場合、染色体の設計が悪
ければ、ランダムサーチと同程度の収束速度しかみせな
いこともある。
When trying to solve a combinatorial problem using a genetic algorithm, the quality of chromosome design is an important factor that determines the speed of convergence to an optimal solution and the amount of calculation. There is. Even when solving the same problem, the convergence speed to the optimal solution may differ by several orders of magnitude depending on the chromosome design. In an extreme case, if the chromosome design is poor, the convergence speed may be similar to that of the random search.

【0012】上述したようなトラックの配車問題を解決
する場合、複数のトラックの中には同一種類のトラック
(車種や最大積載量、運送コストなどがすべて同じトラ
ックのこと)が2台以上含まれる場合がある。同一種類
のトラックが複数含まれると、図1(b)に示した染色体
の設計方法では、同一車種のトラックに対応する遺伝子
座の間で変数を相互に入れ替えても評価関数の値は全く
同じであり、このことによって最適解への収束が遅くな
るという問題点がある。同様に、午前中なのか午後なの
かといった配送時間帯によっては評価関数の値が影響さ
れないとすると、各トラックについて1回目の行き先と
2回目の行き先とを交換しても評価関数の値は同一であ
り、最適解への収束が遅くなることになる。配送時間帯
による評価関数への影響が認められる場合であってもそ
の影響は軽微であると考えられるから、1回目と2回目
の行き先を交換したとしても、評価関数の値の差はわず
かであり、評価関数の値がばらつかないこととなって、
収束が遅くなる。収束が遅くなるのは、個体群中の染色
体が相互に似ているような場合には、局所最適解に陥り
易く、突然変異によってのみ大域的最適解に到達できる
ようになるからである。
To solve the above-mentioned truck allocation problem, a plurality of trucks include two or more trucks of the same type (all trucks having the same vehicle type, maximum load capacity, transportation cost, etc.). There are cases. When multiple trucks of the same type are included, the value of the evaluation function is exactly the same even if the variables are interchanged among the loci corresponding to the trucks of the same car type in the method of designing the chromosome shown in Fig. 1 (b). Therefore, there is a problem that the convergence to the optimum solution becomes slower. Similarly, assuming that the value of the evaluation function is not affected by the delivery time zone such as morning or afternoon, the value of the evaluation function is the same even if the first destination and the second destination are exchanged for each truck. Therefore, the convergence to the optimal solution becomes slow. Even if the delivery time zone has an effect on the evaluation function, the effect is considered to be slight. Therefore, even if the first and second destinations are exchanged, the difference between the values of the evaluation function is small. Yes, the value of the evaluation function does not vary,
Convergence will be slow. The reason for the slower convergence is that when the chromosomes in a population are similar to each other, it tends to fall into a local optimal solution, and the global optimal solution can be reached only by mutation.

【0013】本発明の目的は、遺伝的アルゴリズムによ
って組み合わせ問題を解く場合において、最適解への収
束が十分に速くなる染色体の割当て方法および装置を提
供することにある。
It is an object of the present invention to provide a method and apparatus for allocating chromosomes that can converge to an optimal solution sufficiently quickly when a combinational problem is solved by a genetic algorithm.

【0014】[0014]

【課題を解決するための手段】本発明の染色体の割当て
方法は、それぞれ要求量が定義され順序が設定され複数
個設けられた要求要素とそれぞれ処理可能量が定義され
複数個用意された処理要素との間の対応関係を定める組
み合わせ問題を遺伝的アルゴリズムによって解決するた
めに使用される染色体の割当て方法であって、前記染色
体の各遺伝子座の値としてそれぞれ前記処理要素を重複
を許さずに割当て、前記処理可能量もしくは前記処理可
能量の和が前記順序の先頭順位の前記要求要素の要求量
以上となるまで、前記染色体の一端側の前記遺伝子座か
ら順に前記処理要素を読み出して当該要求要素と前記取
り出された処理要素との間に対応関係を設定し、順次、
次順位の前記要求要素について、前記処理要素が読み出
されていない遺伝子座を対象として、前記対応関係を設
定する処理を繰り返す。
According to the method of allocating a chromosome of the present invention, a plurality of request elements each having a required quantity defined, an order set, and a plurality of processable quantities defined are prepared. A method for allocating chromosomes used to solve a combinational problem that defines a correspondence relationship between and by a genetic algorithm, wherein each of the processing elements is allocated as a value of each locus of the chromosome without allowing duplication. , The processable amount or the sum of the processable amounts becomes equal to or larger than the required amount of the required element in the first rank of the order, the processing elements are sequentially read from the loci on one end side of the chromosome, and the required element is read. And a corresponding relationship between the extracted processing element and
The processing of setting the correspondence relationship is repeated for the locus from which the processing element has not been read for the request element of the next order.

【0015】本発明の染色体の割当て装置は、それぞれ
要求量が定義され複数個設けられた要求要素とそれぞれ
処理可能量が定義され複数個用意された処理要素との間
の対応関係を定める組み合わせ問題を遺伝的アルゴリズ
ムによって解決するために使用される染色体の割当て装
置であって、前記組み合わせ問題が、前記要求要素ごと
に、当該要求要素の要求量を下回らない処理可能量が割
り当てられるように1ないし複数の前記処理要素を当該
要求要素に対応させ、かつ所定の評価関数を最小もしく
は最大にする組み合わせを探索するものであり、前記要
求要素ごとに当該要求要素の要求量を記憶する第1の記
憶手段と、前記処理要素ごとに当該処理要素の処理可能
量を記憶する第2の記憶手段と、前記処理要素の個数に
対応する個数の記憶要素からなり、前記各記憶要素が前
記染色体の各遺伝子座に対応するものである染色体記憶
手段と、前記記憶要素ごとに当該記憶要素の値として前
記処理要素を重複を許さずに割当てて格納し、前記処理
可能量もしくは前記処理可能量の和が前記第1の記憶手
段における先頭順位の前記要求要素の要求量以上となる
まで、前記第2の記憶手段を参照しながら、前記染色体
記憶手段の一端側から前記記憶要素を順に探索して前記
処理要素を読み出して当該要求要素と前記取り出された
処理要素との間に対応関係を設定し、順次、次順位の前
記要求要素について、前記処理要素が読み出されていな
い記憶要素を対象として、前記対応関係を設定する処理
を繰り返す割当て手段、とを有する。
The chromosome assigning apparatus of the present invention is a combination problem that defines a correspondence relationship between a plurality of request elements each having a required amount defined and a plurality of processing elements each having a processable amount defined. A method for allocating a chromosome used for solving the above problem by a genetic algorithm, wherein the combination problem is such that a processable amount that is not less than a required amount of the required element is assigned to each of the required elements. A first storage for searching for a combination that associates a plurality of the processing elements with the request element and minimizes or maximizes a predetermined evaluation function, and stores the requested amount of the request element for each of the request elements. Means, second storage means for storing the processable amount of the processing element for each of the processing elements, and a number corresponding to the number of the processing elements. A chromosomal storage means consisting of elements, wherein each storage element corresponds to each locus of the chromosome, and the processing element is stored as a value of the storage element for each storage element by assigning it without duplication. Until the processable amount or the sum of the processable amounts becomes equal to or more than the required amount of the request element of the first rank in the first storage unit, the chromosome storage unit of the chromosome storage unit is referred to while referring to the second storage unit. The storage elements are sequentially searched from one end side, the processing elements are read, a correspondence relationship is set between the request element and the retrieved processing element, and the processing elements are sequentially processed with respect to the request elements in the next order. Assigning means for repeating the process of setting the correspondence relationship with respect to the storage elements that have not been read.

【0016】[0016]

【作用】遺伝的アルゴリズムにおける染色体の設計の指
針として、完備性(解空間上の解候補は全て染色体に
表現できること)、健全性(染色体表現空間上の染色
体は全て解空間内の解候補に対応付けられること)のほ
かに、非冗長性(染色体と解候補がなるべく1対1に
対応付けられること)などが知られているが、本発明の
染色体の割当て方法および装置は、この非冗長性を高め
ようとするものである。
[Function] As a guideline for designing chromosomes in a genetic algorithm, completeness (all solution candidates in the solution space can be represented by chromosomes) and soundness (all chromosomes in the chromosome expression space correspond to solution candidates in the solution space) In addition to that, non-redundancy (corresponding one-to-one correspondence between a chromosome and a solution candidate) is known. It is intended to raise

【0017】本発明において、組み合わせ問題の内容と
しては各種のものが考えられるが、典型的な例として、
トラックの配車計画の作成が挙げられる。以下、本発明
の作用をトラックの配車問題を例にして例にして説明す
るが、本発明の応用範囲はこれに限られるものではな
い。
In the present invention, various contents can be considered as the contents of the combination problem, but as a typical example,
One example is the preparation of truck allocation plans. Hereinafter, the operation of the present invention will be described by taking the truck allocation problem as an example, but the application range of the present invention is not limited to this.

【0018】トラックの配車計画を組み合わせ問題とし
てとらえたとき、所定の量の荷物の配送を要求した配送
先が要求要素となり、配送を行なうトラックが供給要素
となる。要求量は、その配送先(あて先)に配送すべき
荷物の量であり、処理可能量は、それぞれのトラックの
最大積載量ということになる。「従来の技術」の欄で図
1(b)を用いて説明した染色体では、各遺伝子座そのも
のがトラックに対応し、遺伝子座の値は配送先を示して
いた。これに対し本発明の染色体の割当て方法および装
置では、各遺伝子座の値がトラックに対応し、染色体と
配送先との関連付けは、要求量(配送すべき荷物の量)
と処理可能量(最大積載量)とを介した間接的なものと
なる。このように染色体の割当てを行なうことにより、
同一種類のトラックが存在するような場合、従来の割当
て方法では染色体の縮退が起こって遺伝的アルゴリズム
による解探索に時間がかかるようになるのに対し、本発
明の基づいて染色体の割当てを行なった場合には、染色
体の縮退が極めて起こりにくいので、最適解を短時間で
見つけられる。簡単に言えば、従来の割当て方法では、
解空間内の要素(組み合わせ)と染色体表現空間内の要
素(染色体)とが1対1では対応しないのに対し、本発
明によれば、1対1に近く対応するようになって、効率
良く探索を行なうことができるようになる。
When the truck allocation plan is considered as a combination problem, the delivery destination that has requested delivery of a predetermined amount of luggage is the request element, and the truck performing the delivery is the supply element. The required amount is the amount of luggage to be delivered to the delivery destination, and the processable amount is the maximum load amount of each truck. In the chromosome described in FIG. 1 (b) in the “Conventional Technology” section, each locus itself corresponds to a track, and the locus value indicates the delivery destination. On the other hand, in the chromosome allocation method and device of the present invention, the value of each locus corresponds to the track, and the association between the chromosome and the delivery destination is the required amount (the amount of parcel to be delivered).
And indirectly through the processable amount (maximum load amount). By allocating chromosomes in this way,
In the case where the same type of tracks exist, the conventional allocation method causes the degeneracy of the chromosomes and it takes time to search the solution by the genetic algorithm. However, the allocation of the chromosomes was performed based on the present invention. In this case, since the degeneration of the chromosome is extremely unlikely, the optimal solution can be found in a short time. Simply put, traditional allocation methods
The elements (combinations) in the solution space and the elements (chromosomes) in the chromosome expression space do not have a one-to-one correspondence, but according to the present invention, the one-to-one correspondence is achieved and the efficiency is improved. You will be able to search.

【0019】本発明の染色体の割当て方法および装置が
対象とする組み合わせ問題は、上述のトラックの配車計
画の作成に代表される運送産業でのスケジューリング問
題のほか、各種のスケジューリング、生産工程における
最適条件の算出、実時間制御、ロボットの適応制御など
の分野における組み合わせ問題がが挙げられる。
The combination problem targeted by the method and apparatus for allocating chromosomes of the present invention is not only the scheduling problem in the transportation industry typified by the above-described truck allocation plan but also optimum conditions in various scheduling and production processes. There are combinatorial problems in the fields of computing, real-time control, and adaptive control of robots.

【0020】[0020]

【実施例】次に本発明の実施例について図面を参照して
説明する。図2は本発明の一実施例の染色体の割当て装
置の構成を示すブロック図である。この割当て装置は、
本発明の方法によって染色体の割当てを行なうとともに
各染色体の評価値(目的関数、評価関数の値)を算出
し、この評価値に応じて遺伝的アルゴリズムによる選
択、交配、淘汰を行なうように構成されている。ここで
は、トラックの配車計画を作成する場合を例に挙げて説
明する。
Embodiments of the present invention will now be described with reference to the drawings. FIG. 2 is a block diagram showing the configuration of a chromosome assignment device according to an embodiment of the present invention. This allocation device
According to the method of the present invention, the chromosome is assigned and the evaluation value of each chromosome (objective function, value of the evaluation function) is calculated, and selection, mating and selection by genetic algorithm are performed according to the evaluation value. ing. Here, a case of creating a truck allocation plan will be described as an example.

【0021】問題設定としては、「従来の技術」で述べ
た場合と同様に、25台のトラックを使用して22箇所
の配送先に荷物を配送する場合の配車計画の作成であ
り、各トラックは同一配送先および異なる配送先に対し
て3往復し、各往復では1箇所の配送先のみに荷物を配
送するか待機しているというものである。本実施例で
は、1〜75までの運行番号によってどのトラックの何
回目の往復かを識別するものとする。第m番目のトラッ
クの第n回目(n=1〜3)の往復は、運行番号X=3
m+n−2で表される。例えば15番目のトラックの2
回目の往復は、運行番号44で表わされる。各トラック
には処理可能量に対応する最大積載量がそれぞれ定めら
れ、各配送先には配送先に送るべき荷物の量すなわち要
求量がそれぞれ定められている。要求量の中には、最大
積載量の最大値を越えるものもあり、このような配送先
には複数回の往復(同一トラックでも異なるトラックで
もよい)で配送する必要がある。また、各トラックに
は、最大積載量の範囲内で最適積載量が定められてお
り、この最適積載量の荷物を運ぶ場合に、遺伝的アルゴ
リズムにおける評価値が最良となるようにされている。
As the problem setting, similarly to the case described in "Prior Art", a dispatch plan is created when 25 trucks are used to deliver parcels to 22 delivery destinations. Is to make three round trips to the same delivery destination and different delivery destinations, and in each round trip, deliveries the package to only one delivery destination or waits. In this embodiment, the number of round trips of which truck is identified by the operation numbers from 1 to 75. The n-th round trip (n = 1 to 3) of the m-th truck is operation number X = 3.
It is represented by m + n-2. For example, 2 of the 15th track
The second round trip is represented by the operation number 44. The maximum load amount corresponding to the processable amount is set for each truck, and the amount of parcels to be sent to the delivery destination, that is, the required amount is set for each delivery destination. Some of the requested amounts exceed the maximum value of the maximum load amount, and it is necessary to deliver to such a delivery destination a plurality of round trips (the same truck or different trucks may be used). Further, an optimum load capacity is set for each truck within the range of the maximum load capacity, and when carrying a load of this optimum load capacity, the evaluation value in the genetic algorithm is set to be the best.

【0022】次に、本実施例の割当て装置について説明
する。この割当て装置は、各トラックごとの最大積載量
を記憶する最大積載量テーブル11と、配送先ごとの要
求量を記憶する配送量テーブル12と、染色体を格納す
る染色体格納部13と、最大積載量テーブル11、配送
量テーブル12および染色体格納部13を参照して本発
明の方法に基づき染色体の割当てを行ない各染色体の評
価値を算出する評価値算出部14と、算出された評価値
に基づいて各染色体の適応度を算出し遺伝的アルゴリズ
ムによって染色体の選択、交差、突然変異などの操作を
行ない染色体格納部13内の染色体を次世代の染色体に
置き換えるGA処理部15と、初期値の染色体(第1世
代の個体群の染色体)を乱数によって発生して染色体格
納部13に格納する初期値発生部16とによって構成さ
れている。遺伝的アルゴリズムでは、一般に、100個
とか200個とかの染色体によって各世代の個体群が形
成されるので、それに対応し、染色体格納部13は1世
代の個体群の染色体全体を格納するだけの容量を有して
いる。また、各染色体は複数(この場合は75個)の遺
伝子座によって構成されており、各遺伝子座ごとに染色
体格納部13の記憶要素が割り当てられている。ここで
記憶要素とは、1単位の記憶を行なうものであって、典
型的には染色体格納部13内の各記憶アドレスに対応す
るものである。
Next, the assigning device of this embodiment will be described. This allocation device includes a maximum load capacity table 11 that stores the maximum load capacity of each truck, a delivery quantity table 12 that stores the required quantity of each delivery destination, a chromosome storage unit 13 that stores chromosomes, and a maximum load capacity. Based on the calculated evaluation value, an evaluation value calculation unit 14 that calculates the evaluation value of each chromosome by allocating the chromosome based on the method of the present invention with reference to the table 11, the delivery amount table 12, and the chromosome storage unit 13. A GA processing unit 15 that calculates the fitness of each chromosome and performs operations such as selecting, intersecting, and mutating the chromosomes by a genetic algorithm to replace the chromosomes in the chromosome storage unit 13 with the next-generation chromosomes, and the initial value chromosomes ( An initial value generation unit 16 that generates a chromosome of the first generation population) by random numbers and stores it in the chromosome storage unit 13. In a genetic algorithm, populations of each generation are generally formed by 100 or 200 chromosomes, and correspondingly, the chromosome storage unit 13 has a capacity enough to store the entire chromosomes of the population of one generation. have. Further, each chromosome is composed of a plurality of (75 in this case) loci, and a storage element of the chromosome storage unit 13 is assigned to each locus. Here, the storage element stores one unit of storage, and typically corresponds to each storage address in the chromosome storage unit 13.

【0023】次に、本実施例における染色体の割当てに
ついて、図3を用い、具体例を挙げて説明する。
Next, the assignment of chromosomes in this embodiment will be described with reference to FIG.

【0024】図3(a)に示されるように,染色体30に
は75個の遺伝子座31が設けられ、各遺伝子座31は
値としてトラックの運行番号を保持している。遺伝子座
31の個数の75個は、運行番号が1〜75までである
ことに対応している。この場合、同一の運行番号が異な
る遺伝子座31には現れないようになっている。すなわ
ち、各遺伝子座は、重複を許さずに運行番号を値として
格納している。図示1番左の遺伝子座(第1番目の遺伝
子座)の値は43であるので、この遺伝子座は15番目
のトラックの1回目の往復を表現しており、左から2番
目の遺伝子座(値59)は20番目のトラックの2回目
の往復を表わしている。以下、第m番目のトラック(ト
ラック番号がmのトラック)のことをトラック#mと記
載し、第n番目の配送先(配送先番号nの配送先)のこ
とを配送先#nと記載することにする。
As shown in FIG. 3A, 75 loci 31 are provided on the chromosome 30, and each locus 31 holds the operation number of the truck as a value. The 75 loci 31 correspond to the service numbers 1 to 75. In this case, the same operation number does not appear in different loci 31. That is, each locus stores the operation number as a value without allowing duplication. Since the value of the leftmost locus (first locus) in the figure is 43, this locus represents the first round trip of the fifteenth track, and the second locus from the left ( The value 59) represents the second round trip of the 20th track. Hereinafter, the mth truck (the truck whose truck number is m) is referred to as truck #m, and the nth delivery destination (the delivery destination with delivery destination number n) is referred to as the delivery destination #n. I will decide.

【0025】図3(b)は最大積載量テーブル11の具体
的内容の例を示しており、各トラックごとに最大積載量
が示されている。なお、最大積載量テーブル11には、
どのトラックの何回目の往復がどの運行番号に対応する
かを示すために、運行番号欄が設けられている。また、
図3(c)は配送量テーブル12の具体的内容の例を示し
ており、各配送先ごとに、その配送先に配送すべき荷物
の量が要求量として記憶され、さらに、その配送先まで
の往復の所要時間が記憶されている。往復の所要時間
は、染色体の評価値算出の際に使用されるものである。
FIG. 3B shows an example of the specific contents of the maximum load capacity table 11, in which the maximum load capacity is shown for each truck. In addition, in the maximum load capacity table 11,
An operation number column is provided to indicate which operation number of which round trip of which truck corresponds. Also,
FIG. 3C shows an example of specific contents of the delivery amount table 12. The amount of parcels to be delivered to the delivery destination is stored as a requested amount for each delivery destination, and further, up to the delivery destination. The time required for the round trip is stored. The time required for the round trip is used when calculating the evaluation value of the chromosome.

【0026】本実施例において、染色体の割当ては、各
染色体に対する評価値の算出を行なう際に行なわれる。
選択、交配、淘汰、突然変異などの遺伝子操作の過程で
は、既に求められている評価値に応じた適応度に基づい
て各遺伝子座31の値のみを操作すればよいので、遺伝
子座の値すなわちトラックの運行番号と配送先との関係
が対応付けられている必要がないが、評価値の算出を行
なう場合には、この対応付けが確定していることが前提
となる。
In the present embodiment, the assignment of chromosomes is performed when the evaluation value for each chromosome is calculated.
In the process of gene manipulation such as selection, mating, selection, and mutation, it is sufficient to manipulate only the value of each locus 31 on the basis of the fitness corresponding to the already evaluated value. It is not necessary that the relationship between the truck operation number and the delivery destination is associated, but it is premised that this association is fixed when the evaluation value is calculated.

【0027】図3(a)に示した染色体30において、ト
ラックと配送先との対応付けは、図示左端側の遺伝子座
から開始される。配送量テーブル12を参照するに、配
送先#1の要求量は0であるのでこの配送先#1への配
車は行なわず、続いて、配送先#2の要求量を読み出
す。配送先#2の要求量は3トンであり、最大積載量の
和が3トン以上となるまで、染色体30の遺伝子座31
を図示左端側から探索して、トラックを割り当てる。図
示左端の遺伝子座の値は43であり、これは最大積載量
が3トンであるトラック#15の2回目の往復に対応す
るから、配送先#2へはトラック#15の2回目の往復
で配送するものとする。
On the chromosome 30 shown in FIG. 3A, the association between the truck and the delivery destination is started from the locus on the left end side in the figure. Referring to the delivery amount table 12, since the requested amount of the delivery destination # 1 is 0, the vehicle allocation to the delivery destination # 1 is not performed, and subsequently, the requested amount of the delivery destination # 2 is read. The required amount of the delivery destination # 2 is 3 tons, and the locus 31 of the chromosome 30 remains until the sum of the maximum loading amounts becomes 3 tons or more.
Is searched from the left end side in the figure, and a track is assigned. The locus at the left end of the figure is 43, which corresponds to the second round trip of truck # 15, which has a maximum loading capacity of 3 tons. Therefore, the second round trip of truck # 15 to destination # 2. Shall be delivered.

【0028】次に、配送先#3の要求量をみると2.9
トンであるから、最大積載量の和が2.9トン以上とな
るまで、染色体30の左端から2番目以降の遺伝子座3
1を順次探索してトラックを割り当てる。2番目の遺伝
子座(値59)はトラック#20(最大積載量3トン)
の2回目の往復なので、この往復で配送先#3に行くも
のとする。
Next, looking at the requested amount of the delivery destination # 3, 2.9
Since it is ton, the locus 3 and the second locus from the left end of the chromosome 30 until the sum of the maximum load is 2.9 tons or more.
1 is sequentially searched and a track is assigned. The second locus (value 59) is truck # 20 (max load 3 tons)
This is the second round trip, so this round trip will go to delivery destination # 3.

【0029】配送先#4の要求量は1.9トンである
が、3番目の遺伝子座(値73)は最大積載量1トンの
トラック#25の1回目の往復であるから、これだけで
は要求量1.9トンを満足できない。そこで4番目の遺
伝子座(値70)を参照するとこれは最大積載量1トン
のトラック#24の1回目の往復であり、これらトラッ
ク#25の1回目とトラック#24の1回目の往復での
最大積載量の和は2トンとなる。そこで、配送先#4に
は、トラック#25の1回目とトラック#24の1回目
の往復で荷物を配送するものとする。
Although the requested amount of the delivery destination # 4 is 1.9 tons, the third locus (value 73) is the first round trip of the truck # 25 having the maximum loading capacity of 1 ton, and thus the request is sufficient. We cannot satisfy the quantity of 1.9 tons. Therefore, referring to the fourth locus (value 70), this is the first round trip of truck # 24 having a maximum loading capacity of 1 ton, and the first round trip of truck # 25 and the first round trip of truck # 24. The maximum load capacity is 2 tons. Therefore, it is assumed that the package is delivered to the delivery destination # 4 by the first round trip of the truck # 25 and the first round trip of the truck # 24.

【0030】以下、図示されるように配送先#5,#6
へのトラックの割り付けを行ない、さらに順次、次の配
送先に関し、どのトラックの何回目の往復で配送するの
かを決定して、トラックと配送先との対応付けを完成さ
せていく。この操作の一般的手順は、後述する図5でフ
ローチャートとして表わされている。図3(a)に示した
例では、染色体30の右端から5番目(左端から数えれ
ば71番目)の遺伝子座に達したところで、全ての配送
先(配送先#1〜配送先#22)に対するトラックの割
当てが完了している。このため、染色体30の右端から
4個の遺伝子座は使用しないトラック、すなわち待機す
るトラックを表わしている。例えば、右端から4番目の
遺伝子座の値は1となっているので、トラック#1は1
回目の往復を行なわないことになる。
The delivery destinations # 5 and # 6 are shown below as illustrated.
The trucks are allocated to the trucks, and the next delivery destination is sequentially determined by the number of round trips of which truck to deliver, and the correspondence between the trucks and the delivery destinations is completed. The general procedure of this operation is shown as a flowchart in FIG. 5 described later. In the example shown in FIG. 3 (a), when the fifth locus from the right end of chromosome 30 (the 71st locus counting from the left end) is reached, all delivery destinations (delivery destinations # 1 to # 22) are delivered. Track allocation is complete. Therefore, the four loci from the right end of the chromosome 30 represent unused tracks, that is, waiting tracks. For example, the value of the fourth locus from the right end is 1, so track # 1 is 1
You will not make the second round trip.

【0031】評価値計算部14は、このようにして各染
色体について配送先とトラックとの対応付けを行ない、
各染色体について評価値を算出する。
In this way, the evaluation value calculation unit 14 associates the delivery destination with the truck for each chromosome,
An evaluation value is calculated for each chromosome.

【0032】次に、この染色体の割当て装置を用い遺伝
的アルゴリズムによって組み合わせ問題を解決する場合
の手順、すなわち最適の配車計画を得る手順について、
図4のフローチャートを用いて説明する。
Next, a procedure for solving a combination problem by a genetic algorithm using this chromosome assigning device, that is, a procedure for obtaining an optimum vehicle allocation plan will be described.
This will be described with reference to the flowchart of FIG.

【0033】まず、初期値発生部16により乱数によっ
て染色体30をn個発生させ、第1世代の個体群を生成
する(ステップ111)。各染色体30は上述の図3
(a)で示した構造を有している。そして各染色体30の
それぞれについて、評価値算出部14により、評価値を
算出する(ステップ112)。評価値fとしてはさまざ
まなものが考えられるが、例えば、
First, the initial value generator 16 generates n chromosomes 30 by random numbers to generate a first generation population (step 111). Each chromosome 30 is shown in FIG.
It has the structure shown in (a). Then, the evaluation value calculation unit 14 calculates the evaluation value for each of the chromosomes 30 (step 112). There are various possible evaluation values f, for example,

【0034】[0034]

【数2】 に表わされるものを使用できる。ここでは評価値が小さ
いほどよい染色体、すなわち適応度の大きい染色体であ
る。さらに、燃費や人件費などを考慮して評価値が定め
られるようにしてもよい。なお、低温輸送を必要とする
荷物を通常の(冷蔵でない)トラックで配送するような
ことになっている染色体や、その他、遵守することが強
く求められている制約条件に反するような染色体につい
ては、式(2)による評価値でなく極めて悪い評価値が与
えられたり、乱数によって生成される別の染色体に置き
換えられたりするようにしてもよい。
[Equation 2] The one represented by can be used. Here, the smaller the evaluation value, the better the chromosome, that is, the chromosome having the higher fitness. Furthermore, the evaluation value may be set in consideration of fuel consumption, labor costs, and the like. In addition, regarding chromosomes that are supposed to be shipped by ordinary (not refrigerated) trucks for packages that require low temperature transportation, and other chromosomes that violate the constraints that are strongly required to comply, Alternatively, an extremely bad evaluation value may be given instead of the evaluation value according to Expression (2), or it may be replaced with another chromosome generated by a random number.

【0035】次に、GA処理部15に制御を移し、各染
色体ごとにその評価値から適応度を算出し、選択用ルー
レットを作成する(ステップ113)。選択用ルーレッ
トは、各染色体をその適応度に応じた確率で選択するた
めのものである。そして、選択用ルーレットを用い親と
なる染色体を各1個ずつ選択し全部でn/2組の両親を
選び出し(ステップ114)、両親となる染色体から子
となる染色体を交差により各2個ずつ生成する(ステッ
プ115)。そして、子の染色体に対し適当な確率で突
然変異を施し(ステップ116)、第2世代の個体群を
生成し、染色体格納部15に格納する。このとき、第2
世代の個体群の各染色体において、その染色体内の遺伝
子座の値に重複が生じないように、交差や突然変異を行
なわせるものとする。そしてこの第2世代の各染色体に
ついて上述と同様に評価値を計算する(ステップ11
7)。続いて終了条件を満足しているかどうかの判定、
すなわち配車が終了したかどうかの判定を行なう(ステ
ップ122)。ここでの終了条件としては、例えば、最
良の染色体の評価値が何世代にわたってほとんど変化し
ないとか、評価値が所定の値に達したなどの条件を採用
することができる。終了条件が満足されていれば遺伝的
アルゴリズムによる処理を終了し、満足していなければ
ステップ113に戻って次の世代で同様の処理を繰り返
す。
Then, the control is transferred to the GA processing section 15, the fitness is calculated from the evaluation value of each chromosome, and the selection roulette is prepared (step 113). The selection roulette is for selecting each chromosome with a probability according to its fitness. Then, using the roulette wheel for selection, one parent chromosome is selected for each, and n / 2 sets of parents are selected in total (step 114), and two children chromosomes are generated from each parent chromosome by crossing each other. (Step 115). Then, the offspring chromosome is mutated with an appropriate probability (step 116) to generate a second generation population, which is stored in the chromosome storage unit 15. At this time, the second
In each chromosome of the generational population, crossover and mutation are performed so that the values of the loci within the chromosome do not overlap. Then, an evaluation value is calculated for each of the second generation chromosomes in the same manner as described above (step 11).
7). Next, judge whether the end condition is satisfied,
That is, it is determined whether the vehicle allocation is completed (step 122). As the termination condition here, for example, a condition that the evaluation value of the best chromosome hardly changes over several generations, or the evaluation value reaches a predetermined value can be adopted. If the end condition is satisfied, the process by the genetic algorithm is ended, and if not satisfied, the process returns to step 113 and the same process is repeated in the next generation.

【0036】次に、評価値の計算(ステップ112,1
17)の詳細について、図5を用いて説明する。この評
価値の計算過程では、上述したように、本発明の方法に
よる染色体の割当てが実行される。ここでは、第i番目
の配送先(配送先#i)の要求量をD(i)で表わし、第
j番目の遺伝子座の値に対応するトラックの最大積載量
をA(j)で表わすものとして、染色体の割当て過程を一
般的に説明する。ここでは、上述の運行番号が異なれば
別のトラックであるとして話を進める。
Next, the evaluation value is calculated (steps 112, 1
Details of 17) will be described with reference to FIG. In the process of calculating this evaluation value, as described above, the chromosome allocation by the method of the present invention is executed. Here, the required amount of the i-th delivery destination (delivery destination #i) is represented by D (i), and the maximum load of the truck corresponding to the value of the j-th locus is represented by A (j). As a general rule, the chromosome allocation process will be described. Here, if the above-mentioned operation numbers are different, it is assumed that the truck is a different truck, and the discussion will proceed.

【0037】まず、変数iとjをそれぞれ1に初期化す
る(ステップ120)。配送先#iの要求量が0である
かをチェックし(ステップ121)、0である場合に
は、次の配送先についての処理を行なうために後述のス
テップ131へ移行してiに1を加算し、0でない場合
には、変数MINにjを代入し(ステップ122)、最
大積載量の和を表わす変数Tを0に初期化する(ステッ
プ123)。そして、第j番目の遺伝子座の値に対応す
るトラックの最大積載量A(j)を変数Tに加算する(ス
テップ124)。ここでjの値をチェックし(ステップ
125)、jが遺伝子座の総数と等しい場合、すなわち
遺伝子座の末端に達した場合には、後述するステップ1
33に移行し、末端に達していない場合には次のステッ
プ126へ移行する。第1回目にステップ125を通過
する場合には、一般的には、遺伝子座の末端には到達し
ていないので、ステップ126へ行くことになる。
First, variables i and j are initialized to 1 (step 120). It is checked whether the requested amount of the delivery destination #i is 0 (step 121). If it is 0, the process proceeds to step 131 described later to perform the process for the next delivery destination, and 1 is set to i. If it is not 0, j is substituted for the variable MIN (step 122), and the variable T representing the sum of the maximum loading amounts is initialized to 0 (step 123). Then, the maximum load capacity A (j) of the truck corresponding to the value of the j-th locus is added to the variable T (step 124). Here, the value of j is checked (step 125), and when j is equal to the total number of loci, that is, when the end of the locus is reached, step 1 described later is performed.
33, and if the end has not been reached, the process proceeds to the next step 126. When passing through the step 125 for the first time, generally, since the end of the gene locus has not been reached, the step goes to the step 126.

【0038】ステップ126では、jに1を加算する。
続いて、変数Tが配送先#iの要求量D(i)以上となっ
ているかをチェックし(ステップ127)、D(i)≦T
であれば配送先#iの要求量を満足してトラックが割当
てられているのでステップ128に移行する。D(i)>
Tの場合には、配送先#iの要求量がまだ満足されてい
ない場合なので、次の遺伝子座に対応するトラックもこ
の配送先#iに割り当てるために、ステップ124に戻
る。ステップ124に戻った時点では、T≠0であっ
て、既にこの配送先#iに割り付けられたトラックの最
大積載量の和がTとなっているから、このループを繰り
返すことにより、配送先#iの要求量を満足するまで次
々とトラックが割り付けられることになる。
At step 126, 1 is added to j.
Then, it is checked whether the variable T is equal to or larger than the requested amount D (i) of the delivery destination #i (step 127), and D (i) ≦ T.
In this case, since the truck is assigned with satisfying the request amount of the delivery destination #i, the process proceeds to step 128. D (i)>
In the case of T, since the requested amount of the delivery destination #i is not yet satisfied, the process returns to step 124 in order to assign the truck corresponding to the next locus to the delivery destination #i. At the time of returning to step 124, T ≠ 0, and the sum of the maximum load capacity of the trucks already assigned to this delivery destination #i is T. Therefore, by repeating this loop, the delivery destination # Tracks will be allocated one after another until the requirement of i is satisfied.

【0039】ステップ127でD(i)≦Tであって配送
先#iに対するトラックの割り付けが完了したら、ステ
ップ128において、j−1をMAXに代入する。この
時点で、配送先#iに対応付けられた遺伝子座のうちの
最初のものの番号が変数MINに、最後のものの番号が
変数MAXに代入されているから、次に、変数MINと
MAXの間の遺伝子座に対応する各トラックと配送先#
iとの対応付けを行ない、配送先#iについての処理を
終了する(ステップ129)。そして、未処理の配送先
が残っているかを判断し(ステップ130)、未処理の
配送先が残っていなければ、この染色体についての割当
てが全て完了した場合なので評価値を算出して(ステッ
プ132)、評価値算出処理をすべて終了する。評価値
算出の際、トラックの使用台数を評価関数に加味して評
価値を良くしてもよい。一方、ステップ130で配送先
が残っている場合には、次の配送先の処理に移るため、
iに1を加算し(ステップ131)、ステップ121に
戻る。
When D (i) ≤T and the allocation of the truck to the delivery destination #i is completed in step 127, j-1 is substituted into MAX in step 128. At this point, the number of the first locus associated with the delivery destination #i is assigned to the variable MIN, and the number of the last locus is assigned to the variable MAX. Therefore, next, between the variables MIN and MAX. Trucks and shipping destinations for each locus #
It is associated with i, and the process for delivery destination #i is completed (step 129). Then, it is judged whether or not any unprocessed delivery destinations remain (step 130). If no unprocessed delivery destinations remain, it means that the assignment for this chromosome has been completed, and an evaluation value is calculated (step 132). ), And the evaluation value calculation process is completed. When calculating the evaluation value, the evaluation value may be improved by adding the number of used trucks to the evaluation function. On the other hand, if the delivery destination remains in step 130, the process moves to the next delivery destination.
1 is added to i (step 131), and the process returns to step 121.

【0040】ステップ125で遺伝子座の末端に到達し
たことが検出されたときは、未処理の配送先があるにも
関わらず未割当てのトラックがなくなった場合であり、
所定の配送を行なうことができない場合である。このと
きは、ステップ133において、変数MAXにjを代入
する。この時点で、配送先#iに対応付けられた遺伝子
座のうちの最初のものの番号が変数MINに、最後のも
のの番号が変数MAXに代入されているから、次に、変
数MINとMAXの間の遺伝子座に対応する各トラック
と配送先#iとの対応付けを行なう(ステップ13
4)。そして、所定の配送を実行することができない染
色体として、極端に悪い評価値をこの染色体に与えて、
あるいは未積載量を評価値に加えて(ステップ13
5)、評価値算出処理を全て終了する。ただし、ステッ
プ135の時点で、D(i)≦Tかつiが最後の配送先に
対応する場合は、所定の配送が行なえている場合である
ので、ステップ132と同様に、通常の評価値をこの染
色体に与えるものとする。あるいは、トラックの使用台
数を評価関数に加味して評価値を良くしてもよい。
When it is detected in step 125 that the end of the locus has been reached, it means that there is no unassigned truck despite the unprocessed delivery destination.
This is the case when the prescribed delivery cannot be performed. At this time, in step 133, j is substituted for the variable MAX. At this point, the number of the first locus associated with the delivery destination #i is assigned to the variable MIN, and the number of the last locus is assigned to the variable MAX. Therefore, next, between the variables MIN and MAX. The respective trucks corresponding to the loci of the above are associated with the delivery destination #i (step 13).
4). Then, as a chromosome that cannot perform the predetermined delivery, an extremely bad evaluation value is given to this chromosome,
Alternatively, the unloaded amount is added to the evaluation value (step 13
5), the evaluation value calculation process is completed. However, when D (i) ≦ T and i corresponds to the last delivery destination at the time of step 135, it means that the predetermined delivery can be performed, and thus the normal evaluation value is set as in step 132. It shall be given to this chromosome. Alternatively, the evaluation value may be improved by adding the number of used trucks to the evaluation function.

【0041】以上の処理を各染色体30に施すことによ
り、各染色体30の評価値をそれぞれ算出することがで
きる。
By performing the above processing on each chromosome 30, the evaluation value of each chromosome 30 can be calculated.

【0042】次に、本実施例によって染色体の割当てを
行ない、遺伝的アルゴリズムによって配車計画を作成し
た場合と、「従来の技術」欄で図1(b)を用いて説明し
た染色体を使用し遺伝的アルゴリズムによって配車計画
を作成した場合(従来例)を比較した結果を説明する。
問題設定は、本実施例において上述したものとし、ま
た、本実施例に基づき50万世代の世代交代を行なわ
せ、配車計画の最良解を得ておいた。その結果、本実施
例によれば、4000世代の進化で、最良解との重量誤
差が4.3トン、時間誤差が3.3時間である解が得られ
たのに対し、従来例によれば、20000世代の進化
で、最良解との重量誤差が5.0トン、時間誤差が10.
6時間である解が得られた。結局、従来の方法を用いた
場合に比べ、本発明によれば、短時間でよりよい解が得
られることが確認された。
Next, the case of allocating the chromosomes according to the present embodiment and creating the vehicle allocation plan by the genetic algorithm, and the case of using the chromosomes described with reference to FIG. The result of comparing the case where the vehicle allocation plan is created by the statistical algorithm (conventional example) will be described.
The problem setting is as described above in the present embodiment, and the generation change of 500,000 generations is performed based on the present embodiment to obtain the best solution for the vehicle allocation plan. As a result, according to the present example, in the evolution of 4000 generations, a solution with a weight error of 4.3 tons and a time error of 3.3 hours from the best solution was obtained, whereas with the conventional example. For example, with the evolution of the 20000 generation, the weight error from the best solution is 5.0 tons and the time error is 10.
A solution of 6 hours was obtained. In the end, it was confirmed that a better solution can be obtained in a shorter time according to the present invention than in the case of using the conventional method.

【0043】遺伝的アルゴリズムでは、各染色体にその
適応度に応じた淘汰圧力が加わることになるが、単純に
適応度に比例して染色体が選択される(適応度比例戦
略)ようにするだけでなく、例えば、最もよい染色体
は必ず次世代に生き残るようにする(エリート保存戦
略)、適応度によって各染色体をいくつかのランクの
うちの1つにランク付けしランクに応じた確率で子孫を
残せるようにする(ランク戦略)、各染色体が残す子孫
の期待値を計算した上でその染色体が選択された場合に
その期待値から0.5を引く(期待値戦略)などの戦略
をとるようにしてもよい。エリート保存戦略は最良の染
色体を生き残らす戦略であり、期待値戦略は染色体数が
少ない場合の乱数のゆらぎの影響を抑える戦略である。
In the genetic algorithm, selection pressure is applied to each chromosome according to its fitness, but it is possible to simply select the chromosome in proportion to the fitness (fitness proportional strategy). No, for example, make sure that the best chromosomes survive in the next generation (elite conservation strategy), rank each chromosome in one of several ranks according to fitness, and leave offspring with a probability according to the rank (Rank strategy), calculate the expected value of the offspring left by each chromosome, and if that chromosome is selected, subtract 0.5 from that expected value (expected value strategy). May be. The elite conservation strategy is a strategy for surviving the best chromosomes, and the expected value strategy is a strategy for suppressing the influence of random number fluctuations when the number of chromosomes is small.

【0044】[0044]

【発明の効果】以上説明したように本発明は、それぞれ
要求量が定義され複数個設けられた要求要素とそれぞれ
処理可能量が定義され複数個用意された処理要素との間
の対応関係を定める組み合わせ問題を遺伝的アルゴリズ
ムによって解決する場合に、染色体の各遺伝子座の値と
してそれぞれ処理要素を重複を許さずに割当て、処理可
能量の和が要求要素の要求量以上となるまで遺伝子座を
順に探索して処理要素を読み出して当該要求要素と取り
出された処理要素との間に対応関係を設定することを繰
り返すことにより、染色体の非冗長性が向上して、より
短い時間で最適の組み合わせを求めることができるよう
になるという効果がある。特に本発明によれば、運送産
業でのスケジューリングや配送計画を短時間で作成でき
るようになる。
As described above, according to the present invention, the correspondence relationship between the request elements provided with a plurality of request amounts defined and the plurality of processing elements provided with the processable amounts defined is determined. When solving the combinatorial problem using a genetic algorithm, the processing elements are assigned as the values of each locus of the chromosome without duplication, and the loci are sequentially processed until the sum of the processable amounts exceeds the required amount of the required elements. By repeating searching and reading the processing element and setting the correspondence between the request element and the extracted processing element, the non-redundancy of the chromosome is improved, and the optimum combination can be obtained in a shorter time. The effect is that you can ask for it. Particularly, according to the present invention, it becomes possible to create a scheduling and a delivery plan in the transportation industry in a short time.

【図面の簡単な説明】[Brief description of drawings]

【図1】(a)は遺伝的アルゴリズムの概要を説明する
図、(b)は染色体の構成例を示す図である。
FIG. 1A is a diagram for explaining an outline of a genetic algorithm, and FIG. 1B is a diagram showing a configuration example of a chromosome.

【図2】本発明の一実施例の染色体の割当て装置の構成
を示すブロック図である。
FIG. 2 is a block diagram showing a configuration of a chromosome assignment device according to an embodiment of the present invention.

【図3】(a)は染色体の割当て例を示す図、(b)は最大積
載量テーブルの内容の例を示す図、(c)は配送量テーブ
ルの内容の例を示す図である。
3A is a diagram showing an example of chromosome allocation, FIG. 3B is a diagram showing an example of contents of a maximum load amount table, and FIG. 3C is a diagram showing an example of contents of a delivery amount table.

【図4】図2の装置における遺伝的アルゴリズムによる
処理を示す流れ図である。
4 is a flow chart showing processing by a genetic algorithm in the apparatus of FIG.

【図5】染色体の割当ておよび評価値算出の過程を示す
流れ図である。
FIG. 5 is a flowchart showing a process of allocating a chromosome and calculating an evaluation value.

【符号の説明】[Explanation of symbols]

11 最大積載量テーブル 12 配送量テーブル 13 染色体格納部 14 評価値算出部 15 GA処理部 16 初期値発生部 30,200 染色体 31,210 遺伝子座 111〜118,120〜135,201,203
ステップ 202,204,205 個体群
11 maximum load amount table 12 delivery amount table 13 chromosome storage unit 14 evaluation value calculation unit 15 GA processing unit 16 initial value generation unit 30,200 chromosomes 31,210 loci 111-118, 120-135, 201,203
Steps 202, 204, 205 Population

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 庁内整理番号 FI 技術表示箇所 C12Q 1/68 Z 9453−4B G06F 15/18 550 C 9071−5L 17/60 // G05B 13/02 M 7531−3H G06F 15/21 C ─────────────────────────────────────────────────── ─── Continuation of the front page (51) Int.Cl. 6 Identification code Internal reference number FI Technical display location C12Q 1/68 Z 9453-4B G06F 15/18 550 C 9071-5L 17/60 // G05B 13 / 02 M 7531-3H G06F 15/21 C

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 それぞれ要求量が定義され順序が設定さ
れ複数個設けられた要求要素とそれぞれ処理可能量が定
義され複数個用意された処理要素との間の対応関係を定
める組み合わせ問題を遺伝的アルゴリズムによって解決
するために使用される染色体の割当て方法であって、 前記染色体の各遺伝子座の値としてそれぞれ前記処理要
素を重複を許さずに割当て、 前記処理可能量もしくは前記処理可能量の和が前記順序
の先頭順位の前記要求要素の要求量以上となるまで、前
記染色体の一端側の前記遺伝子座から順に前記処理要素
を読み出して当該要求要素と前記取り出された処理要素
との間に対応関係を設定し、順次、次順位の前記要求要
素について、前記処理要素が読み出されていない遺伝子
座を対象として、前記対応関係を設定する処理を繰り返
す、染色体の割当て方法。
1. A combination problem which defines a correspondence relationship between a plurality of request elements each having a defined request amount and a set order and a plurality of prepared process elements each having a processable amount defined therein is genetically defined. A method of allocating a chromosome used for solving by an algorithm, wherein each of the processing elements is assigned as a value of each locus of the chromosome without allowing duplication, and the processable amount or the sum of the processable amounts is Correspondence between the required processing element and the processing element retrieved by sequentially reading the processing elements from the locus on one end side of the chromosome until the required amount of the required elements in the first order of the order is equal to or more than the required amount. And a process of sequentially setting the correspondence relationship with respect to the request elements in the next order, targeting loci from which the processing elements have not been read out. Repeat, allocation method of the chromosome.
【請求項2】 それぞれ要求量が定義され複数個設けら
れた要求要素とそれぞれ処理可能量が定義され複数個用
意された処理要素との間の対応関係を定める組み合わせ
問題を遺伝的アルゴリズムによって解決するために使用
される染色体の割当て装置であって、 前記組み合わせ問題が、前記要求要素ごとに、当該要求
要素の要求量を下回らない処理可能量が割り当てられる
ように1ないし複数の前記処理要素を当該要求要素に対
応させ、かつ所定の評価関数を最小もしくは最大にする
組み合わせを探索するものであり、 前記要求要素ごとに当該要求要素の要求量を記憶する第
1の記憶手段と、 前記処理要素ごとに当該処理要素の処理可能量を記憶す
る第2の記憶手段と、 前記処理要素の個数に対応する個数の記憶要素からな
り、前記各記憶要素が前記染色体の各遺伝子座に対応す
るものである染色体記憶手段と、 前記記憶要素ごとに当該記憶要素の値として前記処理要
素を重複を許さずに割当てて格納し、前記処理可能量も
しくは前記処理可能量の和が前記第1の記憶手段におけ
る先頭順位の前記要求要素の要求量以上となるまで、前
記第2の記憶手段を参照しながら、前記染色体記憶手段
の一端側から前記記憶要素を順に探索して前記処理要素
を読み出して当該要求要素と前記取り出された処理要素
との間に対応関係を設定し、順次、次順位の前記要求要
素について、前記処理要素が読み出されていない記憶要
素を対象として、前記対応関係を設定する処理を繰り返
す割当て手段、とを有する染色体の割当て装置。
2. A genetic algorithm is used to solve a combination problem that defines a correspondence relationship between a plurality of request elements each having a required amount defined and a plurality of process elements each having a processable amount defined. A chromosome allocation device used for that, wherein the combination problem is such that one or a plurality of the processing elements are assigned such that a processable amount that does not fall below the request amount of the request element is assigned to each of the request elements. First search means for searching for a combination that corresponds to a request element and that minimizes or maximizes a predetermined evaluation function, and stores a request amount of the request element for each request element, and for each processing element A second storage means for storing the processable amount of the processing element, and a number of storage elements corresponding to the number of the processing elements. The element is a chromosome storage means that corresponds to each locus of the chromosome, and the processing element is stored by assigning the processing element as a value of the storage element without duplication, and the processable amount or the Until the sum of the processable amounts becomes equal to or larger than the required amount of the request element of the first rank in the first storage means, the storage element is loaded from one end side of the chromosome storage means while referring to the second storage means. A search is performed in order to read the processing elements, a correspondence relationship is set between the request element and the fetched processing element, and the processing elements of the request elements in the next order are not read. A chromosome assigning device, comprising: an assigning unit that repeats the process of setting the correspondence with respect to an element.
【請求項3】 前記組み合わせ問題が運送産業でのスケ
ジューリング問題である請求項2に記載の染色体の割当
て装置。
3. The chromosome assignment device according to claim 2, wherein the combination problem is a scheduling problem in the transportation industry.
【請求項4】 前記第1の要素があて先に対応し、前記
要求量が対応するあて先から要求された配送量であり、
前記第2の要素が運搬手段による1回の運搬に対応し、
前記処理可能量が対応する運搬手段の最大運搬可能量で
ある請求項3に記載の染色体の割当て装置。
4. The first element corresponds to a destination, and the requested amount is a delivery amount requested from the corresponding destination,
The second element corresponds to one-time transportation by the transportation means,
The chromosome allocation device according to claim 3, wherein the treatable amount is the maximum transportable amount of the corresponding transporting means.
JP2076594A 1994-02-18 1994-02-18 Method and device for assigning chromosome Withdrawn JPH07230443A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2076594A JPH07230443A (en) 1994-02-18 1994-02-18 Method and device for assigning chromosome

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2076594A JPH07230443A (en) 1994-02-18 1994-02-18 Method and device for assigning chromosome

Publications (1)

Publication Number Publication Date
JPH07230443A true JPH07230443A (en) 1995-08-29

Family

ID=12036281

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2076594A Withdrawn JPH07230443A (en) 1994-02-18 1994-02-18 Method and device for assigning chromosome

Country Status (1)

Country Link
JP (1) JPH07230443A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5897629A (en) * 1996-05-29 1999-04-27 Fujitsu Limited Apparatus for solving optimization problems and delivery planning system
JP2021103417A (en) * 2019-12-25 2021-07-15 株式会社豊田中央研究所 Optimization device, optimization method, and computer program

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5897629A (en) * 1996-05-29 1999-04-27 Fujitsu Limited Apparatus for solving optimization problems and delivery planning system
JP2021103417A (en) * 2019-12-25 2021-07-15 株式会社豊田中央研究所 Optimization device, optimization method, and computer program

Similar Documents

Publication Publication Date Title
Tan et al. A hybrid multi-objective evolutionary algorithm for solving truck and trailer vehicle routing problems
Khouja et al. A review of the joint replenishment problem literature: 1989–2005
Zheng et al. Multi-objective multi-population biased random-key genetic algorithm for the 3-D container loading problem
Liu et al. Novel multi-objective resource allocation and activity scheduling for fourth party logistics
Borumand et al. A developed genetic algorithm for solving the multi-objective supply chain scheduling problem
Başligil et al. A distribution network optimization problem for third party logistics service providers
JPH10222562A (en) Method for supporting multipurpose will decision
JP2000036093A (en) Vehicle allocation device
Jamrus et al. Extended priority-based hybrid genetic algorithm for the less-than-container loading problem
Wauters et al. A decomposition approach to dual shuttle automated storage and retrieval systems
JP2816802B2 (en) Search device and search method for optimal dispatch and delivery sequence in delivery problem
CN110705765A (en) E-commerce order boxing optimization method based on genetic algorithm and heuristic strategy
Ayadi et al. Memetic Algorithm for a Multi-Objective Vehicle Routing Problem with Multiple Trips.
Chen et al. Integrated scheduling of zone picking and vehicle routing problem with time windows in the front warehouse mode
CN110942251B (en) Batch scheduling method based on joint ant colony algorithm
Queirolo et al. Warehouse layout design: minimizing travel time with a genetic and simulative approach—methodology and case study
JPH07234997A (en) Method/system for planning car allocation
Singh et al. Carton Set Optimization in E‐commerce Warehouses: A Case Study
Rüther et al. A grouping genetic algorithm for multi depot pickup and delivery problems with time windows and heterogeneous vehicle fleets
Fakhrzad et al. A realistic perish ability inventory management for location-inventory-routing problem based on Genetic Algorithm
Roohnavazfar et al. A hybrid algorithm for the Vehicle Routing Problem with AND/OR Precedence Constraints and time windows
JPH07230443A (en) Method and device for assigning chromosome
Kozan An integrated material handling system for a truck assembly plant
JPH07219920A (en) Processing method and device for solving optimization problem
Aziz et al. Genetic algorithm based approach for the mufti product multi period inventory routing problem

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20010508