Computer-readable recording medium storing program, data processing device, and data processing method
By storing and executing the processing program in the computer, receiving user-defined information to generate an optimization system, and processing complex objective functions through local search, the problem of difficulty in processing complex objective functions in the existing technology is solved, and an efficient solution search and optimization system is realized. Build.
Patent Information
- Application Number
- CN202410899363.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-07-18
- Filing Date
- 2024-07-05
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art is difficult to deal with complex objective functions, such as objective functions of three- or four-term terms, and it is impossible to directly add user-specific solutions to the optimization system, resulting in users needing to build an optimization system from scratch, which consumes a lot of labor time.
Provide a non-transitory computer-readable recording medium that stores a program for causing a computer to perform processing. The program receives user-defined information, including function definition information and neighborhood definition information, generates an optimization system suitable for the user's problem, and performs local search through Calculate the change of the objective function and select the appropriate neighborhood state to update the value of the state variable.
It enables users to search for solutions using an optimization system suitable for their problems, improves the ability to handle complex objective functions, and reduces the time spent building optimization systems.
Smart Images

Figure CN119337026A_ABST
Abstract
Description
Technical Field
[0001] The embodiments discussed herein relate to a non-transitory computer-readable recording medium storing a program, a data processing apparatus, and a data processing method. Background Art
[0002] Various problems in the real world (hereinafter referred to as real problems) can be expressed as combinatorial optimization problems. In the case of solving a combinatorial optimization problem, the problem is converted into a format determined by the optimization system to be used. This conversion is called formulation. For example, in the case of an optimization system using an Ising machine, the combinatorial optimization problem can be formulated as an objective function in a quadratic unconstrained binary optimization (QUBO) format. The user causes the optimization system to perform a solution search, reflects the obtained solution search results in the real problem, and checks whether an appropriate solution has been obtained.
[0003] Conventionally, there is a case where coefficients included in an objective function are specified by a user according to a combinatorial optimization problem to be calculated.
[0004] Japanese Laid-Open Patent Publication No. 2021-131611, Japanese Laid-Open Patent Publication No. 2016-103282, U.S. Patent Application Publication No. 2018 / 0365586, and U.S. Patent Application Publication No. 2019 / 0102353 are disclosed as related technologies. Summary of the invention
[0005] Technical issues
[0006] According to the prior art, the objective function can be defined only within the range defined in the optimization system. For example, according to the optimization system using the Ising machine for a quadratic objective function, an objective function having a cubic term or a quartic term may not be directly processed. In addition, it is not possible to add a solution method specifically for a problem that a user wants to solve to the optimization system.
[0007] In this case, the user can build an original optimization system from scratch by himself, but the construction takes a lot of man-hours. Therefore, it is difficult to search for a solution through an optimization system suitable for the problem that the user wants to solve.
[0008] In one aspect, an object of the embodiment is to provide a program, a data processing apparatus, and a data processing method capable of searching for a solution using an optimization system suitable for a problem that a user wants to solve.
[0009] Solution to the problem
[0010] According to one aspect of the embodiment, a non-transitory computer-readable recording medium is provided, which stores a program for causing a computer to perform processing, the processing comprising: receiving input of user-defined information, the user-defined information comprising function definition information and neighborhood definition information, the function definition information defining an objective function of a combinatorial optimization problem, the neighborhood definition information defining one or more neighborhood states when searching for a solution to the combinatorial optimization problem by local search; generating an optimization system based on the user-defined information and basic information stored in a memory, the optimization system being configured to search for a solution to the combinatorial optimization problem by local search, the basic information indicating processing that is independent of a definition of the objective function and a definition of one or more neighborhood states; receiving input of values of coefficients included in the objective function; and executing the optimization system so that the optimization system: a) calculates an amount of change in a value of the objective function when a state represented by values of a plurality of state variables included in the objective function transitions to one or more neighborhood states based on the function definition information, the neighborhood definition information, and the values of the coefficients, b) selects a first neighborhood state from the one or more neighborhood states based on the amount of change, and c) updates the values of the plurality of state variables to the values of the first neighborhood state.
[0011] Advantageous Effects of the Invention
[0012] In one aspect, embodiments enable solution searching using an optimization system that is appropriate for the problem a user wants to solve. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a diagram showing an exemplary data processing apparatus according to the first embodiment;
[0014] Figure 2 is a block diagram showing exemplary hardware of a data processing apparatus according to a second embodiment;
[0015] Figure 3 is a block diagram illustrating exemplary functions of a data processing apparatus;
[0016] Figure 4 is a diagram showing an exemplary implementation of a process definition of an initial solution generating unit;
[0017] Figure 5 is a diagram showing an exemplary implementation of a process definition of a starting solution generating unit;
[0018] Figure 6 is a diagram illustrating an exemplary local search unit;
[0019] Figure 7 is a flowchart showing the flow of an exemplary processing procedure when executing the optimization system; and
[0020] Figure 8is a flowchart showing the flow of an exemplary procedure of a local search process. DETAILED DESCRIPTION
[0021] Hereinafter, modes for carrying out the embodiments will be described with reference to the drawings.
[0022] (First Embodiment)
[0023] Figure 1 1 is a diagram showing an exemplary data processing device according to the first embodiment. The data processing device 10 according to the first embodiment may be a client device or may be a server device. The data processing device 10 may be referred to as a computer.
[0024] The data processing device 10 according to the first embodiment includes a storage unit 11 and a processing unit 12 .
[0025] The storage unit 11 is a volatile storage device (e.g., an electronic circuit such as a dynamic random access memory (DRAM)) or a nonvolatile storage device (e.g., 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.
[0026] The storage unit 11 stores user definition information 11a, basic information 11b, and coefficient data 11c to be described later. In addition, the storage unit 11 may store calculation conditions for solution search and the like.
[0027] For example, the processing unit 12 is implemented 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, for example, 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 referred to as a multiprocessor or simply referred to as a "processor". In addition, the processing unit 12 may be implemented using an electronic circuit such as an application specific integrated circuit (ASIC) or a field programmable gate array (FPGA).
[0028] The processing unit 12 executes the processing of steps S1 to S5 as follows.
[0029] Step S1: The processing unit 12 receives input of user-defined information 11a. The user-defined information 11a includes function definition information and neighborhood definition information.
[0030] The function definition information is information that defines the objective function (F(x)) of the combinatorial optimization problem. In the function definition information, the objective functions of various combinatorial optimization problems such as linear programming problems and quadratic programming problems can be defined. For example, in addition to the target quadratic objective function in the Ising machine, a cubic or higher order objective function or a complex objective function can also be directly defined.
[0031] In the function definition information, for example, the definition of F(x) itself is expressed in a program format such as a function. For example, the quartic objective function F(x)=A0x0x1x2x3+B0x0x1x2+B1x1x2x3+B2x2x3x0+C0x0x1+C1x2x3+D0x2 can be defined by the function definition information. References x0 to x3 are called state variables. The combination of values of x0 to x3 is called a state. The state represents a solution. For example, the solution that minimizes the value of F(x) is the optimal solution. By reversing the sign of each term of F(x) from + to -, the solution that maximizes the value of F(x) can be regarded as the optimal solution.
[0032] The neighborhood definition information is information that defines one or more neighborhood states when searching for a solution to a combinatorial optimization problem by local search. In the neighborhood definition information, it is defined which solution is set as the neighborhood state for a certain solution (state). For example, in the case where the state variable included in the objective function is a binary variable 0 or 1, the neighborhood state can be defined as a state in which the value of any one of all state variables changes from 0 to 1 or from 1 to 0. For example, in the case where the state variable included in the objective function is an integer variable, the user can freely define the neighborhood state as eight modes of each integer variable ±(1, 2, 4, 8), etc.
[0033] Furthermore, the user definition information 11a may include information indicating a process definition of an initial solution generating process or the like (see Figure 4 wait).
[0034] For example, the user-defined information 11a as described above is input to the data processing device 10 by an operation of an input device (not shown) performed by a user. In the case where the data processing device 10 is a server device, the user-defined information 11a is transmitted from a client device to the data processing device via a network and is input. The input user-defined information 11a is stored in the storage unit 11.
[0035] Step S2: The processing unit 12 generates an optimization system based on the user-defined information 11a and the basic information 11b, and the optimization system searches for a solution to the combinatorial optimization problem through a local search.
[0036] The basic information 11b is information indicating processing that is not related to the definition of the objective function and the neighborhood state. The basic information 11b can also be regarded as information indicating a portion corresponding to a basic algorithm in the solution search process.
[0037] Examples of processing that is not related to the definition of the objective function and the neighborhood state include interactive interface processing with a program that executes the processing of steps S1 to S5. In addition, examples of processing that is not related to the definition of the objective function and the neighborhood state include processing for managing solutions in the middle of a search, processing related to a solution search that is performed while appropriately calling a portion to be processed based on the user-defined information 11a (hereinafter referred to as a user-defined portion), and the like.
[0038] For example, the processing unit 12 compiles the user-defined information 11a and the basic information 11b described in the program format, thereby generating a file of the optimization program in a format that can be executed by a computer. In this case, an optimization program including a user-defined part and a part (hereinafter referred to as a basic part) that performs processing based on the basic 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 based on the optimization program and a hardware part that performs processing of the basic part can also be referred to as an optimization system.
[0039] Furthermore, the processing unit 12 can construct an optimization system including a user-defined part and a basic part by programming an FPGA included in the processing unit 12 based on the user-defined information 11 a and the basic information 11 b .
[0040] Figure 1 The generated optimization system 15 is schematically shown. The optimization system 15 includes user definition parts 15a1 and 15a2 that perform processing based on input user definition information 11a and a basic part 15b that performs processing based on basic information 11b.
[0041] Step S3: The processing unit 12 receives input of the values of the coefficients included in the objective function. In the case where the objective function is F(x)=A0x0x1x2x3+B0x0x1x2+B1x1x2x3+B2x2x3x0+C0x0x1+C1x2x3+D0x2, A0, B0 to B2, C0, C1 and D0 are coefficients. Hereinafter, the input values of the coefficients will be referred to as coefficient data 11c. The coefficient data 11c is input to the data processing device 10 by, for example, an operation of an input device (not shown) performed by a user. In the case where the data processing device 10 is a server device, the coefficient data 11c is transmitted from a client device to the data processing device via a network and is input. The coefficient data 11c is stored in the storage unit 11.
[0042] Step S4: The processing unit 12 executes the optimization system. For example, the optimization system is executed by executing the generated optimization program described above. Alternatively, the optimization system is executed by starting the processing of the FPGA in which the optimization system is constructed as described above. Note that the optimization system can be executed when the processing unit 12 receives an execution instruction from the user.
[0043] In the case of executing the optimization system, the following processing is performed.
[0044] 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 change in the value of the objective function (which may also be referred to as the evaluation value hereinafter) when the state represented by the values of the multiple state variables included in the objective function transitions to one or more neighborhood states. One or more neighborhood states are enumerated based on the neighborhood definition information included in the user-defined information 11a.
[0045] Step S4b: The processing unit 12 selects a first neighborhood state allowing the transition from the one or more neighborhood states based on ΔE for each of the one or more neighborhood states. For example, the processing unit 12 performs the above selection according to a selection method such as the greedy algorithm (also known as greed), the simulated annealing (SA) method, or the tabu search method.
[0046] For example, according to the greedy algorithm, the neighborhood state with the minimum ΔE (positive or negative value) among the one or more neighborhood states is selected as the first neighborhood state. In the SA method, based on the comparison result between ΔE and a predetermined value, it is determined whether to allow the transition to the neighborhood state that causes ΔE. Examples of the predetermined value include a noise value obtained based on a random number and a temperature parameter value. 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 positive, the transition can be allowed. In the case where there are multiple neighborhood states allowing the transition, the processing unit 12 can select one of the multiple neighborhood states as the first neighborhood state according to a predetermined rule.
[0047] The selection method to be applied can be specified by the user. The selection method to be applied can be included in the user-defined information 11a.
[0048] Step S4c: The processing unit 12 updates the current values of the multiple state variables to the values of the first neighborhood state. In a manner similar to step S4a, the processing of step S4c is based on the function definition information and the neighborhood definition information included in the user-defined information 11a.
[0049] Step S4d: The processing unit 12 calculates the evaluation value of the updated solution (first neighborhood state). In case the calculated evaluation value is less than the minimum evaluation value obtained so far, it is retained as the updated minimum solution (=local solution).
[0050] In steps S4a to S4d described above, for example, the portion that performs the processing of steps S4a and S4c corresponds to the user-defined portion in the optimization system, and the other portions correspond to the basic portion.
[0051] The processing of steps S4a to S4d described above is repeated until a predetermined termination condition is satisfied. In the case of applying the SA method, for example, each time the processing of step S4b is repeated a predetermined number of times, the processing unit 12 reduces the value of the temperature parameter (T) described above according to a predetermined temperature parameter change plan.
[0052] Step S5: The processing unit 12 outputs the search results of the 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 send the search results to another information processing device (e.g., a client device) via a network.
[0053] Note that the processing unit 12 may store the minimum solution described above in a solution pool, and may generate a starting solution when performing a local search again using a plurality of solutions stored in the solution pool. Such processing will be described in the second embodiment.
[0054] As described above, the data processing device 10 according to the first embodiment receives input of user-defined information 11a. The user-defined information 11a includes function definition information and neighborhood definition information, the function definition information defines the objective function of the combinatorial optimization problem, and the neighborhood definition information defines one or more neighborhood states when searching for a solution to the combinatorial optimization problem by local search. Then, the data processing device 10 generates an optimization system that searches for a solution to the combinatorial optimization problem by local search based on basic information 11b and the user-defined information 11a, the basic information 11b indicating processing that is independent of the definition of the objective function and the neighborhood state and is pre-stored in the storage unit 11. The data processing device 10 receives input of the value of the coefficient included in the objective function, and executes the optimization system, thereby calculating ΔE accompanying 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 that allows the transition is selected based on ΔE, and the values of a plurality of state variables are updated to the values of the first neighborhood state.
[0055] According to such a data processing device 10, it becomes possible to use the definition of the objective function and the neighborhood state suitable for the problem that the user wants to solve, thereby performing a solution search by an optimization system suitable for the problem that the user wants to solve.
[0056] For example, according to an existing optimization system that uses the Ising machine for a quadratic objective function, an objective function having a cubic term or a quartic term may not be directly processed. Therefore, an objective function having a cubic term or a quartic term may be converted into a quadratic form that can be processed by the Ising machine. However, in this case, the number of state variables included in the objective function increases after the conversion, and it becomes difficult to obtain an optimal solution or a better solution close to the optimal solution within the desired time. As described above, according to the data processing device 10 of the first embodiment, it becomes possible to use the definition of the objective function and the neighborhood state that are suitable for the problem that the user wants to solve, so that the number of state variables does not increase with the conversion of the objective function. Therefore, it can be expected to obtain a better solution to a problem with a complex objective function that is difficult to solve by an existing optimization system.
[0057] Furthermore, since the user does not need to create the basic information 11 b , it becomes possible to construct an optimization system that searches for a solution to a combinatorial optimization problem represented by any objective function with a minimal description.
[0058] (Second Embodiment)
[0059] Next, a second embodiment will be described.
[0060] The data processing device 20 according to the second embodiment may be a client device or may be a server device. The data processing device 20 may be referred to as a computer.
[0061] Figure 2 is a block diagram showing exemplary hardware of a data processing device according to the second embodiment.
[0062] 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 medium reader 26, and a communication interface 27. The units described above are coupled to a bus.
[0063] The processor 21 is a processor including an arithmetic circuit that executes program commands, such as a GPU or a CPU. 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. Note that the processor 21 may include a plurality of processor cores. In addition, the data processing device 20 may include a plurality of processors. Note that a collection of a plurality of processors (a multiprocessor) may be referred to as a "processor".
[0064] RAM 22 is a volatile semiconductor memory that temporarily stores programs to be executed by processor 21 and data to be used for arithmetic operations by processor 22. Note that data processing apparatus 20 may include a memory of a different type from RAM 22, or may include a plurality of memories.
[0065] The HDD 23 is a nonvolatile storage device that stores programs of software such as an operating system (OS), middleware, and application software, and data. The programs include, for example, programs for causing the data processing device 20 to perform processing for generating an optimization system and searching for solutions to combinatorial optimization problems. Note that the data processing device 20 may include another type of storage device, such as a flash memory or a solid-state drive (SSD), or may include a plurality of nonvolatile storage devices.
[0066] The GPU 24 outputs an image to a display 24a coupled to the data processing device 20 according to a command from the processor 21. As the display 24a, a cathode ray tube (CRT) display, a liquid crystal display (LCD), a plasma display panel (PDP), an organic electroluminescence (OEL) display, etc. can be used.
[0067] The input interface 25 obtains an input signal from an input device 25a coupled to the data processing device 20, and outputs it 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. can be used. In addition, various types of input devices can be coupled to the data processing device 20.
[0068] The medium reader 26 is a reading device that reads the program and data recorded on the recording medium 26a. For example, a magnetic disk, an optical disk, a magneto-optical disk (MO), a semiconductor memory, etc. can be used as the recording medium 26a. Examples of magnetic disks include a floppy disk (FD) and an HDD. Examples of optical disks include a compact disk (CD) and a digital versatile disk (DVD).
[0069] The medium reader 26, for example, 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, for example, the processor 21. Note that the recording medium 26a may be a portable recording medium and may be used to distribute the program and data. In addition, the recording medium 26a and the HDD 23 may be referred to as computer-readable recording media.
[0070] The communication interface 27 is an interface coupled to the network 27a and communicates with another information processing device via the network 27a. The communication interface 27 may be a wired communication interface coupled to a communication device such as a switch through a cable, or may be a wireless communication interface coupled to a base station via a wireless link.
[0071] Next, the functions and processing procedures of the data processing device 20 will be described.
[0072] Figure 3 is a block diagram illustrating exemplary functions of a data processing apparatus.
[0073] The data processing device 20 includes a user-defined information input unit 31, a basic information storage unit 32, an optimization system generation unit 33, and an optimization system 34. In addition, the optimization system 34 includes 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 also be regarded as being composed of Figure 1 The exemplary functions implemented by the storage unit 11 and the processing unit 12 shown in FIG.
[0074] Each of the functions described above can be implemented using, for example, a program module to be executed by the processor 21 or a storage area (register or cache memory) in the processor 21. The basic information storage unit 32, the input data storage unit 34c, and the solution pool 34d can be implemented using a storage area secured in the RAM 22 or the HDD 23.
[0075] The user definition information input unit 31 receives input of user definition information. In a manner similar to the user definition information 11a described in the first embodiment, the user definition information includes function definition information and neighborhood definition information. Furthermore, in the second embodiment, the user definition information includes process definition information indicating process definitions of the initial solution generation process and the starting solution generation process. Examples of the process definitions of the initial solution generation process and the starting solution generation process will be described later (see Figure 4 and Figure 5 ). For example, the user definition information is described in a program format. Note that in the case where the initial solution generation process or the start solution generation process is not executed, the user definition information may not include its process definition information.
[0076] The basic information storage unit 32 stores basic information indicating processing irrelevant to the definition of the target function and the neighborhood state. For example, the basic information is also described in a program format.
[0077] The optimization system generation unit 33 generates the optimization system 34 based on the user definition information and the basic information. For example, the optimization system generation unit 33 compiles the user definition information and the basic information described in the program format, thereby generating a file of the optimization program in a format that can be executed by a computer. In this case, an optimization program including a user definition part and a basic part is generated (constructed) as the optimization system. The generated optimization program can be stored in the RAM 22 or in the HDD 23.
[0078] The coefficient data input unit 34a belonging to the basic part receives input of coefficient data, which is the value of the coefficient included in the target function. The coefficient data input unit 34a assigns the file path of the coefficient data to the input data storage unit 34c.
[0079] The initial solution generating unit 34b belonging to the user definition part is called at the time of initialization. The initial solution generating unit 34b generates and outputs an initial solution for local search. The processing of the initial solution generating unit 34b is defined by the processing definition information included in the user definition information.
[0080] Figure 4 is a diagram showing an exemplary implementation of a process definition of an initial solution generating unit.
[0081] The initial solution generating unit 34b generates an initial solution according to the input identification information ( Figure 4 The index (i) in the example is generated and output as Figure 4 The initial solution shown in . Figure 4 In an exemplary implementation of the processing definition, in the case of i=0, an initial solution is generated in which the values of all state variables included in the objective function are 0. In the case of i=1, an initial solution is generated in which the values of all state variables included in the objective function are 1. In the case of i=2, a value (fixed value) pre-specified by the user is output as the initial solution. Examples of fixed values include values pre-calculated by preprocessing, manual calculations performed by the user, and the like. In the case of i≥3, an initial solution is generated in which the values of all state variables included in the objective function are randomly determined.
[0082] In this manner, the initial solution generating unit 34b can generate various initial solutions simply by changing the value of the index input to the initial solution generating unit 34b.
[0083] For example, the same number of indices (i) as the number of solutions stored in the solution pool 34d are given to the initial solution generation unit 34b, and the same number of initial solutions as the number of solutions stored in the solution pool 34d are output. The output initial solution is represented as a structure (vars) storing the values of all state variables. Since vars depends on the function definition information of the target function included in the user definition information, the initial solution generation unit 34b belongs to the user definition part.
[0084] The input data storage unit 34c reads the coefficient data from the file specified by the file path given by the coefficient data input unit 34a, and retains the value of the coefficient of the objective function. The value of the coefficient is stored in the structure (inputs). Since inputs depends 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.
[0085] The solution pool 34d belonging to the basic part stores a plurality of solutions. In addition, the solution pool 34d performs the following processing under the control of the overall control unit 34h.
[0086] At the time of initialization, the solution pool 34d stores a plurality of initial solutions output from the initial solution generating unit 34b. For example, in the case where the solution pool 34d stores 16 solutions, indexes of i=0 to 15 are given to the initial solution generating unit 34b, and 16 initial solutions are output. Then, the solution pool 34d stores the 16 initial solutions. At this time, the solution pool 34d calculates and retains the evaluation value of each initial solution based on the objective function defined by the function definition information and the coefficient data stored in inputs.
[0087] During the solution search, the solution pool 34d outputs the stored solution to the starting solution generation unit 34e. The local solution (hereinafter referred to as solution A) output from the local search unit 34f is input to the solution pool 34d. Then, the solution pool 34d compares the evaluation value of solution A with the solution (hereinafter referred to as solution B) with the highest (worst) evaluation value among the stored solutions. In the case where the evaluation value of solution B> 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 process of comparing with solution B. That is, the solution pool 34 does not retain duplicate solutions.
[0088] The initial solution generation unit 34e belonging to the user-defined part generates and outputs a new solution (initial solution) when the local search is restarted based on the multiple solutions output from the solution pool 34d. The initial solution generation unit 34e can also generate an initial solution based on the multiple initial solutions stored in the solution pool 34d at the time of initialization. The processing of the initial solution generation unit 34e is defined by the processing definition information included in the user-defined information.
[0089] Figure 5 is a diagram showing an exemplary implementation of a process definition of a starting solution generating unit.
[0090] exist Figure 5 In an exemplary implementation of , the starting solution generation unit 34e receives four solutions (four vars arrays) stored in the solution pool 34d, and generates and outputs a starting solution (represented by one vars). The starting solution generation unit 34e generates a starting solution according to the processing definition. For example, the starting solution generation unit 34e can generate a starting solution by randomly selecting one of the four input solutions and changing some of the values of the state variables included in the selected solution. In addition, the starting solution generation unit 34e can randomly select two of the four input solutions, and use the selected two solutions to generate a starting solution through a genetic algorithm or the like.
[0091] Furthermore, the initial solution generating unit 34e calculates and outputs the evaluation value of the generated initial solution based on the function definition information defining the inputs and F(x).
[0092] The local search unit 34f includes a basic part and a user-defined part.
[0093] Figure 6 is a diagram showing an example of a local search unit.
[0094] The local search unit 34f includes a neighborhood enumeration unit 34f1, a selection unit 34f2, an updating unit 34f3 and a minimum solution retaining unit 34f4.
[0095] The neighborhood enumeration unit 34f1 belongs to the user-defined part. The neighborhood enumeration unit 34f1 enumerates one or more neighborhood states for the current solution (or starting solution) based on the neighborhood definition information included in the user-defined information. The current solution is represented by a structure (vars). Since the content of the structure is freely described by the user, the state variables can be freely defined regardless of the objective function.
[0096] In the case where the objective function is F(x)=A0x0x1x2x3+B0x0x1x2+B1x1x2x3+B2x2x3x0+C0x0x1+C1x2x3+D0x2, the number of state variables is 4. Therefore, the values of the four state variables (x0, x1, x2, and x3) are stored in vars. A0, B0 to B2, C0, C1, and D0 are coefficients stored in the structure (inputs). In the case where each state variable is a binary variable of 0 or 1 and the neighborhood state is defined as a state in which the value of any one of all the state variables changes from 0 to 1 or from 1 to 0, there are four neighborhood states for the current solution.
[0097] Note that in the event that there are multiple defined neighborhood states, the neighborhood enumeration unit 34f1 may enumerate some of these neighborhood states.
[0098] The neighborhood enumeration unit 34f1 reads the coefficient data stored in inputs, and calculates the change (ΔE) of the value (evaluation value) of the objective function defined by the function definition information for each of the enumerated neighborhood states. Assuming that the evaluation value of the current solution is F(x) and the evaluation value of the neighborhood state is F(x'), it can be calculated by the formula ΔE i = F(x') - F(x) to calculate the state variable x for which the binary variable is 0 or 1 i The value of x i becomes 1-x i The ΔE of the neighborhood state i . Figure 6An exemplary case of calculating ΔE for four neighborhood states is shown.
[0099] The selection unit 34f2 belongs to the basic part. The selection unit 34f2 selects a first neighborhood state allowing a transition from among one or more neighborhood states based on ΔE for each of the one or more enumerated neighborhood states. For example, the selection unit 34f2 performs the above-described selection according to a selection method such as a greedy algorithm, a SA method, or a tabu search method.
[0100] For example, according to the greedy algorithm, a neighborhood state having the minimum ΔE (positive or negative value) among one or more neighborhood states is selected as the first neighborhood state. In the SA method, based on the comparison result between ΔE and a predetermined value, it is determined whether to allow a transition to a neighborhood state causing ΔE. Examples of the predetermined value include a noise value obtained based on a random number and a temperature parameter value. 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 positive, the transition can be allowed. In the case where there are multiple neighborhood states allowing a transition, the selection unit 34f2 may select one neighborhood state among the multiple neighborhood states as the first neighborhood state according to a predetermined rule.
[0101] The selection method to be applied can be specified by the user. The selection method to be applied can be included in user-defined information.
[0102] The selection unit 34f2 outputs an index of a state variable whose value is changed to transition to the selected first neighborhood state. Note that the selection unit 34f2 may add data indicating valid or invalid to the index and output the index. For example, a neighborhood state may not be selected in the SA method. In this case, data indicating invalid is added to the index.
[0103] The update unit 34f3 belongs to the user-defined part. The update unit 34f3 receives the index output from the selection unit 34f2, and updates the current solution stored in vars to the first neighborhood state. For example, in the case where the selection unit 34f2 has output index = s, the update unit 34f3 updates the state variable x among the state variables of the current solution stored in vars, which is a binary variable, to x s value to x s = 1 - x s .
[0104] Note that in the case where data indicating invalid is added to the index output from the selection unit 34f2, the update unit 34f3 does not need to update the current solution.
[0105] The minimum solution retaining unit 34f4 belongs to the basic part. The minimum solution retaining unit 34f4 retains the current solution and the minimum solution obtained so far. In addition, the minimum solution retaining unit 34f4 calculates the evaluation value of the updated solution (first neighborhood state). In the case where the calculated evaluation value is less than the minimum value of the evaluation values obtained so far, the minimum solution retaining unit 34f4 updates the minimum solution obtained so far with the updated solution.
[0106] The minimum solution retaining unit 34f4 outputs the minimum solution retained when a predetermined termination condition is satisfied as a local solution.
[0107] Figure 3 The output unit 34g in outputs the solution stored in the solution pool 34d when a predetermined termination condition is satisfied.
[0108] The overall control unit 34h controls each unit of the optimization system 34.
[0109] The entire processing process of the data processing device 20 is similar to Figure 1 . That is, the user-defined information input unit 31 receives the input of the user-defined information (step S1), and the optimization system generation unit 33 generates the optimization system 34 (step S2). In addition, the coefficient data input unit 34a receives the input of the coefficient data (step S3). Then, the optimization system 34 is executed (step S4), and the output unit 34g outputs the solution stored in the solution pool 34d as the search result of the solution obtained by executing the optimization system 34 (step S5). The output unit 34g can output the evaluation value of the solution together with the solution stored in the solution pool 34d. The output unit 34g can display the search results on the display 24a, or can send the search results to another information processing device (e.g., a client device) via the network 27a.
[0110] Hereinafter, an exemplary process when the optimization system 34 is executed in the data processing device 20 will be described.
[0111] Figure 7 is a flowchart showing the flow of an exemplary processing procedure when executing the optimization system.
[0112] Step S10: The input data storage unit 34c reads the coefficient data from the file specified by the file path given by the coefficient data input unit 34a, and retains the values of the coefficients of the objective function. The values of the coefficients are stored in the structure (inputs).
[0113] Step S11: The initial solution generating unit 34b generates and outputs an initial solution for starting a local search. The initial solution output from the initial solution generating unit 34b is stored in the solution pool 34d.
[0114] Step S12: The initial solution generating unit 34e generates a new solution (initial solution) based on the plurality of solutions output from the solution pool 34d.
[0115] Step S13: The local search unit 34f performs a local search process. An exemplary procedure of the local search process will be described later.
[0116] Step S14: The solution pool 34d receives the local solution (solution A) output from the local search unit 34f, and compares the evaluation value of solution A with the solution (hereinafter solution B) having the highest evaluation value among the stored solutions. If the evaluation value of solution B>the evaluation value of solution A, the solution pool 34d performs an update process of replacing 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 are close to the optimal solution.
[0117] Step S15: The overall control unit 34h determines whether a predetermined termination condition is satisfied. For example, when an upper limit time specified by the user has passed or when the repetitive process is executed a number of times specified by the user, the overall control unit 34h determines that the termination condition is satisfied.
[0118] If the overall control unit 34h determines that the predetermined termination condition is not satisfied, the processing starting from step S12 is repeated. If the overall control unit 34h determines that the predetermined termination condition is satisfied, the execution of the optimization system 34 is terminated.
[0119] Figure 8 is a flowchart showing the flow of an exemplary procedure of a local search process.
[0120] Step S20: The neighborhood enumeration unit 34f1 enumerates one or more neighborhood states for the current solution (initialization start solution) based on the neighborhood definition information. Then, the neighborhood enumeration unit 34f1 calculates the amount of change (ΔE) of the evaluation value for the enumerated neighborhood states.
[0121] Step S21: The selection unit 34f2 selects a first neighborhood state (neighborhood solution) that allows transition from one or more neighborhood states based on ΔE of each of the one or more neighborhood states.
[0122] Step S22: The updating unit 34f3 updates the current solution to the first neighborhood state selected by the selecting unit 34f2 by changing the values of the state variables included in the current solution.
[0123] Step S23: The minimum solution retaining unit 34f4 calculates the evaluation value of the first neighborhood state, and if the evaluation value is less than the minimum value of the evaluation values obtained so far, updates and retains the minimum solution obtained so far with the updated solution.
[0124] Step S24: The overall control unit 34h determines whether a predetermined termination condition for the partial search process is satisfied. For example, when the upper limit time specified by the user has passed or when the repetitive process is executed a number of times specified by the user, the overall control unit 34h determines that the termination condition is satisfied.
[0125] If the overall control unit 34h determines that the predetermined termination condition is not satisfied, the processing from step S20 is repeated. If the overall control unit 34h determines that the predetermined termination condition is satisfied, the processing of step S25 is performed.
[0126] Step S25: The minimum solution retaining unit 34f4 outputs the minimum solution retained when the predetermined termination condition is met as a local solution. Therefore, a local search process is terminated, and the process returns to Figure 7 The processing of step S14 in .
[0127] According to the data processing device 20 of the second embodiment as described above, it is possible to obtain an effect similar to that of the information processing device 10 of the first embodiment. That is, it becomes possible to use the definition of the objective function and the neighborhood state suitable for the problem that the user wants to solve, so that a solution search can be performed by an optimization system suitable for the problem that the user wants to solve. In addition, since the user does not need to create basic information, it becomes possible to construct an optimization system with a minimum description that searches for a solution to a combinatorial optimization problem represented by any objective function.
[0128] Furthermore, in the data processing device 20 according to the second embodiment, the user-defined information includes processing definition information indicating a processing definition of a process for generating an initial solution for a local search. In addition, the user-defined portion of the optimization system 34 includes an initial solution generation unit 34b that generates and outputs an initial solution based on the processing definition information according to the input identification information. Therefore, an initial solution suitable for a problem that the user wants to solve can be applied to a local search. For example, in a problem in which the majority of the values of all state variables of the optimal solution are assumed to be 0, such as Figure 4 As shown in , it is sufficient in the case where the user enters 0 as the index (i). In the problem where the majority of the values of all state variables of the optimal solution are 1, such as Figure 4 As shown in , it is sufficient if the user enters 1 as the index (i).
[0129] Furthermore, in the data processing device 20 according to the second embodiment, the user-defined information includes processing definition information indicating a processing definition of a process of generating a starting solution from a plurality of solutions when the local search is started again. In addition, the user-defined portion of the optimization system 34 includes a starting solution generating unit 34e that generates and outputs a starting solution from a plurality of solutions stored in the solution pool 34d based on the processing definition information. Therefore, it becomes possible to suppress a situation in which a solution obtained by the local search fails to escape from a certain local solution and a solution stored in the solution pool 34d is not updated. Therefore, it becomes possible to increase the possibility that the solution stored in the solution pool 34d is updated to a better solution.
[0130] Note that, as described above, the processing contents described above can be realized by causing the data processing device 20 to execute a program.
[0131] The program can be recorded in a computer-readable recording medium (e.g., recording medium 26a). For example, a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc. can be used as a recording medium. Examples of magnetic disks include FD and HDD. Examples of optical disks include CD, recordable (R) / rewritable (RW) CD, DVD, and DVD-R / RW. The program can be recorded in a portable recording medium and distributed. In this case, the program can be copied from the portable recording medium to another recording medium (e.g., HDD23) and executed.
[0132] Although one aspect of the program, the data processing apparatus, and the data processing method according to the embodiment has been described based on the embodiment, these are merely examples and are not limited to the above description.
Claims
1. A non-transitory computer-readable recording medium storing a program for causing a computer to execute a process, the process comprising: Receiving input of user-defined information, the user-defined information comprising function definition information and neighborhood definition information, the function definition information defining an objective function of a combinatorial optimization problem, the neighborhood definition information defining one or more neighborhood states when searching for a solution to the combinatorial optimization problem by local search; generating an optimization system based on the user-defined information and basic information stored in a memory, the optimization system being configured to search for a solution to the combinatorial optimization problem by the local search, the basic information indicating processing that is independent of a definition of the objective function and a definition of the one or more neighborhood states; receiving input of values of coefficients included in the objective function; as well as The optimization system is executed such that the optimization system: a) calculating, based on the function definition information, the neighborhood definition information and the values of the coefficients, an amount of change in the value of the objective function when the state represented by the values of the plurality of state variables included in the objective function transitions to the one or more neighborhood states, b) selecting a first neighborhood state from the one or more neighborhood states based on the change amount, and c) updating the values of the plurality of state variables to the values of the first neighborhood state.
2. The non-transitory computer-readable recording medium according to claim 1, wherein The optimization system includes a basic part that performs processing based on the basic information, and a user-defined part that performs processing based on the user-defined information.
3. The non-transitory computer-readable recording medium according to claim 2, wherein: The user definition information includes first process definition information indicating a process definition of a process for generating an initial solution for the local search, and The user definition part includes an initial solution generating unit that generates the initial solution according to input identification information based on the first process definition information and outputs the initial solution.
4. The non-transitory computer-readable recording medium according to claim 2, wherein: The optimization system performs the local search by repeatedly calculating the variation, selecting the first neighborhood state, and updating the values of the plurality of state variables to the values of the first neighborhood state, and stores the solution obtained by the local search in a solution pool. The user definition information includes second process definition information indicating a process definition of a process of generating a starting solution from a plurality of solutions when the local search is started again, and The user definition part includes a starting solution generating unit that generates the starting solution from the plurality of solutions stored in the solution pool based on the second process definition information and outputs the starting solution.
5. A data processing device, comprising: a storage unit configured to store basic information indicating processing unrelated to a definition of an objective function of a combinatorial optimization problem and a definition of one or more neighborhood states when searching for a solution to the combinatorial optimization problem by a local search; as well as A processing unit configured to perform a process comprising: receiving input of user-defined information, the user-defined information comprising function definition information and neighborhood definition information, the function definition information defining the objective function, and the neighborhood definition information defining the one or more neighborhood states; generating an optimization system based on the user-defined information and the basic information, the optimization system being configured to search for a solution to the combinatorial optimization problem through the local search; receiving input of values of coefficients included in the objective function; and The optimization system is executed such that the optimization system: a) calculating, based on the function definition information, the neighborhood definition information and the values of the coefficients, an amount of change in the value of the objective function when the state represented by the values of the plurality of state variables included in the objective function transitions to the one or more neighborhood states, b) selecting a first neighborhood state from the one or more neighborhood states based on the change amount, and c) updating the values of the plurality of state variables to the values of the first neighborhood state.
6. A data processing method implemented by a computer, the data processing method comprising: Receiving input of user-defined information, the user-defined information comprising function definition information and neighborhood definition information, the function definition information defining an objective function of a combinatorial optimization problem, the neighborhood definition information defining one or more neighborhood states when searching for a solution to the combinatorial optimization problem by local search; generating an optimization system based on the user-defined information and basic information stored in a memory, the optimization system being configured to search for a solution to the combinatorial optimization problem by the local search, the basic information indicating processing that is independent of a definition of the objective function and a definition of the one or more neighborhood states; receiving input of values of coefficients included in the objective function; as well as The optimization system is executed such that the optimization system: a) calculating, based on the function definition information, the neighborhood definition information and the values of the coefficients, an amount of change in the value of the objective function when the state represented by the values of the plurality of state variables included in the objective function transitions to the one or more neighborhood states, b) selecting a first neighborhood state from the one or more neighborhood states based on the change amount, and c) updating the values of the plurality of state variables to the values of the first neighborhood state.
Citation Information
Patent Citations
Multi-state quantum optimization engine
US20180365586A1
Accuracy and time-to-solution in solving combinatorial optimization problems with quantum annealers by using anneal offsets
US20190102353A1