Information processing device, information processing method, and information processing program
The information processing device addresses large-scale vehicle routing problems with two-way one-hot constraints by using a weight matrix switching mechanism to efficiently transition state variables, enhancing the ability to escape quasi-local solutions and achieve optimal results.
Patent Information
- Application Number
- JP2022008901
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-01-24
- Publication Date
- 2025-10-01
- Estimated Expiration
- 2042-01-24
Smart Images

Figure 0007746860000010 
Figure 0007746860000011 
Figure 0007746860000012
Abstract
Description
[Technical Field]
[0001] The present invention relates to an information processing device, an information processing method, and an information processing program. [Background technology]
[0002] Combinatorial optimization problems exist in various fields in modern society. For example, in fields such as manufacturing, distribution, and marketing, combinations of elements that optimize or minimize costs are sought. However, combinatorial optimization problems are known to be difficult to solve using conventional von Neumann computers because the computation time increases exponentially as the number of variables corresponding to the elements increases.
[0003] As a method for solving multivariable optimization problems that von Neumann computers are not good at, there are optimization devices that use an Ising energy function. Such optimization devices are also called Ising machines or Boltzmann machines. The energy function is also sometimes called a cost function or an objective function. Optimization devices calculate the problem to be calculated by replacing it with an Ising model, which is a model that represents the behavior of spin in magnetic materials.
[0004] One calculation method for solving minimum value problems using the Ising model is to find the minimum value of an Ising-type energy function using Markov Chain Monte Carlo (MCMC). In the MCMC method, state transitions, which are updates to the state variables of the energy function, are generally performed with transition probabilities according to the Boltzmann distribution. In the MCMC method, a search is performed by probabilistically flipping one of the bits in the bit string representing the state, and the feasibility of a transition is determined based on the energy difference when transitioning from the current state to a nearby state. Ising-type energy is the energy of a quadratic system of binary variables.
[0005] Among such optimization problems, there are problems that are subject to a constraint condition called a one-hot constraint. A one-hot constraint is a constraint that limits the number of state variables that take on a value of 1 in a solution when there are multiple state variables. Optimization problems that feature a one-hot constraint include many scheduling problems such as the Traveling Salesman Problem (TSP) and the Versatile Place and Route (VPR) problem, as well as the Knapsack Problem and the Bin Packing Problem.
[0006] Furthermore, there are two types of one-hot constraints. One is called a one-way one-hot (1W1H) constraint. In this case, each variable appears once in the set of constraints. Optimization problems with this constraint include traffic flow optimization and bin packing problems.
[0007] The other constraint is called the 2W2H (Two Way One Hot) constraint. In this case, n 2 When the variables are arranged in an n x n square, the sums of each row and each column are all 1. This constraint is equivalent to the constraint when determining the permutation of n different elements, for example, the integers 1, 2, . . . , n. Optimization problems with this constraint include the traveling salesman problem, the vehicle routing problem, and the quadratic assignment problem (QAP).
[0008] In solving such two-way, two-hot problems, by devising a formulation, it has been possible to increase the number of target locations from approximately 20 to approximately 100, for example, in the case of a vehicle dispatching problem. Furthermore, a technology has been proposed for performing optimization processing by using one of two evaluation functions with different penalty coefficients to determine the lowest energy state and the other to search for a solution to the optimization problem. Furthermore, a technology has been proposed for updating the values of state variables using the Markov chain Monte Carlo method based on a transition probability distribution in which the larger the positive change in the value of the evaluation function due to a change in the value of the state variable, the larger the transition probability is compared to the Boltzmann distribution. [Prior art documents] [Patent documents]
[0009] [Patent Document 1] Japanese Patent Application Publication No. 2019-121137 [Patent Document 2] Japanese Patent Application Publication No. 2020-205049 Summary of the Invention [Problem to be solved by the invention]
[0010] However, for large-scale or highly difficult vehicle routing problems, conventional solution methods with innovative formulations have great difficulty in escaping from quasi-local solutions, potentially making it difficult to obtain an optimal solution. The reason for this is that, when performing a state transition, conventional solution methods with innovative formulations search within a narrow neighborhood of the current state. This is because state transitions under a 2-way, 1-hot constraint are simple operations on permutations. Therefore, one possible method for escaping the suboptimal state is to search within a wider neighborhood, but if the number of state variables to be transitioned is increased, the number of next states to be searched for increases exponentially, making the calculation difficult.
[0011] In this regard, a technology that performs optimization processing using two evaluation functions with different penalty coefficients increases the probability of escaping from a quasi-local optimum, but it is difficult to reduce the amount of calculation when a state transition is performed according to a two-way one-hot constraint while searching a wide neighborhood.Furthermore, even with a technology that updates the value of a state variable based on a transition probability distribution in which the transition probability increases according to the value of the evaluation function, it is difficult to reduce the amount of calculation when a state transition is performed according to a two-way one-hot constraint while searching a wide neighborhood.
[0012] The disclosed technology has been made in view of the above, and aims to provide an information processing device, an information processing method, and an information processing program that can efficiently obtain a solution to a problem that conforms to a 2-way 1-hot constraint. [Means for solving the problem]
[0013] In one aspect of the information processing device, information processing method, and information processing program disclosed herein, a search unit searches for a solution to a problem given constraints including a 2-way 1-hot constraint by using a first matrix based on an objective function as a weight matrix. A transition unit changes a part of the value of the solution, which is the search result of the search unit, when the search by the search unit reaches a specific state. A weight matrix switching unit, when the part of the value of the solution is changed by the transition unit, causes the search unit to perform a search using a return matrix generated by applying a penalty coefficient to the weight matrix as the weight matrix. When the search result by the search unit reaches a state satisfying the 2-way 1-hot constraint, returns the weight matrix to the first matrix and causes the single operation unit to perform a search. [Effects of the Invention]
[0014] In one aspect, the present invention can efficiently solve problems subject to a two-way one-hot constraint. [Brief explanation of the drawings]
[0015] [Figure 1] FIG. 1 is a diagram for explaining the 2-way 1-hot constraint. [Figure 2]FIG. 2 is a configuration diagram of an optimization unit included in the optimization device according to the embodiment. [Figure 3] FIG. 3 is a diagram showing a weighting matrix used in the embodiment. [Figure 4] FIG. 4 is a diagram illustrating an example of a data storage state of a storage element. [Figure 5] FIG. 5 is a diagram illustrating an example of a selection circuit. [Figure 6] FIG. 6 is a block diagram illustrating details of the control unit of the optimization device according to the embodiment. [Figure 7] FIG. 7 is a diagram illustrating an example of a vehicle allocation planning problem. [Figure 8] FIG. 8 is a diagram showing an example of group variables assigned to matrix elements. [Figure 9] FIG. 9 is a flowchart of the optimization process performed by the optimization device according to the embodiment. [Figure 10] FIG. 10 is a flowchart of the optimization process according to the 2-way 1-hot constraint. [Figure 11] FIG. 11 is a flowchart of the optimization process for returning to a state that satisfies the 2-way 1-hot constraint. DETAILED DESCRIPTION OF THE INVENTION
[0016] Hereinafter, embodiments of an information processing device, an information processing method, and an information processing program disclosed in the present application will be described in detail with reference to the accompanying drawings. Note that the information processing device, the information processing method, and the information processing program disclosed in the present application are not limited to the following embodiments. [Example]
[0017] The values of N bits corresponding to the multiple spins (number of spins = N) included in the 2-way 1-hot Ising model are expressed as state variables x1 to x N In the following, x i The state variable x i Or just x i It may be expressed as:
[0018] In this case, for example, the one-hot constraint is satisfied when there is only one state variable whose value is 1 in each group in parentheses in the following formula (1).
[0019]
number
[0020] For example, if there are three state variables x1, x2, and x3 in a group, the states {x1, x2, x3} = {1, 0, 0}, {0, 1, 0}, and {0, 0, 1} satisfy the 1-hot constraint. On the other hand, the states {x1, x2, x3} = {0, 0, 0}, {1, 1, 0}, {1, 0, 1}, and {0, 1, 1} do not satisfy the 1-hot constraint.
[0021] Furthermore, in the case of a 2-way 1-hot constraint, both groups of two conditions satisfy the 1-hot constraint, that is, the number of state variables whose value is 1 in each group is one. In the case of a 2-way 1-hot constraint, for example, if both groups of two conditions have n components, the elements that collectively represent the components of each group can be arranged in an n x n square as shown in Figure 1. In this case, the sum of each row and the sum of each column are all 1. Figure 1 is a diagram for explaining the 2-way 1-hot constraint. In Figure 1, m = 1, 2,...,N, and N = n 2 is.
[0022] In this case, in order to transition from a state that satisfies the 2-way 1-hot constraint to another state that satisfies the 2-way 1-hot constraint, the optimization device changes the value of 4 bits in one state update process. For example, in Figure 1, the state variable x j If has a value of 0, then x j When x transitions from 0 to 1, j The state variable x that is in the same row as i is transitioned from 1 to 0. Also, x j The state variable x that is in the same column as g is transitioned from 1 to 0. Furthermore, x iIn the same column as x g x on the same line as k is transitioned from 0 to 1. Hereinafter, transitioning the value of a certain state variable from 0 to 1 or from 1 to 0 will be referred to as inversion of the value of the state variable or bit inversion.
[0023] In this way, in order to transition from a state that satisfies the 2-way 1-hot constraint to another state that satisfies the 2-way 1-hot constraint, four state variables transition as shown in the following equation (2).
[0024]
number
[0025] In this case, the Ising-type energy function using the weight values is defined by, for example, the following equation (3).
[0026]
number
[0027] The first item on the right side is the sum of the values of the two bits (0 or 1) and the weight value for all combinations of two bits that can be selected from all bits included in the Ising model, without omissions or overlaps. x i is the state variable whose index (bit identification information) is i, and x j is a state variable that represents the value of the bit whose index is j. In the following, the index represented as i may be referred to as index i or simply as i. ij is a weight value that indicates the magnitude of interaction between the bit with index i and the bit with index j. ii = 0. Also, W ij =W ji This is often the case.
[0028] The two items on the right side are the sum of the products of the bias values of all bits and the bit values. idenotes the bias value of the bit with index i.
[0029] Next, in formula (2), x i The value of 1-x changes i Then, x i The increase in Δx i =(1-x i )-x i =1-2x i The energy change (ΔE i ) is expressed by the following formula (4).
[0030]
number
[0031] Furthermore, as mentioned above, to transition from one state that satisfies the 2-way 1-hot constraint to another state that satisfies the 2-way 1-hot constraint, the value of 4 bits is changed. If the indexes i, j, k, and g are changed as shown in Equation (2), the energy change in that case can be calculated using Equation (3) as shown in Equation (5).
[0032]
number
[0033] x i When changes from 1 to 0, Δx i becomes -1, and x i When changes from 0 to 1, Δx i is 1. Note that h i is called the local field value, and Δx i Depending on h i Multiplying by the sign (+1 or -1) is ΔE i is.
[0034] And x j When bit-flipping occurs, the local field h i The change in δh i (j)is expressed by the following equation (6).
[0035]
number
[0036] That is, h i Prepare a register to store x j When the bits are inverted, the correct h is obtained by adding the change expressed by equation (5). i is obtained.
[0037] x j h when changes from 0 to 1 m The change in is δh m (j) =+W mj and x j h when changes from 1 to 0 m The change in is δh m (j) =-W mj Similarly, x i h for the bit with index m when m The change in is δh m (i) =Δx m W mi Also, x k h for the bit with index m when m The change in is δh m (k) =Δx m W mk Also, x g h for the bit with index m when m The change in is δh m (k) =Δx m W mk This can be expressed as:
[0038] As mentioned above, to transition from one state that satisfies the 2-way 1-hot constraint to another state that satisfies the 2-way 1-hot constraint, the value of 4 bits is changed. For example, the state variable x jchanges from 0 to 1, and the state variable x i changes from 1 to 0, and the state variable x k changes from 0 to 1, and the state variable x g When changes from 1 to 0, the change in the local field with index m is expressed by the following equation (7).
[0039]
number
[0040] When the optimization device searches for a ground state by repeatedly changing the values of four bits in one state update process, the local field values are updated in each state update process to calculate the energy change. For example, if the values of the bits at index j and index k in a certain group both change from 0 to 1, and the values of the bits at index i and index g both change from 1 to 0, then the values of h1 to h2 for n bits are calculated as follows: n is updated based on the following equation (8):
[0041]
number
[0042] In formula (8), h1'~h n ' is the local field value after the update.
[0043] Next, details of the optimization device 1 according to the present embodiment will be described. FIG. 2 is a configuration diagram of an optimization unit included in the optimization device according to the embodiment. The optimization device 1, which is an information processing device, includes a control unit 10 and an optimization unit 20. The optimization unit 20 includes a storage unit 21, a local field generation unit 22, an energy change calculation unit 23, an offset addition unit 24, a selection circuit 25, and an update unit 26. The optimization unit 20 is an example of a "search unit." Here, a case will be described in which an optimization problem having a 2-way 1-hot constraint is solved using a group of conditions, each of which has n components.
[0044] The storage unit 21 has paths for multiple columns, and furthermore, the same number of storage elements 210 as the number of columns are arranged in each column. For example, in FIG. 2, the storage unit 21 has paths for N columns. The storage unit 21 has N storage elements 210 in each column. The storage elements 210 arranged in the same number of rows from the top of each column correspond to a row having N elements. That is, the storage unit 21 holds weight values indicating the magnitude of interaction between each of the N bits in the storage elements 210 arranged in an N×N matrix. The weight matrix, which is a matrix of weight values, has initial values stored in each storage element 210 of the storage unit 21 by the control unit 10 during the initial setting process. In FIG. 2, when the row number is i and the column number is j, the storage element 210 in each row and column stores W ij The storage unit 21 is realized by using, for example, a register or a static random access memory (SRAM).
[0045] Here, a description will be given of the weight matrix and weight values stored in the memory element 210 of the memory unit 21. Fig. 3 is a diagram showing a weight matrix used in the embodiment. Fig. 4 is a diagram showing an example of the data storage state of the memory element.
[0046] In this embodiment, two weight matrices are used: an optimization matrix 31 for performing optimization processing while the state variables satisfy the two-way one-hop constraint, and a restoration matrix 32 for returning state variables that do not satisfy the two-way one-hop constraint to a state that satisfies the two-way one-hop constraint. This optimization matrix 31 is an example of a "first matrix." Here, a mode in which optimization processing is performed using the optimization matrix 31 while the state variables satisfy the two-way one-hop constraint is called an optimization mode. Also, a mode in which a state variable that does not satisfy the two-way one-hop constraint is returned to a state that satisfies the two-way one-hop constraint using the restoration matrix 32 is called a restoration mode.
[0047] The optimization matrix 31 is a matrix that combines a 0 matrix and a distance matrix D as shown in FIG. 3. The distance matrix D is a matrix that gives a cost according to the distance between two locations. The distance matrix D is expressed, for example, as a matrix 33. The matrix 33 corresponds to the distance matrix D in the first row and second column of the optimization matrix 31.
[0048] As shown in FIG. 3, the return matrix 32 is a matrix combining a penalty matrix P and a modified distance matrix D'. The penalty matrix P is a matrix that assigns a penalty coefficient p to a state variable that violates one of the conditions in the 2-way 1-hot constraint, and is represented by matrix 35. The modified distance matrix D' is a matrix that assigns a penalty to a state variable that violates the other condition in the 2-way 1-hot constraint, and is a matrix obtained by adding a diagonal matrix 34, whose diagonal elements are the penalty coefficient p, to the distance matrix D. For example, we will explain a case where the state variables are arranged as a matrix, with the elements in the rows representing the passage of time and the elements in the columns representing locations. In this case, the penalty matrix P is a matrix that assigns a penalty to a state variable that violates the condition that a person must not be at two or more different locations at the same time, such as being at location B1 at time T1 and then moving to location B2 at time T1. The modified distance matrix D' is a matrix that penalizes state variables that violate the condition that one location is visited only once, such as being at location B1 at time T1 and time T2, and assigns weight values to other state variables.
[0049] Next, a description will be given of the weight values stored in each storage element 210. For example, the storage element 210 stores the data 211 shown in FIG.
[0050] A value representing the cost corresponding to the distance between two locations represented by the element is stored as the weight value 212 located at a location corresponding to an element other than the diagonal components of the distance matrix D. In contrast, 0 and a penalty coefficient p are stored as the weight value 212 located at a location corresponding to an element other than the diagonal components of the distance matrix D and the penalty matrix P.
[0051] Furthermore, flag 213 stores information indicating whether weight value 212 is a penalty coefficient p or a cost according to the distance between two base stations. Here, a value of 0 in flag 213 indicates that weight value 212 is a cost, and a value of 1 in flag 213 indicates that weight value 212 is a penalty coefficient. That is, a flag 213 with a value of 0 is added to weight values 212 located at positions corresponding to elements other than the diagonal components of distance matrix D. In contrast, a flag 213 with a value of 1 is added to weight values 212 located at positions corresponding to elements other than the diagonal components of distance matrix D and penalty matrix P.
[0052] Furthermore, the storage element 210 has a selection circuit 214. The selection circuit 214 receives an input of data 211 held in the storage element 210. The selection circuit 214 also receives an input of information indicating whether the operation mode of the optimization device 1 is the optimization mode or the return mode from the control unit 10. The selection circuit 214 then checks the flag 213 of the data 211 to determine whether the weight value 212 is the penalty coefficient p or the cost. If the weight value 212 is the cost, the selection circuit 214 always outputs the value of the weight value 212 as is. On the other hand, if the weight value 212 is the penalty coefficient p, the selection circuit 214 outputs 0 when the optimization device 1 operates in the optimization mode, and outputs the penalty coefficient when the optimization device 1 operates in the return mode.
[0053] Returning to FIG. 1, the description of the storage unit 21 will be continued. When the selection circuit 25 selects a state variable whose value is to be inverted, the weight value corresponding to the selected state variable among the weight values stored in each storage element 210 of the storage unit 21 is rewritten to the inverted value. For example, if x is selected as the state variable to be inverted, j When is selected, the index j is input from the selection circuit 25, and W mj The weight values expressed as
[0054] Here, when operating in optimization mode under the 2-way 1-hot constraint, all four bits are inverted together. Therefore, in optimization mode, among the weight values stored in each storage element 210 of the storage unit 21, the weight value held by the storage element 210 identified by the index indicating the other three bits corresponding to the index specified by the selection circuit 25 is also rewritten. For example, in the matrix shown in FIG. 1, the indexes indicating the other three bits corresponding to the index j are i, k, and g.
[0055] The local field generating unit 22 has a plurality of local field generating circuits 220 arranged to correspond to each column of the memory elements 210 arranged in the matrix of the memory unit 21. Each local field generating circuit 220 acquires a weight value of each memory element 210 arranged in the corresponding column. Then, each local field generating circuit 220 uses the acquired weight value to generate a local field value, which is the value of the local field.
[0056] In the example of FIG. 1, the local field generator 22 generates local field values h1, h2, . . . , h for each of the N bits. N Each of the local field generating circuits 220 has a holding unit (for example, a register) (not shown), and holds local field values h1 to h N Maintain and update the information.
[0057] For example, the state variable x j When the weights W are updated, each local field generating circuit 220 updates the corresponding weights W j1 ,W j2 ,~,W jN Specifically, the local field generating circuit 220 corresponding to the i-th row updates the local field by adding or subtracting the state variable x j If transitions from 0 to 1, the weight value W ji The local field h i and the state variable x j If the transition occurs from 1 to 0, the weight value W ji The local field h iHere, as described above, in the case of 2-way 1-hot, 4 bits are inverted, so the local field generation circuit 220 updates the local field by adding or subtracting Equation (7) to the local field it holds.
[0058] h1~h N The initial values of the bias values b1 to b N and is set by the control unit 10 during the initial setting process. The local field generating circuit 220 is realized using, for example, an adder or a subtractor in addition to a register.
[0059] Furthermore, when the operation mode is changed from optimization mode to return mode, the local field generation unit 22 causes each local field generation circuit 220 to recalculate the local field values that are the local fields at the time of the change. This is because when the operation mode is changed from optimization mode to return mode, an appropriate state variable having a value of 1 is forcibly transitioned to 0 by the control unit 10, causing a violation of the 2-way 1-hot constraint and a significant change in the local field. In this case, however, the local field generation unit 22 does not redo the local field calculation from the beginning, but rather causes the recalculation by adding twice the penalty coefficient p to the local fields of the variables included in the row and column where the violation of the 2-way 1-hot constraint occurred.
[0060] The energy change calculation unit 23 calculates the energy change based on the local field value generated by the local field generation unit 22. In the example of Fig. 1, the energy change calculation unit 23 calculates ΔE1, ΔE2, ..., ΔE N In FIG. 2, as an example, the local field h i Although the diagram shows paths extending from the local field generation circuit 220 holding the energy change calculation circuit 230 to each of the energy change calculation circuits 230, paths also extend from other local field generation circuits 220 to all of the energy change calculation circuits 230.
[0061] The energy change calculation circuit 230 calculates the amount of energy change using equation (5). Specifically, ΔE j is the amount of energy change when four state variables transition as shown in Equation 2. Thereafter, each energy change calculation circuit 230 outputs the calculated amount of energy change to the selection circuit 25.
[0062] The offset addition unit 24 monitors the amount of energy change output from each energy change calculation circuit 230. If all of the energy change amounts output from each energy change calculation circuit 230 are positive, the offset addition unit 24 adds an offset to each value. The offset is a negative value, and the offset addition unit 24 adjusts the amount of energy change so that it appears as a negative value, i.e., an energy change amount when the energy decreases.
[0063] The selection circuit 25 receives as input the energy change amounts output from each energy change calculation circuit 230. Here, if all of the energy change amounts are positive, the selection circuit 25 receives as input a value to which an offset has been added by the offset addition unit 24.
[0064] The selection circuit 25 outputs an index that identifies one of the values for which updating is permitted, based on the magnitude relationship between the thermal excitation energy and the energy change amounts output by each of the multiple energy change calculation circuits 230. The thermal excitation energy is determined based on a random number and a temperature parameter input from the control unit 10. When simulated annealing is performed in the optimization device 1, the temperature parameter is controlled by the control unit 10, for example, so that its value decreases each time the process of updating the state of the Ising model is repeated a predetermined number of times. It is also possible to select a state change in the direction of decreasing energy, but in this case, the process will stop at a local minimum. Therefore, a selection is made that probabilistically allows changes that increase energy as well.
[0065] Fig. 5 is a diagram showing an example of a selection circuit. The selection circuit 25 in Fig. 5 is a circuit that selects candidates for update bits in a parallel manner. The input terminals 251 are terminals that receive input of index values corresponding to the amount of energy change output from the energy change calculation circuit 230. Each terminal is connected two to a selector 252. Furthermore, outputs from the selector 252 are connected two to a selector 252 in the next stage.
[0066] The selection circuit 25 compares the amount of energy change input from the energy change calculation circuit 230 with the temperature parameter input from the control unit 10 to determine whether the transition of the state variable is acceptable. For example, the selection circuit 25 determines that the transition of the state variable is acceptable when the amount of energy change is less than a predetermined value calculated from the temperature parameter. Then, the selection circuit 25 sets an update enable flag for the index corresponding to the energy change for which the transition of the state variable is determined to be acceptable. The selection circuit 25 then inputs the indexes corresponding to each energy change to each input terminal 251, and holds a tournament using the selector 252.
[0067] The selector 252 is realized, for example, by the circuit on the right side of FIG. 5 . The selector 252 having this circuit receives two statuses 01 and 02 as inputs and acquires flags F1 and F2 and indexes #1 and #2 from them, respectively. The selector 252 then receives a random number as input and selects one of the indexes 01 or 02 for which the updateable flag is set. The selector 252 adds an entry number indicating the selected 0 or 1 to the upper part of the index. The selector 252 then outputs the selected index to the selector 252 in the next stage. The index selected by the selector 252 in the final stage indicates the bit selected by the selection circuit 25. Information on the index selected by the selection circuit 25 is output to the update unit 26 and sent to the storage unit 21. As a result, the weight values held by the storage element 210 identified by the index and the storage element 210 identified by the index representing the corresponding other bit are updated.
[0068] The update unit 26 updates N-bit values (x1 to x N ) is stored in the memory unit 260. The memory unit 260 is realized by using, for example, a register or an SRAM. The update unit 26 updates the value of the bit identified by the index input from the selection circuit 25 from 0 to 1. Furthermore, the update unit 26 updates the values of the other three bits corresponding to the index input from the selection circuit 25. For example, the state variable x j When an index j indicating i, k, and g is input from the selection circuit 25, the update unit 26 updates the values of the bits identified by the indexes i, k, and g. In this case, the update unit 26 updates each value as shown in Equation (2).
[0069] The update unit 26 outputs a notification of the completion of updating the state variables to the control unit 10. Furthermore, the update unit 26 also outputs the updated values of each state variable to the control unit 10.
[0070] Next, the control unit 10 will be described. FIG. 6 is a block diagram showing details of the control unit of the optimization device according to the embodiment. As shown in FIG. 6, the control unit 10 includes an upper limit calculation unit 11, an objective function generation unit 12, an initialization execution unit 13, a candidate determination unit 14, a temperature management unit 15, an update control unit 16, a notification unit 17, a forced transition unit 18, and a weight matrix switching unit 19. The control unit 10 is realized, for example, by an FPGA (Field Programmable Gate Array). More specifically, the functions of the upper limit calculation unit 11, the objective function generation unit 12, the initialization execution unit 13, the candidate determination unit 14, the temperature management unit 15, the update control unit 16, the notification unit 17, the forced transition unit 18, and the weight matrix switching unit 19 are realized by a computing unit and a memory unit included in a programmed FPGA.
[0071] Here, a case will be described in which the optimization device 1 solves a vehicle dispatch planning problem (CVRP). FIG. 7 is a diagram showing an example of the vehicle dispatch planning problem. In the vehicle dispatch planning problem, as shown in FIG. 7, the positions of a depot 101 and bases 102 to which goods are to be delivered are determined. Also, the distance between the depot 101 and each base 102 and the vehicle's maximum load capacity are given. Furthermore, a demand amount corresponding to the amount of goods to be delivered to each base 102 is given. Then, goods are transported to each base 102 by a plurality of vehicles departing from the depot 101 and returning to the depot 101. The vehicle dispatch planning problem is a problem of finding a route that minimizes the total distance traveled by all vehicles under the above conditions. FIG. 5 shows a vehicle dispatch planning problem in which goods are transported using four vehicles along four routes.
[0072] The initialization execution unit 13 receives input of the conditions of the vehicle dispatch problem to be solved. The problem instance, which is the condition of this vehicle dispatch problem, includes the number of delivery destination bases 102, the distance between each of the depots 101 and 102, the number of routes, etc. Each element according to the input condition is expressed using a matrix indicating constituent requirements indicating a group of conditions indicating which route the element is included in and a group of conditions indicating the point in time at which delivery will be made. The constituent requirements indicating the group of conditions indicating which route the element is included in and the group of conditions indicating the point in time at which delivery will be made are examples of "a predetermined number of components included in each of the two groups." The initialization execution unit 13 outputs the conditions of the vehicle dispatch problem to the upper limit calculation unit 11.
[0073] Thereafter, the initialization execution unit 13 receives input of information on a matrix representing each bit of a state variable that satisfies the 2-way 1-hot constraint and an objective function from the objective function generation unit 12. Then, the initialization execution unit 13 selects a storage element 210 to be used for optimization of the storage unit 21 according to the elements of the matrix. Next, the initialization execution unit 13 obtains a weight value corresponding to each state variable from the objective function and sets a weight value corresponding to each storage element 210.
[0074] Next, the initialization execution unit 13 sets the state variables x1 to x NAfter setting all to 0, the state variables x1 to x are set to satisfy the 2-way 1-hot constraint. N Then, the initialization execution unit 13 sets each bit representing the state variables x1 to x N The value of each bit representing h1 to h2 is output to the optimization unit 20. As a result, the value of each bit in the initial state is stored in the storage unit 260 of the update unit 26, and the local field generation unit 22 generates the local fields h1 to h2 according to the state of each bit. N is generated and maintained.
[0075] 8 is a diagram showing an example of group variables assigned to elements of a matrix. The initialization execution unit 13 assigns row group numbers to elements in the same row of the matrix as the same row group, and assigns column group numbers to elements in the same column as the same column group. The initialization execution unit 13 then associates an index representing each element with the row group number and the column group number.
[0076] Then, the initialization execution unit 13 outputs information on the group variables associated with the indexes representing the elements to the candidate designation unit 14. Furthermore, the initialization execution unit 13 notifies the temperature management unit 15 of the setting of the initial temperature.
[0077] The upper limit calculation unit 11 sorts the demand amounts of the locations 102 in ascending order. Next, when calculating the maximum number of locations for the Mth route, the upper limit calculation unit 11 calculates the cumulative demand amount including the number of locations from the top of the sorted demand amounts to the (M-1)th location. Next, the upper limit calculation unit 11 identifies the minimum number of locations that does not exceed "M × vehicle load limit." Then, the upper limit calculation unit 11 determines the quotient when dividing the identified number of locations by M as the maximum number of locations for the Nth route. This is because, by sorting the demand amounts in ascending order, the demand amounts become a target decreasing sequence, and it is a contradiction if the Mth route has a larger number than the number obtained by dividing the minimum number of locations that does not exceed "M × vehicle load limit" by M. The upper limit calculation unit 11 varies M from 1 to the maximum number of vehicles to find the maximum number of locations for each route from the first route to the maximum number of vehicles. Then, the upper limit calculation unit 11 outputs information on the maximum number of locations for each route to the objective function generation unit 12.
[0078] The objective function generation unit 12 receives input of information on the maximum number of bases for each route from the upper limit calculation unit 11. Next, the objective function generation unit 12 calculates the difference between the sum of the maximum numbers of bases for each route and the number of bases 102. Then, the objective function generation unit 12 sets the calculated difference value as the number of redundant bases (dummy depots). Next, the objective function generation unit 12 creates a matrix expressed by rows in which the number of bases up to the maximum number for each route is listed in order and rows in which bases including redundant bases are listed. In other words, if the direction in which the rows extend represents the passage of time, this matrix represents at what point in time the vehicle will visit which of the expanded bases, which are the actual bases 102 plus redundant bases. Each row is a group of conditions indicating which route a base is to be taken, and each column is a group of conditions indicating at what point in time the base will perform delivery.
[0079] Then, the objective function generation unit 12 assigns numbers to the locations 102 as i=0, 1, 2, . . . and if there is a car at the location 102 with index i at time t, then x it If there is no car, then x it is set to 0 and the bits representing the state variables are set.
[0080] In this matrix, the first row through the row with the maximum number of depots on the first route represent the positions of vehicles traveling on the first route, and the next row through the row with the maximum number of depots on the second route represent the positions of vehicles traveling on the second route. In this way, the route numbers are increased in order, and the last row of this matrix up to the row just before the maximum number of depots on the Nth route represent the positions of vehicles traveling on the Nth route. This matrix has the same number of rows and columns, and satisfies the 2-way 1-hot constraint that "each row and each column has one 1".
[0081] Then, the objective function generating unit 12 defines the objective function as the following equation (9).
[0082]
number
[0083] E(x,y) represents energy, C(x) represents the total cost, P1(x) represents the constraint on redundant locations, and P2(x,y) represents the inequality constraint on the slack variable y.
[0084] The objective function generator 12 outputs the generated matrix information and energy function to the initialization execution unit 13.
[0085] The temperature management unit 15 receives an instruction to set an initial temperature from the initialization execution unit 13. Then, the temperature management unit 15 sets a high initial temperature as a temperature parameter. Then, the temperature management unit 15 notifies the optimization unit 20 of the temperature parameter. After that, when the temperature management unit 15 receives an instruction to decrease the temperature from the update control unit 16, it decreases the value of the temperature parameter in accordance with a pre-specified temperature schedule. Every time the temperature parameter is changed, the temperature management unit 15 notifies the optimization unit 20 of the changed temperature parameter.
[0086] The candidate determination unit 14 receives an input of information on group variables representing each index from the initialization execution unit 13. The candidate determination unit 14 also receives an input of the operation mode of the optimization device 1 from the update control unit 16. Then, the candidate determination unit 14 determines an index representing a state variable to be inverted and be a candidate for transition in accordance with the operation mode, and notifies the optimization unit 20. A method for selecting a state variable to be inverted and be a candidate for transition will be described below.
[0087] The case where the operation mode is the optimization mode will be described. The candidate determination unit 14 uses information on the group variables to select an index representing a state variable whose value is to be inverted. For example, the candidate determination unit 14 selects an index representing a state variable x in the matrix shown in FIG. j Then, the candidate determination unit 14 identifies indices indicating the other three bits determined by the 2-way 1-hot constraint according to the selected index. For example, the candidate determination unit 14 selects an index j indicating the state variable x jFirst, index j indicating "i", i, k, and g are selected as the other three indices. Next, the candidate designator 14 determines that the state variables corresponding to the selected indices are candidates for inverting the values of the state variables. Then, the candidate designator 14 notifies the optimization unit 20 of the indices determined to be candidates for inverting the values of the state variables.
[0088] The candidate determination unit 14 selects an index j to be inverted one by one from 1 to N, and determines for all indexes whether the state variable indicated by each index is a candidate for bit inversion, and notifies the optimization unit 20.
[0089] Next, the case where the operating mode is the return mode will be described. In this case, since there is no 2-way 1-hot constraint, the candidate designator 14 uses information on the group variables to select indices representing the state variables whose values are to be inverted, in order from 1 to N. Then, for each selection, the candidate designator 14 notifies the optimization unit 20 of the index determined to be a candidate for inverting the value of the state variable.
[0090] Thereafter, when the candidate determination unit 14 receives an instruction to select the next state variable x from the update control unit 16, it again selects an index from 1 to N in order according to the operation mode, and notifies the optimization unit 20 whether or not each state variable is to be a candidate for bit inversion.
[0091] The update control unit 16 receives a notification of the completion of updating the state variables from the optimization unit 20. At this time, the update control unit 16 also receives input of the values of each state variable from the optimization unit 20. Then, the update control unit 16 sequentially accumulates information on the values of the state variables after the update, and determines whether or not the system has fallen into a local solution using the most recent information.
[0092] If the system is trapped in a local solution, the update control unit 16 instructs the forced transition unit 18 to execute a forced transition process to escape from the local solution. Furthermore, the update control unit 16 notifies the candidate determination unit 14, the weight matrix switching unit 19, and the optimization unit 20 of a change in the operation mode from the optimization mode to the return mode.
[0093] After transitioning to the return mode, when the update control unit 16 receives a notification from the optimization unit 20 that the state variables have been updated, the update control unit 16 also acquires the values of each state variable from the optimization unit 20. Then, the update control unit 16 determines whether the values of the state variables satisfy the 2-way 1-hot constraint. If the state does not satisfy the 2-way 1-hot constraint, the update control unit 16 continues operation in the return mode and repeats state transitions to restore a state that satisfies the 2-way 1-hot constraint. On the other hand, if the state satisfies the 2-way 1-hot constraint, the update control unit 16 determines to restore to the optimization mode. Then, the update control unit 16 notifies the candidate determination unit 14, the weight matrix switching unit 19, and the optimization unit 20 of the change from the return mode to the optimization mode.
[0094] On the other hand, if the solution is not trapped in a local solution, the update control unit 16 determines whether the state variables have been selected a prescribed number of times with the same temperature setting. If the state variables have not been selected a prescribed number of times with the same temperature setting, the update control unit 16 instructs the candidate determination unit 14 to select the next state variable x.
[0095] On the other hand, when the selection of state variables at the same temperature setting has been completed a prescribed number of times, the update control unit 16 determines whether the temperature has been lowered a predetermined number of times. If the number of times the temperature has been lowered has not reached the predetermined number, the update control unit 16 instructs the temperature management unit 15 to lower the temperature and instructs the candidate designation unit 14 to select the next state variable x.
[0096] On the other hand, if the number of times the temperature has been lowered reaches a predetermined number, the update control unit 16 determines to end the optimization process. Then, the update control unit 16 updates each state variable (x1 to x2) stored in the storage unit 260 of the update unit 26 of the optimization unit 20. N ) represents N=n 2 The update control unit 16 then acquires the value of each of the acquired state variables (x1 to x N ) represents N=n 2The update control unit 16 then deletes the bit value of the state variable that represents the redundant location from the values of these bits. The update control unit 16 then outputs information indicating the optimized route that travels around the actual locations 102 to the notification unit 17.
[0097] In this embodiment, the update control unit 16 determines to execute the forced transition process when the process falls into a local solution, but the occasion for executing the forced transition process is not limited to this. For example, the update control unit 16 may determine to execute the forced transition process when a predetermined number of iterations, such as once in 100 or once in 10,000, is completed. In addition, the update control unit 16 determines to execute the forced transition process when the selection circuit 25 selects x1 to x N Alternatively, the update control unit 16 may determine to execute the forced transition process when a state in which the change in energy is small continues for a predetermined number of times.
[0098] The notification unit 17 receives an input of information indicating an optimized route for traveling around the actual locations 102 from the update control unit 16. Then, the notification unit 17 finds an optimal route from the acquired information indicating the optimized route for traveling around the actual locations 102, and notifies the user of the found optimal route by transmitting it to a terminal device (not shown) used by the user.
[0099] When the search reaches a local solution, the forced transition unit 18 receives an instruction from the update control unit 16 to execute a forced transition process to escape from the local solution. Here, the case where the search reaches a local solution is an example of "when the search reaches a specific state." The forced transition unit 18 then selects row groups and column groups to which values are to be forcedly transitioned according to a predetermined algorithm. For example, the forced transition unit 18 selects row groups and column groups including information indicating a tour of the locations where different routes are close to each other or overlap on the route that visits each location. In the case of FIG. 7 , the forced transition unit 18 selects row groups and column groups including information indicating a tour of the locations in the areas 121 and 122, regarding the areas 121 and 122 as a place where different routes are close to each other or overlap.
[0100] Thereafter, the forced transition unit 18 forcibly transitions the values of the state variables that are 1 among the state variables included in the selected row group and column group to 0. As a result, the state variables transition to a state that is significantly different from their current state, and become in a state that violates the 2-way 1-hot constraint.
[0101] Here, the forced transition unit 18 in this embodiment selects row groups and column groups to which the state variable values are to be forcibly transitioned using a predetermined algorithm. However, the selection method is not limited to this. For example, the forced transition unit 18 may randomly select row groups and column groups to which the state variable values are to be forcibly transitioned. Furthermore, the forced transition unit 18 may receive designation of row groups and column groups to which the state variable values are to be forcibly transitioned from an administrator terminal (not shown). It may also be preferable to determine row groups and column groups to which the state variable values are to be forcibly transitioned depending on the optimization stage. In this case, the forced transition unit 18 may obtain the state variables at that time from the update unit 26 of the optimization unit 20, output them to an external device, and have the external device analyze the state variables to calculate which bits are appropriate to change, and make a selection based on the calculation results. The forced transition unit 18 is an example of a "transition unit."
[0102] The weighting matrix switching unit 19 receives a notification from the update control unit 16 that the operation mode has been changed from the optimization mode to the return mode. Then, the weighting matrix switching unit 19 transmits a signal indicating that the operation of the optimization device 1 is in the return mode to the storage unit 21 and the local field generation unit 22 of the optimization unit 20. As a result, the penalty coefficient p is output from each storage element 210 of the storage unit 21 that holds the penalty coefficient p. That is, the return matrix 32 in FIG. 3 is used to calculate the local field. Furthermore, each local field generation circuit 220 of the local field generation unit 22 recalculates a local field value representing the local field.
[0103] Thereafter, when the state variables reach a state where the 2-way 1-hot constraint is satisfied, the weighting matrix switching unit 19 receives a notification from the update control unit 16 that the operation mode has been changed from the return mode to the optimization mode. Then, the weighting matrix switching unit 19 transmits a signal indicating that the operation of the optimization device 1 is in the optimization mode to the storage unit 21 of the optimization unit 20. As a result, the storage element 210 that holds the penalty coefficient p in each storage element 210 of the storage unit 21 returns to a state where it outputs 0. In other words, the optimization matrix 31 returns to a state where it is used for calculating the local field.
[0104] Fig. 9 is a flowchart of the optimization process by the optimization device according to the embodiment. Next, the flow of the optimization process by the optimization device 1 according to the embodiment will be described with reference to Fig. 7. This optimization process is realized by an information processing program executed in the optimization device 1.
[0105] The initialization execution unit 13 receives input of the conditions of the vehicle dispatching problem. Then, the initialization execution unit 13 outputs the acquired conditions of the vehicle dispatching problem to the upper limit calculation unit 11. The upper limit calculation unit 11 arranges the bases 102 to be delivery destinations in order of smallest demand amount. Next, the upper limit calculation unit 11 selects the bases 102 arranged in order of smallest demand amount from the top, and calculates the maximum number of bases for each route using the accumulated demand amount up to the selected base 102 and the vehicle loading upper limit value. The objective function generation unit 12 sets redundant bases using the maximum number of bases and generates a matrix indicating the routes and delivery orders included in the expanded bases including the redundant bases and the actual bases 102. Then, the objective function generation unit 12 provides bits representing each element of the generated matrix and generates an objective function using these bits. The initialization execution unit 13 acquires the matrix and objective function generated by the objective function generation unit 12. Next, the initialization execution unit 13 executes the following group index setting and initialization process (step S1).
[0106] Specifically, the initialization execution unit 13 assigns a row group number indicating each row to each element of each row of the acquired matrix, and assigns a column group number indicating each column to each element of each column.The initialization execution unit 13 then associates an index indicating each element with the row group number and column group number.Furthermore, the initialization execution unit 13 sets information indicating whether each index belongs to a redundant variable group depending on whether it indicates delivery to a redundant base.
[0107] The initialization execution unit 13 also allocates memory elements 210 in the memory unit 21 of the optimization unit 20 corresponding to each element of the matrix, and stores the weight values for each bit obtained from the objective function. Furthermore, the initialization execution unit 13 sets the initial value of each bit so as to satisfy 2-way 1-hot, and notifies the optimization unit 20. As a result, the optimization unit 20 determines whether the local field generation unit 22 generates the local fields h1 to h2. N is calculated and stored, and the initial value of each bit is stored in the storage unit 260 of the update unit 26.
[0108] The temperature management unit 15 receives an instruction to set a temperature from the initialization execution unit 13. If the temperature has not yet been set, the temperature management unit 15 notifies the optimization unit 20 of a high initial temperature and sets the initial temperature. If the temperature has already been set, the temperature management unit 15 lowers the temperature from the set temperature that was set at that time in accordance with a pre-specified temperature schedule. The temperature management unit 15 then notifies the optimization unit 20 of the new lower set temperature and sets the temperature (step S2).
[0109] The control unit 10 and the optimization unit 20 execute the optimization process according to the 2-way 1-hot constraint (step S3).
[0110] Thereafter, when the optimization unit 20 completes updating the state variables and local fields, the update control unit 16 of the control unit 10 determines whether or not a local solution has been reached based on the values of the updated state variables (step S4).
[0111] If the solution has fallen into a local solution (step S4: Yes), the update control unit 16 instructs the forced transition unit 18 to execute a forced transition process to escape from the local solution. The forced transition unit 18 selects row groups and column groups whose values are to be forcedly transitioned according to a predetermined algorithm. Then, the forced transition unit 18 transitions the values of state variables having a value of 1 in the selected row groups and column groups to 0 (step S5).
[0112] The update control unit 16 also notifies the storage unit 21 and the local field generation unit 22 of the change of the operation mode to the return mode. Then, a signal indicating the return mode is input to the selection circuit 214 of the storage element 210 of the storage unit 21. The selection circuit 214 determines whether the input weight value is a penalty coefficient p using the flag 213, and if the weight value is the penalty coefficient p, outputs a weight value representing the input penalty coefficient p. At this time, if the weight value is a cost, the selection circuit 214 also outputs a weight value representing the cost. As a result, the storage unit 21 changes the weight matrix to be used to the return matrix 32 (step S6).
[0113] The local field generating unit 22 receives notification of the change of the operation mode to the return mode from the update control unit 16, and causes each local field generating circuit 220 to recalculate the local field after the values of some state variables have been forcibly transitioned from 1 to 0 (step S7).
[0114] Then, the control unit 10 and the optimization unit 20 execute an optimization process to return to a state that satisfies the 2-way 1-hot constraint (step S8).
[0115] After that, when the update of the state variables and local fields in the optimization unit 20 is completed, the update control unit 16 of the control unit 10 determines whether the state has returned to satisfy the 2-way 1-hot constraint based on the values of each updated state variable (step S9).
[0116] If the state variables have not returned to a state that satisfies the 2-way 1-hot constraint (step S9: No), the optimization process repeats step S8.
[0117] On the other hand, if the state variables have returned to a state that satisfies the 2-way 1-hot constraint (step S9: Yes), the update control unit 16 notifies the storage unit 21 of the restoration of the operation mode to the optimization mode. Then, a signal indicating the optimization mode is input to the selection circuit 214 of the storage element 210 of the storage unit 21. The selection circuit 214 determines whether the input weight value is the penalty coefficient p using the flag 213, and if the weight value is the penalty coefficient p, outputs 0 as the weight value. At this time, if the weight value is a cost, the selection circuit 214 outputs a weight value representing the cost. As a result, the storage unit 21 returns the weight matrix to be used to the optimization matrix 31 (step S10). Thereafter, the optimization process returns to step S3.
[0118] On the other hand, if the optimization does not fall into a local solution (step S4: No), the update control unit 16 determines whether the update of the state variables has been completed a specified number of times (step S11). If the update of the state variables has not reached the specified number of times (step S11: No), the optimization process returns to step S3.
[0119] On the other hand, if the state variables have been updated the specified number of times (step S11: Yes), the update control unit 16 determines whether the temperature has been lowered the specified number of times (step S12).
[0120] If the temperature has not been lowered the specified number of times (step S12: No), the optimization process returns to step S2. On the other hand, if the temperature has been lowered the specified number of times (step S12: Yes), the optimization device 1 ends the optimization process.
[0121] Fig. 10 is a flowchart of the optimization process according to the 2-way 1-hot constraint. Next, the flow of the optimization process according to the 2-way 1-hot constraint will be described with reference to Fig. 10. Each process shown in Fig. 10 is an example of the process executed in step S3 in Fig. 9.
[0122] The candidate determination unit 14 acquires information on group variables associated with the index representing each state variable from the initialization execution unit 13. Next, the candidate determination unit 14 selects x, one of the elements of the matrix shown in FIG. 1, as the index representing the state variable to be inverted. j Next, the candidate determination unit 14 selects an index j corresponding to the state variable x of the matrix shown in FIG. 1 as an index indicating the other three bits determined by the 2-way 1-hot constraint according to the selected index j. i ,x k ,x g The candidate designator 14 identifies the indices i, k, and g corresponding to the candidate j (step S101). The candidate designator 14 selects the indices from 1 to N in order as the index j.
[0123] The candidate designator 14 notifies the optimizer 20 of the indices i, j, k, and g. The optimizer 20 then updates the x j Then, the optimization unit 20 reads out the value of x j The energy change calculation unit 23 is notified whether the transition of the value of j is from 0 to 1 or from 1 to 0. The energy change calculation unit 23 calculates the local field h j Then, i, k, and g corresponding to j are identified, and h i ,h k ,h g h from each of the local field generating circuits 220 that hold i ,h k ,h g is read out (step S102).
[0124] Next, the energy change calculation unit 23 calculates the energy change amount ΔE (ΔE1, ΔE2, . . . , ΔE N ) is calculated (step S103). After that, the energy change calculation unit 23 outputs information on the calculated amount of energy change.
[0125] If all of the energy change amounts output from the energy change calculation unit 23 are positive, the offset adding unit 24 adds an offset to each of the energy change amounts (step S104).
[0126] The selection circuit 25 acquires information on each amount of energy change output from the energy change calculation unit 23. Then, the selection circuit 25 sets an updateable flag to an index indicating a state variable that can accept a value inversion when compared with the set temperature acquired from the temperature management unit 15 of the control unit 10. Thereafter, the selection circuit 25 selects one index q from the indexes to which the updateable flag has been added (step S105).
[0127] The optimization unit 20 acquires information on the group variables assigned to each index from the control unit 10. Then, the optimization unit 20 selects the state variable x indicated by the index q selected by the selection circuit 25. q The state variable x whose value is inverted and satisfies the 2-way 1-hot constraint corresponds to the inversion of the value of p ,x r ,x s Then, the optimization unit 20 identifies group variables that represent the indexes p, r, and s (step S106).
[0128] Information on p, q, r, and s, which are indices indicating the state variables whose values are to be updated, is input to the storage unit 21, and weight values corresponding to the indices are output to each local field generation circuit 220 of the local field generation unit 22. Each local field generation circuit 220 receives the input of the weight values corresponding to the updates of p, q, r, and s, and updates the local field that it holds (step S107).
[0129] Furthermore, the storage unit 21 updates the weight values stored in the storage elements 210 corresponding to the indexes p, q, r, and s (step S108).
[0130] The update unit 26 receives information of p, q, r, and s, which are indices indicating the state variables whose values are to be updated, and updates x, which is a state variable indicated by the index acquired from the state variables held by the storage unit 260. p ,x q ,x r ,x s Then, the update unit 26 identifies the identified state variable xp ,x q ,x r ,x s The value of is inverted and updated (step S109).
[0131] Thereafter, the update unit 26 writes all updated state variables into the storage unit 260. Furthermore, each local field generating circuit 220 writes the updated local field into the register that holds it (step S110).
[0132] Fig. 11 is a flowchart of the optimization process for returning to a state that satisfies the 2-way 1-hot constraint. Next, the flow of the optimization process for returning to a state that satisfies the 2-way 1-hot constraint will be described with reference to Fig. 11. Each process shown in Fig. 11 is an example of the process executed in step S8 in Fig. 9.
[0133] The candidate determination unit 14 acquires information on group variables associated with the index representing each state variable from the initialization execution unit 13. Next, the candidate determination unit 14 selects x, one of the elements of the matrix shown in FIG. 1, as the index representing the state variable to be inverted. j The candidate designator 14 selects the index j in order from index 1 to index N (step S201).
[0134] The candidate designator 14 notifies the optimizer 20 of the index j. The optimizer 20 then updates the x stored in the storage unit 260 of the updater 26. j Then, the optimization unit 20 reads out the value of x j The energy change calculation unit 23 is notified whether the transition of the value of j is from 0 to 1 or from 1 to 0. The energy change calculation unit 23 calculates the local field h j Next, the energy change calculation unit 23 calculates the energy change amount ΔE (ΔE1, ΔE2, . . . , ΔE N ) is calculated (step S202). After that, the energy change calculation unit 23 outputs information on the calculated amount of energy change.
[0135] If all of the energy change amounts output from the energy change calculation unit 23 are positive, the offset adding unit 24 adds an offset to each energy change amount (step S203).
[0136] The selection circuit 25 acquires information on each amount of energy change output from the energy change calculation unit 23. Then, the selection circuit 25 sets an updateable flag to an index indicating a state variable that can accept a value inversion compared with the set temperature acquired from the temperature management unit 15 of the control unit 10. Thereafter, the selection circuit 25 selects one index q from the indexes to which the updateable flag has been added as an index to be updated (step S204).
[0137] Information on an index q indicating a state variable whose value is to be updated is input to the storage unit 21, and a weight value corresponding to the index is output to each local field generation circuit 220 of the local field generation unit 22. Each local field generation circuit 220 receives the input of the weight value corresponding to the update of the index q and updates the local field that it holds (step S205).
[0138] Furthermore, the storage unit 21 updates the weight value stored in the storage element 210 corresponding to the index q (step S206).
[0139] The update unit 26 receives information on an index q indicating a state variable whose value is to be updated, and updates x, which is a state variable indicated by the index acquired from the state variables held by the storage unit 260. q Then, the update unit 26 identifies the identified state variable x q The value of is inverted and updated (step S207).
[0140] Thereafter, the update unit 26 writes all the updated state variables into the storage unit 260. Furthermore, each local field generating circuit 220 writes the updated local field into the register that holds it (step S208).
[0141] As described above, when solving an optimization problem with a 2-way 1-hot constraint, if the optimization device according to this embodiment reaches a predetermined state, such as a local solution, it forcibly transitions the values of some state variables from 1 to 0. Then, it switches the weighting matrix to a matrix using a penalty coefficient, performs optimization processing, and returns to a state that satisfies the 2-way 1-hot constraint. This makes it possible to easily escape from a situation where the optimization problem has fallen into a direct optimal solution, and easily obtain an optimal solution. [Explanation of symbols]
[0142] 1 Optimization device 10 Control Unit 11 Upper limit calculation section 12 Objective function generator 13 Initialization execution unit 14 Candidate Decision Department 15 Temperature control section 16 Update control section 17 Notification Department 18 Forced transition section 19 Weight matrix switching unit 20 Optimization Section 21 Memory section 22 Local field generator 23 Energy change calculation section 24 Offset addition section 25 Selection circuit 26 Update section 210 Memory element 220 Local Field Generator 230 Energy change calculation circuit 260 Storage section
Claims
1. a search unit that searches for a solution to a problem given constraints including a two-way one-hot constraint by using a first matrix based on an objective function as a weight matrix; a transition unit that changes a value of a part of the solution that is a search result of the search unit when the search by the search unit reaches a specific state; a weight matrix switching unit that, when the transition unit changes the values of the part of the plurality of variables included in the solution, causes the search unit to perform a search using a return matrix generated by using a penalty coefficient on the weight matrix as the weight matrix, and when the search result by the search unit reaches a state that satisfies the 2-way 1-hot constraint, returns the weight matrix to the first matrix and causes the search unit to perform a search; An information processing device comprising:
2. the search unit satisfies the 2-way 1-hot constraint by assigning a predetermined number of state variables to a predetermined number of components included in each of the two groups without allowing overlap; The transition unit cancels the assignment of some of the state variables to the components by changing values of some of the solutions.
2. The information processing apparatus according to claim 1, wherein:
3. 3. The information processing apparatus according to claim 1, wherein the transition unit transitions a part of the solution to another value when the search by the search unit falls into a local solution.
4. The information processing device described in any one of claims 1 to 3, further comprising a candidate determination unit that, when causing the search unit to perform a search using the first matrix, selects four variables to be changed from the variables of the objective function so as to satisfy the two-way one-hot constraint, and causes the search unit to perform a search, and when causing the search unit to perform a search using the return matrix, selects one variable to be changed from the variables of the objective function, and causes the search unit to perform a search.
5. 5. The information processing apparatus according to claim 1, wherein the search unit recalculates the local field when the transition unit changes a value of part of the solution.
6. In the first matrix, values used in an objective function are assigned to a plurality of first elements, and 0 is assigned to second elements other than the first elements; the return matrix is given the same value as the first matrix to the first element, and the value of the penalty coefficient to the second element, The search unit has a storage element for storing each element of the return matrix, and when using the return matrix, reads the value of the penalty coefficient from the storage element in which the value of the second element is stored, and when using the first matrix, reads 0 from the storage element in which the value of the second element is stored.
2. The information processing apparatus according to claim 1, wherein:
7. searching for a solution to a problem given constraints including a two-way one-hot constraint using a first matrix based on an objective function as a weight matrix; When the search reaches a specific state, a part of the value of the solution that is the search result is changed; When a part of the values of the solution is changed, a return matrix generated by applying a penalty coefficient to the weight matrix is used as the weight matrix to search for the solution; When the search result reaches a state where the two-way one-hot constraint is satisfied, the weight matrix is returned to the first matrix and the solution search is performed. An information processing method characterized by causing a computer to execute processing.
8. searching for a solution to a problem given constraints including a two-way one-hot constraint using a first matrix based on an objective function as a weight matrix; When the search reaches a specific state, a part of the value of the solution that is the search result is changed; When a part of the values of the solution is changed, a return matrix generated by applying a penalty coefficient to the weight matrix is used as the weight matrix to search for the solution; When the search result reaches a state where the two-way one-hot constraint is satisfied, the weight matrix is returned to the first matrix and the solution search is performed. An information processing program that causes a computer to execute a process.
Citation Information
Patent Citations
Device and method for data processing
JP1990210574A
Optimization device and control method for optimization device
JP2019121137A
Optimization device, control method of optimization device, and control program of optimization device
JP2020205049A
Combination optimization device, combination optimization method, and combination optimization program
JP2021033657A
Optimization apparatus, optimization program, and optimization method
JP2021043787A