JP7411397B2 - Integer programming device, integer programming method and integer programming program - Google Patents

Integer programming device, integer programming method and integer programming program Download PDF

Info

Publication number
JP7411397B2
JP7411397B2 JP2019219811A JP2019219811A JP7411397B2 JP 7411397 B2 JP7411397 B2 JP 7411397B2 JP 2019219811 A JP2019219811 A JP 2019219811A JP 2019219811 A JP2019219811 A JP 2019219811A JP 7411397 B2 JP7411397 B2 JP 7411397B2
Authority
JP
Japan
Prior art keywords
term
integer programming
coefficient
annealing machine
spins
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2019219811A
Other languages
Japanese (ja)
Other versions
JP2021089596A (en
Inventor
耕太郎 棚橋
宗 田中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Waseda University
Recruit Co Ltd
Original Assignee
Waseda University
Recruit Co 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 Waseda University, Recruit Co Ltd filed Critical Waseda University
Priority to JP2019219811A priority Critical patent/JP7411397B2/en
Publication of JP2021089596A publication Critical patent/JP2021089596A/en
Application granted granted Critical
Publication of JP7411397B2 publication Critical patent/JP7411397B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Description

本発明は、整数計画装置、整数計画方法及び整数計画プログラムに関する。 The present invention relates to an integer programming device, an integer programming method, and an integer programming program.

近年、量子アニーリングマシン等のアニーリングマシンを、組合せ最適化問題を解くために用いる試みが行われている。組合せ最適化問題の多くは、制約付き整数計画問題として定式化することができるため、アニーリングマシンによって組合せ最適化問題を解くことは、制約付き整数計画問題を解くことに帰着される。 In recent years, attempts have been made to use annealing machines such as quantum annealing machines to solve combinatorial optimization problems. Since many combinatorial optimization problems can be formulated as constrained integer programming problems, solving a combinatorial optimization problem by an annealing machine is reduced to solving a constrained integer programming problem.

制約付き整数計画問題を解く方法として、例えば、下記非特許文献1には、制約条件を表すスピンの二次式をハミルトニアンに加えて、制約条件を満たすスピンの配列が基底状態となるようにする方法が記載されている。 As a method for solving a constrained integer programming problem, for example, in Non-Patent Document 1 below, a quadratic spin expression representing a constraint condition is added to the Hamiltonian, and the spin arrangement that satisfies the constraint condition becomes the ground state. The method is described.

D-Wave, "Using QUBOs to Represent Constraints",[online],[令和元年11月15日検索]、インターネット〈URL:https://docs.dwavesys.com/docs/latest/c_gs_6.html>D-Wave, "Using QUBOs to Represent Constraints", [online], [Retrieved November 15, 2019], Internet <URL: https://docs.dwavesys.com/docs/latest/c_gs_6.html>

非特許文献1に記載のように、制約条件を表すスピンの2次式と、目的関数との和をハミルトニアンとすることで、制約条件を満たしつつ、目的関数を最小化又は最大化するスピンの配列を求めることができる。具体的には、二値変数(スピン)をxと表し、目的関数をf(x)と表し、複数の制約条件をgi(x)=ciと表すとき、以下の数式(1)で表されるハミルトニアンの基底状態を求めることで、制約付き整数計画問題を解くことができる。ここで、iが属する集合Cは、制約条件の集合を表す。 As described in Non-Patent Document 1, by setting the sum of the spin quadratic expression representing the constraint condition and the objective function as a Hamiltonian, the spin function that minimizes or maximizes the objective function while satisfying the constraint condition is obtained. Arrays can be obtained. Specifically, when a binary variable (spin) is expressed as x, an objective function is expressed as f(x), and multiple constraints are expressed as g i (x) = c i , the following formula (1) is used. Constrained integer programming problems can be solved by finding the ground state of the represented Hamiltonian. Here, the set C to which i belongs represents a set of constraints.

ここで、制約条件を表すスピンの2次式の係数μiを適切な値に設定しなければ、精度の高い解を得ることができない。そのため、従来、適切な解が得られるように係数μiをグリッドサーチ等で探索している。しかしながら、係数μiの探索は、係数の数が増えるほど困難となるため、制約条件の数が増えるほど精度の高い解を得ることが困難となる。 Here, a highly accurate solution cannot be obtained unless the coefficient μ i of the spin quadratic equation representing the constraint condition is set to an appropriate value. Therefore, conventionally, the coefficient μ i is searched for by a grid search or the like in order to obtain an appropriate solution. However, the search for the coefficient μ i becomes more difficult as the number of coefficients increases, and therefore, as the number of constraints increases, it becomes more difficult to obtain a highly accurate solution.

そこで、本発明は、アニーリングマシンによって制約付き整数計画問題の解をより精度よく求めることができる整数計画装置、整数計画方法及び整数計画プログラムを提供する。 Therefore, the present invention provides an integer programming device, an integer programming method, and an integer programming program that can more accurately find solutions to constrained integer programming problems using an annealing machine.

本発明の一態様に係る整数計画装置は、制約付き整数計画問題の目的関数を表す第1項と、制約条件を表し、複数のスピンに関する1次式で表される第2項と、制約条件を表し、複数のスピンに関する2次式で表される第3項とを含むハミルトニアンをアニーリングマシンに設定する設定部と、アニーリングマシンによって求められた複数のスピンの値を取得する取得部と、第2項の係数を、第2項の値に基づいて更新する更新部と、を備える。 An integer programming device according to one aspect of the present invention includes a first term representing an objective function of a constrained integer programming problem, a second term representing a constraint condition and expressed by a linear equation regarding a plurality of spins, and a constraint condition. and a third term expressed by a quadratic equation regarding a plurality of spins, in an annealing machine; an acquisition unit that obtains values of the plurality of spins obtained by the annealing machine; and an updating unit that updates the coefficient of the second term based on the value of the second term.

この態様によれば、1次式で表される第2項と、2次式で表される第3項とを含むハミルトニアンをアニーリングマシンに設定することで、第2項の係数を第2項の値に基づいて更新することができ、係数の探索負荷を軽減することができ、アニーリングマシンによって制約付き整数計画問題の解をより精度よく求めることができる。 According to this aspect, by setting a Hamiltonian including a second term expressed by a linear expression and a third term expressed by a quadratic expression in an annealing machine, the coefficient of the second term is can be updated based on the value of , the load of searching for coefficients can be reduced, and the solution to a constrained integer programming problem can be found with higher accuracy using an annealing machine.

上記態様において、更新部は、第2項の係数を、係数を固定してアニーリングマシンによって求められた第2項の期待値に基づいて更新してもよい。 In the above aspect, the updating unit may update the coefficient of the second term based on the expected value of the second term determined by an annealing machine with the coefficient fixed.

この態様によれば、第2項の係数の更新をより適切に行うことができ、係数の更新回数を減らすことができる。 According to this aspect, the coefficient of the second term can be updated more appropriately, and the number of times the coefficient is updated can be reduced.

上記態様において、更新部は、第2項の係数を固定してアニーリングマシンによって所定回数求められた複数のスピンの値が制約条件を満たす頻度を算出し、頻度が閾値以上である場合に、第2項の係数の更新を終了してもよい。 In the above aspect, the updating unit fixes the coefficient of the second term and calculates the frequency with which the plurality of spin values obtained a predetermined number of times by the annealing machine satisfy the constraint condition, and when the frequency is equal to or greater than the threshold, The updating of the coefficients of the second term may be completed.

この態様によれば、制約条件を満たす確率が高い係数を定めることができ、アニーリングマシンによって求められる解の精度をより高くすることができる。 According to this aspect, coefficients with a high probability of satisfying the constraint conditions can be determined, and the accuracy of the solution obtained by the annealing machine can be further increased.

上記態様において、設定部は、制約条件が不等号条件の場合、不等号条件を満たす値が値域となる関数による等号条件を表す第2項及び第3項を含むハミルトニアンをアニーリングマシンに設定してもよい。 In the above aspect, when the constraint condition is an inequality condition, the setting unit may set a Hamiltonian including a second term and a third term representing an equality condition by a function whose range is a value that satisfies the inequality condition in the annealing machine. good.

この態様によれば、等号条件のみならず、不等号条件で表される制約条件を含む整数計画問題の解をより精度よく求めることができる。 According to this aspect, a solution to an integer programming problem that includes not only an equality condition but also a constraint expressed by an inequality condition can be obtained with higher accuracy.

上記態様において、更新部は、第3項の係数を、第2項の係数の更新とともに定数倍して更新してもよい。 In the above aspect, the updating unit may update the coefficient of the third term by multiplying it by a constant while updating the coefficient of the second term.

この態様によれば、第3項の係数の更新を適切に行うことができ、アニーリングマシンによって求められる解の精度をより高くすることができる。 According to this aspect, the coefficient of the third term can be updated appropriately, and the accuracy of the solution obtained by the annealing machine can be made higher.

上記態様において、設定部は、第1項と、複数の制約条件を表し、複数のスピンに関する複数の1次式の重み付き和で表される第2項と、複数の制約条件を表し、複数のスピンに関する複数の2次式の和で表される第3項とを含むハミルトニアンをアニーリングマシンに設定し、更新部は、第2項の重み係数を、複数の1次式の値に基づいて更新してもよい。 In the above aspect, the setting unit includes a first term, a second term that represents a plurality of constraint conditions and is expressed as a weighted sum of a plurality of linear equations regarding a plurality of spins, and a second term that represents a plurality of constraint conditions and A Hamiltonian including a third term expressed as the sum of multiple quadratic equations regarding the spin of is set in the annealing machine, and the update unit changes the weighting coefficient of the second term based on the values of the multiple linear equations. May be updated.

この態様によれば、複数の制約条件がある場合であっても、第3項の係数を複数の2次式について共通として、調整する係数を第2項の重み係数に絞ることができ、係数の探索負荷を軽減することができ、アニーリングマシンによって制約付き整数計画問題の解をより精度よく求めることができる。 According to this aspect, even if there are multiple constraint conditions, the coefficient of the third term can be made common to multiple quadratic expressions, and the coefficients to be adjusted can be narrowed down to the weighting coefficient of the second term, and the coefficient The search load can be reduced, and the annealing machine can more accurately find solutions to constrained integer programming problems.

本発明の他の態様に係る整数計画方法は、整数計画装置の演算部によって、制約付き整数計画問題の目的関数を表す第1項と、制約条件を表し、複数のスピンに関する1次式で表される第2項と、制約条件を表し、複数のスピンに関する2次式で表される第3項とを含むハミルトニアンをアニーリングマシンに設定することと、アニーリングマシンによって求められた複数のスピンの値を取得することと、第2項の係数を、第2項の値に基づいて更新することと、を含む。 In an integer programming method according to another aspect of the present invention, a first term representing an objective function of a constrained integer programming problem and a constraint condition are expressed by a linear equation regarding a plurality of spins by a calculation unit of an integer programming device. setting a Hamiltonian in an annealing machine including a second term representing a constraint condition and a third term expressed by a quadratic equation regarding a plurality of spins, and values of the plurality of spins obtained by the annealing machine. and updating the coefficient of the second term based on the value of the second term.

この態様によれば、1次式で表される第2項と、2次式で表される第3項とを含むハミルトニアンをアニーリングマシンに設定することで、第2項の係数を第2項の値に基づいて更新することができ、係数の探索負荷を軽減することができ、アニーリングマシンによって制約付き整数計画問題の解をより精度よく求めることができる。 According to this aspect, by setting a Hamiltonian including a second term expressed by a linear expression and a third term expressed by a quadratic expression in an annealing machine, the coefficient of the second term is can be updated based on the value of , the load of searching for coefficients can be reduced, and the solution to a constrained integer programming problem can be found with higher accuracy using an annealing machine.

本発明の他の態様に係る整数計画プログラムは、整数計画装置に備えられた演算部を、制約付き整数計画問題の目的関数を表す第1項と、制約条件を表し、複数のスピンに関する1次式で表される第2項と、制約条件を表し、複数のスピンに関する2次式で表される第3項とを含むハミルトニアンをアニーリングマシンに設定する設定部、アニーリングマシンによって求められた複数のスピンの値を取得する取得部、及び第2項の係数を、第2項の値に基づいて更新する更新部、として機能させる。 An integer programming program according to another aspect of the present invention includes a first term representing an objective function of a constrained integer programming problem, a first term representing a constraint condition, and a first term regarding a plurality of spins. A setting section that sets a Hamiltonian including a second term expressed by an equation and a third term expressing a constraint condition and expressed by a quadratic equation regarding a plurality of spins in an annealing machine; It functions as an acquisition unit that acquires the value of the spin, and an update unit that updates the coefficient of the second term based on the value of the second term.

この態様によれば、1次式で表される第2項と、2次式で表される第3項とを含むハミルトニアンをアニーリングマシンに設定することで、第2項の係数を第2項の値に基づいて更新することができ、係数の探索負荷を軽減することができ、アニーリングマシンによって制約付き整数計画問題の解をより精度よく求めることができる。 According to this aspect, by setting a Hamiltonian including a second term expressed by a linear expression and a third term expressed by a quadratic expression in an annealing machine, the coefficient of the second term is can be updated based on the value of , the load of searching for coefficients can be reduced, and the solution to a constrained integer programming problem can be found with higher accuracy using an annealing machine.

本発明によれば、アニーリングマシンによって制約付き整数計画問題の解をより精度よく求めることができる整数計画装置、整数計画方法及び整数計画プログラムを提供することができる。 According to the present invention, it is possible to provide an integer programming device, an integer programming method, and an integer programming program that can more accurately find a solution to a constrained integer programming problem using an annealing machine.

本発明の実施形態に係る整数計画システムのネットワーク構成を示す図である。FIG. 1 is a diagram showing a network configuration of an integer planning system according to an embodiment of the present invention. 本実施形態に係る整数計画装置の機能ブロックを示す図である。FIG. 2 is a diagram showing functional blocks of an integer planning device according to the present embodiment. 本実施形態に係る整数計画装置の物理的構成を示す図である。FIG. 1 is a diagram showing the physical configuration of an integer planning device according to the present embodiment. 本実施形態に係る整数計画装置によりナップサック問題を解いた場合の目的関数の平均値と、従来法でナップサック問題を解いた場合の目的関数の平均値との関係を示す図である。FIG. 7 is a diagram showing the relationship between the average value of the objective function when the knapsack problem is solved by the integer programming device according to the present embodiment and the average value of the objective function when the knapsack problem is solved by the conventional method. 本実施形態に係る整数計画装置によりナップサック問題を解く場合の係数の更新回数と、従来法でナップサック問題を解く場合の係数の更新回数との関係を示す図である。FIG. 7 is a diagram showing the relationship between the number of coefficient updates when solving a knapsack problem using the integer programming device according to the present embodiment and the number of coefficient updates when solving a knapsack problem using a conventional method. 本実施形態に係る整数計画装置によりナップサック問題を解く場合及び従来法によりナップサック問題を解く場合における正規化した目的関数の値を示す図である。FIG. 7 is a diagram showing normalized objective function values when a knapsack problem is solved by the integer programming device according to the present embodiment and when a knapsack problem is solved by a conventional method. 本実施形態に係る整数計画装置により制約付きスピングラス問題を解いた場合の目的関数の平均値と、従来法で制約付きスピングラス問題を解いた場合の目的関数の平均値との関係を示す図である。A diagram showing the relationship between the average value of the objective function when a constrained spin glass problem is solved by the integer programming device according to the present embodiment and the average value of the objective function when the constrained spin glass problem is solved using the conventional method. It is. 本実施形態に係る整数計画装置により制約付きスピングラス問題を解く場合の係数の更新回数と、従来法で制約付きスピングラス問題を解く場合の係数の更新回数との関係を示す図である。FIG. 7 is a diagram showing the relationship between the number of coefficient updates when solving a constrained spin glass problem using the integer programming device according to the present embodiment and the number of coefficient updates when solving a constrained spin glass problem using a conventional method. 本実施形態に係る整数計画装置により実行される整数計画処理のフローチャートである。7 is a flowchart of integer planning processing executed by the integer planning device according to the present embodiment. 本実施形態に係る整数計画装置により実行される整数計画処理のフローチャートである。7 is a flowchart of integer planning processing executed by the integer planning device according to the present embodiment.

添付図面を参照して、本発明の実施形態について説明する。なお、各図において、同一の符号を付したものは、同一又は同様の構成を有する。 Embodiments of the present invention will be described with reference to the accompanying drawings. In addition, in each figure, those with the same reference numerals have the same or similar configurations.

図1は、本発明の実施形態に係る整数計画システム100のネットワーク構成を示す図である。整数計画システム100は、整数計画装置10及びアニーリングマシン20を含む。整数計画装置10及びアニーリングマシン20は、インターネット等の通信ネットワークNを介して互いに通信可能に構成される。 FIG. 1 is a diagram showing a network configuration of an integer planning system 100 according to an embodiment of the present invention. Integer programming system 100 includes an integer programming device 10 and an annealing machine 20. The integer planning device 10 and the annealing machine 20 are configured to be able to communicate with each other via a communication network N such as the Internet.

整数計画装置10は、汎用のコンピュータで構成され、制約付き整数計画問題を、アニーリングマシン20を用いて解く。ここで、制約付き整数計画問題は、1又は複数の制約条件を満たすように、所定の目的関数を最小化又は最大化するような整数値を求める問題である。本実施形態では、整数値が0又は1である、0-1整数計画問題を解く場合について説明する。 The integer programming device 10 is composed of a general-purpose computer, and solves a constrained integer programming problem using an annealing machine 20. Here, the constrained integer programming problem is a problem for finding integer values that minimize or maximize a predetermined objective function so as to satisfy one or more constraint conditions. In this embodiment, a case will be explained in which a 0-1 integer programming problem in which the integer value is 0 or 1 is solved.

アニーリングマシン20は、イジングモデルのハミルトニアンの基底状態を求める専用コンピュータであり、整数計画装置10により設定されたハミルトニアンについて、その基底状態を求める。整数計画装置10は、制約付き整数計画問題の目的関数を表す第1項と、制約条件を表し、複数のスピンに関する1次式で表される第2項と、制約条件を表し、複数のスピンに関する2次式で表される第3項とを含むハミルトニアンをアニーリングマシン20に設定する。 The annealing machine 20 is a dedicated computer that finds the ground state of the Hamiltonian of the Ising model, and finds the ground state of the Hamiltonian set by the integer programming device 10. The integer programming device 10 has a first term representing an objective function of a constrained integer programming problem, a second term representing a constraint and expressed by a linear equation regarding a plurality of spins, and a second term representing a constraint and representing a plurality of spins. A Hamiltonian is set in the annealing machine 20, including the third term expressed by a quadratic equation for .

アニーリングマシン20は、量子アニーリングマシンであっても、一般のアニーリングマシンであってもよい。ここで、アニーリングマシンとは、二値変数を引数とするイジングモデルの目的関数(ハミルトニアン)を最小化又は最大化する二値変数の値を確率的に求める装置である。二値変数は、古典ビットや量子ビットで実現されてよい。アニーリングマシンは、目的関数がイジングモデルの形式でハードウェアによって実装された非ノイマン型コンピュータであってよく、自然計算(natural computing)を実行する計算機であってよい。アニーリングマシン20は、量子アニーリングマシンの他、FPGA(Field-Programmable Gate Array)によって構成されてよく、二値変数を引数とする目的関数を最小化又は最大化する二値変数の値を確率的に求めるものであればどのようなハードウェアによって構成されるものであってもよく、目的関数の最小又は最大を求める過程において量子現象を利用していてもよいし、利用していなくてもよい。 The annealing machine 20 may be a quantum annealing machine or a general annealing machine. Here, the annealing machine is a device that probabilistically obtains the value of a binary variable that minimizes or maximizes the objective function (Hamiltonian) of an Ising model that uses a binary variable as an argument. Binary variables may be implemented with classical bits or quantum bits. An annealing machine may be a non-Neumann computer whose objective function is implemented in hardware in the form of an Ising model, and may be a computer that performs natural computing. The annealing machine 20 may be configured by an FPGA (Field-Programmable Gate Array) in addition to a quantum annealing machine, and probabilistically calculates the value of a binary variable that minimizes or maximizes an objective function using a binary variable as an argument. Any hardware may be used as long as it is desired, and quantum phenomena may or may not be utilized in the process of finding the minimum or maximum of the objective function.

図2は、本実施形態に係る整数計画装置10の機能ブロックを示す図である。整数計画装置10は、設定部11、取得部12及び更新部13を備える。 FIG. 2 is a diagram showing functional blocks of the integer planning device 10 according to this embodiment. The integer planning device 10 includes a setting section 11, an acquisition section 12, and an updating section 13.

設定部11は、制約付き整数計画問題の目的関数を表す第1項と、制約条件を表し、複数のスピンに関する1次式で表される第2項と、制約条件を表し、複数のスピンに関する2次式で表される第3項とを含むハミルトニアンをアニーリングマシン20に設定する。より一般には、設定部11は、制約付き整数計画問題の目的関数を表す第1項と、複数の制約条件を表し、複数のスピンに関する複数の1次式の重み付き和で表される第2項と、複数の制約条件を表し、複数のスピンに関する複数の2次式の和で表される第3項とを含むハミルトニアンをアニーリングマシン20に設定する。 The setting unit 11 includes a first term representing an objective function of a constrained integer programming problem, a second term representing a constraint and expressed by a linear equation regarding a plurality of spins, and a second term representing a constraint and representing a linear equation regarding a plurality of spins. A Hamiltonian including the third term expressed by a quadratic equation is set in the annealing machine 20. More generally, the setting unit 11 includes a first term representing an objective function of a constrained integer programming problem, and a second term representing a plurality of constraint conditions and expressed as a weighted sum of a plurality of linear equations regarding a plurality of spins. A Hamiltonian including a third term representing a plurality of constraint conditions and expressed as a sum of a plurality of quadratic equations regarding a plurality of spins is set in the annealing machine 20.

二値変数(スピン)ベクトルをxと表し、目的関数をf(x)と表し、複数の制約条件をgi(x)=ciと表すとき、設定部11は、以下の数式(2)で表されるハミルトニアンをアニーリングマシン20に設定する。 When a binary variable (spin) vector is expressed as x, an objective function is expressed as f(x), and a plurality of constraint conditions are expressed as g i (x) = c i , the setting unit 11 uses the following formula (2). A Hamiltonian represented by is set in the annealing machine 20.

ここで、λiは、第2項に含まれる複数の1次式の重み係数であり、μは、第3項の係数である。従来の方法において設定されていたハミルトニアン(数式(1))と比較すると、係数λiが追加されているものの、第3項の係数μが、複数の制約条件を表す複数の2次式について共通となっている点が異なる。このように、複数の制約条件がある場合であっても、第3項の係数を複数の2次式について共通として、調整する係数を第2項の重み係数に絞ることができ、係数の探索負荷を軽減することができ、アニーリングマシンによって制約付き整数計画問題の解をより精度よく求めることができる。なお、第3稿の係数μを複数の制約条件毎に設定し、係数μiとしてもよい。 Here, λ i is a weighting coefficient of a plurality of linear equations included in the second term, and μ is a coefficient of the third term. Compared to the Hamiltonian (formula (1)) set in the conventional method, although the coefficient λ i is added, the coefficient μ in the third term is common to multiple quadratic equations expressing multiple constraints. The difference is that In this way, even if there are multiple constraint conditions, the coefficient of the third term can be made common to multiple quadratic equations, and the coefficients to be adjusted can be narrowed down to the weighting coefficient of the second term, making it possible to search for coefficients. The load can be reduced, and the annealing machine can more accurately find solutions to constrained integer programming problems. Note that the coefficient μ of the third draft may be set for each of a plurality of constraint conditions, and may be used as the coefficient μ i .

取得部12は、アニーリングマシン20によって求められた複数のスピンの値を取得する。取得部12は、係数λi及びμを固定して、アニーリングマシン20によって複数回基底状態を求め、それぞれの場合の複数のスピンの値を取得してよい。 The acquisition unit 12 acquires a plurality of spin values determined by the annealing machine 20. The acquisition unit 12 may fix the coefficients λ i and μ, determine the ground state multiple times using the annealing machine 20, and acquire multiple spin values in each case.

更新部13は、第2項の係数を、第2項の値に基づいて更新する。より一般的には、更新部13は、第2項の重み係数λiを、複数の1次式の値に基づいて更新する。また、更新部13は、第3項の係数μを、第2項の係数の更新とともに定数倍して更新する。 The updating unit 13 updates the coefficient of the second term based on the value of the second term. More generally, the updating unit 13 updates the weighting coefficient λ i of the second term based on the values of a plurality of linear expressions. Further, the updating unit 13 updates the coefficient μ of the third term by multiplying it by a constant while updating the coefficient of the second term.

本実施形態に係る整数計画装置10によれば、1次式で表される第2項と、2次式で表される第3項とを含むハミルトニアンをアニーリングマシンに設定することで、第2項の係数を第2項の値に基づいて更新することができ、係数の探索負荷を軽減することができ、アニーリングマシンによって制約付き整数計画問題の解をより精度よく求めることができる。また、第3項の係数の更新を適切に行うことができ、アニーリングマシンによって求められる解の精度をより高くすることができる。 According to the integer planning device 10 according to the present embodiment, by setting a Hamiltonian including a second term expressed by a linear expression and a third term expressed by a quadratic expression in an annealing machine, the second term is The coefficient of the term can be updated based on the value of the second term, the load of searching for the coefficient can be reduced, and the solution to the constrained integer programming problem can be found with higher accuracy using the annealing machine. Further, the coefficient of the third term can be updated appropriately, and the accuracy of the solution obtained by the annealing machine can be further improved.

更新部13は、第2項の係数を、その係数を固定してアニーリングマシン20によって求められた第2項の期待値に基づいて更新してよい。具体的には、更新部13は、
以下の数式(3)により、第2項の係数λi及び第3項の係数μを更新する。ここで、<gi(x)-ci>は、アニーリングマシン20によって求められた第2項の期待値を表す。また、αは、任意のパラメータであり、例えば1.1~1.2程度としてよい。
The updating unit 13 may update the coefficient of the second term based on the expected value of the second term determined by the annealing machine 20 while fixing the coefficient. Specifically, the update unit 13
The coefficient λ i of the second term and the coefficient μ of the third term are updated using Equation (3) below. Here, <g i (x)−c i > represents the expected value of the second term determined by the annealing machine 20. Further, α is an arbitrary parameter, and may be set to about 1.1 to 1.2, for example.

このように、第2項の期待値に基づいて係数を更新することで、第2項の係数の更新をより適切に行うことができ、係数の更新回数を減らすことができる。 In this way, by updating the coefficients based on the expected value of the second term, the coefficients of the second term can be updated more appropriately, and the number of times the coefficients are updated can be reduced.

更新部13は、第2項の係数を固定してアニーリングマシン20によって所定回数求められた複数のスピンの値が制約条件を満たす頻度を算出し、その頻度が閾値以上である場合に、第2項の係数の更新を終了してよい。このようにして、制約条件を満たす確率が高い係数を定めることができ、アニーリングマシンによって求められる解の精度をより高くすることができる。 The updating unit 13 fixes the coefficient of the second term and calculates the frequency with which the plurality of spin values obtained a predetermined number of times by the annealing machine 20 satisfy the constraint condition, and when the frequency is equal to or higher than the threshold, You may finish updating the coefficients of the term. In this way, coefficients with a high probability of satisfying the constraint conditions can be determined, and the accuracy of the solution obtained by the annealing machine can be further increased.

図3は、本実施形態に係る整数計画装置10の物理的構成を示す図である。整数計画装置10は、演算部に相当するCPU(Central Processing Unit)10aと、記憶部に相当するRAM(Random Access Memory)10bと、記憶部に相当するROM(Read only Memory)10cと、通信部10dと、入力部10eと、表示部10fと、を有する。これらの各構成は、バスを介して相互にデータ送受信可能に接続される。なお、本例では整数計画装置10が一台のコンピュータで構成される場合について説明するが、整数計画装置10は、複数のコンピュータが組み合わされて実現されてもよい。また、図3で示す構成は一例であり、整数計画装置10はこれら以外の構成を有してもよいし、これらの構成のうち一部を有さなくてもよい。 FIG. 3 is a diagram showing the physical configuration of the integer planning device 10 according to this embodiment. The integer planning device 10 includes a CPU (Central Processing Unit) 10a corresponding to a calculation section, a RAM (Random Access Memory) 10b corresponding to a storage section, a ROM (Read only Memory) 10c corresponding to a storage section, and a communication section. 10d, an input section 10e, and a display section 10f. These components are connected to each other via a bus so that they can transmit and receive data. In this example, a case will be described in which the integer planning device 10 is composed of one computer, but the integer planning device 10 may be realized by combining a plurality of computers. Further, the configuration shown in FIG. 3 is an example, and the integer planning device 10 may have a configuration other than these, or may not have a part of these configurations.

CPU10aは、RAM10b又はROM10cに記憶されたプログラムの実行に関する制御やデータの演算、加工を行う制御部である。CPU10aは、制約なし整数計画問題を、アニーリングマシンを用いて解くプログラム(整数計画プログラム)を実行する演算部である。CPU10aは、入力部10eや通信部10dから種々のデータを受け取り、データの演算結果を表示部10fに表示したり、RAM10bに格納したりする。 The CPU 10a is a control unit that performs control related to the execution of programs stored in the RAM 10b or ROM 10c, and performs calculations and processing of data. The CPU 10a is a calculation unit that executes a program (integer programming program) for solving an unconstrained integer programming problem using an annealing machine. The CPU 10a receives various data from the input section 10e and the communication section 10d, and displays the data calculation results on the display section 10f or stores them in the RAM 10b.

RAM10bは、記憶部のうちデータの書き換えが可能なものであり、例えば半導体記憶素子で構成されてよい。RAM10bは、CPU10aが実行するプログラム、ハミルトニアンに含まれる相互作用や局所磁場に関するデータを記憶してよい。なお、これらは例示であって、RAM10bには、これら以外のデータが記憶されていてもよいし、これらの一部が記憶されていなくてもよい。 The RAM 10b is a storage unit in which data can be rewritten, and may be formed of, for example, a semiconductor storage element. The RAM 10b may store programs executed by the CPU 10a, and data regarding interactions and local magnetic fields included in the Hamiltonian. Note that these are just examples, and the RAM 10b may store data other than these, or some of them may not be stored.

ROM10cは、記憶部のうちデータの読み出しが可能なものであり、例えば半導体記憶素子で構成されてよい。ROM10cは、例えば広告配信プログラムや、書き換えが行われないデータを記憶してよい。 The ROM 10c is a storage section from which data can be read, and may be composed of, for example, a semiconductor storage element. The ROM 10c may store, for example, an advertisement distribution program or data that is not rewritten.

通信部10dは、整数計画装置10を他の機器に接続するインターフェースである。通信部10dは、インターネット等の通信ネットワークNに接続されてよい。 The communication unit 10d is an interface that connects the integer planning device 10 to other devices. The communication unit 10d may be connected to a communication network N such as the Internet.

入力部10eは、ユーザからデータの入力を受け付けるものであり、例えば、キーボード及びタッチパネルを含んでよい。 The input unit 10e receives data input from the user, and may include, for example, a keyboard and a touch panel.

表示部10fは、CPU10aによる演算結果を視覚的に表示するものであり、例えば、LCD(Liquid Crystal Display)により構成されてよい。表示部10fは、例えば、アニーリングマシンによって求められた複数のスピンの配列を表示してよい。 The display unit 10f visually displays the calculation results by the CPU 10a, and may be configured by, for example, an LCD (Liquid Crystal Display). The display section 10f may display, for example, a plurality of spin arrays determined by an annealing machine.

整数計画プログラムは、RAM10bやROM10c等のコンピュータによって読み取り可能な記憶媒体に記憶されて提供されてもよいし、通信部10dにより接続される通信ネットワークを介して提供されてもよい。整数計画装置10では、CPU10aが整数計画プログラムを実行することにより、図2を用いて説明した様々な動作が実現される。なお、これらの物理的な構成は例示であって、必ずしも独立した構成でなくてもよい。例えば、整数計画装置10は、CPU10aとRAM10bやROM10cが一体化したLSI(Large-Scale Integration)を備えていてもよい。 The integer planning program may be provided by being stored in a computer-readable storage medium such as the RAM 10b or ROM 10c, or may be provided via a communication network connected by the communication unit 10d. In the integer planning device 10, the various operations described using FIG. 2 are realized by the CPU 10a executing the integer planning program. Note that these physical configurations are merely examples, and do not necessarily have to be independent configurations. For example, the integer planning device 10 may include an LSI (Large-Scale Integration) in which a CPU 10a, a RAM 10b, and a ROM 10c are integrated.

[第1実施例]
第1実施例として、本実施形態に係る整数計画装置10により、アニーリングマシン20を用いてナップサック問題を解く例を説明する。ナップサック問題とは、i番目(i=1~N)の物品に関する価値vi及び重量wiが与えられた場合に、重量の合計を所定値W以下とする制約条件を満たしつつ、価値の合計を最大化する問題である。
[First example]
As a first example, an example will be described in which the integer planning device 10 according to the present embodiment solves a knapsack problem using the annealing machine 20. The knapsack problem is a problem in which, given the value v i and weight w i of the i-th (i = 1 to N) item, the sum of the values is The problem is to maximize the

従来法では、以下の数式(4)に示すハミルトニアンの基底状態となる二値変数xiを求める。係数μは、定数α>1を用いて、μ←αμとして制約条件を満たすようになるまで(又は制約条件を満たす頻度が閾値を超えるまで)更新を繰り返すことで定められる。 In the conventional method, a binary variable x i that becomes the ground state of the Hamiltonian shown in Equation (4) below is obtained. The coefficient μ is determined using a constant α>1 by repeatedly updating μ←αμ until the constraint condition is satisfied (or until the frequency of satisfying the constraint condition exceeds a threshold value).

ここで、v(x)、w(x)及びh(y)は、以下の数式(5)で定義される。また、yi(i=1~d)は0又は1の値を取る二値変数であり、d=floor(log2(W-1))+1である。floor(・)は、引数を、引数以下の整数に切り下げる関数である。h(y)は、1からWまでのいずれかの値を取る関数となる。 Here, v(x), w(x) and h(y) are defined by the following equation (5). Further, y i (i=1 to d) is a binary variable that takes a value of 0 or 1, and d=floor(log 2 (W-1))+1. floor(·) is a function that rounds down the argument to an integer less than or equal to the argument. h(y) is a function that takes any value from 1 to W.

本実施形態に係る整数計画装置10は、以下の数式(6)に示すハミルトニアンの基底状態となる二値変数xiを求める。 The integer programming device 10 according to the present embodiment determines a binary variable x i that becomes the base state of the Hamiltonian shown in Equation (6) below.

ここで、v(x)、w(x)及びh(y)は、数式(5)で定義される。第2項の係数λ及び第3項の係数μは、数式(3)により更新する。 Here, v(x), w(x) and h(y) are defined by Equation (5). The coefficient λ of the second term and the coefficient μ of the third term are updated using Equation (3).

本実施形態に係る整数計画装置10の設定部11は、制約条件が不等号条件の場合、不等号条件を満たす値が値域となる関数による等号条件を表す第2項及び第3項を含むハミルトニアンをアニーリングマシン20に設定する。本例の場合、設定部11は、関数h(y)による等号条件を表す第2項及び第3項を含むハミルトニアンをアニーリングマシン20に設定する。このようにして、等号条件のみならず、不等号条件で表される制約条件を含む整数計画問題の解をより精度よく求めることができる。 When the constraint condition is an inequality condition, the setting unit 11 of the integer planning device 10 according to the present embodiment creates a Hamiltonian including a second term and a third term representing the equality condition by a function whose range is a value that satisfies the inequality condition. setting in the annealing machine 20. In the case of this example, the setting unit 11 sets the Hamiltonian including the second and third terms representing the equality condition based on the function h(y) in the annealing machine 20. In this way, solutions to integer programming problems that include not only equality conditions but also constraint conditions expressed by inequality conditions can be found with higher accuracy.

図4は、本実施形態に係る整数計画装置10によりナップサック問題を解いた場合の目的関数の平均値と、従来法でナップサック問題を解いた場合の目的関数の平均値との関係を示す図である。同図では、縦軸に従来法でナップサック問題を解いた場合の目的関数v(x)の平均値を示し、横軸に本実施形態に係る整数計画装置10によりナップサック問題を解いた場合の目的関数v(x)の平均値を示している。同図では、価値vi及び重量wiをランダムに生成して、従来法及び本実施形態に係る整数計画装置10によって、それぞれアニーリングマシン20を用いて解を求めた場合の目的関数v(x)の平均値をプロットしている。グラフ中に示した破線は、従来法による目的関数v(x)の平均値と、本実施形態に係る整数計画装置10による目的関数v(x)の平均値とが等しくなる場合を示している。また、同図では、ナップサック問題の物品数NがN=20である場合を丸印で示し、N=30である場合を三角印で示し、N=40である場合を四角印で示している。 FIG. 4 is a diagram showing the relationship between the average value of the objective function when the knapsack problem is solved by the integer programming device 10 according to the present embodiment and the average value of the objective function when the knapsack problem is solved by the conventional method. be. In the figure, the vertical axis shows the average value of the objective function v(x) when the knapsack problem is solved by the conventional method, and the horizontal axis shows the objective when the knapsack problem is solved by the integer programming device 10 according to the present embodiment. It shows the average value of the function v(x). In the figure, the objective function v ( x ) is plotted. The broken line shown in the graph indicates a case where the average value of the objective function v(x) according to the conventional method is equal to the average value of the objective function v(x) according to the integer planning device 10 according to the present embodiment. . In addition, in the same figure, the case where the number of items N in the knapsack problem is N = 20 is indicated by a circle, the case where N = 30 is indicated by a triangle, and the case where N = 40 is indicated by a square. .

同図によれば、N=20,30,40いずれの場合でも、本実施形態に係る整数計画装置10によりナップサック問題を解いた場合の目的関数v(x)の平均値は、従来法でナップサック問題を解いた場合の目的関数v(x)の平均値よりも大きい。よって、本実施形態に係る整数計画装置10によれば、従来法の場合よりも大きな目的関数v(x)の値を達成できる確率が高く、制約付き整数計画問題についてより精度の高い解が得られていることが読み取れる。このような精度の違いは、ハミルトニアンに含まれる係数を適切に決定できるか否かにより生じていると考えられる。従来法では、係数μを適切に決定できなかったり、収束させるまでに時間がかかったりするが、本実施形態に係る整数計画装置10によれば、係数λ,μをより適切かつより迅速に決定することができる。 According to the figure, in any case where N=20, 30, or 40, the average value of the objective function v(x) when the knapsack problem is solved by the integer planning device 10 according to the present embodiment is It is larger than the average value of the objective function v(x) when the problem is solved. Therefore, according to the integer programming device 10 according to the present embodiment, the probability of achieving a larger value of the objective function v(x) is higher than in the case of the conventional method, and a more accurate solution to the constrained integer programming problem can be obtained. You can read what is being said. This difference in accuracy is thought to be caused by whether or not the coefficients included in the Hamiltonian can be appropriately determined. In the conventional method, the coefficient μ cannot be appropriately determined or it takes time to converge, but according to the integer planning device 10 according to the present embodiment, the coefficients λ and μ can be determined more appropriately and more quickly. can do.

図5は、本実施形態に係る整数計画装置10によりナップサック問題を解く場合の係数の更新回数と、従来法でナップサック問題を解く場合の係数の更新回数との関係を示す図である。ここで、更新回数は、従来法の場合及び本実施形態に係る整数計画装置10の場合いずれも、アニーリングマシン20によって求められる複数のスピンの値が制約条件を満たす頻度が閾値以上となるまでの回数である。 FIG. 5 is a diagram showing the relationship between the number of coefficient updates when solving the knapsack problem using the integer programming device 10 according to the present embodiment and the number of coefficient updates when solving the knapsack problem using the conventional method. Here, in both the case of the conventional method and the case of the integer planning device 10 according to the present embodiment, the number of updates is the number of times until the frequency with which the values of the plurality of spins determined by the annealing machine 20 satisfy the constraint condition becomes equal to or higher than the threshold value. It is the number of times.

同図では、縦軸に従来法でナップサック問題を解く場合の係数μの更新回数を示し、横軸に本実施形態に係る整数計画装置10によりナップサック問題を解く場合の係数λ,μの更新回数を示している。同図では、図4の場合と同様に、価値vi及び重量wiをランダムに生成して、従来法及び本実施形態に係る整数計画装置10によって、それぞれアニーリングマシン20を用いて解を求める場合の係数の更新回数をプロットしている。また、プロットの円の面積は、頻度に比例している。また、同図では、ナップサック問題の物品数NがN=20である場合を一点鎖線で示し、N=30である場合を破線で示し、N=40である場合を実線で示している。 In the figure, the vertical axis shows the number of updates of the coefficient μ when solving the knapsack problem using the conventional method, and the horizontal axis shows the number of updates of the coefficients λ and μ when solving the knapsack problem using the integer planning device 10 according to the present embodiment. It shows. In the figure, as in the case of FIG. 4, values v i and weights w i are randomly generated, and solutions are obtained using the annealing machine 20 by the integer programming device 10 according to the conventional method and the present embodiment, respectively. The number of updates of the coefficients is plotted for each case. Also, the area of the circle in the plot is proportional to the frequency. Further, in the figure, the case where the number of articles N in the knapsack problem is N=20 is shown by a dashed line, the case where N=30 is shown by a broken line, and the case where N=40 is shown by a solid line.

同図によれば、N=20,30,40いずれの場合でも、本実施形態に係る整数計画装置10によりナップサック問題を解く場合の係数の更新回数は、従来法でナップサック問題を解く場合の係数の更新回数よりも少ない。よって、本実施形態に係る整数計画装置10によれば、従来法の場合よりも係数λ,μをより高速に収束させることができていることが読み取れる。 According to the figure, in any case where N=20, 30, or 40, the number of times the coefficients are updated when solving the knapsack problem by the integer planning device 10 according to the present embodiment is the same as the coefficients when solving the knapsack problem using the conventional method. is less than the number of updates. Therefore, it can be seen that according to the integer programming device 10 according to this embodiment, the coefficients λ and μ can be converged more quickly than in the case of the conventional method.

図6は、本実施形態に係る整数計画装置10によりナップサック問題を解く場合及び従来法によりナップサック問題を解く場合における正規化した目的関数の値を示す図である。同図では、縦軸に従来法及び本実施形態に係る整数計画装置10でナップサック問題を解いた場合の目的関数v(x)の平均値を、最適解の場合の目的関数の値で正規化した値を示し、横軸にランダムに生成した価値vi及び重量wiのナップサック問題を識別する問題IDを示している。同図は、価値vi及び重量wiが与えられた各問題について、係数λ,μが収束した後に得られた目的関数の値を箱ひげ図で示している。また、同図では、ナップサック問題の物品数NがN=40である場合の結果を示している。 FIG. 6 is a diagram showing the values of the normalized objective function when the knapsack problem is solved by the integer programming device 10 according to the present embodiment and when the knapsack problem is solved by the conventional method. In the figure, the vertical axis shows the average value of the objective function v(x) when solving the knapsack problem using the conventional method and the integer programming device 10 according to the present embodiment, normalized by the value of the objective function for the optimal solution. The horizontal axis shows a problem ID for identifying a knapsack problem with a randomly generated value v i and weight w i . This figure shows, in a boxplot, the values of the objective function obtained after the coefficients λ and μ converge for each problem given a value v i and a weight w i . Moreover, the same figure shows the result when the number of articles N in the knapsack problem is N=40.

同図によれば、20個の問題全てについて、本実施形態に係る整数計画装置10によりナップサック問題を解いた場合の正規化した目的関数の値は1.0に近く、従来法でナップサック問題を解いた場合の正規化した目的関数の値(0.5~0.7程度)よりも大きい。同図から、本実施形態に係る整数計画装置10によれば、従来法の場合よりも目的関数の値が大きいだけでなく、ほとんどの場合に最適解が得られていることが読み取れる。 According to the figure, for all 20 problems, the value of the normalized objective function when the knapsack problem is solved by the integer programming device 10 according to the present embodiment is close to 1.0, and the value of the normalized objective function when the knapsack problem is solved by the integer programming device 10 according to the present embodiment is close to 1.0. It is larger than the normalized objective function value (about 0.5 to 0.7) when solved. From the figure, it can be seen that according to the integer programming device 10 according to the present embodiment, not only the value of the objective function is larger than that of the conventional method, but also the optimal solution is obtained in most cases.

[第2実施例]
第2実施例として、本実施形態に係る整数計画装置10により、アニーリングマシン20を用いて制約付きスピングラス問題を解く例を説明する。制約付きスピングラス問題とは、ランダムに生成された相互作用qij(i,j=1~N)が与えられた場合に、二値変数xiの合計がBとなるように、Σi≦jijijを最大化する問題である。本例では、qijを平均0、分散1の正規分布によって生成した。
[Second example]
As a second example, an example will be described in which the integer programming device 10 according to the present embodiment solves a constrained spin glass problem using the annealing machine 20. The constrained spin glass problem refers to the problem of Σ i≦ such that, given randomly generated interactions q ij ( i , j = 1 to N), the sum of binary variables The problem is to maximize j q ij x i x j . In this example, q ij is generated using a normal distribution with a mean of 0 and a variance of 1.

従来法では、以下の数式(7)に示すハミルトニアンの基底状態となる二値変数xiを求める。係数μは、定数α>1を用いて、μ←αμとして制約条件を満たすようになるまで(又は制約条件を満たす頻度が閾値を超えるまで)更新を繰り返すことで定められる。 In the conventional method, a binary variable x i that becomes the ground state of the Hamiltonian shown in Equation (7) below is obtained. The coefficient μ is determined using a constant α>1 by repeatedly updating μ←αμ until the constraint condition is satisfied (or until the frequency of satisfying the constraint condition exceeds a threshold value).

本実施形態に係る整数計画装置10は、以下の数式(8)に示すハミルトニアンの基底状態となる二値変数xiを求める。ここで、第2項の係数λ及び第3項の係数μは、数式(3)により更新する。 The integer programming device 10 according to the present embodiment determines a binary variable x i that becomes the base state of the Hamiltonian shown in Equation (8) below. Here, the coefficient λ of the second term and the coefficient μ of the third term are updated using Equation (3).

図7は、本実施形態に係る整数計画装置10により制約付きスピングラス問題を解いた場合の目的関数の平均値と、従来法で制約付きスピングラス問題を解いた場合の目的関数の平均値との関係を示す図である。
同図では、縦軸に従来法で制約付きスピングラス問題を解いた場合の目的関数Σi≦jijijの平均値を示し、横軸に本実施形態に係る整数計画装置10により制約付きスピングラス問題を解いた場合の目的関数Σi≦jijijの平均値を示している。同図では、相互作用qijをランダムに生成して、従来法及び本実施形態に係る整数計画装置10によって、それぞれアニーリングマシン20を用いて解を求めた場合の目的関数Σi≦jijijの平均値をプロットしている。グラフ中に示した破線は、従来法による目的関数Σi≦jijijの平均値と、本実施形態に係る整数計画装置10による目的関数Σi≦jijijの平均値とが等しくなる場合を示している。また、同図では、制約付きスピングラス問題の制約パラメータBがB=8である場合を丸印で示し、B=16である場合を三角印で示し、B=32である場合を四角印で示している。
FIG. 7 shows the average value of the objective function when the constrained spin glass problem is solved by the integer programming device 10 according to the present embodiment, and the average value of the objective function when the constrained spin glass problem is solved using the conventional method. FIG.
In the figure, the vertical axis shows the average value of the objective function Σ i≦j q ij x i x j when solving the constrained spin glass problem using the conventional method, and the horizontal axis shows the average value of the objective function Σ i≦j q ij x i x j It shows the average value of the objective function Σ i≦j q ij x i x j when a constrained spin glass problem is solved. In the figure, the objective function Σ i≦j q ij is obtained when interactions q ij are randomly generated and solutions are obtained using the annealing machine 20 by the integer programming device 10 according to the conventional method and the present embodiment, respectively . The average value of x i x j is plotted. The broken line shown in the graph represents the average value of the objective function Σ i≦j q ij x i x j according to the conventional method, and the objective function Σ i≦j q ij x i x j according to the integer programming device 10 according to the present embodiment. This shows the case where the average value of In addition, in the same figure, the case where the constraint parameter B of the constrained spin glass problem is B = 8 is indicated by a circle, the case where B = 16 is indicated by a triangle, and the case where B = 32 is indicated by a square. It shows.

同図によれば、B=8,16,32いずれの場合でも、本実施形態に係る整数計画装置10により制約付きスピングラス問題を解いた場合の目的関数Σi≦jijijの平均値は、従来法で制約付きスピングラス問題を解いた場合の目的関数Σi≦jijijの平均値の平均値よりも大きい場合が多い。よって、本実施形態に係る整数計画装置10によれば、従来法の場合よりも大きな目的関数Σi≦jijijの値を達成できる確率が高く、制約付きスピングラス問題についてより精度の高い解が得られていることが読み取れる。このような精度の違いは、ハミルトニアンに含まれる係数を適切に決定できるか否かにより生じていると考えられる。従来法では、係数μを適切に決定できなかったり、収束させるまでに時間がかかったりするが、本実施形態に係る整数計画装置10によれば、係数λ,μをより適切かつより迅速に決定することができる。 According to the figure, in any case where B=8, 16, or 32, the objective function Σ i≦j q ij x i x j when the constrained spin glass problem is solved by the integer programming device 10 according to the present embodiment The average value of is often larger than the average value of the objective function Σ i≦j q ij x i x j when a constrained spin glass problem is solved using the conventional method. Therefore, according to the integer programming device 10 according to the present embodiment, the probability of achieving a larger value of the objective function Σ i≦j q ij x i x j is higher than in the case of the conventional method, and it is easier to solve the constrained spin glass problem. It can be seen that a highly accurate solution has been obtained. This difference in accuracy is thought to be caused by whether or not the coefficients included in the Hamiltonian can be appropriately determined. In the conventional method, the coefficient μ cannot be appropriately determined or it takes time to converge, but according to the integer planning device 10 according to the present embodiment, the coefficients λ and μ can be determined more appropriately and more quickly. can do.

図8は、本実施形態に係る整数計画装置10により制約付きスピングラス問題を解く場合の係数の更新回数と、従来法で制約付きスピングラス問題を解く場合の係数の更新回数との関係を示す図である。ここで、更新回数は、従来法の場合及び本実施形態に係る整数計画装置10の場合いずれも、アニーリングマシン20によって求められる複数のスピンの値が制約条件を満たす頻度が閾値以上となるまでの回数である。 FIG. 8 shows the relationship between the number of coefficient updates when solving a constrained spin glass problem using the integer programming device 10 according to the present embodiment and the number of coefficient updates when solving a constrained spin glass problem using the conventional method. It is a diagram. Here, in both the case of the conventional method and the case of the integer planning device 10 according to the present embodiment, the number of updates is the number of times until the frequency with which the values of the plurality of spins determined by the annealing machine 20 satisfy the constraint condition becomes equal to or higher than the threshold value. It is the number of times.

同図では、縦軸に従来法で制約付きスピングラス問題を解く場合の係数μの更新回数を示し、横軸に本実施形態に係る整数計画装置10により制約付きスピングラス問題を解く場合の係数λ,μの更新回数を示している。同図では、図7の場合と同様に、相互作用qijをランダムに生成して、従来法及び本実施形態に係る整数計画装置10によって、それぞれアニーリングマシン20を用いて解を求める場合の係数の更新回数をプロットしている。また、プロットの円の面積は、頻度に比例している。また、同図では、制約付きスピングラス問題の制約パラメータBがB=8である場合を一点鎖線で示し、B=16である場合を破線で示し、B=32である場合を実線で示している。 In the figure, the vertical axis shows the number of updates of the coefficient μ when solving a constrained spin glass problem using the conventional method, and the horizontal axis shows the coefficient when solving the constrained spin glass problem using the integer programming device 10 according to the present embodiment. It shows the number of updates of λ and μ. In the same figure, as in the case of FIG. 7, the coefficients are calculated when interactions q ij are randomly generated and solutions are obtained using the annealing machine 20 by the integer programming device 10 according to the conventional method and the present embodiment, respectively. The number of updates is plotted. Also, the area of the circle in the plot is proportional to the frequency. In addition, in the same figure, the case where the constraint parameter B of the constrained spin glass problem is B=8 is shown by a dashed line, the case where B=16 is shown by a broken line, and the case where B=32 is shown by a solid line. There is.

同図によれば、B=8,16,32いずれの場合でも、本実施形態に係る整数計画装置10により制約付きスピングラス問題を解く場合の係数の更新回数は、従来法で制約付きスピングラス問題を解く場合の係数の更新回数よりも少ない。よって、本実施形態に係る整数計画装置10によれば、従来法の場合よりも係数λ,μをより高速に収束させることができていることが読み取れる。 According to the figure, in any case where B=8, 16, or 32, the number of coefficient updates when solving a constrained spin glass problem using the integer programming device 10 according to the present embodiment is the same as the number of updates of the coefficients when solving a constrained spin glass problem using the conventional method. This is less than the number of times the coefficients are updated when solving the problem. Therefore, it can be seen that according to the integer programming device 10 according to this embodiment, the coefficients λ and μ can be converged more quickly than in the case of the conventional method.

図9は、本実施形態に係る整数計画装置10により実行される整数計画処理のフローチャートである。同図では、制約条件が1つである場合の整数計画処理のフローチャートを示している。 FIG. 9 is a flowchart of integer planning processing executed by the integer planning device 10 according to this embodiment. This figure shows a flowchart of integer planning processing when there is one constraint condition.

はじめに、整数計画装置10は、目的関数を表す第1項と、制約条件を表し、1次式で表される第2項と、制約条件を表し、2次式で表される第3項とを含むハミルトニアンをアニーリングマシンに設定する(S10)。 First, the integer planning device 10 has a first term representing an objective function, a second term representing a constraint and expressed by a linear equation, and a third term representing a constraint and expressed by a quadratic equation. A Hamiltonian including the following is set in an annealing machine (S10).

その後、整数計画装置10は、アニーリングマシンによって求められた複数のスピンの値を取得し(S11)、第2項の係数を固定してアニーリングマシンによって求められた第2項の期待値に基づいて、第2項の係数を更新する(S12)。また、整数計画装置10は、第3項の係数を定数倍して更新する(S13)。 After that, the integer planning device 10 acquires the plurality of spin values determined by the annealing machine (S11), fixes the coefficient of the second term, and calculates the value based on the expected value of the second term determined by the annealing machine. , updates the coefficient of the second term (S12). Further, the integer planning device 10 updates the coefficient of the third term by multiplying it by a constant (S13).

整数計画装置10は、複数のスピンの値が制約条件を満たす頻度を算出する(S14)。そして、整数計画装置10は、頻度が閾値以上である場合(S15:YES)、第2項の係数及び第3項の係数を決定する(S16)。なお、整数計画装置10は、決定された第2項の係数及び第3項の係数を含むハミルトニアンをアニーリングマシンに設定して、制約付き整数計画装置の解を求めてよい。一方、頻度が閾値未満である場合(S15:NO)、整数計画装置10は、処理S11~S15を再び実行する。 The integer planning device 10 calculates the frequency with which the values of the plurality of spins satisfy the constraint condition (S14). Then, if the frequency is equal to or greater than the threshold (S15: YES), the integer planning device 10 determines the coefficient of the second term and the coefficient of the third term (S16). Note that the integer programming device 10 may set the Hamiltonian including the determined coefficients of the second term and the coefficients of the third term in an annealing machine to obtain a solution of the constrained integer programming device. On the other hand, if the frequency is less than the threshold (S15: NO), the integer planning device 10 executes the processes S11 to S15 again.

図10は、本実施形態に係る整数計画装置10により実行される整数計画処理のフローチャートである。同図では、制約条件が2以上である場合の整数計画処理のフローチャートを示している。 FIG. 10 is a flowchart of integer planning processing executed by the integer planning device 10 according to this embodiment. This figure shows a flowchart of integer planning processing when the constraint condition is 2 or more.

はじめに、整数計画装置10は、目的関数を表す第1項と、複数の制約条件を表し、複数の1次式の重み付き和で表される第2項と、複数の制約条件を表し、複数の2次式の和で表される第3項とを含むハミルトニアンをアニーリングマシンに設定する(S20)。 First, the integer programming device 10 has a first term representing an objective function, a second term representing a plurality of constraint conditions and represented by a weighted sum of a plurality of linear equations, and a second term representing a plurality of constraint conditions and a plurality of A Hamiltonian including the third term represented by the sum of quadratic equations is set in the annealing machine (S20).

その後、整数計画装置10は、アニーリングマシンによって求められた複数のスピンの値を取得し(S21)、第2項の重み係数を固定してアニーリングマシンによって求められた複数の1次式の期待値に基づいて、第2項の重み係数を更新する(S22)。また、整数計画装置10は、第3項の係数を定数倍して更新する(S23)。 After that, the integer planning device 10 acquires the values of the plurality of spins obtained by the annealing machine (S21), and fixes the weighting coefficient of the second term to obtain the expected values of the plurality of linear equations obtained by the annealing machine. The weighting coefficient of the second term is updated based on (S22). Further, the integer planning device 10 updates the coefficient of the third term by multiplying it by a constant (S23).

整数計画装置10は、複数のスピンの値が制約条件を満たす頻度を算出する(S24)。そして、整数計画装置10は、頻度が閾値以上である場合(S25:YES)、第2項の重み係数及び第3項の係数を決定する(S16)。なお、整数計画装置10は、決定された第2項の重み係数及び第3項の係数を含むハミルトニアンをアニーリングマシンに設定して、制約付き整数計画装置の解を求めてよい。一方、頻度が閾値未満である場合(S25:NO)、整数計画装置10は、処理S21~S25を再び実行する。 The integer planning device 10 calculates the frequency with which the values of the plurality of spins satisfy the constraint condition (S24). Then, if the frequency is equal to or greater than the threshold (S25: YES), the integer planning device 10 determines the weighting coefficient of the second term and the coefficient of the third term (S16). Note that the integer programming device 10 may set the Hamiltonian including the determined weight coefficient of the second term and the coefficient of the third term in an annealing machine to obtain a solution of the constrained integer programming device. On the other hand, if the frequency is less than the threshold (S25: NO), the integer planning device 10 executes the processes S21 to S25 again.

以上説明した実施形態は、本発明の理解を容易にするためのものであり、本発明を限定して解釈するためのものではない。実施形態が備える各要素並びにその配置、材料、条件、形状及びサイズ等は、例示したものに限定されるわけではなく適宜変更することができる。また、異なる実施形態で示した構成同士を部分的に置換し又は組み合わせることが可能である。 The embodiments described above are intended to facilitate understanding of the present invention, and are not intended to be interpreted as limiting the present invention. Each element included in the embodiment, as well as its arrangement, material, conditions, shape, size, etc., are not limited to those illustrated, and can be changed as appropriate. Further, it is possible to partially replace or combine the structures shown in different embodiments.

10…整数計画装置、10a…CPU、10b…RAM、10c…ROM、10d…通信部、10e…入力部、10f…表示部、11…設定部、12…取得部、13…更新部、20…アニーリングマシン、100…整数計画システム DESCRIPTION OF SYMBOLS 10... Integer planning device, 10a... CPU, 10b... RAM, 10c... ROM, 10d... Communication section, 10e... Input section, 10f... Display section, 11... Setting section, 12... Acquisition section, 13... Update section, 20... Annealing machine, 100...Integer programming system

Claims (8)

制約付き整数計画問題の目的関数を表す第1項と、制約条件を表し、複数のスピンに関する1次式で表される第2項と、前記制約条件を表し、前記複数のスピンに関する2次式で表される第3項とを含むハミルトニアンをアニーリングマシンに設定する設定部と、
前記アニーリングマシンによって求められた前記複数のスピンの値を取得する取得部と、
前記第2項の係数を、前記第2項の値に基づいて更新する更新部と、
を備える整数計画装置。
a first term representing an objective function of a constrained integer programming problem, a second term representing a constraint condition and expressed by a linear equation regarding the plurality of spins, and a quadratic expression representing the constraint condition and relating to the plurality of spins. a setting unit that sets a Hamiltonian including a third term expressed by the annealing machine;
an acquisition unit that acquires the values of the plurality of spins determined by the annealing machine;
an updating unit that updates the coefficient of the second term based on the value of the second term;
An integer programming device comprising:
前記更新部は、前記第2項の前記係数を、前記係数を固定して前記アニーリングマシンによって求められた前記第2項の期待値に基づいて更新する、
請求項1に記載の整数計画装置。
The updating unit updates the coefficient of the second term based on the expected value of the second term determined by the annealing machine with the coefficient fixed.
The integer programming device according to claim 1.
前記更新部は、前記第2項の前記係数を固定して前記アニーリングマシンによって所定回数求められた前記複数のスピンの値が前記制約条件を満たす頻度を算出し、前記頻度が閾値以上である場合に、前記第2項の前記係数の更新を終了する、
請求項1又は2に記載の整数計画装置。
The updating unit fixes the coefficient of the second term and calculates the frequency with which the plurality of spin values obtained a predetermined number of times by the annealing machine satisfy the constraint condition, and if the frequency is equal to or greater than a threshold value, , ending the updating of the coefficients of the second term;
An integer programming device according to claim 1 or 2.
前記設定部は、前記制約条件が不等号条件の場合、前記不等号条件を満たす値が値域となる関数による等号条件を表す前記第2項及び前記第3項を含むハミルトニアンを前記アニーリングマシンに設定する、
請求項1から3のいずれか一項に記載の整数計画装置。
When the constraint condition is an inequality condition, the setting unit sets, in the annealing machine, a Hamiltonian including the second term and the third term representing the equality condition by a function whose range is a value that satisfies the inequality condition. ,
An integer programming device according to any one of claims 1 to 3.
前記更新部は、前記第3項の係数を、前記第2項の前記係数の更新とともに定数倍して更新する、
請求項1から4のいずれか一項に記載の整数計画装置。
The updating unit updates the coefficient of the third term by multiplying it by a constant while updating the coefficient of the second term.
An integer programming device according to any one of claims 1 to 4.
前記設定部は、前記第1項と、複数の制約条件を表し、前記複数のスピンに関する複数の1次式の重み付き和で表される第2項と、前記複数の制約条件を表し、前記複数のスピンに関する複数の2次式の和で表される第3項とを含むハミルトニアンを前記アニーリングマシンに設定し、
前記更新部は、前記第2項の重み係数を、前記複数の1次式の値に基づいて更新する、
請求項1から5のいずれか一項に記載の整数計画装置。
The setting unit is configured to represent the first term, a second term representing a plurality of constraint conditions and represented by a weighted sum of a plurality of linear equations regarding the plurality of spins, and the plurality of constraint conditions; setting a Hamiltonian including a third term represented by a sum of a plurality of quadratic equations regarding a plurality of spins in the annealing machine;
The updating unit updates the weighting coefficient of the second term based on the values of the plurality of linear expressions.
An integer programming device according to any one of claims 1 to 5.
整数計画装置の演算部によって、
制約付き整数計画問題の目的関数を表す第1項と、制約条件を表し、複数のスピンに関する1次式で表される第2項と、前記制約条件を表し、前記複数のスピンに関する2次式で表される第3項とを含むハミルトニアンをアニーリングマシンに設定することと、
前記アニーリングマシンによって求められた前記複数のスピンの値を取得することと、
前記第2項の係数を、前記第2項の値に基づいて更新することと、
を含む整数計画方法。
By the arithmetic unit of the integer programming device,
a first term representing an objective function of a constrained integer programming problem, a second term representing a constraint condition and expressed by a linear equation regarding the plurality of spins, and a quadratic expression representing the constraint condition and relating to the plurality of spins. Setting a Hamiltonian including the third term expressed by in an annealing machine,
obtaining values of the plurality of spins determined by the annealing machine;
updating the coefficient of the second term based on the value of the second term;
Integer programming methods including.
整数計画装置に備えられた演算部を、
制約付き整数計画問題の目的関数を表す第1項と、制約条件を表し、複数のスピンに関する1次式で表される第2項と、前記制約条件を表し、前記複数のスピンに関する2次式で表される第3項とを含むハミルトニアンをアニーリングマシンに設定する設定部、
前記アニーリングマシンによって求められた前記複数のスピンの値を取得する取得部、及び
前記第2項の係数を、前記第2項の値に基づいて更新する更新部、
として機能させる整数計画プログラム。
The arithmetic unit included in the integer programming device is
a first term representing an objective function of a constrained integer programming problem, a second term representing a constraint condition and expressed by a linear equation regarding the plurality of spins, and a quadratic expression representing the constraint condition and relating to the plurality of spins. a setting unit that sets a Hamiltonian including a third term expressed by the annealing machine;
an acquisition unit that acquires the values of the plurality of spins determined by the annealing machine; and an update unit that updates the coefficient of the second term based on the value of the second term.
An integer programming program that works as an integer programming program.
JP2019219811A 2019-12-04 2019-12-04 Integer programming device, integer programming method and integer programming program Active JP7411397B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2019219811A JP7411397B2 (en) 2019-12-04 2019-12-04 Integer programming device, integer programming method and integer programming program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2019219811A JP7411397B2 (en) 2019-12-04 2019-12-04 Integer programming device, integer programming method and integer programming program

Publications (2)

Publication Number Publication Date
JP2021089596A JP2021089596A (en) 2021-06-10
JP7411397B2 true JP7411397B2 (en) 2024-01-11

Family

ID=76220224

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2019219811A Active JP7411397B2 (en) 2019-12-04 2019-12-04 Integer programming device, integer programming method and integer programming program

Country Status (1)

Country Link
JP (1) JP7411397B2 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017219979A (en) 2016-06-06 2017-12-14 日本電信電話株式会社 Optimization problem solving apparatus, method, and program
JP2019046038A (en) 2017-08-31 2019-03-22 株式会社デンソー Evaluation function converter and program
JP2019512134A (en) 2016-02-23 2019-05-09 1キュービー インフォメーション テクノロジーズ インコーポレイテッド1Qb Information Technologies Inc. Method and system for solving Lagrange duals of binary polynomially constrained multinomial programming problems using a binary optimizer

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2019512134A (en) 2016-02-23 2019-05-09 1キュービー インフォメーション テクノロジーズ インコーポレイテッド1Qb Information Technologies Inc. Method and system for solving Lagrange duals of binary polynomially constrained multinomial programming problems using a binary optimizer
JP2017219979A (en) 2016-06-06 2017-12-14 日本電信電話株式会社 Optimization problem solving apparatus, method, and program
JP2019046038A (en) 2017-08-31 2019-03-22 株式会社デンソー Evaluation function converter and program

Also Published As

Publication number Publication date
JP2021089596A (en) 2021-06-10

Similar Documents

Publication Publication Date Title
Deng et al. Markowitz-based portfolio selection with cardinality constraints using improved particle swarm optimization
Sung et al. Using models to improve optimizers for variational quantum algorithms
Zhu et al. Hybrid and enhanced PSO: Novel first order reliability method-based hybrid intelligent approaches
Breve et al. Particle competition and cooperation in networks for semi-supervised learning
Wan et al. An improved hybrid genetic algorithm with a new local search procedure
US8250069B2 (en) Green&#39;s function formulations for pagerank algorithm using helmholtz wave equation representations of internet interactions
Wu et al. A hybrid-forecasting model reducing Gaussian noise based on the Gaussian support vector regression machine and chaotic particle swarm optimization
JP6919770B2 (en) Parameter search method, parameter search device, and parameter search program
US20210089832A1 (en) Loss Function Optimization Using Taylor Series Expansion
Gortazar et al. Black box scatter search for general classes of binary optimization problems
US20210256179A1 (en) Information processing method and information processing system
US20170323206A1 (en) Method and system for determining a weight allocation in a group comprising a large plurality of items using an optimization oracle
CN114139712B (en) Quantum circuit processing method, quantum circuit processing device, electronic device and storage medium
Murillo et al. Revised HLMS: A useful algorithm for fuzzy measure identification
Horn et al. First investigations on noisy model-based multi-objective optimization
JP2020205049A (en) Optimization device, control method of optimization device, and control program of optimization device
WO2016151620A1 (en) Simulation system, simulation method, and simulation program
Peng et al. A hierarchical particle swarm optimizer with latin sampling based memetic algorithm for numerical optimization
CN114037082A (en) Quantum computing task processing method and system and computer equipment
JP7411397B2 (en) Integer programming device, integer programming method and integer programming program
CN113919504A (en) Information processing system, information processing method, and computer-readable storage medium
Nguyen et al. Online learning-based clustering approach for news recommendation systems
Li et al. Model based screening embedded bayesian variable selection for ultra-high dimensional settings
Wishon et al. Robust efficiency measures for linear knapsack problem variants
JP2021125136A (en) Optimization device and optimization method

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20210719

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20221202

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20231130

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20231207

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20231225

R150 Certificate of patent or registration of utility model

Ref document number: 7411397

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150