Program, data processing device, and data processing method
The data processing device allows users to define their own objective functions and neighborhood states, creating a tailored optimization system for their specific problems, overcoming limitations of conventional systems in handling complex functions and reducing the need for new system construction.
Patent Information
- Application Number
- JP2023116455
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-18
- Publication Date
- 2025-01-30
Smart Images

Figure 2025014165000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to a program, a data processing device, and a data processing method. [Background technology]
[0002] Various problems in the real world (hereafter referred to as real problems) can be expressed as combinatorial optimization problems. When solving a combinatorial optimization problem, the problem is converted into a format determined by the optimization system being used. This conversion is called formulation. For example, in the case of an optimization system that uses an Ising machine, a combinatorial optimization problem may be formulated into an objective function in the QUBO (Quadratic Unconstrained Binary Optimization) format. The user causes the optimization system to perform a solution search, applies the obtained solution search results to the real problem, and checks whether an appropriate solution has been obtained.
[0003] Conventionally, coefficients included in an objective function have sometimes been specified by a user depending on the combinatorial optimization problem to be calculated (see, for example, Patent Documents 1 to 4). [Prior art documents] [Patent documents]
[0004] [Patent Document 1] JP 2021-131611 A [Patent Document 2] JP 2016-103282 A [Patent Document 3] US Patent Application Publication No. 2018 / 0365586 [Patent Document 4] US Patent Application Publication No. 2019 / 0102353 Summary of the Invention [Problem to be solved by the invention]
[0005] In conventional technology, objective functions can only be defined within a range determined by the optimization system. For example, an optimization system using an Ising machine that targets quadratic objective functions cannot directly handle objective functions with cubic or quartic terms. In addition, it is not possible to add a solution method specialized for the problem that the user wants to solve to the optimization system.
[0006] In such cases, users may build their own original optimization system from scratch, but this requires a lot of man-hours, making it difficult for users to search for a solution using an optimization system that is suitable for the problem they want to solve.
[0007] In one aspect, the present invention aims to provide a program, a data processing device, and a data processing method that are capable of searching for a solution using an optimization system suited to a problem that a user wishes to solve. [Means for solving the problem]
[0008] In one embodiment, a program is provided that causes a computer to execute a process of accepting input of user-defined information including function definition information that defines an objective function of a combinatorial optimization problem and neighborhood definition information that defines one or more neighborhood states when a solution to the combinatorial optimization problem is searched for by local search, generating an optimization system that represents a process that is independent of the definitions of the objective function and the one or more neighborhood states and searches for a solution to the combinatorial optimization problem by the local search based on base information stored in a memory and the user-defined information, accepting input of values of coefficients included in the objective function, and executing the optimization system to calculate an amount of change in the value of the objective function when a state represented by values of multiple state variables included in the objective function transitions to the one or more neighborhood states based on the function definition information, the neighborhood definition information, and the values of the coefficients, selecting a first neighborhood state from the one or more neighborhood states based on the amount of change, and updating the values of the multiple state variables to the values of the first neighborhood state.
[0009] Also provided in one embodiment is a data processing apparatus. Also provided in one embodiment is a method for processing data. Effect of the Invention
[0010] In one aspect, the present invention enables a solution search to be performed by an optimization system suited to the problem that a user wishes to solve. [Brief description of the drawings]
[0011] [Figure 1] FIG. 1 illustrates an example of a data processing device according to a first embodiment; [Diagram 2] FIG. 11 is a block diagram illustrating an example of hardware of a data processing device according to a second embodiment. [Diagram 3] FIG. 2 is a block diagram showing an example of functions of a data processing device. [Figure 4] FIG. 13 is a diagram illustrating an example of implementation of a process definition of an initial solution generating unit. [Diagram 5] FIG. 13 is a diagram illustrating an implementation example of a process definition of a starting solution generating unit. [Figure 6] FIG. 13 illustrates an example of a local search unit. [Figure 7] 11 is a flowchart showing a flow of an example of a processing procedure when the optimization system is executed. [Figure 8] 13 is a flowchart illustrating an example of a procedure for a local search process. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] Hereinafter, an embodiment of the invention will be described with reference to the drawings. (First embodiment) 1 is a diagram illustrating an example of a data processing device according to a first embodiment. The data processing device 10 according to the first embodiment may be a client device or a server device. The data processing device 10 may be called a computer.
[0013] The data processing device 10 of the first embodiment includes a storage unit 11 and a processing unit 12. The storage unit 11 is a volatile storage device (for example, an electronic circuit such as a dynamic random access memory (DRAM)) or a non-volatile storage device (for example, an electronic circuit such as a flash memory, a hard disk drive (HDD), etc.). The storage unit 11 may include an electronic circuit such as a register.
[0014] The storage unit 11 stores user-defined information 11a, base information 11b, and coefficient data 11c, which will be described later. The storage unit 11 may also store calculation conditions for a solution search. The processing unit 12 can be realized by a processor, which is hardware such as a central processing unit (CPU), a graphics processing unit (GPU), or a digital signal processor (DSP). The processor executes a program stored in a memory (which may be the storage unit 11) such as a random access memory (RAM). A collection of processors may be called a multiprocessor or simply a "processor." The processing unit 12 may also be realized by using an electronic circuit such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
[0015] The processing unit 12 performs the following steps S1 to S5. Step S1: The processing unit 12 receives input of the user-defined information 11a. The user-defined information 11a includes function definition information and neighborhood definition information.
[0016] Function definition information is information that defines the objective function (F(x)) of a combinatorial optimization problem. With function definition information, objective functions for various combinatorial optimization problems such as linear programming problems and quadratic programming problems can be defined. For example, in addition to the quadratic objective functions targeted by Ising machines, cubic or higher objective functions and complex objective functions can also be directly defined.
[0017] In the function definition information, the definition of F(x) itself is expressed in a program format such as a function. For example, a fourth-order objective function F(x)=A0x0x1x2x3+B0x0x1x2+B1x1x2x3+B2x2x3x0+C0x0x1+C1x2x3+D0x2 can be defined in the function definition information. x0 to x3 are called state variables. A combination of the values of x0 to x3 is called a state. A certain state represents a certain solution. For example, the solution that minimizes the value of F(x) is the optimal solution. By inverting the sign of each term of F(x) from + to -, the solution that maximizes the value of F(x) can also be considered as the optimal solution.
[0018] Neighborhood definition information is information that defines one or more neighborhood states when a solution to a combinatorial optimization problem is searched for by local search. The neighborhood definition information defines what kind of solution is to be a neighborhood state for a certain solution (state). For example, when the state variables included in the objective function are binary variables of 0 or 1, the neighborhood state can be defined as one in which the value of any one of all state variables changes from 0 to 1 or from 1 to 0. When the state variables included in the objective function are integer variables, the user can freely define the neighborhood state as, for example, eight patterns of ±(1, 2, 4, 8) per integer variable.
[0019] Furthermore, the user-defined information 11a may include information indicating a process definition such as a process for generating an initial solution (see FIG. 4, which will be described later). The above-mentioned user-defined information 11a is input to the data processing device 10 by, for example, a user operating an input device (not shown). When the data processing device 10 is a server device, the user-defined information 11a is transferred from a client device to the data processing device 10 via a network and input thereto. The input user-defined information 11a is stored in the storage unit 11.
[0020] Step S2: The processing unit 12 generates an optimization system that searches for a solution to a combinatorial optimization problem by local search, based on the user-defined information 11a and the base information 11b. The base information 11b is information that represents a process that does not depend on the definition of the objective function and the neighborhood state. The base information 11b can also be said to be information that represents a part that corresponds to a basic algorithm in the solution search process.
[0021] An example of the process that does not depend on the definition of the objective function and the neighborhood state is an interactive interface process with the program that performs the processes of steps S1 to S5. Also, an example of the process that does not depend on the definition of the objective function and the neighborhood state is a process that manages the solution during the search, or a process related to the solution search that is performed while appropriately calling a part that performs the process based on the user-defined information 11a (hereinafter referred to as the user-defined part).
[0022] For example, the processing unit 12 compiles the user-defined information 11a and the base information 11b written in a program format to generate an optimization program file in a format executable by a computer. In this case, an optimization program including a user-defined part and a part (hereinafter referred to as a base part) that performs processing based on the base information 11b is generated (constructed) as an optimization system. Note that in the data processing device 10, a configuration including a hardware part that performs processing of the user-defined part and a hardware part that performs processing of the base part based on the optimization program can also be called an optimization system.
[0023] Furthermore, the processing unit 12 may program an FPGA included in the processing unit 12 based on the user-defined information 11a and the base information 11b to construct an optimization system including a user-defined portion and a base portion.
[0024] 1 shows a schematic diagram of the generated optimization system 15. The optimization system 15 includes user-defined parts 15a1 and 15a2 that perform processing based on input user-defined information 11a, and a base part 15b that performs processing based on base information 11b.
[0025] Step S3: The processing unit 12 accepts input of coefficient values included in the objective function. When the objective function is F(x)=A0x0x1x2x3+B0x0x1x2+B1x1x2x3+B2x2x3x0+C0x0x1+C1x2x3+D0x2, A0, B0 to B2, C0, C1, and D0 are coefficients. The input coefficient values are hereinafter referred to as coefficient data 11c. The coefficient data 11c is input to the data processing device 10, for example, by a user operating an input device (not shown). When the data processing device 10 is a server device, the coefficient data 11c is transferred from a client device to the data processing device 10 via a network and input. The coefficient data 11c is stored in the storage unit 11.
[0026] Step S4: The processing unit 12 executes the optimization system. For example, the optimization system is executed by executing the optimization program generated as described above. Alternatively, the optimization system is executed by starting processing of the FPGA in which the optimization system is built as described above. Note that the optimization system may be executed when the processing unit 12 receives an execution instruction from a user.
[0027] By executing the optimization system, the following processes are carried out: Step S4a: The processing unit 12 calculates ΔE based on the function definition information, the neighborhood definition information, and the coefficient data 11c. ΔE is the amount of change in the value of the objective function (hereinafter, sometimes referred to as an evaluation value) when a state represented by the values of multiple state variables included in the objective function transitions to one or more neighborhood states. The one or more neighborhood states are listed based on the neighborhood definition information included in the user-defined information 11a.
[0028] Step S4b: The processing unit 12 selects a first neighboring state to which a transition is permitted from among one or more neighboring states based on ΔE of each of the one or more neighboring states. The processing unit 12 performs the above selection according to a selection method such as a greedy method, a simulated annealing (SA) method, or a Tabu search method.
[0029] For example, in the greedy method, among one or more neighboring states, the neighboring state with the smallest ΔE (positive or negative value) is selected as the first neighboring state. In the SA method, based on the comparison result between ΔE and a predetermined value, it is determined whether to permit a transition to the neighboring state that causes the ΔE. The predetermined value is, for example, a noise value obtained based on a random number and the value of a temperature parameter. For example, log(rand)×T, which is an example of a noise value obtained based on a uniform random number (rand, 0 < rand < 1) and a temperature parameter (T), can be used as the predetermined value. In this case, even if ΔE is a positive value, the transition may be permitted. When there are a plurality of neighboring states for which the transition is permitted, the processing unit 12 may select one of them as the first neighboring state according to a predetermined rule.
[0030] The selection method to be applied can be specified by the user. The selection method to be applied may be included in the user-defined information 11a. Step S4c: The processing unit 12 updates the values of the current plurality of state variables to the values of the first neighboring state. The processing in step S4c is also processing according to the function definition information and the neighborhood information included in the user-defined information 11a, similar to step S4a.
[0031] Step S4d: The processing unit 12 calculates the evaluation value of the updated solution (the first neighboring state). If the calculated evaluation value is smaller than the minimum value of the evaluation values obtained so far, it is held as the updated minimum solution (= local solution).
[0032] Among the above steps S4a to S4d, for example, the parts that perform the processing of steps S4a and S4c are the user-defined parts in the optimization system, and the other parts are the base parts.
[0033] The above-described processes of steps S4a to S4d are repeated until a predetermined end condition is satisfied. When the SA method is applied, for example, each time the process of step S4b is repeated a predetermined number of times, the processing unit 12 decreases the value of the above-mentioned temperature parameter (T) in accordance with a predetermined temperature parameter change schedule.
[0034] Step S5: The processing unit 12 outputs the search results for solutions obtained by executing the optimization system. For example, the processing unit 12 outputs the minimum solution obtained so far and its evaluation value. The processing unit 12 may display the search results on a display device (not shown), or may transmit the search results to another information processing device (for example, a client device) via a network.
[0035] The processing unit 12 may store the minimum solution in a solution pool and generate a starting solution when the local search is performed again using the solutions stored in the solution pool. Such processing will be described in the second embodiment.
[0036] As described above, the data processing device 10 of the first embodiment accepts the input of the user-defined information 11a. The user-defined information 11a includes function definition information that defines an objective function of a combinatorial optimization problem, and neighborhood definition information that defines one or more neighborhood states when a solution to the combinatorial optimization problem is searched for by a local search. The data processing device 10 generates an optimization system that searches for a solution to the combinatorial optimization problem by a local search, based on the base information 11b that represents a process that does not depend on the definition of the objective function and the neighborhood state and is stored in advance in the storage unit 11, and the user-defined information 11a. The data processing device 10 accepts the input of the value of the coefficient included in the objective function, and executes the optimization system to calculate ΔE associated with the transition to each neighborhood state based on the function definition information, the neighborhood definition information, and the value of the coefficient. Then, a first neighborhood state to which the transition is permitted is selected based on ΔE, and the values of the multiple state variables are updated to the values of the first neighborhood state.
[0037] According to such a data processing device 10, it is possible to use an objective function and a definition of a neighborhood state suitable for the problem that the user wants to solve, and therefore it is possible to search for a solution using an optimization system suitable for the problem that the user wants to solve.
[0038] For example, a conventional optimization system using an Ising machine for a quadratic objective function cannot directly handle an objective function having a cubic or quartic term. Therefore, an objective function having a cubic or quartic term may be converted into a quadratic form that an Ising machine can handle. In that case, however, the number of state variables included in the objective function increases after conversion, making it difficult to obtain an optimal solution or a good solution close to the optimal solution within a desired time. As described above, according to the data processing device 10 of the first embodiment, it is possible to use the definition of the objective function and the neighboring state suitable for the problem that the user wants to solve, so that the number of state variables does not increase due to the conversion of the objective function. As a result, it is expected that a good solution can be obtained for a problem with a complex objective function that is difficult to solve with a conventional optimization system.
[0039] Furthermore, since the user does not need to create the base information 11b, an optimization system that searches for a solution to a combinatorial optimization problem expressed by an arbitrary objective function can be constructed with a minimum of description.
[0040] (Second embodiment) Next, a second embodiment will be described. The data processing device 20 of the second embodiment may be a client device or a server device, and may be called a computer.
[0041] FIG. 2 is a block diagram illustrating an example of hardware of a data processing device according to the second embodiment. The data processing device 20 is, for example, a computer, and includes a processor 21, a RAM 22, a HDD 23, a GPU 24, an input interface 25, a media reader 26, and a communication interface 27. The above units are connected to a bus.
[0042] The processor 21 is a processor such as a GPU or a CPU that includes an arithmetic circuit that executes program instructions. The processor 21 loads at least a part of the program and data stored in the HDD 23 into the RAM 22 and executes the program. The processor 21 may include multiple processor cores. The data processing device 20 may include multiple processors. A set of multiple processors (multiprocessor) may be called a "processor."
[0043] The RAM 22 is a volatile semiconductor memory that temporarily stores programs executed by the processor 21 and data used in calculations by the processor 21. Note that the data processing device 20 may include a type of memory other than the RAM 22, or may include multiple memories.
[0044] The HDD 23 is a non-volatile storage device that stores software programs such as an OS (Operating System), middleware, and application software, as well as data. The programs include, for example, a program that causes the data processing device 20 to execute a process of generating an optimization system and searching for a solution to a combinatorial optimization problem. The data processing device 20 may be provided with other types of storage devices such as a flash memory or an SSD (Solid State Drive), or may be provided with multiple non-volatile storage devices.
[0045] The GPU 24 outputs an image to a display 24a connected to the data processing device 20 in accordance with an instruction from the processor 21. As the display 24a, a CRT (Cathode Ray Tube) display, a liquid crystal display (LCD: Liquid Crystal Display), a plasma display (PDP: Plasma Display Panel), an organic EL (OEL: Organic Electro-Luminescence) display, or the like can be used.
[0046] The input interface 25 acquires an input signal from an input device 25a connected to the data processing device 20 and outputs the signal to the processor 21. As the input device 25a, a pointing device such as a mouse, a touch panel, a touch pad, or a trackball, a keyboard, a remote controller, a button switch, etc. may be used. In addition, a plurality of types of input devices may be connected to the data processing device 20.
[0047] The medium reader 26 is a reading device that reads programs and data recorded on the recording medium 26a. For example, a magnetic disk, an optical disk, a magneto-optical disk (MO: Magneto-Optical disk), a semiconductor memory, etc. can be used as the recording medium 26a. The magnetic disk includes a flexible disk (FD: Flexible Disk) and a HDD. The optical disk includes a compact disc (CD) and a digital versatile disc (DVD).
[0048] The medium reader 26 copies the program and data read from the recording medium 26a to another recording medium such as the RAM 22 or the HDD 23. The read program is executed by the processor 21, for example. The recording medium 26a may be a portable recording medium, and may be used for distributing the program and data. The recording medium 26a and the HDD 23 may also be referred to as computer-readable recording media.
[0049] The communication interface 27 is an interface that is connected to the network 27a and communicates with other information processing devices via the network 27a. The communication interface 27 may be a wired communication interface that is connected to a communication device such as a switch by a cable, or may be a wireless communication interface that is connected to a base station by a wireless link.
[0050] Next, the functions and processing procedures of the data processing device 20 will be described. FIG. 3 is a block diagram illustrating an example of functions of the data processing device. The data processing device 20 has a user-defined information input unit 31, a base information storage unit 32, an optimization system generation unit 33, and an optimization system 34. The optimization system 34 also has a coefficient data input unit 34a, an initial solution generation unit 34b, an input data storage unit 34c, a solution pool 34d, a starting solution generation unit 34e, a local search unit 34f, an output unit 34g, and an overall control unit 34h. These functions can be considered as examples of functions realized by the storage unit 11 and the processing unit 12 shown in FIG. 1.
[0051] Each of the above functions can be implemented, for example, by using a program module executed by the processor 21 or a storage area (register or cache memory) within the processor 21. The base information storage unit 32, the input data storage unit 34c, and the solution pool 34d may be implemented by using a storage area secured in the RAM 22 or the HDD 23.
[0052] The user-defined information input unit 31 accepts input of user-defined information. The user-defined information includes function definition information and neighborhood definition information, similar to the user-defined information 11a described in the first embodiment. Furthermore, in the second embodiment, the user-defined information includes process definition information indicating process definitions of an initial solution generation process and a starting solution generation process. Examples of process definitions of an initial solution generation process and a starting solution generation process will be described later (see Figs. 4 and 5). The user-defined information is described, for example, in a program format. Note that, when an initial solution generation process or a starting solution generation process is not performed, the user-defined information does not need to include the process definition information.
[0053] The base information storage unit 32 stores base information that represents processing that does not depend on the definition of the objective function and the neighborhood state. The base information is also written in, for example, a program format. The optimization system generation unit 33 generates an optimization system 34 based on the user-defined information and the base information. For example, the optimization system generation unit 33 generates an optimization program file in a format executable by a computer by compiling the user-defined information and the base information described in a program format. In this case, an optimization program including a user-defined portion and a base portion is generated (constructed) as an optimization system. The generated optimization program may be stored in the RAM 22 or the HDD 23.
[0054] The coefficient data input unit 34a belonging to the base part accepts input of coefficient data, which is the value of a coefficient included in an objective function. The coefficient data input unit 34a provides a file path of the coefficient data to the input data storage unit 34c.
[0055] The initial solution generating unit 34b belonging to the user-defined part is called at the time of initialization. The initial solution generating unit 34b generates and outputs an initial solution for the local search. The process of the initial solution generating unit 34b is defined by the process definition information included in the user-defined information.
[0056] FIG. 4 is a diagram illustrating an example of implementation of the process definition of the initial solution generating unit. The initial solution generating unit 34b generates and outputs an initial solution as shown in FIG. 4 according to the input identification information (index (i) in the example of FIG. 4). In the implementation example of the process definition in FIG. 4, when i=0, an initial solution in which the values of all state variables included in the objective function are 0 is generated. When i=1, an initial solution in which the values of all state variables included in the objective function are 1 is generated. When i=2, a value (fixed value) previously specified by the user is output as the initial solution. The fixed value is, for example, a value previously calculated by preprocessing or manual calculation by the user. When i≧3, an initial solution in which the values of all state variables included in the objective function are randomly determined is generated.
[0057] In this way, by simply changing the value of the index input to the initial solution generating unit 34b, the initial solution generating unit 34b can generate various initial solutions. For example, the initial solution generating unit 34b is given the same number of indexes (i) as the number of solutions stored in the solution pool 34d, and outputs the same number of initial solutions as the number of solutions stored in the solution pool 34d. The output initial solutions are represented as a structure (vars) that stores the values of all state variables. Since vars depends on the function definition information of the objective function included in the user-defined information, the initial solution generating unit 34b belongs to the user-defined part.
[0058] The input data storage unit 34c reads coefficient data from a file specified by the file path provided by the coefficient data input unit 34a, and holds the values of the coefficients of the objective function. The values of the coefficients are stored in a structure (inputs). Since the inputs depend on the function definition information of the objective function included in the user-defined information, the input data storage unit 34c also belongs to the user-defined part.
[0059] The solution pool 34d belonging to the base part stores a plurality of solutions. Furthermore, the solution pool 34d performs the following processes under the control of the overall control unit 34h. At the time of initialization, the solution pool 34d stores a plurality of initial solutions output by the initial solution generation unit 34b. When the solution pool 34d stores 16 solutions, for example, an index of i=0 to 15 is given to the initial solution generation unit 34b, and the 16 initial solutions are output. Then, the solution pool 34d stores the 16 initial solutions. At this time, the solution pool 34d calculates and holds an evaluation value of each initial solution based on the objective function defined in the function definition information and the coefficient data stored in the inputs.
[0060] During solution search, the solution pool 34d outputs the stored solutions to the starting solution generating unit 34e. A local solution (hereinafter, solution A) output by the local search unit 34f is input to the solution pool 34d. The solution pool 34d then compares the solution with the highest (worst) evaluation value (hereinafter, solution B) among the stored solutions with the evaluation value of solution A. If the evaluation value of solution B is greater than the evaluation value of solution A, the solution pool 34d replaces solution B with solution A. However, if solution A has already been stored, the solution pool 34d skips the comparison process with solution B. In other words, the solution pool 34d does not hold duplicate solutions.
[0061] The starting solution generating unit 34e belonging to the user-defined part generates and outputs a new solution (starting solution) when restarting the local search from the multiple solutions output by the solution pool 34d. The starting solution generating unit 34e can generate a starting solution from the multiple initial solutions stored in the solution pool 34d even at the time of initialization. The processing of the starting solution generating unit 34e is defined by processing definition information included in the user-defined information.
[0062] FIG. 5 is a diagram illustrating an example of implementation of the process definition of the starting solution generating unit. In the implementation example of FIG. 5, the starting solution generating unit 34e receives four solutions (represented by four vars arrays) stored in the solution pool 34d, and generates and outputs one starting solution (represented by one vars). The starting solution generating unit 34e generates one starting solution according to the process definition. For example, the starting solution generating unit 34e may randomly select one of the four input solutions and change some values of state variables included in the selected solution to generate a starting solution. The starting solution generating unit 34e may also randomly select two of the four input solutions and generate a starting solution by using the two selected solutions through a genetic algorithm or the like.
[0063] Furthermore, the starting solution generating unit 34e calculates and outputs an evaluation value of the generated starting solution based on the inputs and function definition information that defines F(x). The local search portion 34f includes a base portion and a user-defined portion.
[0064] FIG. 6 is a diagram illustrating an example of the local search unit. The local search unit 34f includes a neighborhood enumeration unit 34f1, a selection unit 34f2, an update unit 34f3, and a minimum solution holding unit 34f4.
[0065] The neighborhood enumeration unit 34f1 belongs to the user definition part. The neighborhood enumeration unit 34f1 enumerates one or more neighborhood states for the current solution (or the starting solution) based on the neighborhood definition information included in the user definition information. The current solution is represented by a structure (vars). The contents of the structure are freely written by the user, so state variables can be freely defined regardless of the objective function.
[0066] If the objective function is F(x)=A0x0x1x2x3+B0x0x1x2+B1x1x2x3+B2x2x3x0+C0x0x1+C1x2x3+D0x2, the number of state variables is four. Therefore, the values of the four state variables (x0, x1, x2, x3) are stored in vars. A0, B0~B2, C0, C1, D0 are coefficients and are stored in the structure (inputs). If each state variable is a binary variable of 0 or 1, and a neighborhood state is defined as one of all state variables changing its value from 0 to 1 or from 1 to 0, there are four neighborhood states for the current solution.
[0067] When there are multiple defined neighborhood states, the neighborhood enumeration unit 34f1 may enumerate some of these neighborhood states. The neighborhood enumeration unit 34f1 reads out the coefficient data stored in the inputs and calculates the change (ΔE) in the value (evaluation value) of the objective function defined in the function definition information for each enumerated neighborhood state. i The value of x i →1-x i ΔE for the nearby state changed to i If the evaluation value of the current solution is F(x) and the evaluation value of the neighboring state is F(x'), then ΔE i =F(x')-F(x). Figure 6 shows an example where ΔE is calculated for four neighboring states.
[0068] The selection unit 34f2 belongs to the base part. The selection unit 34f2 selects, among one or more neighboring states, a first neighboring state that permits transition based on the respective ΔE of the enumerated one or more neighboring states. The selection unit 34f2 performs the above selection according to a selection method such as, for example, a greedy method, a SA method, or a Tabu search method.
[0069] For example, in the greedy method, among one or more neighboring states, the neighboring state with the smallest ΔE (positive or negative value) is selected as the first neighboring state. In the SA method, based on the comparison result between ΔE and a predetermined value, it is determined whether to permit transition to the neighboring state that causes that ΔE. The predetermined value is, for example, a noise value obtained based on a random number and the value of a temperature parameter. For example, log(rand)×T, which is an example of a noise value obtained based on a uniform random number (rand, 0 < rand < 1) and a temperature parameter (T), can be used as the predetermined value. In this case, even if ΔE is a positive value, the transition may be permitted. When there are a plurality of neighboring states for which the transition is permitted, the selection unit 34f2 may select one of them as the first neighboring state according to a predetermined rule.
[0070] The applied selection method can be specified by the user. The applied selection method may be included in user-defined information. The selection unit 34f2 outputs the index of the state variable whose value is changed to transition to the selected first neighboring state. Note that the selection unit 34f2 may output by adding data indicating valid or invalid to the index. For example, in the SA method, there may be a case where no neighboring state is selected. In that case, data indicating invalid is added to the index.
[0071] The update unit 34f3 belongs to the user-defined part. The update unit 34f3 receives the index output by the selection unit 34f2 and updates the current solution stored in vars to the first neighborhood state. For example, when the selection unit 34f2 outputs index=s, the update unit 34f3 updates the state variable x s The value of x s =1-x s to update.
[0072] If data indicating invalidity is added to the index output by the selection unit 34f2, the update unit 34f3 does not need to update the current solution. The minimum solution holding unit 34f4 belongs to the base part. The minimum solution holding unit 34f4 holds the current solution and the minimum solution obtained so far. The minimum solution holding unit 34f4 also calculates an evaluation value of the updated solution (first neighborhood state). If the calculated evaluation value is smaller than the minimum evaluation value obtained so far, the minimum solution holding unit 34f4 updates the minimum solution obtained so far with the updated solution.
[0073] The minimum solution holding unit 34f4 outputs the held minimum solution as a local solution when a predetermined termination condition is satisfied. An output unit 34g in FIG. 3 outputs the solutions stored in the solution pool 34d when a predetermined termination condition is satisfied.
[0074] The overall control unit 34h controls each unit of the optimization system 34. The overall processing procedure of the data processing device 20 is the same as the processing of steps S1 to S5 shown in FIG. 1. That is, the user-defined information input unit 31 accepts the input of user-defined information (step S1), and the optimization system generation unit 33 generates the optimization system 34 (step S2). The coefficient data input unit 34a accepts the input of coefficient data (step S3). Then, the optimization system 34 is executed (step S4), and the output unit 34g outputs the solutions stored in the solution pool 34d as search results of the solutions obtained by the execution of the optimization system 34 (step S5). The output unit 34g may output the evaluation values of the solutions stored in the solution pool 34d together with the solutions. The output unit 34g may display the search results on the display 24a, or may transmit them to another information processing device (for example, a client device) via the network 27a.
[0075] An example of a processing procedure when the optimization system 34 is executed in the data processing device 20 will be described below. FIG. 7 is a flowchart showing an example of a processing procedure when the optimization system is executed.
[0076] Step S10: The input data storage unit 34c reads the coefficient data from the file specified by the file path provided by the coefficient data input unit 34a, and holds the values of the coefficients of the objective function. The values of the coefficients are stored in a structure (inputs).
[0077] Step S11: The initial solution generating unit 34b generates and outputs an initial solution for starting a local search. The initial solution output by the initial solution generating unit 34b is stored in the solution pool 34d. Step S12: The starting solution generating unit 34e generates a new solution (starting solution) from the multiple solutions output by the solution pool 34d.
[0078] Step S13: The local search unit 34f executes a local search process, an example of which will be described later. Step S14: The solution pool 34d receives the local solution (solution A) output by the local search unit 34f, and compares the evaluation value of the solution A with the solution (hereinafter, solution B) with the highest (worst) evaluation value among the stored solutions. If the evaluation value of solution B is greater than the evaluation value of solution A, the solution pool 34d performs an update process to replace solution B with solution A. By repeating the initial solution generation process and the local search process, the solutions in the solution pool 34d are gradually updated to better solutions and approach the optimal solution.
[0079] Step S15: The overall control unit 34h judges whether a predetermined end condition is satisfied. For example, the overall control unit 34h judges that the end condition is satisfied when an upper limit time specified by the user has elapsed or when the process has been repeated a number of times specified by the user.
[0080] If the overall control unit 34h determines that the predetermined termination condition is not satisfied, the process is repeated from step S12. If the overall control unit 34h determines that the predetermined termination condition is satisfied, the execution of the optimization system 34 is terminated.
[0081] FIG. 8 is a flowchart illustrating an example of a procedure for the local search process. Step S20: The neighborhood enumeration unit 34f1 enumerates one or more neighborhood states for the current solution (the starting solution at initialization) based on the neighborhood definition information. Then, the neighborhood enumeration unit 34f1 calculates the change in evaluation value (ΔE) for the enumerated neighborhood states.
[0082] Step S21: The selection unit 34f2 selects a first neighboring state (neighborhood solution) to which a transition is permitted from among one or more neighboring states, based on ΔE of each of the one or more neighboring states.
[0083] Step S22: The update unit 34f3 changes the values of the state variables included in the current solution, thereby updating the current solution to the first neighboring state selected by the selection unit 34f2. Step S23: The minimum solution holding unit 34f4 calculates the evaluation value of the first neighborhood state, and if the evaluation value is smaller than the minimum evaluation value obtained so far, it updates the minimum solution obtained so far with the updated solution and holds it.
[0084] Step S24: The overall control unit 34h judges whether a predetermined end condition of the local search process is satisfied. For example, the overall control unit 34h judges that the end condition is satisfied when an upper limit time specified by the user has elapsed or when the process has been repeated a number of times specified by the user.
[0085] If the overall control unit 34h determines that the predetermined end condition is not satisfied, the process from step S20 is repeated. If the overall control unit 34h determines that the predetermined end condition is satisfied, the process from step S25 is performed.
[0086] Step S25: The minimum solution storage unit 34f4 outputs the minimum solution stored when a predetermined termination condition is satisfied as a local solution. This ends one round of local search processing, and the process returns to step S14 in FIG.
[0087] According to the data processing device 20 of the second embodiment as described above, the same effect as that of the data processing device 10 of the first embodiment can be obtained. That is, since it is possible to use the definition of the objective function and the neighborhood state suitable for the problem that the user wants to solve, it is possible to search for a solution by an optimization system suitable for the problem that the user wants to solve. In addition, since the user does not need to create base information, it is possible to build an optimization system that searches for a solution to a combinatorial optimization problem expressed by an arbitrary objective function with a minimum of description.
[0088] Furthermore, in the data processing device 20 of the second embodiment, the user-defined information includes process definition information indicating a process definition of a process for generating an initial solution for a local search. The user-defined portion of the optimization system 34 has an initial solution generating unit 34b that generates and outputs an initial solution according to the input identification information based on the process definition information. This allows an initial solution suitable for a problem that the user wants to solve to be applied to the local search. For example, in a problem in which the optimal solution is assumed to have most of the values of all state variables being 0, the user may input 0 as the index (i) as shown in FIG. 4. In a problem in which the optimal solution is assumed to have most of the values of all state variables being 1, the user may input 1 as the index (i) as shown in FIG. 4.
[0089] In the data processing device 20 of the second embodiment, the user-defined information includes process definition information indicating a process definition of a process for generating a starting solution from a plurality of solutions when restarting a local search. The user-defined part of the optimization system 34 has a starting solution generator 34e that generates and outputs a starting solution from a plurality of solutions stored in the solution pool 34d based on the process definition information. This makes it possible to prevent a situation in which a solution obtained by a local search cannot escape from a certain local solution, and the solutions stored in the solution pool 34d are not updated. This makes it possible to increase the possibility that the solutions stored in the solution pool 34d will be updated to good solutions.
[0090] As described above, the above processing contents can be realized by causing the data processing device 20 to execute a program. The program may be recorded on a computer-readable recording medium (e.g., recording medium 26a). For example, a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory may be used as the recording medium. Magnetic disks include FDs and HDDs. Optical disks include CDs, CD-R (Recordable) / RW (Rewritable), DVDs, and DVD-R / RWs. The program may be recorded on a portable recording medium and distributed. In that case, the program may be copied from the portable recording medium to another recording medium (e.g., HDD 23) and executed.
[0091] While one aspect of the program, data processing device, and data processing method of the present invention has been described above based on the embodiment, these are merely examples and the present invention is not limited to the above description. [Explanation of symbols]
[0092] 10 Data Processing Device 11 Storage section 11a User-defined information 11b Base Information 11c Coefficient Data 12 Processing section 15 Optimization System 15a1, 15a2 User-defined part 15b Base part
Claims
1. accepting input of user-defined information including function definition information that defines an objective function of a combinatorial optimization problem and neighborhood definition information that defines one or more neighborhood states when searching for a solution to the combinatorial optimization problem by a local search; generating an optimization system that represents a process that does not depend on the definition of the objective function and the one or more neighboring states, and searches for a solution to the combinatorial optimization problem by the local search based on base information stored in a memory and the user-defined information; Accepting input of coefficient values included in the objective function; By executing the optimization system, an amount of change in the value of the objective function when a state represented by values of a plurality of state variables included in the objective function transitions to the one or more neighboring states is calculated based on the function definition information, the neighborhood definition information, and the values of the coefficients, a first neighboring state is selected from the one or more neighboring states based on the amount of change, and values of the plurality of state variables are updated to values of the first neighboring state. A program that causes a computer to carry out processing.
2. The program according to claim 1 , wherein the optimization system includes a base portion that performs processing based on the base information, and a user-defined portion that performs processing based on the user-defined information.
3. the user-defined information includes first process definition information indicating a process definition of a process for generating an initial solution of the local search, the user definition portion has an initial solution generating unit that generates and outputs the initial solution according to input identification information based on the first process definition information; The program according to claim 2.
4. the optimization system performs the local search by repeating the calculation of the change amount, the selection of the first neighboring state, and the updating of the values of the plurality of state variables to the values of the first neighboring state, and stores a solution obtained by the local search in a solution pool; the user-defined information includes second process definition information indicating a process definition of a process for generating a starting solution from a plurality of solutions when restarting the local search, The user definition portion has a starting solution generation unit that generates and outputs the starting solution from the plurality of solutions stored in the solution pool based on the second process definition information. The program according to claim 2.
5. a storage unit that stores base information representing an objective function of a combinatorial optimization problem and a process that does not depend on the definition of one or more neighboring states when searching for a solution to the combinatorial optimization problem by local search; a processing unit that receives input of user-defined information including function definition information that defines the objective function and neighborhood definition information that defines the one or more neighborhood states, generates an optimization system that searches for a solution to the combinatorial optimization problem by the local search based on the base information and the user-defined information, receives input of values of coefficients included in the objective function, and executes the optimization system to calculate an amount of change in the value of the objective function when a state represented by values of a plurality of state variables included in the objective function transitions to the one or more neighborhood states based on the function definition information, the neighborhood definition information, and the coefficient values, selects a first neighborhood state from the one or more neighborhood states based on the amount of change, and updates values of the plurality of state variables to values of the first neighborhood state; A data processing device comprising:
6. The computer accepting input of user-defined information including function definition information that defines an objective function of a combinatorial optimization problem and neighborhood definition information that defines one or more neighborhood states when searching for a solution to the combinatorial optimization problem by a local search; generating an optimization system that represents a process that does not depend on the definition of the objective function and the one or more neighboring states, and searches for a solution to the combinatorial optimization problem by the local search based on base information stored in a memory and the user-defined information; Accepting input of coefficient values included in the objective function; By executing the optimization system, an amount of change in the value of the objective function when a state represented by values of a plurality of state variables included in the objective function transitions to the one or more neighboring states is calculated based on the function definition information, the neighborhood definition information, and the values of the coefficients, a first neighboring state is selected from the one or more neighboring states based on the amount of change, and values of the plurality of state variables are updated to values of the first neighboring state. Data processing methods.
Citation Information
Patent Citations
Information processing system and management device
JP2016103282A
Information processing apparatus, program, information processing method and information processing system
JP2021131611A
Multi-state quantum optimization engine
US20180365586A1
Accuracy and time-to-solution in solving combinatorial optimization problems with quantum annealers by using anneal offsets
US20190102353A1