JP2023001055A - Program, data processing apparatus, and data processing method - Google Patents

Program, data processing apparatus, and data processing method Download PDF

Info

Publication number
JP2023001055A
JP2023001055A JP2022092512A JP2022092512A JP2023001055A JP 2023001055 A JP2023001055 A JP 2023001055A JP 2022092512 A JP2022092512 A JP 2022092512A JP 2022092512 A JP2022092512 A JP 2022092512A JP 2023001055 A JP2023001055 A JP 2023001055A
Authority
JP
Japan
Prior art keywords
allocation
matrix
change
memory
state
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2022092512A
Other languages
Japanese (ja)
Inventor
ムハマド バーゲルベイク
Bagherbeik Mohammad
アリ シェイクホレスラミ
Ali Sheikholeslami
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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to EP22179185.8A priority Critical patent/EP4105837A1/en
Priority to US17/841,385 priority patent/US20220414184A1/en
Priority to CN202210678832.3A priority patent/CN115496251A/en
Publication of JP2023001055A publication Critical patent/JP2023001055A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Complex Calculations (AREA)

Abstract

To solve assignment problems at high speed.SOLUTION: A storage unit 11 stores a flow matrix representing flows between a plurality of entities to be assigned to a plurality of destinations, and a distance matrix representing distances between the plurality of destinations. A processing unit 12 calculates a first change in an evaluation function, which is to be caused by a first assignment change of exchanging the destinations of first and second entities among the plurality of entities, with vector arithmetic operations based on the flow and distance matrices, determines based on the first change whether to accept the first assignment change, and when determining to accept the first assignment change, updates an assignment state and updates the distance matrix by swapping the two columns or two rows (two columns in the example of FIG. 2) of the distance matrix corresponding to the first and second entities.SELECTED DRAWING: Figure 2

Description

本発明は、プログラム、データ処理装置及びデータ処理方法に関する。 The present invention relates to a program, a data processing device, and a data processing method.

割当問題は、配車ルーティングやFPGA(Field-Programmable Gate Array)のブロック配置など、様々な実世界のアプリケーションをもつNP困難な組合せ最適化問題のクラスである。割当問題の例として、2次割当問題(QAP:Quadratic Assignment Problem)がある(たとえば、非特許文献1参照)。 Allocation problems are a class of NP-hard combinatorial optimization problems that have a variety of real-world applications such as vehicle dispatch routing and block placement in Field-Programmable Gate Arrays (FPGAs). An example of the assignment problem is the quadratic assignment problem (QAP) (see Non-Patent Document 1, for example).

2次割当問題は、n個の要素(施設など)をn個の割当先に割り当てる際に、要素間のフロー量(施設間での物資の輸送量などのコスト)と、各要素が割り当てられる割当先間の距離との積の総和を最小化するような割当を求める問題である。すなわち、2次割当問題は、以下の式(1)で表される評価関数の値を最小化するような割当を探索する問題である。評価関数は割当状態に応じたコストを表し、コスト関数などとも呼ばれる。 In the secondary allocation problem, when n elements (facilities, etc.) are allocated to n allocation destinations, the amount of flow between elements (cost such as the amount of goods transported between facilities) and each element are allocated. This is a problem of finding an allocation that minimizes the sum of products of distances between allocation destinations. That is, the secondary assignment problem is a problem of searching for an assignment that minimizes the value of the evaluation function represented by Equation (1) below. The evaluation function expresses the cost according to the allocation state, and is also called a cost function.

Figure 2023001055000002
Figure 2023001055000002

式(1)において、fi,jは、識別番号=i,jの要素間のフロー量、dφ(i),φ(j)は、識別番号=i,jの要素が割り当てられている割当先間の距離を示す。
ところで、ノイマン型コンピュータが不得意とする大規模な離散最適化問題を計算する装置として、イジング型の評価関数を用いたボルツマンマシン(イジング装置とも呼ばれる)がある。ボルツマンマシンは、回帰型ニューラルネットワークの一種である。
In equation (1), f i,j is the amount of flow between elements with identification numbers=i and j, and d φ(i) and φ(j) are assigned to elements with identification numbers=i and j. Indicates the distance between assignees.
By the way, there is a Boltzmann machine (also called an Ising machine) using an Ising evaluation function as a device for calculating a large-scale discrete optimization problem, which is not good for von Neumann computers. A Boltzmann machine is a type of recurrent neural network.

ボルツマンマシンは、組合せ最適化問題を磁性体のスピンの振る舞いを表すイジングモデルに変換する。そして、ボルツマンマシンは、疑似焼き鈍し法やパラレルテンパリング(たとえば、非特許文献2参照)などのマルコフ連鎖モンテカルロ法により、イジング型の評価関数の値が最小となるイジングモデルの状態の探索を行う(たとえば、非特許文献3参照)。評価関数の値は、エネルギーに相当する。なお、ボルツマンマシンは、評価関数の符号を変えれば、評価関数の値が極大になる状態を探索することもできる。イジングモデルの状態は、複数の状態変数の値(ニューロン値とも呼ばれる)の組合せにより表現できる。各状態変数の値として、0または1を用いることができる。 A Boltzmann machine transforms a combinatorial optimization problem into an Ising model that represents the spin behavior of a magnetic material. Then, the Boltzmann machine uses a Markov chain Monte Carlo method such as pseudo-annealing or parallel tempering (see, for example, Non-Patent Document 2) to search for the state of the Ising model that minimizes the value of the Ising-type evaluation function (for example, , Non-Patent Document 3). The value of the evaluation function corresponds to energy. By changing the sign of the evaluation function, the Boltzmann machine can also search for the state where the value of the evaluation function is maximized. The state of the Ising model can be represented by a combination of multiple state variable values (also called neuron values). 0 or 1 can be used as the value of each state variable.

イジング型の評価関数は、たとえば、以下の式(2)で定義される。 The Ising evaluation function is defined, for example, by the following equation (2).

Figure 2023001055000003
Figure 2023001055000003

右辺の1項目は、イジングモデルの全状態変数の全組合せについて、漏れと重複なく、N個の状態変数から選ばれる2つの状態変数の値(0または1)と重み値(2つの状態変数の間の相互作用の強さを表す)との積を積算したものである。sは、識別番号がiの状態変数、sは、識別番号がjの状態変数であり、wi,jは、識別番号がiとjの状態変数間の相互作用の大きさを示す重み値である。右辺の2項目は、各識別番号についてのバイアス係数と状態変数との積の総和を求めたものである。bは、識別番号=iについてのバイアス係数を示している。 One item on the right side is the value (0 or 1) of two state variables selected from N state variables without omission or duplication, and the weight value (of the two state variables) for all combinations of all state variables of the Ising model. It represents the strength of the interaction between s i is the state variable with the identification number i, s j is the state variable with the identification number j, and w i,j indicates the magnitude of the interaction between the state variables with the identification numbers i and j. is a weight value. The two items on the right side are sums of products of bias coefficients and state variables for each identification number. b i indicates the bias coefficient for identification number=i.

また、sの値の変化に伴うエネルギーの変化量(ΔE)は、以下の式(3)で表される。 Also, the amount of change in energy (ΔE i ) that accompanies the change in the value of s i is represented by the following equation (3).

Figure 2023001055000004
Figure 2023001055000004

式(3)において、sが1から0に変化するとき、Δsは-1となり、sが0から1に変化するとき、Δsは1となる。なお、hは局所場と呼ばれ、Δsに応じてhに符号(+1または-1)を乗じたものがΔEとなる。 In equation (3), Δs i becomes −1 when s i changes from 1 to 0, and Δs i becomes 1 when s i changes from 0 to 1. Note that h i is called a local field, and ΔE i is obtained by multiplying h i by a sign (+1 or −1) according to Δs i .

そして、たとえば、ΔEが、乱数と温度パラメータの値に基づいて得られるノイズ値(熱ノイズとも呼ばれる)より小さい場合には、sの値を更新することで状態遷移を発生させ、局所場も更新する、という処理が繰り返される。 Then, for example, if ΔE i is smaller than the noise value (also called thermal noise) obtained based on the random number and the value of the temperature parameter, the value of s i is updated to generate a state transition, and the local field is also updated, and the process is repeated.

このようなボルツマンマシンを用いて2次割当問題を計算する技術が提案されている(たとえば、特許文献1、非特許文献4参照)。
2次割当問題のイジング型の評価関数は、以下の式(4)で表せる。
Techniques for calculating the quadratic allocation problem using such Boltzmann machines have been proposed (see Patent Document 1 and Non-Patent Document 4, for example).
The Ising-type evaluation function for the secondary assignment problem can be expressed by the following equation (4).

Figure 2023001055000005
Figure 2023001055000005

式(4)において、xは状態変数をベクトル化したものであり、n個の要素のn個の割当先への割当状態を表す。xは、(x1,1,…,x1,n,x2,1,…,x2,n,……,xn,1,…,xn,n)と表せる。xi,j=1は、識別番号=iの要素が、識別番号=jの割当先に割り当てられていることを示し、xi,j=0は、識別番号=iの要素が、識別番号=jの割当先に割り当てられていないことを示す。 In equation (4), x is a vectorized state variable, and represents the allocation state of n elements to n allocation destinations. xT can be expressed as (x1,1,...,x1,n,x2,1 , ... , x2 ,n ,..., xn,1 ,..., xn,n ). x i,j =1 indicates that the element with identification number=i is assigned to the assignee with identification number=j, and x i,j =0 indicates that the element with identification number=i = indicates that it is not assigned to the assignee of j.

Wは、重み値の行列であり、前述のフロー量(fi,j)と、n個の割当先間の距離の行列Dを用いて、以下の式(5)で表せる。 W is a matrix of weight values, and can be represented by the following equation (5) using the aforementioned flow amount (f i,j ) and matrix D of distances between n allocation destinations.

Figure 2023001055000006
Figure 2023001055000006

米国特許出願公開第2021/0326679号明細書U.S. Patent Application Publication No. 2021/0326679

Eugene L. Lawler, “The quadratic assignment problem”, Management Science, Vol.9, No.4 pp.586-599, July 1963Eugene L. Lawler, “The quadratic assignment problem”, Management Science, Vol.9, No.4 pp.586-599, July 1963 Robert H. Swendsen and Jian-Sheng Wang, ”Replica monte carlo simulation of spin-glasses”, Physical Review Letters, Vol.57, No.21, pp.2607-2609, November 1986Robert H. Swendsen and Jian-Sheng Wang, ``Replica monte carlo simulation of spin-glasses'', Physical Review Letters, Vol.57, No.21, pp.2607-2609, November 1986 K. Dabiri, et al., “Replica Exchange MCMC Hardware With Automatic Temperature Selection and Parallel Trial”, IEEE Transactions on Parallel and Distributed Systems, Vol.31, No.7, pp.1681-1692, July 2020K. Dabiri, et al., “Replica Exchange MCMC Hardware With Automatic Temperature Selection and Parallel Trial”, IEEE Transactions on Parallel and Distributed Systems, Vol.31, No.7, pp.1681-1692, July 2020 M.Bagherbeik et al., ”A permutational boltzmann machine with parallel tempering for solving combinatorial optimization problems”, In International Conference on Parallel Problem Solving from Nature, pp.317-331, Springer, 2020M.Bagherbeik et al., ``A permutational boltzmann machine with parallel tempering for solving combinatorial optimization problems'', In International Conference on Parallel Problem Solving from Nature, pp.317-331, Springer, 2020 Rainer E Burkard, Stefan E Karisch, and Franz Rendl, “Qaplib-a quadratic assignment problem library”, Journal of Global optimization, 10(4), pp.391-403, 1997Rainer E Burkard, Stefan E Karisch, and Franz Rendl, “Qaplib-a quadratic assignment problem library”, Journal of Global optimization, 10(4), pp.391-403, 1997 Gintaras Palubeckis, “An algorithm for construction of test cases for the quadratic assignment problem”, Informatica, Lith. Acad. Sci., Vol.11, No.3, pp.281-296, 2000Gintaras Palubeckis, “An algorithm for construction of test cases for the quadratic assignment problem”, Informatica, Lith. Acad. Sci., Vol.11, No.3, pp.281-296, 2000 Zvi Drezner, Peter M Hahn, and Eric D Taillard, “Recent advances for the quadratic assignment problem with special emphasis on instances that are difficult for meta-heuristic methods”, Annals of Operations research, 139(1), pp.65-94, 2005Zvi Drezner, Peter M Hahn, and Eric D Taillard, “Recent advances for the quadratic assignment problem with special emphasis on instances that are difficult for meta-heuristic methods”, Annals of Operations research, 139(1), pp.65-94 , 2005 Allyson Silva, Leandro C. Coelho, and Maryam Darvish, “Quadratic assignment problem variants: A survey and an effective parallel memetic iterated tabu search”, European Journal of Operational Research, 2020Allyson Silva, Leandro C. Coelho, and Maryam Darvish, “Quadratic assignment problem variants: A survey and an effective parallel memetic iterated tabu search”, European Journal of Operational Research, 2020 Danny Munera, Daniel Diaz, and Salvador Abreu, “Hybridization as cooperative parallelism for the quadratic assignment problem”, In Hybrid Metaheuristics, pp. 47-61, Springer International Publishing Switzerland, 2016Danny Munera, Daniel Diaz, and Salvador Abreu, “Hybridization as cooperative parallelism for the quadratic assignment problem”, In Hybrid Metaheuristics, pp. 47-61, Springer International Publishing Switzerland, 2016 Kresimir Mihic, Kevin Ryan, and Alan Wood, “Randomized decomposition solver with the quadratic assignment problem as a case study”, INFORMS Journal on Computing, Vol.30, No.2, pp.295-308, 2018Kresimir Mihic, Kevin Ryan, and Alan Wood, “Randomized decomposition solver with the quadratic assignment problem as a case study”, INFORMS Journal on Computing, Vol.30, No.2, pp.295-308, 2018

上記のような評価関数を用いて2次割当問題を計算する手法は、エネルギーの変化量の計算や、局所場の更新などの処理が多数回繰り返され、メモリアクセスも多数回繰り返されるため計算に時間がかかる。 The method of calculating the quadratic assignment problem using the above evaluation function requires many iterations of processing such as calculation of the amount of change in energy and updating of the local field, and memory access is also repeated many times. time consuming.

1つの側面では、本発明は、割当問題を高速に計算できるプログラム、データ処理装置及びデータ処理方法を提供することを目的とする。 An object of the present invention in one aspect is to provide a program, a data processing apparatus, and a data processing method capable of calculating allocation problems at high speed.

1つの実施態様では、割当問題の解を、割当状態に応じたコストを表す評価関数を用いた局所探索により探索する処理をコンピュータに実行させるプログラムであって、メモリに記憶された、複数の割当先へ割り当てられる複数の要素間のフロー量を表すフロー行列と、前記複数の割当先間の距離を表す距離行列と、に基づいて、前記複数の要素のうち、第1の要素と第2の要素の割当先が入れ替わる第1の割当変更が生じた場合の、前記評価関数の第1の変化量を、ベクトル算術演算を用いて計算し、前記第1の変化量に基づいて、前記第1の割当変更を許容するか否かを判定し、前記第1の割当変更を許容すると判定した場合、前記割当状態を更新するとともに、前記距離行列において、前記第1の要素と前記第2の要素に対応する2列または2行を入れ替えるように更新する、処理を前記コンピュータに実行させるプログラムが提供される。 In one embodiment, a program for causing a computer to execute a process of searching for a solution to an allocation problem by local search using an evaluation function representing a cost according to an allocation state, wherein a plurality of allocations stored in a memory Based on a flow matrix representing the amount of flow between the plurality of elements to be allocated first and a distance matrix representing the distance between the plurality of allocation destinations, the first element and the second element among the plurality of elements calculating a first amount of change in the evaluation function using vector arithmetic operations when a first allocation change occurs in which an element allocation destination is replaced; and based on the first amount of change, the first If it is determined that the first allocation change is permitted, the allocation state is updated, and in the distance matrix, the first element and the second element A program is provided that causes the computer to perform a process of updating to swap two columns or two rows corresponding to .

また、1つの実施態様では、データ処理装置が提供される。
また、1つの実施態様では、データ処理方法が提供される。
Also, in one embodiment, a data processing apparatus is provided.
Also, in one embodiment, a data processing method is provided.

1つの側面では、本発明は、割当問題を高速に計算できる。 In one aspect, the present invention enables fast computation of allocation problems.

QAPの計算例を示す図である。It is a figure which shows the calculation example of QAP. QAPの計算時における距離行列の並べ替え例とデータ処理装置の例を示す図である。FIG. 10 is a diagram showing an example of rearrangement of distance matrices and an example of a data processing device when calculating QAP; キャッシュ行列の更新計算の例を示す図である。FIG. 10 is a diagram illustrating an example of cache matrix update calculation; パラレルテンパリングを実行するソルバーシステムの例を示す図である。FIG. 2 illustrates an example solver system that performs parallel tempering; QAPの解をパラレルテンパリングによる局所探索で探索するアルゴリズムの例を示す図である。FIG. 4 is a diagram showing an example of an algorithm for searching for a QAP solution by local search by parallel tempering; パラレルテンパリングによる局所探索の全体の処理の流れを示すフローチャートである。4 is a flow chart showing the overall processing flow of local search by parallel tempering; QAPの場合のレプリカの初期化処理の一例の流れを示すフローチャートである。FIG. 11 is a flow chart showing an example of the flow of replica initialization processing in the case of QAP; FIG. QAPの場合のレプリカ探索処理の一例の流れを示すフローチャートである。FIG. 11 is a flow chart showing an example of the flow of replica search processing in the case of QAP; FIG. QSAPの解をパラレルテンパリングによる局所探索で探索するアルゴリズムの例を示す図である。FIG. 10 is a diagram showing an example of an algorithm for searching for a QSAP solution by local search by parallel tempering; QSAPの場合のレプリカの初期化処理の一例の流れを示すフローチャートである。FIG. 11 is a flow chart showing an example of the flow of replica initialization processing in the case of QSAP; FIG. QSAPの場合のレプリカ探索処理の一例の流れを示すフローチャートである。FIG. 11 is a flow chart showing an example of the flow of replica search processing in the case of QSAP; FIG. VΔC法と比較したSAM法、BM$法による計算の高速化の度合いの評価結果を示す図である。FIG. 10 is a diagram showing evaluation results of the degree of speeding up of calculation by the SAM method and the BM$ method compared with the VΔC method; スカラー型の演算処理に対するベクトル型の演算処理の高速化の度合いの評価結果を示す図である。FIG. 10 is a diagram showing evaluation results of the degree of acceleration of vector-type arithmetic processing relative to scalar-type arithmetic processing; 負荷分散の一例を示す図である。It is a figure which shows an example of load distribution. 負荷分散による演算処理の高速化の度合いの評価結果を示す図である。FIG. 10 is a diagram showing evaluation results of the degree of speeding up of arithmetic processing by load balancing; 測定アルゴリズムの一例を示す図である。FIG. 4 is a diagram showing an example of a measurement algorithm; VΔC法、SAM法、BM$法について測定された相対的な高速化の度合いと、問題サイズに応じて占有されるメモリ階層を示す図である。Fig. 2 shows the relative speedup measured for the VΔC, SAM, and BM$ methods and the memory hierarchy occupied as a function of problem size; ΔC生成回路の一例を示す図である。FIG. 4 is a diagram showing an example of a ΔC generation circuit; 列の入れ替えを行うハードウェア構成の第1の例を示す図である。FIG. 10 is a diagram illustrating a first example of a hardware configuration for permuting columns; 列の入れ替え例を示す図である。It is a figure which shows the example of permuting a row|line|column. 列の入れ替えを行うハードウェア構成の第2の例を示す図である。FIG. 10 is a diagram illustrating a second example of a hardware configuration for permuting columns; 列の入れ替えを行うハードウェア構成の第2の例の1つ目の変形例を示す図である。FIG. 10 is a diagram showing a first modification of the second example of the hardware configuration for permuting columns; 列の入れ替えを行うハードウェア構成の第2の例の2つ目の変形例を示す図である。FIG. 11 is a diagram showing a second modification of the second example of the hardware configuration for permuting columns; 列の入れ替えを行うハードウェア構成の第3の例を示す図である。FIG. 13 is a diagram illustrating a third example of a hardware configuration for permuting columns; 列の入れ替えを行うハードウェア構成の第3の例の変形例を示す図である。FIG. 12 is a diagram showing a modification of the third example of the hardware configuration for permuting columns; ΔC生成回路の他の例を示す図である。FIG. 10 is a diagram showing another example of a ΔC generation circuit; 2つのレプリカについての処理を行うハードウェア構成の例を示す図である。FIG. 10 is a diagram illustrating an example of a hardware configuration for processing two replicas; FIG. ΔC生成回路の他の例を示す図である。FIG. 10 is a diagram showing another example of a ΔC generation circuit; レプリカ処理回路の一例を示す図である。It is a figure which shows an example of a replica processing circuit. 非対称行列を用いたQAPの計算で用いられるレプリカ処理回路の一例を示す図である。FIG. 4 is a diagram showing an example of a replica processing circuit used in QAP calculation using an asymmetric matrix; データ処理装置の一例であるコンピュータのハードウェア例を示す図である。It is a figure which shows the hardware example of the computer which is an example of a data processing apparatus.

以下、発明を実施するための形態を、図面を参照しつつ説明する。
本実施の形態のデータ処理装置は、割当問題の例として2次割当問題(QAP)または2次半割当問題(QSAP:Quadratic Semi-Assignment Problem)の解を、局所探索により探索する。以下、QAP、QSAP及び局所探索について説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, embodiments for carrying out the invention will be described with reference to the drawings.
The data processing apparatus of the present embodiment searches for a solution of a quadratic assignment problem (QAP) or a quadratic semi-assignment problem (QSAP: Quadratic Semi-Assignment Problem) as an example of an assignment problem by local search. QAP, QSAP and local search are described below.

(QAP)
図1は、QAPの計算例を示す図である。QAPは、n個の要素(施設など)をn個の割当先に割り当てる際に、要素間のフロー量と、各要素が割り当てられる割当先間の距離との積の総和を最小化するような割当を求める問題である。
(QAP)
FIG. 1 is a diagram showing an example of QAP calculation. QAP, when assigning n elements (facilities, etc.) to n assignees, minimizes the sum of the products of the flow amount between the elements and the distance between the assignees to which each element is assigned. It is a matter of asking for allocation.

図1には、1~4の識別番号が付された4つの施設を4箇所の割当先(L~L)に割り当てる例が示されている。
n個の要素間のフロー量を表すフロー行列は、以下の式(6)で表される。
FIG. 1 shows an example of allocating four facilities with identification numbers 1 to 4 to four allocation destinations (L 1 to L 4 ).
A flow matrix representing the amount of flow between n elements is represented by the following equation (6).

Figure 2023001055000007
Figure 2023001055000007

フロー行列(F)は、n行n列の行列である。fi,jはi行j列のフロー量であり、識別番号=i,jの要素間のフロー量を表す。たとえば、図1の識別番号=1の施設と識別番号=2の施設との間のフロー量は、f1,2と表せる。 The flow matrix (F) is a matrix with n rows and n columns. f i,j is the amount of flow in row i and column j, and represents the amount of flow between elements with identification number=i,j. For example, the amount of flow between the facility with identification number=1 and the facility with identification number=2 in FIG. 1 can be expressed as f 1,2 .

n箇所の割当先間の距離を表す距離行列は、以下の式(7)で表される。 A distance matrix representing the distance between n allocation destinations is represented by the following equation (7).

Figure 2023001055000008
Figure 2023001055000008

距離行列(D)は、n行n列の行列である。dk,lはk行l列の距離であり、識別番号=k,lの割当先間の距離を表す。たとえば、図1の識別番号=1の割当先(L)と識別番号=2の割当先(L)との間の距離は、d1,2と表せる。 The distance matrix (D) is a matrix of n rows and n columns. d k, l is the distance of k rows and l columns, and represents the distance between the allocation destinations of identification numbers=k, l. For example, the distance between the allocation destination (L 1 ) with identification number=1 and the allocation destination (L 2 ) with identification number=2 in FIG. 1 can be expressed as d 1,2 .

QAPの計算は、前述の式(1)を最小化するような割当を探索することで行われる。n個の要素のn箇所の割当先への割当状態は、整数割当ベクトルφまたはバイナリ状態行列Xで表される。φは集合Φの要素である。Φは、セットN={1,2,3,…,n}の全ての順列のセットである。バイナリ状態行列Xに含まれるバイナリ変数であるxi,jは、以下の式(8)で表される。 QAP computation is done by searching for allocations that minimize equation (1) above. The allocation state of n elements to n allocation destinations is represented by an integer allocation vector φ or a binary state matrix X. φ is an element of the set Φ n . Φ n is the set of all permutations of the set N={1,2,3,...,n}. A binary variable x i,j included in the binary state matrix X is represented by the following equation (8).

Figure 2023001055000009
Figure 2023001055000009

図1には、識別番号=1の施設が識別番号=2の割当先、識別番号=2の施設が識別番号=3の割当先、識別番号=3の施設が識別番号=4の割当先、識別番号=4の施設が識別番号=1の割当先にそれぞれ割り当てられた場合の例が示されている。整数割当ベクトルφは、φ(1)=2、φ(2)=3、φ(3)=4、φ(4)=1となっている。バイナリ状態行列Xは、x1,2、x2,3、x3,4、x4,1がそれぞれ1となっており、その他のxi,jは0になっている。 In FIG. 1, the facility with identification number = 1 is the allocation destination with identification number = 2, the facility with identification number = 2 is the allocation destination with identification number = 3, the facility with identification number = 3 is the allocation destination with identification number = 4, An example is shown in which facilities with identification number=4 are assigned to allocation destinations with identification number=1. The integer assignment vector φ is φ(1)=2, φ(2)=3, φ(3)=4, and φ(4)=1. In the binary state matrix X, x 1,2 , x 2,3 , x 3,4 and x 4,1 are each 1, and the other x i,j are 0.

QAPには、フロー行列と距離行列の一方または両方が対称行列の場合と、フロー行列と距離行列の両方が非対称行列の場合がある。本実施の形態では、主に対称行列(対角成分が0(バイアスレス))を用いたQAPに焦点が当てられている。このようなQAPが、インスタンスの大部分であるし、計算を単純化するためである。ただし、対称行列を用いたQAPは、非対称行列を用いたQAPに直接的に変換可能である。 In QAP, one or both of the flow matrix and the distance matrix are symmetrical, and both the flow matrix and the distance matrix are asymmetrical. In this embodiment, the focus is mainly on QAP using a symmetric matrix (diagonal elements are 0 (biasless)). This is because such QAPs are the bulk of the instances and to simplify the calculations. However, QAP with symmetric matrices can be directly converted to QAP with asymmetric matrices.

(QSAP)
QSAPはQAPを変形したものである。QSAPでは、要素数と割当先の数とが等しくない。たとえば、各割当先に複数の要素を割り当てることが許容される。QSAPでは、距離行列は以下の式(9)で表される。
(QSAP)
QSAP is a variant of QAP. In QSAP, the number of elements and the number of assignees are not equal. For example, it is permissible to assign multiple elements to each assignee. In QSAP, the distance matrix is represented by Equation (9) below.

Figure 2023001055000010
Figure 2023001055000010

距離行列(D)の対角要素は、割当先内でのルーティングを考慮するため非零である。QSAPではさらに、以下の式(10)で表される追加の行列Bが用いられる。 The diagonal elements of the distance matrix (D) are non-zero to allow for intra-assignment routing. QSAP also uses an additional matrix B expressed in Equation (10) below.

Figure 2023001055000011
Figure 2023001055000011

i,kは、識別番号=iの要素を識別番号=kの割当先に割り当てるための一定のコストを表している。
QSAPの計算は、QAPの評価関数である式(1)の代わりに、以下の式(11)を最小化するような割当を探索することで行われる。
b i,k represents a constant cost for assigning the element with identification number=i to the assignee with identification number=k.
QSAP is calculated by searching for assignments that minimize the following equation (11) instead of equation (1), which is the QAP evaluation function.

Figure 2023001055000012
Figure 2023001055000012

n個の要素のm箇所の割当先への割当状態は、整数割当ベクトルψ(ψ∈[1,m])、またはバイナリ状態行列Sで表される。バイナリ状態行列Sに含まれるバイナリ変数であるsi,jは、以下の式(12)で表される。 The allocation state of n elements to m allocation destinations is represented by an integer allocation vector ψ(ψε[1, m] n ) or a binary state matrix S. A binary variable s i,j included in the binary state matrix S is represented by the following equation (12).

Figure 2023001055000013
Figure 2023001055000013

(局所探索)
局所探索では、現在の状態の変更によって到達可能な近傍状態内において候補解の探索が行われる。QAPに対して局所探索を行う方法として、要素間のペアワイズ交換がある。この手法では、2つの要素が選択され、それらの割当先が交換される。2つの要素(識別番号=a,bで表される)の、割当先(識別番号=φ(a),φ(b)で表される)の交換による評価関数(式(1))の値の変化量は、以下の式(13)で表すことができる。
(local search)
Local search searches for candidate solutions within neighboring states that are reachable by changing the current state. Pairwise exchange between elements is a method of performing local search for QAP. In this approach, two elements are selected and their assignments are exchanged. The value of the evaluation function (formula (1)) obtained by exchanging the allocation destinations (identification numbers = φ(a), φ(b)) of the two elements (identification numbers = a, b) can be expressed by the following equation (13).

Figure 2023001055000014
Figure 2023001055000014

式(13)のように、変化量(ΔCex)は積和演算ループによって生成される。
QSAPに対してペアワイズ交換により局所探索を行う場合、評価関数(式(11))の値の変化量は、以下の式(14)で表すことができる。
As shown in equation (13), the amount of change (ΔC ex ) is generated by a sum-of-products operation loop.
When local search is performed on QSAP by pairwise exchange, the amount of change in the value of the evaluation function (equation (11)) can be expressed by the following equation (14).

Figure 2023001055000015
Figure 2023001055000015

式(14)においてΔBexは、各割当先への要素の割当に関する一定のコストの変化を示し、以下の式(15)で表される。 In Equation (14), ΔB ex indicates a constant change in cost for allocating elements to each assignee, and is expressed by Equation (15) below.

Figure 2023001055000016
Figure 2023001055000016

QSAPにおける状態空間は、割当状態を表す前述の順列のみに制約されない。ある割当先に、別の要素が割り当てられているかどうかに関係なく、要素をその割当先に再配置することができる。識別番号=aの要素を、現在の割当先(識別番号=ψ(a))から識別番号=lの割当先に、割当変更する際の評価関数の値の変化量は、以下の式(16),(17)で表される。 The state space in QSAP is not constrained only to the aforementioned permutations representing allocation states. An element can be relocated to its assignee regardless of whether another element is assigned to that assignee. The amount of change in the value of the evaluation function when the element of identification number = a is changed from the current allocation destination (identification number = ψ(a)) to the allocation destination of identification number = l is given by the following formula (16 ), (17).

Figure 2023001055000017
Figure 2023001055000017

Figure 2023001055000018
Figure 2023001055000018

局所探索では、上記のように計算される変化量に基づいて、その変化量の評価関数の値の変化を引き起こす割当変更の提案を受け入れるか否かが決定される。提案を受け入れるか否かは、たとえば、貪欲法など事前に定義された基準に基づいて決定される。貪欲法が用いられる場合、コスト(評価関数の値(エネルギー))を削減する割当変更が受け入れられる。貪欲法が用いられる場合、提案の受け入れ確率(PAR:Proposal Acceptance Rate)は、探索の開始時に高くなるが、探索が評価関数の極小値でスタックし、それ以上の改善の動きが見つからないため、後に0に近づく傾向がある。 In the local search, based on the amount of change calculated as described above, it is determined whether or not to accept a proposal of assignment change that causes a change in the value of the evaluation function of the amount of change. Whether or not to accept the offer is determined based on predefined criteria, eg, greedy. If the greedy method is used, allocation changes that reduce the cost (value of the cost function (energy)) are accepted. When the greedy method is used, the Proposal Acceptance Rate (PAR) is high at the beginning of the search, but the search gets stuck at a local minimum of the evaluation function and no further improvement moves are found. It tends to approach 0 later.

貪欲法に代えて、本実施の形態では、疑似焼き鈍し法などの確率的局所探索法を使用することができる。確率的局所探索法では、割当の変化にランダム性を加えるために、温度パラメータ(T)を使用して、以下の式(18)で表されるメトロポリス法の受入れ確率(Pacc)を用いることができる。 Instead of the greedy method, this embodiment can use a probabilistic local search method such as the pseudo-annealing method. In the probabilistic local search method, the temperature parameter (T) is used to add randomness to the assignment changes, using the Metropolis method acceptance probability (P acc ) expressed in equation (18) below. be able to.

Figure 2023001055000019
Figure 2023001055000019

Tが無限大に向かって増加すると、Pacc及びPARは増加し、ΔCの値に関係なくすべての提案が受け入れられる。Tが下げられて0に近づくと、提案の受け入れは貪欲になり、PARは探索が最終的に評価関数の極小値でスタックするため、0になる傾向がある。 As T increases towards infinity, P acc and PAR increase and all proposals are accepted regardless of the value of ΔC. As T is lowered and approaches 0, proposal acceptance becomes greedy and PAR tends to 0 as the search eventually gets stuck at a local minimum of the evaluation function.

QAPとQSAPのΔCの計算は、データ処理装置が割当問題の解を探索する際に、データ処理装置における合計処理時間の大部分を占める。
ΔCの計算を、以下のようにベクトル算術演算を用いて行うことで計算の高速化が可能となる。
The calculation of ΔC for QAP and QSAP accounts for most of the total processing time in the data processing system as it searches for a solution to the allocation problem.
Calculation of ΔC can be performed at high speed by using vector arithmetic operations as follows.

(ΔC計算のベクトル化)
以下この手法をVΔC法と呼ぶ場合がある。式(13)によるQAPのΔCexの計算は、i=a,bの計算をスキップするという条件がなければ、内積計算を用いて簡単にベクトル化できる。
(Vectorization of ΔC calculation)
Hereinafter, this method may be referred to as the VΔC method. Calculation of ΔC ex of QAP by Equation (13) can be easily vectorized using inner product calculation, provided that there is no condition to skip the calculation of i=a,b.

本実施の形態のデータ処理装置は、この条件をなくし、ΔCexの計算をn個のすべての要素に関する積和演算ループとし、以下の式(19)に示されるように、フロー量と距離との追加の積を補償項として加えることで、その条件をなくすことによる補償を行う。 The data processing apparatus of the present embodiment eliminates this condition, calculates ΔC ex as a product-sum operation loop for all n elements, and uses the flow amount and the distance as shown in the following equation (19). Compensate by removing that condition by adding an additional product of as a compensation term.

Figure 2023001055000020
Figure 2023001055000020

式(19)は、識別番号=a,bの要素の割当先が入れ替わったときの、フロー量の差のベクトルΔF(式(20))及び距離の差のベクトルΔD(式(21))を用いて、式(22)のように、内積を使用して再定式化できる。 Equation (19) expresses the flow amount difference vector ΔF (equation (20)) and the distance difference vector ΔD (equation (21)) when the allocation destinations of the elements with identification numbers = a and b are switched. can be reformulated using inner products as in equation (22).

Figure 2023001055000021
Figure 2023001055000021

Figure 2023001055000022
Figure 2023001055000022

Figure 2023001055000023
Figure 2023001055000023

式(20)のΔ Fは、フロー行列のb行とa行の差ベクトルを表し、Fb,*はフロー行列のb行を示し、Fa,*はフロー行列のa行を示す。
ベクトルΔFの要素は、元のフロー行列の順序で配置されるが、ベクトルΔDの要素は現在の割当状態に対応するように並べられる。これは、式(21)のように、転置されたバイナリ状態行列X(Xと表記されている)と(Dφ(a),*-Dφ(b),*)との乗算によって数学的に示される。Dφ(a),*は距離行列のa行を示し、Dφ(b),*は距離行列のb行を示す。
Δ b a F in equation (20) represents the difference vector between rows b and a of the flow matrix, F b,* denotes row b of the flow matrix, and F a,* denotes row a of the flow matrix. .
The elements of vector ΔF are arranged in the order of the original flow matrix, while the elements of vector ΔD are ordered to correspond to the current allocation state. This can be done mathematically by multiplying the transposed binary state matrix X (denoted X T ) by (D φ(a),* −D φ(b),* ) as in equation (21). shown D φ(a),* denotes row a of the distance matrix and D φ(b),* denotes row b of the distance matrix.

ソフトウェアでは、式(21)のような計算は、要素数=nに比例する時間でベクトルΔDの要素を並べ替えることで実現される。
QSAPの場合、1つの割当先に要素が複数配置可能であるため、以下の式(23)のようにm行m列の距離行列から、サイズ=nのベクトル(ΔD)が生成される。
In software, a calculation such as Equation (21) is realized by rearranging the elements of vector ΔD in time proportional to the number of elements=n.
In the case of QSAP, since a plurality of elements can be arranged in one allocation destination, a vector (ΔD) of size=n is generated from a distance matrix of m rows and m columns as shown in Equation (23) below.

Figure 2023001055000024
Figure 2023001055000024

このようなベクトルΔDと式(20)に示したベクトルΔFとを用いて、ΔC exは、以下の式(24)により計算できる。 Using such a vector ΔD and the vector ΔF shown in equation (20), ΔC s ex can be calculated by the following equation (24).

Figure 2023001055000025
Figure 2023001055000025

QSAPの場合、複数の要素が同じ割当先に割り当てられることが制限されないことから、式(24)の2行目のような追加の補償項がΔCに加えられる。
また、式(17)に対応する再配置によるΔC relの計算のベクトル化した形式は、以下の式(25)のように表せる。
Since QSAP does not restrict multiple elements to be assigned to the same assignee, an additional compensation term is added to ΔC as in the second line of equation (24).
Also, the vectorized form of the calculation of ΔC s rel by rearrangement corresponding to Equation (17) can be expressed as Equation (25) below.

Figure 2023001055000026
Figure 2023001055000026

再配置による要素の割当先の移動は、1つの要素について行われるため、ベクトルΔFの計算と、フロー量と距離との積を加えることによる補償は必要ない。
(距離行列の並べ替え)
上記のVΔC法は、SIMD(Single Instruction/Multiple Data)を用いることで、複数のCPU(Central Processing Unit)や複数のGPU(Graphics Processing Unit)などのプロセッサ上に実装可能である。
Since the movement of the assignment destination of the element due to rearrangement is performed for one element, it is not necessary to calculate the vector ΔF and compensate by adding the product of the flow amount and the distance.
(Rearrangement of distance matrix)
The above VΔC method can be implemented on processors such as multiple CPUs (Central Processing Units) and multiple GPUs (Graphics Processing Units) by using SIMD (Single Instruction/Multiple Data).

しかし、VΔC法で行われるΔDの要素の並べ替えは、要素数=nに比例する時間で実行することができるが、2つの要素の割当先の入れ替えによるΔCの計算のたびに実行されるため処理効率がよくない。また、大量の計算コストがかかる可能性がある。 However, the rearrangement of the elements of ΔD performed by the VΔC method can be executed in a time proportional to the number of elements = n, but it is executed each time the calculation of ΔC is performed by switching the assignment destination of the two elements. Poor processing efficiency. It can also be computationally expensive.

適切な要素順をもつΔDを生成する計算コストを最小限に抑えるために、本実施形態のデータ処理装置は、現在の割当状態に応じて距離行列の列を並べ替える。以下この手法をSAM(State-Aligned D Matrix)法と呼ぶ場合がある。また、以下では、このように並べ替えを行った距離行列を状態整列D行列と呼び、割当問題がQAPの場合はD、割当問題がQSAPの場合はDと表記する。 In order to minimize the computational cost of generating ΔD with proper element order, the data processing apparatus of the present embodiment rearranges the columns of the distance matrix according to the current allocation state. Hereinafter, this method may be called SAM (State-Aligned D Matrix) method. Also, hereinafter, the distance matrix rearranged in this way is called a state-ordered D matrix, and is denoted as D X when the allocation problem is QAP and D S when the allocation problem is QSAP.

図2は、QAPの計算時における距離行列の並べ替え例とデータ処理装置の例を示す図である。
データ処理装置10は、たとえば、コンピュータであり、記憶部11、処理部12を有する。
FIG. 2 is a diagram showing an example of distance matrix rearrangement and an example of a data processing device when calculating QAP.
The data processing device 10 is, for example, a computer and has a storage section 11 and a processing section 12 .

記憶部11は、たとえば、DRAM(Dynamic Random Access Memory)などの電子回路である揮発性の記憶装置、または、HDD(Hard Disk Drive)やフラッシュメモリなどの電子回路である不揮発性の記憶装置である。記憶部11は、SRAM(Static Random Access Memory)レジスタなどの電子回路を含んでいてもよい。 The storage unit 11 is, for example, a volatile storage device that is an electronic circuit such as a DRAM (Dynamic Random Access Memory), or a non-volatile storage device that is an electronic circuit such as a HDD (Hard Disk Drive) or flash memory. . The storage unit 11 may include an electronic circuit such as an SRAM (Static Random Access Memory) register.

記憶部11は、たとえば、局所探索などをコンピュータに実行させるプログラムを記憶するとともに、前述のフロー行列、距離行列、状態整列D行列(DまたはD)、割当状態(整数割当ベクトルφまたはバイナリ状態行列Xで表される)を記憶する。 The storage unit 11 stores, for example, a program that causes a computer to execute a local search and the like, and also stores the aforementioned flow matrix, distance matrix, state-aligned D matrix (D X or D S ), allocation state (integer allocation vector φ or binary state matrix X).

処理部12は、たとえば、CPU、GPU、DSP(Digital Signal Processor)などのハードウェアであるプロセッサにより実現できる。また、処理部12は、ASIC(Application Specific Integrated Circuit)やFPGAなどの電子回路により実現されるようにしてもよい。処理部12は、記憶部11に記憶されたプログラムを実行して、局所探索処理をデータ処理装置10に行わせる。なお、処理部12は、複数のプロセッサの集合であってもよい。 The processing unit 12 can be realized by a processor, which is hardware such as a CPU, GPU, DSP (Digital Signal Processor), for example. Also, the processing unit 12 may be implemented by an electronic circuit such as an ASIC (Application Specific Integrated Circuit) or FPGA. The processing unit 12 executes a program stored in the storage unit 11 to cause the data processing device 10 to perform local search processing. Note that the processing unit 12 may be a set of multiple processors.

処理部12は、2つの要素の割当先を入れ替える処理を繰り返し、たとえば、式(1)または式(11)に示した評価関数の値が極小になる割当状態を探索する。評価関数の極小値のうちの最小値になる割当状態が最適解となる。なお、式(1)または式(11)に示した評価関数の符号を変えれば、処理部12は、評価関数の値が極大になる割当状態を探索することもできる(この場合、最大値が最適解となる)。 The processing unit 12 repeats the process of interchanging the allocation destinations of the two elements, and searches for an allocation state in which the value of the evaluation function shown in Equation (1) or Equation (11) is minimized, for example. The optimum solution is the allocation state that has the minimum value among the minimum values of the evaluation function. By changing the sign of the evaluation function shown in Equation (1) or Equation (11), the processing unit 12 can also search for an allocation state in which the value of the evaluation function is maximized (in this case, the maximum value is optimal solution).

図2には、QAPの計算時における距離行列の並べ替え例が示されている。あるタイムステップ=tの場合の割当状態と、その割当状態に対応した配列となっている状態整列D行列が、φ(t)、DX(t)と表記されている。識別番号=1,3の要素の割当先を入れ替える割当変更が提案され、受け入れられると、タイムステップ=t+1では、図2のφ(t+1)で表されているような割当状態となる。このとき、状態整列D行列として、受け入れられた割当状態に対応するように、DX(t)に対して1列目と3列目が入れ替えられたDX(t+1)が生成される。 FIG. 2 shows an example of permutation of the distance matrix when calculating the QAP. An allocation state for a certain time step=t and a state-aligned D matrix having an arrangement corresponding to the allocation state are denoted by φ (t) and D X(t) . If an allocation change is proposed and accepted to replace the allocation destinations of the elements with identification numbers=1 and 3, at time step=t+1, the allocation state is as represented by φ (t+1) in FIG. A state-aligned D-matrix is then generated, D_X(t+1) , with the first and third columns swapped with respect to D_X(t) to correspond to the accepted allocation states.

なお、提案された割当変更が受け入れられなかった場合、φ(t)とDX(t)の更新はされない。
QAPの場合、状態整列D行列(D)は、以下の式(26)に示されるように、現在の割当状態を表すバイナリ状態行列Xの転置行列Xに、元の距離行列(D)を乗ずることで表すことができる。なお、ハードウェア的に状態整列D行列の列の入れ替えを行う場合のハードウェア構成の例については後述する。
Note that if the proposed allocation change is not accepted, φ (t) and D X(t) are not updated.
For QAP, the state-aligned D matrix (D X ) is the transposed matrix X T of the binary state matrix X representing the current allocation state, and the original distance matrix (D), as shown in equation (26) below. can be expressed by multiplying An example of a hardware configuration in which the columns of the state-aligned D-matrix are permuted in terms of hardware will be described later.

Figure 2023001055000027
Figure 2023001055000027

ベクトルΔDは、以下の式(27)により、前述のベクトルΔDの要素の並べ替えを行わずに計算でき、ΔDを前述の式(22)に代入することで、ΔCexが計算できる。 The vector ΔD X can be calculated by the following equation (27) without rearranging the elements of the vector ΔD described above, and ΔC ex can be calculated by substituting ΔD X into the equation (22) described above.

Figure 2023001055000028
Figure 2023001055000028

QSAPの場合、状態整列D行列(D)は、以下の式(28)に示されるように、現在の割当状態を表すバイナリ状態行列Sの転置行列Sに、元の距離行列(D)を乗ずることで表すことができる。Dは、m行n列の行列となる。 For QSAP, the state-aligned D matrix (D S ) is the transposed matrix S T of the binary state matrix S representing the current allocation state, and the original distance matrix (D ), as shown in equation (28) below. can be expressed by multiplying D S is a matrix with m rows and n columns.

Figure 2023001055000029
Figure 2023001055000029

割当先交換と再配置によるベクトルΔDはそれぞれ、以下の式(29)、式(30)により、前述のΔDの要素の並べ替えを行わずに計算でき、前述の式(24)、式(25)に代入することで、ΔC exとΔC relを計算できる。 The vector ΔD S due to the allocation target exchange and rearrangement can be calculated by the following equations (29) and (30), respectively, without rearranging the elements of ΔD, and the above equations (24) and ( 25), ΔC s ex and ΔC s rel can be calculated.

Figure 2023001055000030
Figure 2023001055000030

Figure 2023001055000031
Figure 2023001055000031

前述のVΔC法では、ベクトルΔDの要素を並べ替えるには、ΔCが計算されるたびに要素数=nに比例する操作が行われる。これとは対照的に、上記の手法(SAM法)では、割当状態に一致するようにDやDの並べ替えが行われるのは、提案された割当変更が受け入れられた場合のみである。これにより、平均して反復ごとに必要な操作の数が削減され計算効率が上がるため、計算時間が短縮され、割当問題を高速に計算できるようになる。 In the VΔC method described above, to rearrange the elements of the vector ΔD, an operation proportional to the number of elements=n is performed each time ΔC is calculated. In contrast, in the above approach (the SAM method), D X and D S are reordered to match the allocation state only if the proposed allocation change is accepted. . This increases computational efficiency by reducing the number of operations required per iteration on average, thus reducing computation time and allowing the allocation problem to be computed quickly.

(ボルツマンマシンキャッシング法(比較例))
ΔC計算をベクトル化して行う手法には以下のような手法も考えられる。この手法は、バイナリ状態行列のビットの反転に対応する部分的なΔCの値(前述の式(3)に示した局所場(h)に対応する)を計算して保存する方法である。以下この手法をボルツマンマシンキャッシング法(BM$法と表記する)と呼ぶ場合がある。
(Boltzmann machine caching method (comparative example))
The following method is also conceivable as a method of vectorizing the ΔC calculation. This technique is a method of calculating and storing partial ΔC values (corresponding to the local fields (h i ) shown in equation (3) above) corresponding to bit inversions of the binary state matrix. Hereinafter, this method may be called the Boltzmann machine caching method (abbreviated as BM$ method).

バイナリ状態行列(XまたはS)の各ビットに対応して、キャッシュされた局所場が用いられる。割当変更の提案が受け入れられたときに、nに比例する時間でn行n列の局所場による行列(以下キャッシュ行列という)の更新が行われることになるが、ΔCの計算については、nに依存しない時間で行うことができる。 A cached local field is used for each bit of the binary state matrix (X or S). When the allocation change proposal is accepted, the matrix with n rows and n columns by the local field (hereinafter referred to as the cache matrix) is updated in a time proportional to n2. can be done in a time independent of

QAPの場合、キャッシュ行列(H)は、探索処理の開始時に式(31)により、nに比例する時間で生成される。 For QAP , the cache matrix (H) is generated by equation (31) at the start of the search process in time proportional to n3.

Figure 2023001055000032
Figure 2023001055000032

キャッシュされた局所場を使用して、式(32)により内積ΔF・ΔDを生成できる。そして、生成したΔF・ΔDを前述の式(22)に代入することで、ΔCexが計算できる。 Using the cached local fields, we can generate the inner product ΔF·ΔD according to equation (32). Then, ΔC ex can be calculated by substituting the generated ΔF·ΔD into the above equation (22).

Figure 2023001055000033
Figure 2023001055000033

割当変更の提案が受け入れられると、キャッシュ行列は、以下の図3に示されるように、式(33)によりクロネッカー積を使用することによって更新される。 If the assignment change proposal is accepted, the cache matrix is updated by using the Kronecker product according to equation (33), as shown in FIG. 3 below.

Figure 2023001055000034
Figure 2023001055000034

図3は、キャッシュ行列の更新計算の例を示す図である。
更新は、一度にキャッシュ行列の一行分行われる。ベクトルΔFの0の要素に対応する行についての処理はスキップされる。
FIG. 3 is a diagram illustrating an example of cache matrix update calculation.
Updates are made one row of the cache matrix at a time. Processing is skipped for rows corresponding to 0 elements of vector ΔF.

QSAPの場合、キャッシュ行列(H)は、探索処理の開始時に式(34)により生成される。 For QSAP, the cache matrix (H s ) is generated by equation (34) at the start of the search process.

Figure 2023001055000035
Figure 2023001055000035

キャッシュされた局所場を使用して、式(35)により内積ΔF・ΔDを生成できる。そして、生成したΔF・ΔDを前述の式(24)に代入することで、ΔC exが計算できる。 Using the cached local fields, we can generate the inner product ΔF·ΔD according to equation (35). ΔC s ex can be calculated by substituting the generated ΔF·ΔD into the above equation (24).

Figure 2023001055000036
Figure 2023001055000036

割当変更の提案が受け入れられると、キャッシュ行列は、式(36)によりクロネッカー積を使用することによって更新される。 If the reassignment proposal is accepted, the cache matrix is updated by using the Kronecker product according to equation (36).

Figure 2023001055000037
Figure 2023001055000037

同様に、キャッシュされた局所場を使用して、式(37)により再配置が生じた場合の内積ΔF・ΔDを生成できる。そして、生成したΔF・ΔDを前述の式(25)に代入することで、ΔC relが計算できる。 Similarly, the cached local field can be used to generate the inner product ΔF·ΔD when rearrangement occurs according to equation (37). Then, ΔC s rel can be calculated by substituting the generated ΔF·ΔD into the above equation (25).

Figure 2023001055000038
Figure 2023001055000038

再配置の割当変更の提案が受け入れられると、キャッシュ行列は、式(38)によって更新される。 If the relocation assignment change proposal is accepted, the cache matrix is updated according to equation (38).

Figure 2023001055000039
Figure 2023001055000039

上記のようなBM$法では、キャッシュ行列を保持することになるが、問題の規模が大きくなるとキャッシュ行列を保持するメモリの容量も大きくなる。このため、高速読み出し可能な比較的容量が小さいメモリの使用が難しくなる。SAM法は、このようなキャッシュ行列を保持しなくてよい。 In the BM$ method as described above, a cache matrix is held, and as the scale of the problem increases, the capacity of memory for holding the cache matrix also increases. This makes it difficult to use a memory with a relatively small capacity that can be read out at high speed. The SAM method need not maintain such a cache matrix.

(ソルバーシステムの設計)
上記の3つの手法(VΔC法、SAM法、BM$法)の性能を比較検証するため、以下に示すようなソルバーシステムを設計した。なお、以下では、データ処理装置10の処理部12がSIMD機能を備えたマルチコアCPUを含み、マルチコアCPU上にパラレルテンパリングアルゴリズムが実装されているものとして説明する。
(Solver system design)
In order to compare and verify the performance of the above three methods (VΔC method, SAM method, BM$ method), a solver system as shown below was designed. In the following description, it is assumed that the processing unit 12 of the data processing device 10 includes a multi-core CPU having SIMD functions, and a parallel tempering algorithm is implemented on the multi-core CPU.

各専用コアは、探索インスタンスデータ(前述のD、D、H、H)を保持するための専用キャッシュをもつ。
図4は、パラレルテンパリングを実行するソルバーシステムの例を示す図である。
Each dedicated core has a dedicated cache to hold the search instance data (D x , D s , H, H s above).
FIG. 4 is a diagram illustrating an example solver system that performs parallel tempering.

ソルバーシステムは、探索部20とパラレルテンパリングコントローラ21を有する。探索部20は、複数のコア20a1~20amを有し、コア20a1~20amのそれぞれが複数のレプリカ(インスタンスに相当する)についての前述の局所探索(SLS:Stochastic Local Search)を並列に実行する。レプリカ数はMである。コア20a1は、レプリカ20b1を含む複数のレプリカについての局所探索を行う。コア20amは、レプリカ20bMを含む複数のレプリカについての局所探索を行う。 The solver system has a search section 20 and a parallel tempering controller 21 . The search unit 20 has a plurality of cores 20a1 to 20am, and each of the cores 20a1 to 20am executes the aforementioned local search (SLS: Stochastic Local Search) on a plurality of replicas (corresponding to instances) in parallel. The number of replicas is M. The core 20a1 performs a local search for multiple replicas including the replica 20b1. The core 20am performs a local search for multiple replicas including the replica 20bM.

QAPの場合は、レプリカごとに、前述の整数割当ベクトルφ、キャッシュ行列(H)(BM$法の場合)、状態整列D行列(D)(SAM法の場合)、評価関数の値(C)が保持される。 In the case of QAP, for each replica, the aforementioned integer allocation vector φ, cache matrix (H) (for BM$ method), state-aligned D matrix (D X ) (for SAM method), evaluation function value (C ) is retained.

QSAPの場合は、レプリカごとに、前述の整数割当ベクトルψ、キャッシュ行列(H)(BM$法の場合)、状態整列D行列(D)(SAM法の場合)、評価関数の値(C)が保持される。 In the case of QSAP, for each replica, the above-mentioned integer assignment vector ψ, cache matrix (H s ) (for BM$ method), state-aligned D matrix (D s ) (for SAM method), evaluation function value ( C) is retained.

式(6)に示したフロー行列(F)と、QSAPの場合に用いられる式(10)に示した行列Bは全レプリカ20b1~20bMについて共通である。
M個のレプリカ20b1~20bMには、互いに異なる値の温度パラメータ(T)が設定される。レプリカ20b1~20bMには、TminからTmaxまで段階的に上昇する温度の何れかが設定されている。以下、このような段階的に上昇する温度パラメータの値を、温度ラダーと呼ぶ場合がある。
The flow matrix (F) shown in Equation (6) and the matrix B shown in Equation (10) used for QSAP are common to all replicas 20b1 to 20bM.
Different temperature parameters (T) are set for the M replicas 20b1 to 20bM. The replicas 20b1 to 20bM are set to any temperature that increases stepwise from T min to T max . Hereinafter, such a stepwise increasing temperature parameter value may be referred to as a temperature ladder.

パラレルテンパリングコントローラ21は、隣接する温度パラメータの値(T、Tk+1)が設定されるレプリカ間で、評価関数の値(C、Ck+1)とT、Tk+1に基づいて、以下の式(39)で表される交換許容確率SAPで、T、Tk+1の値を交換する。 The parallel tempering controller 21 performs the following operations based on the evaluation function values (C k , C k+1 ) and T k , T k+1 between the adjacent replicas for which the temperature parameter values (T k , T k+1 ) are set. The values of T k and T k+1 are exchanged with the exchange admissible probability SAP expressed by Equation (39).

Figure 2023001055000040
Figure 2023001055000040

上記のような探索部20とパラレルテンパリングコントローラ21は、図2に示した処理部12と記憶部11により実現される。
フロー行列、状態整列D行列、キャッシュ行列は、たとえば、単精度浮動小数点数形式で記憶部11に記憶される。VΔC法やSAM法を実行する場合の内積計算やキャッシュ行列の更新などを行う際に、融合積和演算命令が利用できるようにするためである。
The search unit 20 and the parallel tempering controller 21 as described above are realized by the processing unit 12 and the storage unit 11 shown in FIG.
The flow matrix, the state-aligned D matrix, and the cache matrix are stored in the storage unit 11 in single-precision floating-point number format, for example. This is so that the fused multiply-add operation instruction can be used when performing inner product calculation and cache matrix update when executing the VΔC method or the SAM method.

図5は、QAPの解をパラレルテンパリングによる局所探索で探索するアルゴリズムの例を示す図である。なお、図5のアルゴリズムの例では、並列に局所探索が行われるレプリカ数が32である。なお、図5において、16行目、18行目などに示されている“(1)”、“(31)”などは、前述の式(1)、式(31)などを表す。 FIG. 5 is a diagram showing an example of an algorithm for searching a QAP solution by local search by parallel tempering. Note that in the example of the algorithm in FIG. 5, the number of replicas for which local searches are performed in parallel is 32. In FIG. 5, "(1)", "(31)", etc. shown in the 16th line, the 18th line, etc. represent the aforementioned formulas (1), (31), and the like.

アルゴリズムは、温度パラメータの値とレプリカ状態を初期化することから始まる。次に、ソルバーシステムは最適化ループに入り、全てのレプリカに対して並列に、局所探索がI回繰り返し実行される。 The algorithm begins by initializing the values of the temperature parameters and the replica state. The solver system then enters an optimization loop where I iterations of the local search are performed on all replicas in parallel.

I回の局所探索が終わると、レプリカ交換処理が行われ、事前設定されたBKS(Best-Known-Solution)コスト(CBKS)が見つかるか、タイムアウト制限に達するまで、最適化ループが再開される。 After I local searches, the replica exchange process is performed and the optimization loop is restarted until either a preset Best-Known-Solution cost (C BKS ) is found or a timeout limit is reached. .

QAPの局所探索では、ループが事前設定された反復回数(I)で実行され、2つの要素(図5の例では施設)が選択され、その2つの要素の割当先を入れ替えたときのΔCexの値が、選択された手法(VΔC法、BM$法またはSAM法)により計算される。 In the QAP local search, the loop is run for a preset number of iterations (I), two elements (facility in the example of FIG. 5) are selected, and ΔC ex is calculated by the chosen method (VΔC method, BM$ method or SAM method).

次に、計算されたΔCexと各レプリカの現在の温度パラメータの値を用いて、式(18)のPaccが計算される。次に、0から1の範囲の乱数値が生成され、Paccと比較されてベルヌーイ試行が実行され、選択された2つの要素間の割当先の入れ替えの提案が受け入れられるかどうかが決定される。提案が受け入れられた場合には、状態(割当状態)が更新される。 P acc in equation (18) is then calculated using the calculated ΔC ex and the value of the current temperature parameter for each replica. A random value in the range 0 to 1 is then generated and compared to the P acc and a Bernoulli trial is performed to determine if the proposal for swapping assignments between the two selected elements is acceptable. . If the offer is accepted, the status (assignment status) is updated.

図6は、パラレルテンパリングによる局所探索の全体の処理の流れを示すフローチャートである。図6では、図5に示したアルゴリズムのパラレルテンパリングによる局所探索の全体の処理の流れが示されている。 FIG. 6 is a flow chart showing the overall processing flow of local search by parallel tempering. FIG. 6 shows the overall processing flow of local search by parallel tempering of the algorithm shown in FIG.

まず初期化ループ(ステップS10~S13)が、i=0からi<M-1の間、iを1つずつ増やしつつ行われる。Mはレプリカ数である(図5の例では32個)。
初期化ループでは、各レプリカに対して初期温度(温度ラダー)の設定(T[i]←T[i])が行われる(ステップS11)。そして、レプリカの初期化処理(図7参照)が行われる(ステップS12)。
First, an initialization loop (steps S10 to S13) is performed while increasing i by one between i=0 and i<M-1. M is the number of replicas (32 in the example of FIG. 5).
In the initialization loop, an initial temperature (temperature ladder) is set (T[i]←T 0 [i]) for each replica (step S11). Then, a replica initialization process (see FIG. 7) is performed (step S12).

次に、最適化ループ(ステップS14~S16)が、i=0からi<M-1の間、iを1つずつ増やしつつ行われる。
最適化ループでは、レプリカ探索処理が行われる(ステップS15)。レプリカ探索処理では、各レプリカについて、設定された温度パラメータの値を用いて、I回の局所探索が行われる。
Next, an optimization loop (steps S14 to S16) is performed while increasing i by one between i=0 and i<M−1.
In the optimization loop, replica search processing is performed (step S15). In the replica search process, local searches are performed I times for each replica using the set temperature parameter value.

その後、レプリカ交換処理(ステップS17)が行われ、探索を終了させるか否かが判定される(ステップS18)。たとえば、前述のように、事前設定されたBKSコスト(CBKS)が見つかるか、タイムアウト制限に達した場合、探索が終了したと判定され、探索が終了する。探索を終了しないと判定された場合、ステップS14からの最適化ループが再開される。 After that, replica exchange processing (step S17) is performed, and it is determined whether or not to end the search (step S18). For example, as described above, if the preset BKS cost (C BKS ) is found or the timeout limit is reached, then it is determined that the search is over and the search ends. If it is determined not to end the search, the optimization loop from step S14 is restarted.

なお、データ処理装置10は、探索が終了した場合、探索結果(たとえば、後述の最小値、Cmin、φmin)を出力してもよい。探索結果は、たとえばデータ処理装置10に接続される表示装置に表示されてもよいし、外部の装置に送信されてもよい。 Note that the data processing device 10 may output search results (for example, minimum values, C min , φ min described later) when the search ends. The search result may be displayed on a display device connected to the data processing device 10, for example, or may be transmitted to an external device.

なお、図6ではレプリカごとに順番に処理を行う例を示しているが、たとえば、32個のコアをもつプロセッサにより、32個のレプリカについてステップS11,S12,S15の処理を並列に実行可能である。 Although FIG. 6 shows an example in which processing is performed sequentially for each replica, for example, a processor having 32 cores can execute the processing of steps S11, S12, and S15 for 32 replicas in parallel. be.

次に、SAM法を実行する場合を例にして、ステップS12のレプリカの初期化処理と、ステップS15のレプリカ探索処理の流れを、フローチャートを用いて説明する。
図7は、QAPの場合のレプリカの初期化処理の一例の流れを示すフローチャートである。
Next, the flow of the replica initialization process in step S12 and the replica search process in step S15 will be described using a flow chart, taking the case of executing the SAM method as an example.
FIG. 7 is a flowchart showing an example of the flow of replica initialization processing in the case of QAP.

まず、整数割当ベクトルφの初期化が行われる(ステップS20)。ステップS20の処理では、たとえば、ランダムに要素の割当先(施設の配置先)が決定される。そして、式(1)の計算により、初期コスト(C)が計算される(ステップS21)。 First, the integer assignment vector φ is initialized (step S20). In the processing of step S20, for example, the allocation destination of the element (placement destination of the facility) is determined at random. Then, the initial cost (C) is calculated by the calculation of formula (1) (step S21).

その後、初期化したφとCにより、最小値(Cminとφmin)が初期化される(ステップS22)。また、φの初期値に対応するように、状態整列D行列(D)の初期化が行われる(ステップS23)。その後、図6に示したフローチャートの処理に戻る。 After that, the initialized φ and C initialize the minimum values (C min and φ min ) (step S22). Also, the state-aligned D-matrix (D X ) is initialized so as to correspond to the initial value of φ (step S23). After that, the process returns to the process of the flowchart shown in FIG.

図8は、QAPの場合のレプリカ探索処理の一例の流れを示すフローチャートである。
レプリカ探索処理では、イタレーションループ(ステップS30~S40)が、i=1からi<Iの間、iを1つずつ増やしつつ行われる。
FIG. 8 is a flowchart showing an example of the flow of replica search processing in the case of QAP.
In the replica search process, an iteration loop (steps S30 to S40) is performed while increasing i by one between i=1 and i<I.

まず、割当先の入れ替え候補となる2つの要素(識別番号=a,bで表されている)が選択される(ステップS31)。
そして、その2つの要素の割当先を入れ替えたときのΔCex(a,b)の値が、式(22)により計算される(ステップS32)。
First, two elements (represented by identification numbers=a and b) that are candidates for replacement of allocation destinations are selected (step S31).
Then, the value of ΔC ex (a, b) when the allocation destinations of the two elements are exchanged is calculated by Equation (22) (step S32).

次に、計算されたΔCexと各レプリカの現在の温度パラメータの値を用いて、式(18)のPaccが計算される(ステップS33)。そして、Paccが0から1の範囲の乱数値rand()よりも大きいか否かが判定される(ステップS34)。 Next, using the calculated ΔC ex and the current temperature parameter value of each replica, P acc in equation (18) is calculated (step S33). Then, it is determined whether or not Pacc is greater than a random number value rand() ranging from 0 to 1 (step S34).

acc>rand()であると判定された場合、Dの列aと列bの入れ替え(D *,a,D *,b←D *,b,D *,a)が行われる(ステップS35)。さらに、割当先の入れ替えによる割当状態の更新(φ(a),φ(b)←φ(b),φ(a))が行われ(ステップS36)、評価関数の値(C)の更新(C←C+ΔCex(a,b))が行われる(ステップS37)。 If it is determined that P acc >rand( ), then the permutation of columns a and b of D X (D X *, a , D X *, b ←D X *, b , D X *, a ) is is performed (step S35). Furthermore, the allocation state is updated (φ(a), φ(b)←φ(b), φ(a)) by replacing the allocation destination (step S36), and the evaluation function value (C) is updated ( C←C+ΔC ex (a, b)) is performed (step S37).

その後、C<Cminであるか否かが判定され(ステップS38)、C<Cminであると判定された場合、最小値の更新(Cmin←C、φmin←φ)が行われる(ステップS39)。 After that, it is determined whether or not C<C min (step S38), and if it is determined that C<C min , the minimum value is updated (C min ←C, φ min ←φ) ( step S39).

ステップS39の処理後、またはステップS34の処理でPacc>rand()ではないと判定された場合、またはステップS38の処理でC<Cminではないと判定された場合、i=IとなるまでステップS31からの処理が繰り返される。i=Iとなった場合、図6に示したフローチャートの処理に戻る。 After the process of step S39, or if it is determined in the process of step S34 that P acc >rand( ) is not determined, or if it is determined that C<C min is not determined in the process of step S38, until i=I The processing from step S31 is repeated. When i=I, the process returns to the flowchart shown in FIG.

なお、図6~図8に示した処理の順序は一例であり、適宜処理の順序を入れ替えてもよい。
図9は、QSAPの解をパラレルテンパリングによる局所探索で探索するアルゴリズムの例を示す図である。
The order of processing shown in FIGS. 6 to 8 is an example, and the order of processing may be changed as appropriate.
FIG. 9 is a diagram showing an example of an algorithm for searching a QSAP solution by local search by parallel tempering.

図9に示されているQSAPを計算する局所探索の関数は、再配置の提案を受け入れるか否かの判定や更新を行う再配置ループを、2つの要素の割当先を入れ替えるか否かの判定や更新を行う交換ループの前に含んでいる。 The local search function that computes the QSAP shown in FIG. and before the exchange loop that does the update.

次に、SAM法を実行する場合を例にして、QSAPを計算する場合の、図6のステップS12のレプリカの初期化処理と、ステップS15のレプリカ探索処理の流れを、フローチャートを用いて説明する。 Next, the flow of the replica initialization process in step S12 and the replica search process in step S15 in FIG. 6 when calculating QSAP will be described with reference to a flowchart, taking the case of executing the SAM method as an example. .

図10は、QSAPの場合のレプリカの初期化処理の一例の流れを示すフローチャートである。
まず、整数割当ベクトルψの初期化が行われる(ステップS50)。ステップS50の処理では、たとえば、ランダムに要素の割当先(施設の配置先)が決定される。そして、式(11)の計算により、初期コスト(C)が計算される(ステップS51)。
FIG. 10 is a flowchart showing an example of the flow of replica initialization processing in the case of QSAP.
First, the integer assignment vector ψ is initialized (step S50). In the processing of step S50, for example, the allocation destination of the element (location of the facility) is determined at random. Then, the initial cost (C) is calculated according to the equation (11) (step S51).

その後、初期化したψとCにより、最小値(Cminとψmin)が初期化される(ステップS52)。また、ψの初期値に対応するように、式(28)により、状態整列D行列(D)の初期化が行われる(ステップS53)。その後、図6に示したフローチャートの処理に戻る。 After that, the minimum values (C min and ψ min ) are initialized by the initialized ψ and C (step S52). Also, the state-aligned D-matrix (D S ) is initialized according to equation (28) so as to correspond to the initial value of ψ (step S53). After that, the process returns to the process of the flowchart shown in FIG.

図11は、QSAPの場合のレプリカ探索処理の一例の流れを示すフローチャートである。
QSAPの場合のレプリカ探索処理でも、イタレーションループ(ステップS60~S78)が、i=1からi<Iの間、iを1つずつ増やしつつ行われる。
FIG. 11 is a flowchart showing an example of the flow of replica search processing in the case of QSAP.
Also in the replica search process in the case of QSAP, an iteration loop (steps S60 to S78) is performed while increasing i by one between i=1 and i<I.

まず、識別番号=aの要素と識別番号=lの割当先が選択される(ステップS61)。
そして、識別番号=aの要素を識別番号=lの割当先に割り当てたときのΔC relの値が、式(25)により計算される(ステップS62)。
First, an element with identification number=a and an allocation destination with identification number=l are selected (step S61).
Then, the value of ΔC s rel when the element of identification number=a is assigned to the allocation destination of identification number=l is calculated by equation (25) (step S62).

次に、計算されたΔC relと各レプリカの現在の温度パラメータの値を用いて、式(18)のPaccが計算される(ステップS63)。そして、Paccが0から1の範囲の乱数値rand()よりも大きいか否かが判定される(ステップS64)。 Next, using the calculated ΔC s rel and the current temperature parameter value of each replica, P acc in equation (18) is calculated (step S63). Then, it is determined whether or not Pacc is greater than the random number rand() ranging from 0 to 1 (step S64).

acc>rand()であると判定された場合、Dの列aの値が、距離行列Dの列lの値で更新される(ステップS65)。さらに、割当状態の更新(φ(a)←l)が行われ(ステップS66)、評価関数の値(C)の更新(C←C+ΔC rel)が行われる(ステップS67)。 If it is determined that P acc >rand( ), the value in column a of D s is updated with the value in column l of distance matrix D (step S65). Furthermore, the allocation state is updated (φ(a)←l) (step S66), and the evaluation function value (C) is updated (C←C+ΔC s rel ) (step S67).

その後、C<Cminであるか否かが判定され(ステップS68)、C<Cminであると判定された場合、最小値の更新(Cmin←C、ψmin←ψ)が行われる(ステップS69)。 After that, it is determined whether or not C<C min (step S68), and if it is determined that C<C min , the minimum value is updated (C min ←C, ψ min ←ψ) ( step S69).

ステップS69の処理後、またはステップS64の処理でPacc>rand()ではないと判定された場合、またはステップS68の処理でC<Cminではないと判定された場合、ステップS70の処理が行われる。 After the process of step S69, or when it is determined in the process of step S64 that P acc >rand( ) is not obtained, or when it is determined in the process of step S68 that C<C min is not satisfied, the process of step S70 is performed. will be

ステップS70の処理では、割当先の入れ替え候補となる2つの要素(識別番号=a,bで表されている)が選択される。
そして、その2つの要素の割当先を入れ替えたときのΔC exの値が、式(24)により計算される(ステップS71)。
In the process of step S70, two elements (represented by identification numbers=a and b) that are candidates for replacement of allocation destinations are selected.
Then, the value of ΔC s ex when the allocation destinations of the two elements are exchanged is calculated by equation (24) (step S71).

次に、ΔC ex<0であるか否かが判定される(ステップS72)。なお、0の代わりに所定の値(固定値)を用いてもよい。
ΔCex <0であると判定された場合、Dの列aと列bの入れ替え(D *,a,D *,b←D *,b,D *,a)が行われる(ステップS73)。さらに、割当先の入れ替えによる割当状態の更新(ψ(a),ψ(b)←ψ(b),ψ(a))が行われ(ステップS74)、評価関数の値(C)の更新(C←C+ΔC ex)が行われる(ステップS75)。
Next, it is determined whether or not ΔC s ex <0 (step S72). Note that a predetermined value (fixed value) may be used instead of 0.
If it is determined that ΔC ex s < 0, the permutation of columns a and b of D S (D S *, a , D S *, b ← D S *, b , D S *, a ) is a row. (step S73). Furthermore, the allocation state is updated (ψ(a), ψ(b)←ψ(b), ψ(a)) by replacing the allocation destination (step S74), and the evaluation function value (C) is updated ( C←C+ΔC s ex ) is performed (step S75).

その後、C<Cminであるか否かが判定され(ステップS76)、C<Cminであると判定された場合、最小値の更新(Cmin←C、ψmin←ψ)が行われる(ステップS77)。 After that, it is determined whether or not C<C min (step S76), and if it is determined that C<C min , the minimum value is updated (C min ←C, ψ min ←ψ) ( step S77).

ステップS77の処理後、またはステップS72の処理でΔC ex<0ではないと判定された場合、またはステップS76の処理でC<Cminではないと判定された場合、i=IとなるまでステップS61からの処理が繰り返される。i=Iとなった場合、図6に示したフローチャートの処理に戻る。 After the process of step S77, or if it is determined that ΔC s ex <0 is not determined in the process of step S72, or if it is determined that C<C min is not determined in the process of step S76, steps are performed until i=I. The processing from S61 is repeated. When i=I, the process returns to the flowchart shown in FIG.

なお、図10~図11に示した処理の順序は一例であり、適宜処理の順序を入れ替えてもよい。
(計算速度の評価結果)
まず、スカラー型の演算処理を使用し、VΔC法、SAM法、及びBM$法の3つの方法による計算速度を評価した結果を示す。計算対象は、10個のQAPインスタンスであり、図5に示したアルゴリズムにより計算が行われた。計算は、図4に示したようなソルバーシステムを2つ用いて、64レプリカのパラレルテンパリングにより行われた。
The order of processing shown in FIGS. 10 and 11 is an example, and the order of processing may be changed as appropriate.
(Evaluation result of calculation speed)
First, the results of evaluating the calculation speed by three methods, the VΔC method, the SAM method, and the BM$ method, using scalar arithmetic processing, are shown. Calculation targets were 10 QAP instances, and the calculation was performed by the algorithm shown in FIG. The calculations were performed by parallel tempering of 64 replicas using two solver systems as shown in FIG.

各インスタンスは、シーケンシャルに100回、独立な乱数シードで実行され、BKSに到達した時間(TtS:Time-to-Solution)が記録された。
図12は、VΔC法と比較したSAM法、BM$法による計算の高速化の度合いの評価結果を示す図である。横軸はQAPの10個のインスタンスと幾何平均(図12では“GEOMEAN”と表記されている)を表し、縦軸はVΔC法と比較したSAM法、BM$法の高速化の度合いを表している。高速化の度合いは、VΔC法によるTtSに対するSAM法とBM$法によるTtSの比率により表されている。
Each instance was run sequentially 100 times with an independent random number seed and the time to reach BKS (TtS) was recorded.
FIG. 12 is a diagram showing evaluation results of the degree of speeding up of calculation by the SAM method and the BM$ method compared with the VΔC method. The horizontal axis represents 10 instances of QAP and the geometric mean (denoted as “GEOMEAN” in FIG. 12), and the vertical axis represents the degree of speedup of the SAM method and BM$ method compared to the VΔC method. there is The degree of speedup is represented by the ratio of TtS by the SAM method and BM$ method to TtS by the VΔC method.

SAM法を用いた場合、Dを更新する追加の計算コストがあるにもかかわらず、VΔC法を用いた場合よりも計算速度が向上している。
なお、BM$法を用いた場合、VΔC法に対して幾何平均で2.57倍、計算速度が向上している。
With the SAM method, the computational speed is faster than with the VΔC method, despite the additional computational cost of updating DX.
When the BM$ method is used, the calculation speed is improved by a factor of 2.57 in terms of geometric mean as compared with the VΔC method.

(SIMDの場合の計算速度の向上)
次に、スカラー型の演算処理に対するベクトル型の演算処理の計算速度の向上の度合いを評価した結果を示す。ベクトル型の演算処理を行うために、AVX(Advanced Vector eXtensions)2のSIMD組み込み関数が用いられた。
(Improved calculation speed in case of SIMD)
Next, the result of evaluation of the degree of improvement in computational speed of vector-type operation processing relative to scalar-type operation processing will be shown. SIMD built-in functions of AVX (Advanced Vector eXtensions) 2 were used to perform vector type arithmetic processing.

前述と同様の手順を用いて、同じ10のQAPインスタンスをベクトル型の演算処理で実行した。
図13は、スカラー型の演算処理に対するベクトル型の演算処理の高速化の度合いの評価結果を示す図である。横軸はQAPの10個のインスタンスと幾何平均(図13では“GEOMEAN”と表記されている)を表し、縦軸はスカラー型の演算処理に対するベクトル型の演算処理の高速化の度合いを表している。高速化の度合いは、VΔC法、SAM法、BM$法のそれぞれについての、スカラー型の演算処理によるTtSに対するベクトル型の演算処理によるTtSの比率により表されている。
The same 10 QAP instances were run with vector-based computation using a procedure similar to that described above.
FIG. 13 is a diagram showing an evaluation result of the degree of acceleration of vector-type arithmetic processing relative to scalar-type arithmetic processing. The horizontal axis represents 10 instances of QAP and the geometric mean (denoted as "GEOMEAN" in FIG. 13), and the vertical axis represents the degree of acceleration of vector-type operation processing relative to scalar-type operation processing. there is The degree of speedup is represented by the ratio of TtS due to vector-type arithmetic processing to TtS due to scalar-type arithmetic processing for each of the VΔC method, SAM method, and BM$ method.

スカラー型の演算処理に対してベクトル型の演算処理では、平均して、VΔC法の場合ほぼ2倍高速であり、BM$法とSAM法の場合、3倍以上高速であった。VΔC法では、前述のようにVΔC法で行われるΔDの要素の並べ替えが実行時間のかなりの部分を占めるため、SIMD組み込み関数のメリットが最も少ない。 On average, the VΔC method was twice as fast as the scalar type arithmetic processing, and the BM$ method and the SAM method were three times or more faster than the scalar type arithmetic processing. The V.DELTA.C method has the least advantage of SIMD built-in functions because the reordering of the elements of .DELTA.D performed in the V.DELTA.C method occupies a significant portion of the execution time as described above.

(動的負荷分散)
パラレルテンパリングでは、最低温度が設定されているレプリカと最高温度が設定されているレプリカとでは、PARが異なる。Tの値が大きいほど(温度が高いほど)、PARも上がる。これによりSAM法やBM$法の更新処理が、レプリカの処理を行うスレッド間で大きな実行時間のギャップを引き起こす可能性がある。
(dynamic load balancing)
In parallel tempering, the PAR differs between the replica set at the lowest temperature and the replica set at the highest temperature. The higher the value of T (higher the temperature), the higher the PAR. This can cause the SAM and BM$ update processes to cause large execution time gaps between the threads that process the replicas.

これを軽減するために、データ処理装置10は、各温度のイタレーションごとの時間をSLS関数内で追跡し、その時間を用いて、各温度で実行されるイタレーションの回数をスケーリングする。 To mitigate this, data processor 10 tracks the time per iteration at each temperature within the SLS function and uses that time to scale the number of iterations performed at each temperature.

図14は、負荷分散の一例を示す図である。図14では、T1~T32(T1<T2<…<T32)の温度ラダーが設定される32のレプリカについての、温度パラメータの交換前のΔCの計算時間、更新処理の時間が示されている。 FIG. 14 is a diagram illustrating an example of load distribution. FIG. 14 shows calculation time of ΔC before exchange of temperature parameters and update processing time for 32 replicas for which temperature ladders of T1 to T32 (T1<T2< . . . <T32) are set.

負荷分散を行わない場合、大きい温度パラメータの値が設定されたレプリカほど更新処理の時間が長くなり、小さい温度パラメータの値が設定されたレプリカほど更新処理の時間が短い。このため、小さい温度パラメータの値が設定されたレプリカほど長いアイドル時間が生じている。 When load balancing is not performed, replicas with larger temperature parameter values take longer to update, and replicas with smaller temperature parameters take less time to update. For this reason, replicas with smaller temperature parameter values have longer idle times.

これに対して負荷分散を行う場合、たとえば、T1が設定されているレプリカの実行時間(スレッドの実行時間)を基準に、他のレプリカにおけるΔC計算のイタレーション回数がスケーリングされる。 In the case of load balancing, for example, the number of iterations of ΔC calculation in other replicas is scaled based on the execution time (thread execution time) of the replica for which T1 is set.

これにより、図14に示すように、各レプリカ間でスレッドの実行時間をほぼ同等にすることができ、アイドル時間が短縮される。
このような負荷分散の有効性を定量的に示すために、前述の10個のインスタンスを計算対象として、負荷分散による演算処理の高速化の度合いを評価した結果を以下に示す。
As a result, as shown in FIG. 14, the execution times of the threads can be made substantially equal among the replicas, and the idle time can be shortened.
In order to quantitatively demonstrate the effectiveness of such load distribution, the above-mentioned 10 instances were used as calculation targets, and the results of evaluating the degree of speed-up of arithmetic processing due to load distribution are shown below.

図15は、負荷分散による演算処理の高速化の度合いの評価結果を示す図である。横軸はQAPの10個のインスタンスと幾何平均“GEOMEAN”を表し、縦軸は負荷分散を行わない場合の演算処理に対する負荷分散を行った場合の高速化の度合いを表している。高速化の度合いは、負荷分散をせずにSAM法、BM$法のそれぞれを実行したときのTtSに対する、負荷分散をしてSAM法、BM$法のそれぞれを実行したときのTtSの比率により表されている。なお、負荷分散をしたときもしなかったときも、同じ温度パラメータの値のセット(たとえば、図14のT1~T32)が用いられている。 FIG. 15 is a diagram showing evaluation results of the degree of speeding up of arithmetic processing by load distribution. The horizontal axis represents 10 instances of QAP and the geometric mean "GEOMEAN", and the vertical axis represents the degree of speed-up when load balancing is performed as compared to the case when load balancing is not performed. The degree of speedup is determined by the ratio of TtS when the SAM method and BM$ method are executed with load distribution to the TtS when the SAM method and BM$ method are executed without load distribution. is represented. Note that the same set of temperature parameter values (for example, T1 to T32 in FIG. 14) are used both with and without load sharing.

負荷分散により、SAM法では平均1.86倍、BM$では平均1.38倍、演算処理の高速化が達成できていることが分かった。インスタンスファミリ間での負荷分散の有効性の違いは、インスタンスファミリの特性により、温度パラメータの極値間の異なるPARのギャップに起因する可能性がある。 It was found that by load distribution, an average speed-up of 1.86 times was achieved in the SAM method and an average speed-up of 1.38 times was achieved in the BM$ method. Differences in load balancing effectiveness between instance families may be due to different PAR gaps between extremes of temperature parameters due to instance family characteristics.

上記の各機能によって提供される計算の高速化の評価結果を表1にまとめる。 Table 1 summarizes the results of evaluating the computation speedup provided by each of the above functions.

Figure 2023001055000041
Figure 2023001055000041

2種類の高速化の度合(Incremental Speed-UpとCumulative Speed-Up)が示されている。なお、高速化の度合いは、前述の10個のインスタンスについてのTtSの幾何平均を用いて計算されたものであり、VΔC法を用いたスカラー型の演算処理によるTtSを基準(1.00)としている。 Two degrees of speedup (Incremental Speed-Up and Cumulative Speed-Up) are shown. The degree of speedup was calculated using the geometric mean of TtS for the 10 instances described above. there is

(ベンチマーク結果)
上記のVΔC法、SAM法、BM$法に関して、64コアのCPUを含む所定のハードウェア構成のデータ処理装置10を用いてベンチマークスコアが測定された。
(Benchmark result)
With respect to the VΔC method, the SAM method, and the BM$ method, benchmark scores were measured using a data processing apparatus 10 having a predetermined hardware configuration including a 64-core CPU.

上記3つの方法を行うQAPのソルバーのベンチマークスコアを測定するために、QAPライブラリーリファレンス(非特許文献5参照)にあるインスタンスが用いられた。さらに、非特許文献6,7で提案されたインスタンスが用いられた。また、本実施の形態では、非特許文献7に示された問題サイズの大きいQAP(既知の最適解がない)の新しいBKS状態を見つけることが試みられた。またQSAPのソルバーのベンチマークスコアを測定するために、非特許文献8で紹介されたインスタンスのセットが用いられた。 An instance in the QAP library reference (see Non-Patent Document 5) was used to measure the benchmark score of the QAP solver performing the above three methods. Furthermore, the instances proposed in Non-Patent Documents 6 and 7 were used. Also, in the present embodiment, an attempt was made to find a new BKS state for a large problem size QAP (no known optimal solution) given in Non-Patent Document 7. The set of instances introduced in Non-Patent Document 8 was also used to measure the benchmark score of the QSAP solver.

(QAPベンチマーク) (QAP benchmark)

Figure 2023001055000042
Figure 2023001055000042

表2には、ベクトル型の演算処理を行う3つの方法(VΔC法、負荷分散を行うSAM法及びBM$法)を実施するソルバーによる、QAPの各インスタンスに対するTtSが示されている。さらに表2には、VΔC法を用いたベクトル型の演算処理によるTtSを基準(1.00)とした高速化の度合い(TtSの幾何平均を用いて計算されたもの)が示されている。さらに、表2には、公開されている2つのソルバーであるParEOTS(非特許文献9参照)と、PBM(Permutational Boltzmann Machine)(非特許文献1参照)によるTtSと高速化の度合いが示されている。これら2つの公開されているソルバーは、5分のタイムアウトウィンドウ内で、いくつかの難しいインスタンスを100%の成功率で解くことができるものである。 Table 2 shows the TtS for each instance of QAP by solvers implementing three methods of vector-based computation (VΔC method, SAM method with load balancing, and BM$ method). Furthermore, Table 2 shows the degree of speed-up (calculated using the geometric mean of TtS) with TtS as the reference (1.00) by vector type arithmetic processing using the VΔC method. Furthermore, Table 2 shows the TtS and the degree of speedup by two open solvers, ParEOTS (see Non-Patent Document 9) and PBM (Permutational Boltzmann Machine) (see Non-Patent Document 1). there is These two published solvers are capable of solving some difficult instances with 100% success rate within a 5 minute timeout window.

表2に示されているTtSの値は、VΔC法、SAM法、及びBM$法による局所探索を100回独立に連続して実行し、測定されたTtSの平均値(99%の信頼区間の値として表されている)である。各実行のタイムアウト制限は5分である。ParEOTSとPBMについてのTtSの値は、それぞれの開示によるものである。 The TtS values shown in Table 2 are the mean TtS values (with a 99% confidence interval of value). The timeout limit for each run is 5 minutes. The TtS values for ParEOTS and PBM are according to their respective disclosures.

表2に示されているように、BM$法は、5つのソルバーの中で全てのインスタンスにわたって最高のパフォーマンスを示し、PBMと比較して2倍、ParEOTSと比較して300倍以上の高速化を示した。SAM法とBM$法は、VΔC法に対してそれぞれ1.92倍、3.22倍の平均速度向上を示した。なお、表1と比較した表2の結果の違いは、使用されたインスタンスによるものである。 As shown in Table 2, the BM$ method showed the best performance across all instances among the five solvers, speeding up by 2x over PBM and over 300x over ParEOTS. showed that. The SAM and BM$ methods showed an average speed improvement of 1.92 and 3.22 times over the VΔC method, respectively. Note that the difference in results in Table 2 compared to Table 1 is due to the instance used.

ただし、SAM法とBM$法のどちらが良いかは、問題規模やPARに依存し、BM$法よりもSAM法が優位なケースもある。たとえば後述のように(図17参照)、PARが高くなるとBM$法よりもSAM法の方が優位になる傾向がある。また、本評価結果は、CPUでの実装の結果であり、比較的大きなメモリをもった系での結果である。専用回路での実装の場合、局所場を記憶しなくてもよいSAM法が、BM$法よりも優位となる場合も考えられる。 However, which of the SAM method and the BM$ method is better depends on the problem scale and PAR, and there are cases where the SAM method is superior to the BM$ method. For example, as described later (see FIG. 17), the SAM method tends to be superior to the BM$ method when the PAR is high. This evaluation result is the result of mounting on a CPU, and is the result of a system having a relatively large memory. In the case of implementation in a dedicated circuit, the SAM method, which does not require storing local fields, may be superior to the BM$ method.

(QSAPベンチマーク)
QAPと比較して、QSAPソルバーに関するこれまでの開示はほとんどない。主な参考資料は、20コアのCPUに実装されたPMITS(Parallel Memetic Iterative Tabu Search)アルゴリズムである(非特許文献8参照)。PMITSは、ポピュレーションの50%を用いて、1時間のタイムアウト制限で、停止基準と同じ最良のソリューションに到達する。この方法は、協調レプリカを使用したMemeticアルゴリズムにおいて、収束を予測する合理的な方法である。しかし、レプリカが温度ラダーに沿って絶えず流動しているパラレルテンパリングでは、このような基準は妥当ではない。
(QSAP benchmark)
Compared to QAP, there are few previous disclosures on QSAP solvers. The main reference material is the PMITS (Parallel Memetic Iterative Tabu Search) algorithm implemented in a CPU with 20 cores (see Non-Patent Document 8). PMITS uses 50% of the population to arrive at the same best solution as the stopping criterion with a timeout limit of 1 hour. This method is a reasonable way to predict convergence in the Memetic algorithm using cooperative replicas. However, in parallel tempering, where replicas are in constant flow along a temperature ladder, such criteria are not valid.

したがって、本実施の形態では、QAPの場合と同様の方法でTtSが測定され、PMITSについては基準としてTtSの値が測定された。その結果が、以下の表3に示されている。パラレルテンパリングソルバーとPMITSとの間の相関関係については示されていない。 Therefore, in the present embodiment, TtS was measured in the same manner as for QAP, and the value of TtS was measured as a reference for PMITS. The results are shown in Table 3 below. A correlation between the parallel tempering solver and PMITS is not shown.

Figure 2023001055000043
Figure 2023001055000043

表3のように、QAPと比較すると、QSAPインスタンス全体のVΔC法と比較したSAM法及びBM$法のパフォーマンスは、ほぼ2倍低下している。これは、より高いPARに起因するものと考えられる。 As shown in Table 3, when compared to QAP, the performance of the SAM and BM$ methods compared to the VΔC method across QSAP instances is nearly doubled. This is believed to be due to the higher PAR.

(拡張Taillardインスタンス上のQAPスケーリング)
非特許文献7で紹介された、いくつかのQAPインスタンスは未知の最適解をもち、最大n=729のサイズである。このサイズと難易度のため、ベンチマークに使用されることはめったにないが、データ処理装置10は、より良い解を見つけるために、所定の時間制限で、VΔC法、SAM法及びBM$法を用いて、これらのインスタンスを実行した。
(QAP scaling on extended Taillard instances)
Some QAP instances, introduced in Non-Patent Document 7, have unknown optimal solutions and are of size up to n=729. Rarely used for benchmarking because of its size and difficulty, data processor 10 uses the VΔC, SAM, and BM$ methods within a given time limit to find a better solution. and ran these instances.

これらのインスタンスのBKS値を改善しようとした以前の試みでは、数分から数時間実行したにもかかわらず、ほとんどまたはまったく改善されなかった(たとえば、非特許文献10参照)。 Previous attempts to improve the BKS values for these instances yielded little or no improvement despite running for minutes to hours (see, eg, Non-Patent Document 10).

実験では、各インスタンスは、20回実行され、n=125及びn=175の場合は、10秒、n=343及びn=729のインスタンスの場合は30秒で終了する。表4,5には、各インスタンスについてVΔC法、SAM法及びBM$法を適用した場合の最良のコスト(式(1)の評価関数の値)とともに、平均コストが示されている。 In the experiments, each instance was run 20 times and finished in 10 seconds for n=125 and n=175 and 30 seconds for n=343 and n=729 instances. Tables 4 and 5 show the average cost together with the best cost (value of the evaluation function of equation (1)) when applying the VΔC method, the SAM method and the BM$ method for each instance.

Figure 2023001055000044
Figure 2023001055000044

Figure 2023001055000045
Figure 2023001055000045

実行時間が短いにもかかわらず、SAM法とBM$法による4つを除くすべてのインスタンスのBKSを改善でき、平均コストも以前のBKSよりも低くなっていることが分かった。 It was found that despite the short run times, the BKS for all but four instances of the SAM and BM$ methods could be improved, and the average cost was also lower than the previous BKS.

(スケーリング分析)
ベンチマーク結果と、VΔC法とSAM法の定性的比較に基づくと、SAM法がより効率的であると考えられる。VΔC法ではイタレーションごとにΔDの各要素の連続的な並べ替えが行われるのに対し、SAM法では、割当状態に一致するようにDやDの並べ替えが行われるのは、提案された割当変更が受け入れられた場合のみであるためである。
(scaling analysis)
Based on benchmark results and a qualitative comparison between the VΔC method and the SAM method, the SAM method is believed to be more efficient. The VΔC method continuously rearranges the elements of ΔD for each iteration, whereas the SAM method rearranges D X and D S to match the allocation state. This is because it is the only case where the assigned assignment change is accepted.

一方、SAM法とBM$法の相対的な性能は、主にPARに依存する。PARは、使用されている探索アルゴリズムによって大きく異なる可能性がある。さらに、同じ探索アルゴリズム内であっても、PARは、シミュレーテッドアニーリングなどのアルゴリズムを使用した実行時や、パラレルテンパリングなどで同時探索されるインスタンス間で変化する可能性がある。 On the other hand, the relative performance of SAM and BM$ methods mainly depends on PAR. PAR can vary greatly depending on the search algorithm used. Moreover, even within the same search algorithm, the PAR can change at run-time using algorithms such as simulated annealing and between concurrently searched instances such as parallel tempering.

以下、問題サイズとPAR値に応じた実行時間の比較結果を示す。
図16は、測定アルゴリズムの一例を示す図である。
測定アルゴリズムでは、最初に1~100のランダムな値をもつフロー行列(F)及び距離行列(D)が生成される。そして割当状態(φ)が初期化される。次に、所定のイタレーション回数(Ilimit)の処理が実行され、1ループの実行時間が計測される。このとき、所望のPAR値で提案がランダムに受け入れられる。
The results of comparison of execution times according to problem sizes and PAR values are shown below.
FIG. 16 is a diagram showing an example of a measurement algorithm.
The measurement algorithm first generates a flow matrix (F) and a distance matrix (D) with random values from 1-100. Then the allocation state (φ) is initialized. Next, processing is executed for a predetermined number of iterations (I limit ), and the execution time of one loop is measured. Proposals are then randomly accepted at the desired PAR value.

問題のサイズは、SAM法及びBM$法のレプリカデータを格納するために使用されるメモリ階層に基づいて3つのグループに分割されている。n<256と256<n<1024の問題サイズの場合には、Ilimitはそれぞれ100M及び10Mが使用される。n>1024の問題サイズの場合には、Ilimitは1Mが使用される。 The problem sizes are divided into three groups based on the memory hierarchy used to store replica data for the SAM and BM$ methods. For problem sizes of n<256 and 256<n<1024, I limit of 100M and 10M are used, respectively. For problem sizes of n>1024, an I_limit of 1M is used.

各イタレーションでは、ΔCexの値が計算され、乱数生成器が、所望のPARで提案を受け入れるか否かを判定するために用いられる。
CPUパイプライン、キャッシュ、メモリに全負荷がかかっている間の性能を測定するため、64個のループインスタンスが並列に実行された(コアごとに1つ)。この処理は、データポイントごとに10の異なる乱数シードを使用して繰り返され、平均実行時間が測定された。
At each iteration, a value of ΔC ex is calculated and used by a random number generator to determine whether or not to accept the proposal with the desired PAR.
64 loop instances were executed in parallel (one per core) to measure the performance while the CPU pipeline, cache, and memory were under full load. This process was repeated using 10 different random number seeds for each data point and the average execution time was measured.

フロー行列の密度がBM$法のキャッシュ行列(H)の更新関数に影響を与えるため、2つの別々のシミュレーションセットが実行された。1つは完全に密なフロー行列で、もう1つはスパースなフロー行列であり、ゼロ以外の値が10%しかない。各測定は、n=[100,5000]の範囲の10種類の問題サイズと、PAR=[0.0001,0.1]の範囲の29のPARを組み合わせて、合計290のパラメータの組み合わせについて計算が行われた。 Because the density of the flow matrix affects the update function of the cache matrix (H) of the BM$ method, two separate sets of simulations were performed. One is a fully dense flow matrix and the other is a sparse flow matrix with only 10% non-zero values. Each measurement was calculated for a total of 290 parameter combinations, combining 10 problem sizes in the range n=[100,5000] and 29 PARs in the range PAR=[0.0001,0.1]. was done.

図17は、VΔC法、SAM法、BM$法について測定された相対的な高速化の度合いと、問題サイズに応じて占有されるメモリ階層を示す図である。高速化の度合いを示す図では、横軸はPAR[%]を表し、縦軸は高速化の度合い(Speed-Up)を表す。図17には、SAM法及びVΔC法に対するBM$法の高速化の度合いが、それぞれ異なる密度のフロー行列を用いた場合について示されている。さらに、図17には、VΔC法に対するSAM法の高速化の度合いが示されている。図17の例では、メモリ階層は、記憶容量が小さい順に、L2キャッシュ、L3キャッシュ、DRAMがある。 FIG. 17 shows the relative speedups measured for the VΔC method, the SAM method, and the BM$ method, and the memory hierarchy occupied according to the problem size. In the diagram showing the degree of speedup, the horizontal axis represents PAR [%] and the vertical axis represents the degree of speedup (Speed-Up). FIG. 17 shows the degree of acceleration of the BM$ method with respect to the SAM method and the VΔC method when flow matrices with different densities are used. Furthermore, FIG. 17 shows the degree of speedup of the SAM method relative to the VΔC method. In the example of FIG. 17, the memory hierarchy includes L2 cache, L3 cache, and DRAM in descending order of storage capacity.

なお、QAPの10のインスタンスに対する非負荷分散のパラレルテンパリングシミュレーションによる、あるフロー行列の密度に対する最大のPARの値は、以下の表6のようなものであった。 It should be noted that the maximum PAR values for a given flow matrix density from non-load-sharing parallel tempering simulations for 10 instances of QAP were as shown in Table 6 below.

Figure 2023001055000046
Figure 2023001055000046

なお、QSAPシミュレーションは、QAPシミュレーションと類似するため、省略した。両シミュレーションの結果には顕著な差異はないと考えられる。
問題サイズによる相対的な高速化の度合いは、メモリ階層のどの層に探索に用いるデータの大部分が格納されているかに基づいて、3つのグループに分けることができる。各コアには専用のL2キャッシュ(本計算例では記憶容量が256kB)があり、4つのコアのグループはL3キャッシュ(本計算例では記憶容量が16MB)を共有している。
Note that the QSAP simulation is omitted because it is similar to the QAP simulation. It is considered that there is no significant difference between the results of both simulations.
The relative speedup with problem size can be divided into three groups based on which tier of the memory hierarchy contains most of the data used for the search. Each core has a dedicated L2 cache (256 kB storage capacity in this calculation example), and a group of four cores share an L3 cache (16 MB storage capacity in this calculation example).

図17のように、SAM法とBM$法の場合、各ループスレッドのDとキャッシュ行列(H)は、コアのL2キャッシュに最大n=256のサイズで収まり、n=1024までの問題はL3キャッシュに収まる。 As shown in FIG. 17, in the case of the SAM method and the BM$ method, the DX and cache matrix (H) of each loop thread fit in the L2 cache of the core with a maximum size of n=256, and the problem up to n=1024 is fits in the L3 cache.

図17のように、問題サイズが大きくなり、より記憶容量が大きいメモリ階層が用いられるようになると、BM$法と他の2つの方法の間の相対的な性能(高速化の度合い)が低下する。探索に用いるデータが上層のメモリ階層に移動すると、BM$法がSAM法及びVΔC法よりも優れた性能を維持するために要するPARの値が大幅に減少する。 As shown in Figure 17, the relative performance (degree of speedup) between the BM$ method and the other two methods decreases as the problem size increases and memory hierarchies with larger storage capacities are used. do. When the data used for searching is moved to a higher memory hierarchy, the value of PAR required for the BM$ method to maintain superior performance over the SAM and VΔC methods is greatly reduced.

パラレルテンパリングを実施するソルバーの場合、表6に示すように、レプリカ全体の最大のPARの値は、インスタンスファミリ全体の問題サイズとともに必ずしも減少しない。これは、より小さなQAPインスタンスについて、表2に示したのと同じ相対速度を維持するためのPARと問題サイズの関係は、必ずしも図17に示すような関係に依存しないことを示している。 For solvers that implement parallel tempering, as shown in Table 6, the maximum PAR value across replicas does not necessarily decrease with problem size across instance families. This shows that for smaller QAP instances, the relationship between PAR and problem size to maintain the same relative rates as shown in Table 2 does not necessarily depend on the relationship as shown in FIG.

VΔC法に対するSAM法の高速化の度合いは、問題サイズに基づいて2つのグループに分けられる。問題サイズがn≦800で、ループインスタンスごとのDの大部分がキャッシュに収まる場合、SAM法では、PAR<10%の範囲ではVΔCよりも明らかに有利である。探索に用いるデータの保存先をL2キャッシュからL3キャッシュに移行することは、2つの方法間の相対的な性能に大きな影響を与えていない。 The speedup of the SAM method over the VΔC method can be divided into two groups based on problem size. If the problem size is n≤800 and most of the DX per loop instance fits in the cache, the SAM method has a clear advantage over VΔC in the range of PAR<10%. Moving the data used for lookups from the L2 cache to the L3 cache does not significantly affect the relative performance between the two methods.

(ハードウェア例)
以下、SAM法を実現するためのハードウェア例を説明する。
なお、以下では、説明を簡略化するために、フロー行列と距離行列の両方が対称行列(対角成分が0(バイアスレス))であるものとして説明する。前述のように、このようなQAPが、インスタンスの大部分であるし、計算を単純化するためである。対称行列を用いたQAPは、非対称行列を用いたQAPに直接的に変換可能である。
(Hardware example)
An example of hardware for implementing the SAM method will be described below.
To simplify the description, the following description assumes that both the flow matrix and the distance matrix are symmetric matrices (diagonal elements are 0 (biasless)). As mentioned above, such QAPs are the bulk of the instances and to simplify the calculations. QAP with symmetric matrices can be directly converted to QAP with asymmetric matrices.

対称行列のみを用いたQAPの評価関数は、以下の式(40)のように表せる。 A QAP evaluation function using only a symmetric matrix can be expressed as in Equation (40) below.

Figure 2023001055000047
Figure 2023001055000047

式(1)と式(40)との違いは、式(1)の“j=1”が“j=i”となっている点だけである。
式(40)で表される評価関数を用いた場合、QAPの計算に用いられるΔCexは式(19)、式(22)の代わりに、以下の式(41)、式(42)で表せる。
The only difference between formula (1) and formula (40) is that "j=1" in formula (1) is "j=i".
When the evaluation function represented by Equation (40) is used, ΔC ex used for QAP calculation can be represented by the following Equations (41) and (42) instead of Equations (19) and (22). .

Figure 2023001055000048
Figure 2023001055000048

Figure 2023001055000049
Figure 2023001055000049

図18は、ΔC生成回路の一例を示す図である。
ΔC生成回路30は、フロー行列メモリ31a、状態整列D行列メモリ31b、差分計算回路32a,32b、マルチプレクサ33a,33b、内積計算回路34、レジスタ35、乗算回路36、加算回路37を有する。これらは、たとえば、図2に示した記憶部11または処理部12に含まれる回路やメモリである。
FIG. 18 is a diagram showing an example of a ΔC generation circuit.
The ΔC generation circuit 30 has a flow matrix memory 31 a , a state-aligned D matrix memory 31 b , difference calculation circuits 32 a and 32 b , multiplexers 33 a and 33 b , an inner product calculation circuit 34 , a register 35 , a multiplication circuit 36 and an addition circuit 37 . These are, for example, circuits and memories included in the storage unit 11 or the processing unit 12 shown in FIG.

フロー行列メモリ31aは、フロー行列(F)を記憶する。
状態整列D行列メモリ31bは、距離行列を更新したものである状態整列D行列(D)を記憶する。
The flow matrix memory 31a stores a flow matrix (F).
The state-aligned D-matrix memory 31b stores a state-aligned D-matrix (D X ) which is an updated distance matrix.

図18の例では、フロー行列メモリ31aと状態整列D行列メモリ31bは、2つのポートを有するデュアルポートメモリである。一部のFPGAではこのようなデュアルポートメモリを使用可能である。 In the example of FIG. 18, the flow matrix memory 31a and the state alignment D matrix memory 31b are dual port memories having two ports. Such dual port memories are available in some FPGAs.

差分計算回路32aは、式(42)のΔ FであるFb,*-Fa,*を計算する。
差分計算回路32bは、式(42)のΔφ(a) φ(b)であるD φ(a),*-D φ(b),*を計算する。
The difference calculation circuit 32a calculates F b,* -F a,* which is Δ b a F in equation (42).
The difference calculation circuit 32b calculates D X φ(a),* −D X φ(b),* , which is Δ φ(a) φ(b) D X in equation (42).

マルチプレクサ33aは、Fa,*からfa,bを選択して出力する。
マルチプレクサ33bは、D φ(a),*からdφ(a),bを選択して出力する。
内積計算回路34は、Δ FとΔφ(a) φ(b)の内積を計算する。内積計算回路34は、たとえば、並列に接続された複数の乗算器により実現できる。
The multiplexer 33a selects and outputs f a,b from F a,* .
The multiplexer 33b selects and outputs d φ(a),b from D X φ(a),* .
The inner product calculation circuit 34 calculates the inner product of Δ b a F and Δ φ(a) φ(b) DX . The inner product calculation circuit 34 can be implemented, for example, by a plurality of multipliers connected in parallel.

レジスタ35は、式(42)に含まれる係数“2”を保持する。
乗算回路36は2fa,bφ(a),bを計算する。
加算回路37は、内積の計算結果に2fa,bφ(a),bを加算することでΔCexを計算し、出力する。
Register 35 holds the coefficient "2" included in equation (42).
Multiplication circuit 36 computes 2f a,b d φ(a),b .
The addition circuit 37 calculates and outputs ΔC ex by adding 2f a,b d φ(a),b to the inner product calculation result.

このようなハードウェアを用いたΔCexの計算は、たとえば、図2の処理部12に含まれる図示しない制御回路がプログラムを実行することで制御される。
前述のようにSAM法では、ΔCexを発生させる要素の割当先の入れ替え(割当変更)が提案され、受け入れられると、状態整列D行列は、受け入れられた割当状態に対応するように、列が入れ替えられる。
Calculation of ΔC ex using such hardware is controlled by, for example, a control circuit (not shown) included in the processing unit 12 of FIG. 2 executing a program.
As described above, in the SAM method, a permutation (assignment change) of the assignment destination of the element that generates ΔC ex is proposed, and if accepted, the state-aligned D matrix is such that the columns correspond to the accepted assignment state. be replaced.

図19は、列の入れ替えを行うハードウェア構成の第1の例を示す図である。
図19のように、状態整列D行列メモリ31bに記憶されている状態整列D行列の列の入れ替えは、たとえば、マルチプレクサ40a,40b、スイッチ41を用いて行うことができる。これらの回路も図2の処理部12に含みうる。
FIG. 19 is a diagram showing a first example of a hardware configuration for permuting columns.
As shown in FIG. 19, the permutation of the columns of the state-aligned D-matrix stored in the state-aligned D-matrix memory 31b can be performed using multiplexers 40a and 40b and a switch 41, for example. These circuits may also be included in the processing unit 12 of FIG.

マルチプレクサ40aは、状態整列D行列メモリ31bから入れ替えのために読み出される状態整列D行列の各行のうちの、第1の列の値を順に選択して出力する。
マルチプレクサ40bは、状態整列D行列メモリ31bから読み出される状態整列D行列の各行のうちの、第2の列の値を順に選択して出力する。
The multiplexer 40a sequentially selects and outputs the values of the first columns of the rows of the state-aligned D-matrix read out for permutation from the state-aligned D-matrix memory 31b.
The multiplexer 40b sequentially selects and outputs the values of the second columns of the rows of the state-aligned D-matrix read from the state-aligned D-matrix memory 31b.

スイッチ41は、状態整列D行列メモリ31bにおいて、マルチプレクサ40aから出力される値を、マルチプレクサ40bから出力される値が記憶されていた場所に記憶させるように記憶場所を入れ替えて書き込む。また、スイッチ41は、状態整列D行列メモリ31bにおいて、マルチプレクサ40bから出力される値を、マルチプレクサ40aから出力される値が記憶されていた場所に記憶させるように記憶場所を入れ替えて書き込む。 The switch 41 writes the value output from the multiplexer 40a to the location where the value output from the multiplexer 40b was stored in the state-arranged D-matrix memory 31b. Also, the switch 41 writes the value output from the multiplexer 40b to the location where the value output from the multiplexer 40a was stored in the state-arranged D-matrix memory 31b.

このようなハードウェアを用いた列の入れ替えは、たとえば、図2の処理部12に含まれる図示しない制御回路がプログラムを実行することで制御される。
図20は、列の入れ替え例を示す図である。図20では、1列目と3列目の入れ替えが行われる例が示されている。
Such column permutation using hardware is controlled by, for example, a control circuit (not shown) included in the processing unit 12 of FIG. 2 executing a program.
FIG. 20 is a diagram illustrating an example of column permutation. FIG. 20 shows an example in which the first and third columns are interchanged.

最初にd1,3とd1,1がマルチプレクサ40a,40bによって選択され、スイッチ41によって記憶場所が入れ替えられる。次に、d2,3とd2,1がマルチプレクサ40a,40bによって選択され、スイッチ41によって記憶場所が入れ替えられる。同様の処理が合計nサイクル繰り返されることで、列の入れ替えが完了する。 First, d 1,3 and d 1,1 are selected by multiplexers 40 a and 40 b , and switch 41 switches the memory location. Next, d 2,3 and d 2,1 are selected by multiplexers 40 a and 40 b and switched by switch 41 . The same process is repeated for a total of n cycles to complete the column permutation.

図21は、列の入れ替えを行うハードウェア構成の第2の例を示す図である。図21において、図19に示した要素と同じ要素については同一符号が付されている。
図21のように、状態整列D行列メモリ31bには、状態整列D行列のほか、状態整列D行列の転置行列((D)も記憶されている。状態整列D行列の列の入れ替えは、読み出される転置行列の要素を用いて、たとえば、前述のスイッチ41のほか、シフトレジスタ45a,45bにより行うことができる。これらの回路も処理部12に含みうる。
FIG. 21 is a diagram showing a second example of a hardware configuration for permuting columns. In FIG. 21, the same reference numerals are assigned to the same elements as those shown in FIG.
As shown in FIG. 21, the state-aligned D-matrix memory 31b stores not only the state-aligned D-matrix but also the transposed matrix ((D X ) T ) of the state-aligned D-matrix. The permutation of the columns of the state-arranged D-matrix can be performed by using the elements of the read-out transposed matrix, for example, by the shift registers 45a and 45b in addition to the switch 41 described above. These circuits may also be included in the processing unit 12 .

図21の回路構成では、状態整列D行列メモリ31bからは、状態整列D行列の入れ替えが行われる2列に対応する、転置行列の2行が読み出される。
シフトレジスタ45aは、状態整列D行列メモリ31bから読み出される転置行列の2行のうちの、第1の行のn個の値を保持し、1サイクルずつシフトさせて1つずつ値を出力する。
In the circuit configuration of FIG. 21, two rows of the transposed matrix corresponding to the two columns in which the state-aligned D-matrix is permuted are read from the state-aligned D-matrix memory 31b.
The shift register 45a holds n values in the first row of the two rows of the transposed matrix read from the state-aligned D-matrix memory 31b, shifts them one cycle at a time, and outputs the values one at a time.

シフトレジスタ45bは、状態整列D行列メモリ31bから読み出される転置行列の2行のうちの、第2の行のn個の値を保持し、1サイクルずつシフトさせて1つずつ値を出力する。 The shift register 45b holds n values in the second row of the two rows of the transposed matrix read from the state-aligned D-matrix memory 31b, shifts them one cycle at a time, and outputs the values one at a time.

スイッチ41は、状態整列D行列メモリ31bにおいて、シフトレジスタ45aから出力される値を、シフトレジスタ45bから出力される値が記憶されていた場所に記憶させるように記憶場所を切り替える。また、スイッチ41は、状態整列D行列メモリ31bにおいて、シフトレジスタ45bから出力される値を、シフトレジスタ45aから出力される値が記憶されていた場所に記憶させるように記憶場所を切り替える。 The switch 41 switches the storage location in the state-aligned D-matrix memory 31b so that the value output from the shift register 45a is stored in the location where the value output from the shift register 45b was stored. Also, the switch 41 switches the storage location in the state-arranged D-matrix memory 31b so that the value output from the shift register 45b is stored in the location where the value output from the shift register 45a was stored.

このようなハードウェア構成によってもnサイクルで列の入れ替えができる。また、図21のハードウェア構成の場合、図19のハードウェア構成よりも配線性が向上する可能性がある。また、比較的回路規模が大きくなる可能性がある図19に示したようなマルチプレクサ40a,40bが不要になる。 Even with such a hardware configuration, columns can be exchanged in n cycles. Also, in the case of the hardware configuration of FIG. 21, there is a possibility that wiring performance is improved compared to the hardware configuration of FIG. Moreover, the multiplexers 40a and 40b as shown in FIG. 19, which may have a relatively large circuit scale, are not required.

図22は、列の入れ替えを行うハードウェア構成の第2の例の1つ目の変形例を示す図である。図22において、図21に示した要素と同じ要素については同一符号が付されている。 FIG. 22 is a diagram showing a first modification of the second example of the hardware configuration for permuting columns. In FIG. 22, the same symbols are assigned to the same elements as those shown in FIG.

図22のハードウェア構成では、状態整列D行列メモリ31bと分離した転置行列メモリ46に、状態整列D行列の転置行列((D)が記憶されている点が、図21のハードウェア構成と異なっている。転置行列メモリ46から、転置行列の上記2行が読み出される。その他の構成については、図21と同様である。 In the hardware configuration of FIG. 22, the transposed matrix ((D X ) T ) of the state-aligned D matrix is stored in the transposed matrix memory 46 separated from the state-aligned D matrix memory 31b. configuration is different. From the transposed matrix memory 46, the above two rows of the transposed matrix are read. Other configurations are the same as in FIG.

図23は、列の入れ替えを行うハードウェア構成の第2の例の2つ目の変形例を示す図である。図23において、図22に示した要素と同じ要素については同一符号が付されている。 FIG. 23 is a diagram showing a second modification of the second example of the hardware configuration for permuting columns. In FIG. 23, the same reference numerals are assigned to the same elements as those shown in FIG.

図23のハードウェア構成では、図18に示したフロー行列メモリ31aに、フロー行列のほか、状態整列D行列の転置行列((D)も記憶されている。状態整列D行列の列の入れ替えは、フロー行列メモリ31aから読み出される転置行列の要素を用いて、前述のように、スイッチ41、シフトレジスタ45a,45bにより行うことができる。 In the hardware configuration of FIG. 23, the flow matrix memory 31a shown in FIG. 18 stores not only the flow matrix but also the transposed matrix ((D X ) T ) of the state-aligned D matrix. The permutation of the columns of the state-aligned D-matrix can be performed by the switch 41 and the shift registers 45a and 45b, as described above, using the elements of the transposed matrix read from the flow matrix memory 31a.

図24は、列の入れ替えを行うハードウェア構成の第3の例を示す図である。図24において、図19に示した要素と同じ要素については同一符号が付されている。
図24のハードウェア構成では、状態整列D行列は、2つの状態整列D行列メモリ31b1,31b2に記憶される。
FIG. 24 is a diagram showing a third example of a hardware configuration for permuting columns. In FIG. 24, the same reference numerals are assigned to the same elements as those shown in FIG.
In the hardware configuration of FIG. 24, the state-aligned D-matrices are stored in two state-aligned D-matrix memories 31b1 and 31b2.

状態整列D行列メモリ31b1から読み出された状態整列D行列の各行の要素を用いて、状態整列D行列メモリ31b2に記憶されている状態整列D行列に対して、図19のハードウェア構成を用いた場合と同様に列の入れ替えが行われる。 Using the elements of each row of the state-aligned D matrix read from the state-aligned D matrix memory 31b1, the hardware configuration of FIG. 19 is used for the state-aligned D matrix stored in the state-aligned D matrix memory 31b2. The columns are exchanged as if

列の入れ替え後の状態整列D行列は、状態整列D行列メモリ31b1にコピーされる。
このようなハードウェア構成によってもnサイクルで列の入れ替えができる。また、図24のハードウェア構成の場合、図19のハードウェア構成よりも配線性が向上する可能性がある。
The state-aligned D-matrix after the permutation of columns is copied to the state-aligned D-matrix memory 31b1.
Even with such a hardware configuration, columns can be exchanged in n cycles. Also, in the case of the hardware configuration of FIG. 24, there is a possibility that wiring performance is improved compared to the hardware configuration of FIG.

図25は、列の入れ替えを行うハードウェア構成の第3の例の変形例を示す図である。図25において、図19に示した要素と同じ要素については同一符号が付されている。
図25のハードウェア構成では、図18に示したフロー行列メモリ31aに、フロー行列のほか、状態整列D行列の転置行列((D)も記憶されている。状態整列D行列の列の入れ替えは、フロー行列メモリ31aから読み出される転置行列の要素を用いて、前述のように、マルチプレクサ40a,40b、スイッチ41により行うことができる。
FIG. 25 is a diagram showing a modification of the third example of the hardware configuration for permuting columns. In FIG. 25, the same reference numerals are given to the same elements as those shown in FIG.
In the hardware configuration of FIG. 25, the flow matrix memory 31a shown in FIG. 18 stores not only the flow matrix but also the transposed matrix ((D X ) T ) of the state-aligned D matrix. The permutation of the columns of the state-aligned D-matrix can be performed by the multiplexers 40a, 40b and the switch 41 as described above, using the elements of the transposed matrix read from the flow matrix memory 31a.

図26は、ΔC生成回路の他の例を示す図である。図26において、図18に示した要素と同じ要素については同一符号が付されている。
図26のΔC生成回路50では、フロー行列メモリ51a、状態整列D行列メモリ51bとして、シングルポートメモリが用いられている。この場合、Fa,*を保持し、フロー行列メモリ51aからFb,*が読み出されるタイミングでFa,*を出力し、差分計算回路32aとマルチプレクサ33aに供給するレジスタ52aが用いられる。また、D φ(a),*を保持し、状態整列D行列メモリ51bからD φ(b),*が読み出されるタイミングでD φ(a),*を出力し、差分計算回路32bとマルチプレクサ33bに供給するレジスタ52bが用いられる。
FIG. 26 is a diagram showing another example of the ΔC generation circuit. In FIG. 26, the same reference numerals are given to the same elements as those shown in FIG.
In the ΔC generation circuit 50 of FIG. 26, single-port memories are used as the flow matrix memory 51a and the state-ordered D matrix memory 51b. In this case, a register 52a is used which holds Fa ,* , outputs Fa,* at the timing when Fb ,* is read from the flow matrix memory 51a, and supplies it to the difference calculation circuit 32a and the multiplexer 33a. Also, D X φ(a),* is held, D X φ(a),* is output at the timing when D X φ(b),* is read from the state-aligned D matrix memory 51b, and the difference calculation circuit 32b and a register 52b that feeds the multiplexer 33b.

その他の構成については、図18と同様である。
ところで、図21~図24に示した列交換のためのハードウェア構成を、図18または図26に示したΔC生成回路30,50に適用する場合、2つのレプリカについての処理を同時に実行することが可能となる。
Other configurations are the same as those in FIG.
By the way, when the hardware configuration for column exchange shown in FIGS. 21 to 24 is applied to the ΔC generation circuits 30 and 50 shown in FIG. becomes possible.

図27は、2つのレプリカについての処理を行うハードウェア構成の例を示す図である。図27には、図26に示したΔC生成回路50に図22に示した列交換のためのハードウェア構成を組み合わせた構成が示されている。 FIG. 27 is a diagram showing an example of a hardware configuration for processing two replicas. FIG. 27 shows a configuration in which the .DELTA.C generation circuit 50 shown in FIG. 26 is combined with the hardware configuration for column exchange shown in FIG.

図27の例では、状態整列D行列メモリ51bには、2つのレプリカ(R1、R2)の状態整列D行列(D R1、D R2)が記憶されている。
1つのレプリカで割当変更が受け入れられ、状態整列D行列メモリ51bの書き込みポートを使用して1つのレプリカについて列交換が行われる。その間、他方のレプリカについて、状態整列D行列メモリ51bの読み出しポートから読み出される状態整列D行列の要素に基づいて、ΔCexを計算する処理が行われる。
In the example of FIG. 27, the state-aligned D matrix memory 51b stores state-aligned D matrices (D X R1 , D X R2 ) of two replicas (R1, R2).
Allocation changes are accepted at one replica, and column swaps are performed for one replica using the write port of the state-aligned D-matrix memory 51b. Meanwhile, for the other replica, processing is performed to calculate ΔC ex based on the elements of the state-aligned D-matrix read from the read port of the state-aligned D-matrix memory 51b.

なお、どちらのレプリカも更新処理を実行していない場合、一方のレプリカについての処理は、他方のレプリカについてのΔCexの計算が行われている間は、ストールされる。 Note that if neither replica is executing an update process, then the process for one replica is stalled while the ΔC ex calculation is being performed for the other replica.

図28は、ΔC生成回路の他の例を示す図である。図28において、図18に示した要素と同じ要素については同一符号が付されている。
対称順列の問題のみが計算対象となり、ΔCexが、以下の式(43)で表される場合、図28に示すようなΔC生成回路60を用いることもできる。
FIG. 28 is a diagram showing another example of the ΔC generation circuit. In FIG. 28, the same reference numerals are given to the same elements as those shown in FIG.
If only the symmetrical permutation problem is to be calculated and ΔC ex is represented by the following equation (43), a ΔC generating circuit 60 as shown in FIG. 28 can also be used.

Figure 2023001055000050
Figure 2023001055000050

ΔC生成回路60では、図18に示したようなマルチプレクサ33a,33bなどが不要になり、その代わり、セレクタ61が設けられている。
たとえば、差分計算回路32bは、dφ(a),i-dφ(b),iを計算する減算器32biをn個有し、セレクタ61は、減算器32biの出力と0との一方を選択して出力する2入力1出力のマルチプレクサ61aiをn個有する。
The ΔC generation circuit 60 does not require the multiplexers 33a and 33b as shown in FIG. 18, and has a selector 61 instead.
For example, the difference calculation circuit 32b has n subtractors 32bi for calculating d φ(a), i −d φ(b), i , and the selector 61 selects one of the output of the subtractor 32bi and 0. It has n 2-input 1-output multiplexers 61ai that select and output.

マルチプレクサ61aiは、式(43)において、i=a,bとなる場合に0を出力する。このような場合に、0を出力する方法は、マルチプレクサを用いる方法以外の他の方法でもよい。 The multiplexer 61ai outputs 0 when i=a, b in equation (43). In such a case, the method of outputting 0 may be a method other than the method using a multiplexer.

(レプリカ処理回路)
各レプリカについての処理を行う回路は、前述したΔC生成回路40,50,60の何れかと、状態整列D行列の列の入れ替えを行う前述のいくつかのハードウェア構成の何れかと、を組み合わせることで実現できる。
(Replica processing circuit)
A circuit that performs processing for each replica is a combination of any of the ΔC generation circuits 40, 50, and 60 described above and any of the hardware configurations described above for permuting the columns of the state-aligned D matrix. realizable.

図29は、レプリカ処理回路の一例を示す図である。図29には、図26に示したΔC生成回路50に図19に示した列交換のためのハードウェア構成を組み合わせたレプリカ処理回路70の例が示されている。図29において、図19と図26に示した要素と同じ要素については同一符号が付されている。 FIG. 29 is a diagram illustrating an example of a replica processing circuit; FIG. 29 shows an example of a replica processing circuit 70 in which the hardware configuration for column exchange shown in FIG. 19 is combined with the ΔC generation circuit 50 shown in FIG. In FIG. 29, the same elements as those shown in FIGS. 19 and 26 are denoted by the same reference numerals.

図29の例では、マルチプレクサ33bが図19に示したマルチプレクサ40aの機能も有している。
これらの回路は、図2の記憶部11または処理部12に含みうる。
In the example of FIG. 29, multiplexer 33b also has the function of multiplexer 40a shown in FIG.
These circuits can be included in the storage unit 11 or processing unit 12 of FIG.

なお、割当状態を表す整数割当ベクトルφを記憶する構成や、計算されたΔCexを生じさせる割当変更の提案を受け入れるか否かの判定を行う構成などは、図示が省略されている。 Note that the configuration for storing the integer allocation vector φ representing the allocation state and the configuration for determining whether or not to accept the allocation change proposal that causes the calculated ΔC ex are omitted from the drawing.

(非対称行列を用いた場合のQAPへの拡張)
非対称行列(対角成分が非零)を用いたQAPの計算では、対称行列を用いた場合のΔCexに相当するΔCasymは、以下の式(44)で表される。
(Extension to QAP when using asymmetric matrices)
In QAP calculation using an asymmetric matrix (diagonal component is non-zero), ΔC asym corresponding to ΔC ex when using a symmetric matrix is expressed by the following equation (44).

Figure 2023001055000051
Figure 2023001055000051

このような、ΔCasymを計算するレプリカ処理回路は、ΔCexを計算するレプリカ処理回路を用いて実現できる。
図30は、非対称行列を用いたQAPの計算で用いられるレプリカ処理回路の一例を示す図である。図30において、図29に示した要素と同じ要素については同一符号が付されている。
Such a replica processing circuit that calculates ΔC asym can be realized using a replica processing circuit that calculates ΔC ex .
FIG. 30 is a diagram showing an example of a replica processing circuit used in QAP calculation using an asymmetric matrix. In FIG. 30, the same reference numerals are assigned to the same elements as those shown in FIG.

ΔCasymを計算するレプリカ処理回路80は、図29に示したΔCexを計算するレプリカ処理回路70a1,70a2を2つ有する。ただし、一方のレプリカ処理回路70a2のフロー行列メモリ51aには、フロー行列の転置行列(F)が記憶されており、レプリカ処理回路70a2の状態整列D行列メモリ51bには、状態整列D行列の転置行列((D)が記憶されている。 The replica processing circuit 80 for calculating ΔC asym has two replica processing circuits 70a1 and 70a2 for calculating ΔC ex shown in FIG. However, the flow matrix memory 51a of one replica processing circuit 70a2 stores the transposed matrix (F T ) of the flow matrix, and the state-aligned D matrix memory 51b of the replica processing circuit 70a2 stores the state-aligned D matrix A transposed matrix ((D X ) T ) is stored.

レプリカ処理回路80は、さらに、メモリ81a,81b、レジスタ82a,82b、差分計算回路83a,83b、乗算回路84、補償項計算回路85、加算回路86を有する。 The replica processing circuit 80 further has memories 81a and 81b, registers 82a and 82b, difference calculation circuits 83a and 83b, a multiplication circuit 84, a compensation term calculation circuit 85, and an addition circuit 86.

メモリ81aは、フロー行列の対角成分(F)を記憶し、メモリ81bは、距離行列の対角成分(D)を記憶する。非対称行列を用いた場合、対称行列を用いた場合と異なり、これらの対角成分は非零の値を含みうる。 Memory 81a stores the diagonal elements (F d ) of the flow matrix and memory 81b stores the diagonal elements (D d ) of the distance matrix. With an asymmetric matrix, unlike with a symmetric matrix, these diagonal elements can contain non-zero values.

レジスタ82aは、メモリ81aから読み出されるfa,aまたはfb,bの一方を保持し、メモリ81aからfa,aまたはfb,bの他方が読み出されるタイミングで、fa,aまたはfb,bの一方を出力し、差分計算回路83aに供給する。 The register 82a holds one of f a, a or f b ,b read from the memory 81a, and at the timing when the other of f a,a or f b,b is read from the memory 81a, f a,a or f One of b and b is output and supplied to the difference calculation circuit 83a.

レジスタ82bは、メモリ81bから読み出されるdφ(a),φ(a)またはdφ(b),φ(b)の一方を保持する。そして、レジスタ82bは、メモリ81bからdφ(a),φ(a)またはdφ(b),φ(b)の他方が読み出されるタイミングで、dφ(a),φ(a)またはdφ(b),φ(b)の一方を出力し、差分計算回路83bに供給する。 Register 82b holds either d φ (a), φ(a) or d φ(b), φ(b) read from memory 81b. Then, the register 82b stores d φ(a), φ(a) or d φ (a), φ(a) or d One of φ(b) and φ(b) is output and supplied to the difference calculation circuit 83b.

差分計算回路83aは、式(44)のfb,b-fa,aを計算する。
差分計算回路83bは、式(44)のdφ(a),φ(a)-dφ(b),φ(b)を計算する。
The difference calculation circuit 83a calculates f b,b −f a,a in equation (44).
The difference calculation circuit 83b calculates d φ(a), φ(a) −d φ(b), φ(b) of the equation (44).

乗算回路84は、差分計算回路83a,83bの計算結果に基づいて、式(44)の(fb,b-fa,a)(dφ(a),φ(a)-dφ(b),φ(b))を計算する。
補償項計算回路85は、式(44)の右辺の4項目である補償項(i=a,bの計算をスキップするという条件をなくしたことによる補償を行う項)を計算する。補償項計算回路85は、補償項を計算するために、レプリカ処理回路70a1のマルチプレクサ33a,33bからfa,b、dφ(a),φ(b)を受け、レプリカ処理回路70a2のマルチプレクサ33a,33bからfb,a、dφ(b),φ(a)を受ける。
Multiplying circuit 84 calculates (f b,b −f a,a )(d φ(a), φ(a) −d φ(b ), φ(b) ).
The compensation term calculation circuit 85 calculates compensation terms (terms for compensation by eliminating the condition of skipping the calculation of i=a, b), which are the four items on the right side of equation (44). The compensation term calculation circuit 85 receives f a,b , d φ(a), φ(b) from the multiplexers 33a, 33b of the replica processing circuit 70a1 to calculate the compensation terms, and the multiplexer 33a of the replica processing circuit 70a2. , 33b receive f b,a , d φ(b), φ(a) .

加算回路86は、レプリカ処理回路70a1の内積計算回路34から式(44)の右辺の1項目の値を受け、レプリカ処理回路70a2の内積計算回路34から式(44)の右辺の2項目の値を受ける。さらに加算回路86は、乗算回路84から、式(44)の右辺の3項目の値、補償項計算回路85から、式(44)の右辺の4項目の値を受ける。そして、加算回路86はこれらの和を計算することでΔCasymを生成し、出力する。 Adder circuit 86 receives the value of one item on the right side of equation (44) from inner product calculation circuit 34 of replica processing circuit 70a1, and the value of two items on the right side of equation (44) from inner product calculation circuit 34 of replica processing circuit 70a2. receive. Further, adder circuit 86 receives the values of three items on the right side of equation (44) from multiplier circuit 84 and the values of four items on the right side of equation (44) from compensation term calculation circuit 85 . Then, the addition circuit 86 generates and outputs ΔC asym by calculating the sum of these.

これらの回路やメモリなどは、図2の記憶部11または処理部12に含みうる。
なお、割当状態を表す整数割当ベクトルφを記憶する構成、計算されたΔCexを生じさせる割当変更の提案を受け入れるか否かの判定を行う構成などは、図示が省略されている。
These circuits, memories, and the like can be included in the storage unit 11 or the processing unit 12 in FIG.
The configuration for storing the integer allocation vector φ representing the allocation state, the configuration for determining whether or not to accept the allocation change proposal that causes the calculated ΔC ex , and the like are not shown in the drawing.

以上のようなハードウェア構成により、QAPに対してSAM法による局所探索を行うことができる。QSAPに対してSAM法による局所探索を行う構成も、上記のハードウェア構成を適宜変更することで実現できる。たとえば、式(24)の2行目の計算を行うための演算回路(乗算回路や加算回路など)が追加される。 With the hardware configuration as described above, it is possible to perform a local search for QAP by the SAM method. A configuration for performing a local search for QSAP by the SAM method can also be realized by appropriately changing the hardware configuration described above. For example, an arithmetic circuit (such as a multiplication circuit and an addition circuit) is added to perform the calculation on the second line of Equation (24).

なお、上記の処理内容(たとえば、図6~図8、図10、図11など)は、データ処理装置10にプログラムを実行させることでソフトウェアにて実現できる。
プログラムは、コンピュータ読み取り可能な記録媒体に記録しておくことができる。記録媒体として、たとえば、磁気ディスク、光ディスク、光磁気ディスク、半導体メモリなどを使用できる。磁気ディスクには、フレキシブルディスク(FD:Flexible Disk)及びHDDが含まれる。光ディスクには、CD(Compact Disc)、CD-R(Recordable)/RW(Rewritable)、DVD(Digital Versatile Disc)及びDVD-R/RWが含まれる。プログラムは、可搬型の記録媒体に記録されて配布されることがある。その場合、可搬型の記録媒体から他の記録媒体にプログラムをコピーして実行してもよい。
The above processing contents (for example, FIGS. 6 to 8, 10, 11, etc.) can be realized by software by causing the data processing device 10 to execute a program.
The program can be recorded on a computer-readable recording medium. As a recording medium, for example, a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. can be used. Magnetic disks include flexible disks (FDs) and HDDs. Optical discs include CD (Compact Disc), CD-R (Recordable)/RW (Rewritable), DVD (Digital Versatile Disc) and DVD-R/RW. The program may be recorded on a portable recording medium and distributed. In that case, the program may be copied from the portable recording medium to another recording medium and executed.

図31は、データ処理装置の一例であるコンピュータのハードウェア例を示す図である。
コンピュータ90は、CPU91、RAM92、HDD93、GPU94、入力インタフェース95、媒体リーダ96及び通信インタフェース97を有する。上記ユニットは、バスに接続されている。
FIG. 31 is a diagram illustrating an example of hardware of a computer, which is an example of a data processing device.
Computer 90 has CPU 91 , RAM 92 , HDD 93 , GPU 94 , input interface 95 , medium reader 96 and communication interface 97 . The units are connected to a bus.

CPU91は、プログラムの命令を実行する演算回路を含むプロセッサである。CPU91は、HDD93に記憶されたプログラムやデータの少なくとも一部をRAM92にロードし、プログラムを実行する。なお、CPU91は、たとえば、図4に示したように、複数のレプリカの処理を並列に実行するために、複数のプロセッサコアを備えてもよい。また、コンピュータ90は複数のプロセッサを備えてもよい。なお、複数のプロセッサの集合(マルチプロセッサ)を「プロセッサ」と呼んでもよい。 The CPU 91 is a processor including an arithmetic circuit that executes program instructions. The CPU 91 loads at least part of the programs and data stored in the HDD 93 into the RAM 92 and executes the programs. Note that the CPU 91 may include a plurality of processor cores in order to execute processing of a plurality of replicas in parallel, as shown in FIG. 4, for example. Computer 90 may also include multiple processors. A set of multiple processors (multiprocessor) may also be called a "processor".

RAM92は、CPU91が実行するプログラムやCPU91が演算に用いるデータを一時的に記憶する揮発性の半導体メモリである。なお、コンピュータ90は、RAM92以外の種類のメモリを備えてもよく、複数個のメモリを備えてもよい。 The RAM 92 is a volatile semiconductor memory that temporarily stores programs executed by the CPU 91 and data used for calculation by the CPU 91 . The computer 90 may be provided with a type of memory other than the RAM 92, and may be provided with a plurality of memories.

HDD93は、OS(Operating System)やミドルウェアやアプリケーションソフトウェアなどのソフトウェアのプログラム、及び、データを記憶する不揮発性の記憶装置である。プログラムには、たとえば、前述のような割当問題の解を探索する処理をコンピュータ90に実行させるプログラムが含まれる。なお、コンピュータ90は、フラッシュメモリやSSD(Solid State Drive)などの他の種類の記憶装置を備えてもよく、複数の不揮発性の記憶装置を備えてもよい。 The HDD 93 is a nonvolatile storage device that stores an OS (Operating System), software programs such as middleware and application software, and data. The program includes, for example, a program that causes the computer 90 to execute a process of searching for a solution to the assignment problem as described above. Note that the computer 90 may include other types of storage devices such as flash memory and SSD (Solid State Drive), or may include multiple non-volatile storage devices.

GPU94は、CPU91からの命令にしたがって、コンピュータ90に接続されたディスプレイ94aに画像(たとえば、割当問題の計算結果などを表す画像)を出力する。ディスプレイ94aとしては、CRT(Cathode Ray Tube)ディスプレイ、液晶ディスプレイ(LCD:Liquid Crystal Display)、プラズマディスプレイ(PDP:Plasma Display Panel)、有機EL(OEL:Organic Electro-Luminescence)ディスプレイなどを用いることができる。 The GPU 94 outputs an image (for example, an image representing a calculation result of an assignment problem, etc.) to a display 94a connected to the computer 90 according to instructions from the CPU 91 . As the display 94a, a CRT (Cathode Ray Tube) display, a liquid crystal display (LCD), a plasma display (PDP: Plasma Display Panel), an organic EL (OEL: Organic Electro-Luminescence) display, or the like can be used. .

入力インタフェース95は、コンピュータ90に接続された入力デバイス95aから入力信号を取得し、CPU91に出力する。入力デバイス95aとしては、マウスやタッチパネルやタッチパッドやトラックボールなどのポインティングデバイス、キーボード、リモートコントローラ、ボタンスイッチなどを用いることができる。また、コンピュータ90に、複数の種類の入力デバイスが接続されていてもよい。 The input interface 95 acquires an input signal from an input device 95 a connected to the computer 90 and outputs it to the CPU 91 . As the input device 95a, a mouse, a touch panel, a touch pad, a pointing device such as a trackball, a keyboard, a remote controller, a button switch, or the like can be used. Also, the computer 90 may be connected to a plurality of types of input devices.

媒体リーダ96は、記録媒体96aに記録されたプログラムやデータを読み取る読み取り装置である。記録媒体96aとして、たとえば、磁気ディスク、光ディスク、光磁気ディスク(MO:Magneto-Optical disk)、半導体メモリなどを使用できる。磁気ディスクには、FDやHDDが含まれる。光ディスクには、CDやDVDが含まれる。 The medium reader 96 is a reading device that reads programs and data recorded on the recording medium 96a. As the recording medium 96a, for example, a magnetic disk, an optical disk, a magneto-optical disk (MO), a semiconductor memory, or the like can be used. Magnetic disks include FDs and HDDs. Optical discs include CDs and DVDs.

媒体リーダ96は、たとえば、記録媒体96aから読み取ったプログラムやデータを、RAM92やHDD93などの他の記録媒体にコピーする。読み取られたプログラムは、たとえば、CPU91によって実行される。なお、記録媒体96aは、可搬型記録媒体であってもよく、プログラムやデータの配布に用いられることがある。また、記録媒体96aやHDD93を、コンピュータ読み取り可能な記録媒体ということがある。 The medium reader 96 copies the program and data read from the recording medium 96a to another recording medium such as the RAM 92 and the HDD 93, for example. The read program is executed by the CPU 91, for example. Note that the recording medium 96a may be a portable recording medium, and may be used for distribution of programs and data. Also, the recording medium 96a and the HDD 93 may be referred to as a computer-readable recording medium.

通信インタフェース97は、ネットワーク97aに接続され、ネットワーク97aを介して他の情報処理装置と通信を行うインタフェースである。通信インタフェース97は、スイッチなどの通信装置とケーブルで接続される有線通信インタフェースでもよいし、基地局と無線リンクで接続される無線通信インタフェースでもよい。 The communication interface 97 is an interface that is connected to a network 97a and communicates with other information processing apparatuses via the network 97a. The communication interface 97 may be a wired communication interface connected to a communication device such as a switch via a cable, or a wireless communication interface connected to a base station via a wireless link.

以上、実施の形態に基づき、本発明のプログラム、データ処理装置及びデータ処理方法の一観点について説明してきたが、これらは一例にすぎず、上記の記載に限定されるものではない。 Although one aspect of the program, the data processing apparatus, and the data processing method of the present invention has been described above based on the embodiments, these are merely examples and are not limited to the above description.

たとえば、上記の説明では、割当状態に応じて距離行列の列を並べ替えるものとしたが、割当状態に応じた距離行列の行を並べ替えても、適宜式を変形すれば同様の作用効果が得られる。 For example, in the above description, the columns of the distance matrix are rearranged according to the allocation state. can get.

10 データ処理装置
11 記憶部
12 処理部
10 data processing device 11 storage unit 12 processing unit

Claims (9)

割当問題の解を、割当状態に応じたコストを表す評価関数を用いた局所探索により探索する処理をコンピュータに実行させるプログラムであって、
メモリに記憶された、複数の割当先へ割り当てられる複数の要素間のフロー量を表すフロー行列と、前記複数の割当先間の距離を表す距離行列と、に基づいて、前記複数の要素のうち、第1の要素と第2の要素の割当先が入れ替わる第1の割当変更が生じた場合の、前記評価関数の第1の変化量を、ベクトル算術演算を用いて計算し、
前記第1の変化量に基づいて、前記第1の割当変更を許容するか否かを判定し、
前記第1の割当変更を許容すると判定した場合、前記割当状態を更新するとともに、前記距離行列において、前記第1の要素と前記第2の要素に対応する2列または2行を入れ替えるように更新する、
処理を前記コンピュータに実行させるプログラム。
A program for causing a computer to execute a process of searching for a solution to an allocation problem by local search using an evaluation function representing a cost according to an allocation state,
out of the plurality of elements based on a flow matrix representing flow amounts between a plurality of elements allocated to a plurality of allocation destinations and a distance matrix representing distances between the plurality of allocation destinations, stored in memory , calculating a first amount of change in the evaluation function when a first allocation change occurs in which the allocation destinations of the first element and the second element are exchanged, using vector arithmetic operations;
determining whether or not to allow the first allocation change based on the first amount of change;
When it is determined that the first allocation change is permitted, the allocation state is updated, and the distance matrix is updated so that two columns or two rows corresponding to the first element and the second element are exchanged. do,
A program that causes the computer to execute a process.
前記割当問題がQAPである場合、前記第1の変化量と温度パラメータの値とに基づいて計算される受け入れ確率と、乱数値との比較結果に基づいて、前記第1の割当変更を許容するか否かを判定する、処理を前記コンピュータに実行させる請求項1に記載のプログラム。 If the assignment problem is QAP, allow the first assignment change based on a comparison result between the acceptance probability calculated based on the first change amount and the value of the temperature parameter and a random value. 2. The program according to claim 1, causing the computer to execute a process of determining whether or not. 前記第1の変化量の計算前に、
前記割当問題がQSAPである場合、前記第1の要素を第1の割当先に割り当てる第2の割当変更が生じた場合の前記評価関数の第2の変化量を計算し、
前記第2の変化量と温度パラメータの値とに基づいて計算される受け入れ確率と、乱数値との比較結果に基づいて、前記第2の割当変更を許容するか否かを判定し、
前記第2の割当変更を許容すると判定した場合、前記割当状態と前記距離行列を更新し、
前記第1の変化量の計算後に、
前記第1の変化量と所定値との比較結果に基づいて、前記第1の割当変更を許容するか否かを判定する、
処理を前記コンピュータに実行させる請求項1に記載のプログラム。
Before calculating the first amount of change,
when the assignment problem is QSAP, calculating a second amount of change in the evaluation function when a second assignment change occurs in which the first element is assigned to a first assignment destination;
determining whether or not to allow the second allocation change based on a comparison result between the acceptance probability calculated based on the second amount of change and the value of the temperature parameter and a random value;
updating the allocation state and the distance matrix if it is determined that the second allocation change is allowed;
After calculating the first amount of change,
Determining whether to allow the first allocation change based on a comparison result between the first amount of change and a predetermined value;
2. The program according to claim 1, which causes the computer to execute processing.
前記メモリから、前記距離行列を1行ずつ読み出し、
読み出した行に含まれる前記2列の2つの値を選択し、
前記メモリに対して、前記2つの値の記憶場所を入れ替えて書き込む、
処理を繰り返すことで、前記2列の入れ替えを行う、
処理を前記コンピュータに実行させる請求項1に記載のプログラム。
reading the distance matrix row by row from the memory;
selecting two values of the two columns contained in the read row;
swapping storage locations of the two values in the memory;
By repeating the process, the two columns are exchanged,
2. The program according to claim 1, which causes the computer to execute processing.
前記メモリは、前記距離行列の転置行列をさらに記憶しており、
前記転置行列において、前記距離行列の前記2列に対応する2行のうち、第1の行を第1のシフトレジスタに記憶し、第2の行を第2のシフトレジスタに記憶し、
前記メモリに対して、前記第1のシフトレジスタと前記第2のシフトレジスタのそれぞれから1つずつ出力される2つの値の記憶場所を入れ替えて書き込む、処理を繰り返すことで、前記2列の入れ替えを行う、
処理を前記コンピュータに実行させる請求項1に記載のプログラム。
the memory further stores a transposed matrix of the distance matrix;
In the transposed matrix, among two rows corresponding to the two columns of the distance matrix, the first row is stored in a first shift register and the second row is stored in a second shift register;
The two columns are exchanged by repeating a process of swapping storage locations of two values output one by one from each of the first shift register and the second shift register and writing the values into the memory. I do,
2. The program according to claim 1, which causes the computer to execute processing.
前記メモリは、前記距離行列が記憶される第1のメモリと第2のメモリとを含み、
前記第1のメモリから、前記距離行列を1行ずつ読み出し、
読み出した行に含まれる前記2列の2つの値を選択し、
前記第2のメモリに対して、前記2つの値の記憶場所を入れ替えて書き込む、
処理を繰り返すことで、前記2列の入れ替えを行う、
処理を前記コンピュータに実行させる請求項1に記載のプログラム。
the memory includes a first memory and a second memory in which the distance matrix is stored;
reading the distance matrix row by row from the first memory;
selecting two values of the two columns contained in the read row;
swapping storage locations of the two values and writing them to the second memory;
By repeating the process, the two columns are exchanged,
2. The program according to claim 1, which causes the computer to execute processing.
異なる温度パラメータの値がそれぞれに設定された複数のレプリカによるパラレルテンパリングを用いた前記局所探索が行われ、
前記メモリは、前記複数のレプリカのうち、第1のレプリカと第2のレプリカのそれぞれの前記距離行列を記憶しており、
前記第1のレプリカの前記距離行列を更新している間に、前記第2のレプリカの前記距離行列に基づいて、前記第1の変化量の計算を行う、
処理を前記コンピュータに実行させる請求項1に記載のプログラム。
performing the local search using parallel tempering with a plurality of replicas each having a different temperature parameter value;
the memory stores the distance matrix for each of a first replica and a second replica among the plurality of replicas;
calculating the first variation based on the distance matrix of the second replica while updating the distance matrix of the first replica;
2. The program according to claim 1, which causes the computer to execute processing.
割当問題の解を、割当状態に応じたコストを表す評価関数を用いた局所探索により探索するデータ処理装置であって、
複数の割当先へ割り当てられる複数の要素間のフロー量を表すフロー行列と、前記複数の割当先間の距離を表す距離行列とを記憶する記憶部と、
前記フロー行列と、前記距離行列に基づいて、前記複数の要素のうち、第1の要素と第2の要素の割当先が入れ替わる第1の割当変更が生じた場合の、前記評価関数の第1の変化量を、ベクトル算術演算を用いて計算し、前記第1の変化量に基づいて、前記第1の割当変更を許容するか否かを判定し、前記第1の割当変更を許容すると判定した場合、前記割当状態を更新するとともに、前記距離行列において、前記第1の要素と前記第2の要素に対応する2列または2行を入れ替えるように更新する処理部と、
を有するデータ処理装置。
A data processing device that searches for a solution to an allocation problem by local search using an evaluation function representing a cost according to an allocation state,
a storage unit that stores a flow matrix representing flow amounts between a plurality of elements allocated to a plurality of allocation destinations and a distance matrix representing distances between the plurality of allocation destinations;
A first evaluation function of the evaluation function when a first allocation change occurs in which the allocation destinations of the first element and the second element among the plurality of elements are exchanged based on the flow matrix and the distance matrix. using vector arithmetic operations, determining whether or not to permit the first allocation change based on the first amount of change, and determining to permit the first allocation change If so, a processing unit that updates the allocation state and updates the distance matrix so that two columns or two rows corresponding to the first element and the second element are exchanged;
A data processing device having
割当問題の解を、割当状態に応じたコストを表す評価関数を用いた局所探索により探索するデータ処理方法であって、
コンピュータが、
メモリに記憶された、複数の割当先へ割り当てられる複数の要素間のフロー量を表すフロー行列と、前記複数の割当先間の距離を表す距離行列と、に基づいて、前記複数の要素のうち、第1の要素と第2の要素の割当先が入れ替わる第1の割当変更が生じた場合の、前記評価関数の第1の変化量を、ベクトル算術演算を用いて計算し、
前記第1の変化量に基づいて、前記第1の割当変更を許容するか否かを判定し、
前記第1の割当変更を許容すると判定した場合、前記割当状態を更新するとともに、前記距離行列において、前記第1の要素と前記第2の要素に対応する2列または2行を入れ替えるように更新する、
データ処理方法。
A data processing method for searching for a solution to an allocation problem by local search using an evaluation function representing a cost according to an allocation state,
the computer
out of the plurality of elements based on a flow matrix representing flow amounts between a plurality of elements allocated to a plurality of allocation destinations and a distance matrix representing distances between the plurality of allocation destinations, stored in memory , calculating a first amount of change in the evaluation function when a first allocation change occurs in which the allocation destinations of the first element and the second element are exchanged, using vector arithmetic operations;
determining whether or not to allow the first allocation change based on the first amount of change;
When it is determined that the first allocation change is permitted, the allocation state is updated, and the distance matrix is updated so that two columns or two rows corresponding to the first element and the second element are exchanged. do,
Data processing method.
JP2022092512A 2021-06-18 2022-06-07 Program, data processing apparatus, and data processing method Pending JP2023001055A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP22179185.8A EP4105837A1 (en) 2021-06-18 2022-06-15 Computer program, data processing apparatus, and data processing method
US17/841,385 US20220414184A1 (en) 2021-06-18 2022-06-15 Data processing apparatus and data processing method
CN202210678832.3A CN115496251A (en) 2021-06-18 2022-06-16 Data processing apparatus and data processing method

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US202163212554P 2021-06-18 2021-06-18
US63/212,554 2021-06-18

Publications (1)

Publication Number Publication Date
JP2023001055A true JP2023001055A (en) 2023-01-04

Family

ID=84687330

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2022092512A Pending JP2023001055A (en) 2021-06-18 2022-06-07 Program, data processing apparatus, and data processing method

Country Status (1)

Country Link
JP (1) JP2023001055A (en)

Similar Documents

Publication Publication Date Title
JP6083300B2 (en) Program, parallel operation method, and information processing apparatus
CN112835627B (en) Near nearest neighbor search for single instruction multithreading or single instruction multiple data type processors
Romero et al. High performance implementations of the 2D Ising model on GPUs
Shin et al. A thermal-aware optimization framework for ReRAM-based deep neural network acceleration
Nisa et al. Parallel ccd++ on gpu for matrix factorization
JP7219402B2 (en) Optimization device, optimization device control method, and optimization device control program
JP2023001055A (en) Program, data processing apparatus, and data processing method
Newcome et al. Towards auto-tuning Multi-Site Molecular Dynamics simulations with AutoPas
Qiu et al. Dcim-gcn: Digital computing-in-memory to efficiently accelerate graph convolutional networks
TWI782403B (en) Shared scratchpad memory with parallel load-store
EP4105837A1 (en) Computer program, data processing apparatus, and data processing method
Meng et al. Accelerating monte-carlo tree search on cpu-fpga heterogeneous platform
JP2022072685A (en) Evaluation function generation program, evaluation function generation method, optimization method and optimization device
JP2022094510A (en) Optimization program, optimization method, and information processing apparatus
Rocchetti et al. High-performance computing simulations of self-gravity in astronomical agglomerates
US20220318663A1 (en) Non-transitory computer-readable recording medium, optimization method, and optimization apparatus
JP7239521B2 (en) Information processing device and information processing method
JP2022165250A (en) Program, data processing method, and data processing apparatus
CN116107640B (en) Systematic optimization system for DSMC algorithm cache and SIMD vectorization
EP4148628A1 (en) Data processing apparatus, data processing method, and data processing program
JP2023000462A (en) Data processor, program and data processing method
US20230350972A1 (en) Information processing apparatus and information processing method
US20220405347A1 (en) Data processing apparatus, computer-readable recording medium storing program of processing data, and method of processing data
Hirtz Coupe: A Modular, Multi-threaded Mesh Partitioning Platform
CN113283609A (en) Information processing method, information processing apparatus, and information processing program