Debugging device, debugging method, and program

The debugging device automates the identification of inappropriate constraints in optimization problems by grouping and solving within these groups, addressing inefficiencies in manual debugging and reducing solve times.

JP7776026B2Active Publication Date: 2025-11-26NEC CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2024566961
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-12-26
Publication Date
2025-11-26
Estimated Expiration
2042-12-26

AI Technical Summary

Technical Problem

Manual debugging of optimization problems is prone to personal biases and becomes inefficient as the number of constraints increases, leading to prolonged debugging times.

Method used

A debugging device that automatically divides constraints into groups and identifies inappropriate constraints by determining the existence of solutions within these groups, reducing the number of optimization problem solves required.

Benefits of technology

Enables efficient and automated debugging of optimization problems by minimizing the number of solves needed, thus shortening the determination time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007776026000002
    Figure 0007776026000002
  • Figure 0007776026000003
    Figure 0007776026000003
  • Figure 0007776026000004
    Figure 0007776026000004
Patent Text Reader

Abstract

In order to solve the problem of automatically and efficiently implementing a debugging operation on a constraint condition imposed on an optimization problem, a debugging device (1) comprises: a division unit (11) that divides a plurality of constraint conditions into a plurality of groups if a solution to the optimization problem does not exist; and an identification unit (12) that selects at least one group, and repeats a process of determining whether a solution to the optimization problem exists under the constraint condition included in a group other than the selected group, thereby identifying a group for which a solution to the optimization problem exists when excluded.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a debugging device and a debugging method for debugging constraints imposed on an optimization problem, and also to a program for causing a computer to function as such a debugging device. [Background technology]

[0002] In various industries, planning is carried out using mathematical models known as optimization problems. An optimization problem is composed of an objective function that represents utility and constraints that define the search range for a solution. For example, Patent Document 1 discloses a software inspection device that inspects software by determining satisfiability using a constrained optimization solver, with the software to be inspected, input value constraints for the software, and software inspection conditions as input values. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] International Publication No. 2016 / 121074 Summary of the Invention [Problem to be solved by the invention]

[0004] The constraints imposed on an optimization problem are usually mathematical expressions entered by the user. If the user enters an incorrect constraint, an optimization problem that should have a solution may no longer have a solution. For this reason, debugging is important to determine whether the constraints imposed on the optimization problem are appropriate.

[0005] This type of debugging work has traditionally been done manually. This has led to the problem that the quality of judgments on whether constraints are appropriate can be influenced by personal factors. Furthermore, as the number of constraints imposed on an optimization problem increases, the debugging work takes longer.

[0006] One aspect of the present invention has been made in view of the above problems, and its purpose is to realize a debugging device that can automatically and efficiently perform debugging work for constraints imposed on an optimization problem. [Means for solving the problem]

[0007] A debugging device according to one aspect of the present invention includes a dividing means for dividing a plurality of constraints into a plurality of groups when no solution to an optimization problem exists under the plurality of constraints, and an identifying means for selecting at least one group from the plurality of groups and repeatedly determining whether a solution to the optimization problem exists under constraints included in groups other than the selected group, thereby identifying a group that, when excluded, contains a solution to the optimization problem.

[0008] A debugging method according to one aspect of the present invention includes: a debugging device dividing a plurality of constraints into a plurality of groups when no solution to an optimization problem exists under the plurality of constraints; selecting at least one group from the plurality of groups; and repeating a process of determining whether a solution to the optimization problem exists under constraints included in groups other than the selected group, thereby identifying a group that, when excluded, has a solution to the optimization problem.

[0009] A program according to one aspect of the present invention causes a computer to function as a debugging device, and causes the computer to function as: a dividing means that, when a plurality of constraints for which no solution exists exist, divides the plurality of constraints into a plurality of groups; and an identifying means that, by selecting at least one group from the plurality of groups and repeating a process of determining whether a solution to the optimization problem exists under constraints contained in groups other than the selected group, identifies a group for which a solution to the optimization problem exists when excluded. [Effects of the Invention]

[0010] According to one aspect of the present invention, debugging of constraints imposed on an optimization problem can be performed automatically and efficiently. [Brief explanation of the drawings]

[0011] [Figure 1] 1 is a block diagram showing a configuration of a debugging device according to a first embodiment. [Figure 2] FIG. 2 is a flowchart showing the flow of a debugging method according to the first embodiment. [Figure 3] FIG. 10 is a block diagram showing the configuration of a debugging device according to a second embodiment. [Figure 4] FIG. 10 is a flowchart showing the flow of a debugging method according to a second embodiment. [Figure 5] FIG. 10 is a block diagram showing the configuration of a debugging device according to a third embodiment. [Figure 6] FIG. 10 is a flowchart showing the flow of a debugging method according to a third embodiment. [Figure 7] FIG. 1 is a block diagram showing the configuration of an optimization device according to a first embodiment. [Figure 8] FIG. 1 is a flowchart showing the flow of an optimization method according to a first embodiment. [Figure 9] FIG. 10 is a block diagram showing the configuration of an optimization device according to a second embodiment. [Figure 10] FIG. 10 is a flowchart showing the flow of an optimization method according to a second embodiment. [Figure 11] FIG. 10 is a block diagram showing the configuration of a constraint evaluation device according to a third embodiment. [Figure 12] FIG. 10 is a flowchart showing the flow of a constraint evaluation method according to a third embodiment. [Figure 13] FIG. 1 is a block diagram showing the configuration of a computer that functions as a debugging device according to each reference embodiment or an optimization device according to each embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0012] [Optimization problem] The debugging device according to each embodiment and the optimization device according to each reference embodiment described below are devices for identifying inappropriate constraints in order to debug constraints imposed on an optimization problem. The target optimization problem is not particularly limited, but the following optimization problems are envisioned, for example:

[0013] (Optimization problem) In the solution space X, the objective function f(x1, x2, ..., x Γ ) to maximize the elements (x1,x2,…,x Γ The problem of finding a solution space X is called an "optimization problem." Here, the solution space X is the set of elements (x1, x2, ..., x) that satisfy the constraints C1, C2, ..., Cm. Γ ) Each constraint Ci (i=1,2,…,m) is a set of variables x1,x2,…,x Γ It is expressed by a mathematical expression (e.g., an equation or inequality) that includes part or all of the above.

[0014] Here, the objective function f(x1,x2,…,x Γ ) are equivalent to maximizing and minimizing by a trivial transformation. Specifically, if the objective function f(x1, x2, ..., x Γ ) is the optimization problem that minimizes the objective function -f(x1,x2,…,x Γ ) is an optimization problem to maximize

[0015] (Linear programming problems, integer linear programming problems, mixed integer linear programming problems) In an optimization problem where the objective function and constraints are linear with respect to all variables, the variables x1, x2, ..., x Γ An optimization problem where the variables x1, x2, …, x are continuous variables (real variables) is called a "linear programming problem." Γ An optimization problem where the variables x1, x2, ..., x are discrete variables (integer variables) is called an "integer linear programming problem." Also, among optimization problems where the objective function and constraints are linear with respect to all variables, Γ An optimization problem that contains both continuous and discrete variables is called a "mixed integer linear programming problem."

[0016] (Binary optimization problem without quadratic constraints) The objective function f(x1, x2, ..., x Γ ) to maximize the elements (x1,x2,…,x Γ )∈X is called a "quadratically unconstrained binary optimization problem." Here, the variables x1, x2, ..., x Γ are binary variables that take on the values ​​0 or 1. In a quadratic unconstrained binary optimization problem, constraints cannot be handled directly, but they can be handled approximately by adding terms corresponding to the constraints to the objective function.

[0017]

number

[0018] (Debugging device configuration) The configuration of the debugging device 1 according to this embodiment will be described with reference to Fig. 1. Fig. 1 is a block diagram showing the configuration of the debugging device 1.

[0019] The debugging device 1 is a device for debugging a plurality of constraints C1, C2, ..., Cm imposed on an optimization problem P. Here, m is an arbitrary natural number equal to or greater than 2 that represents the number of constraints.

[0020] 1, the debugging device 1 includes a dividing unit 11 and an identifying unit 12. The dividing unit 11 and the identifying unit 12 are components that respectively realize dividing means and identifying means in this embodiment.

[0021] The dividing unit 11 is a means for dividing the constraints C1, C2, ..., Cm into groups G1, G2, ..., Gn when no solution to the optimization problem P exists under the constraints C1, C2, ..., Cm, where n is a natural number equal to or greater than 2 and less than m, representing the number of groups.

[0022] The identification unit 12 is a means for identifying a group Gj′ from which a solution to the optimization problem P exists when excluded. The identification unit 12 repeats the following steps for each j (j between 1 and n): (1) a selection process for selecting at least one group from a plurality of groups G1, G2, ..., Gn (here, one group Gj; in a modified example described later, n′ groups selected from m groups G1, G2, ..., Gn); and (2) a determination process for determining whether a solution to the optimization problem P exists under constraint conditions included in groups G1, G2, ..., Gj-1, Gj+1, ..., Gn other than the selected group Gj, among a plurality of constraint conditions C1, C2, ..., Cm. The group identified by the identification unit 12 as the group Gj′ from which a solution to the optimization problem P exists when excluded is a group from which a solution to the optimization problem P does not exist under constraint conditions included in groups G1, G2, ..., Gj′-1, Gj′+1, ..., Gn other than the selected group Gj.

[0023] The optimization problem P may be an optimization problem for which it is known in advance that no solution exists under the multiple constraint conditions C1, C2, ..., Cm, or an optimization problem for which it is not known in advance that no solution exists under the multiple constraint conditions C1, C2, ..., Cm. In the latter case, the dividing unit 11 may perform a determination process to determine whether or not a solution exists for the optimization problem P under the multiple constraint conditions C1, C2, ..., Cm, before performing a division process to divide the multiple constraint conditions C1, C2, ..., Cm into multiple groups G1, G2, ..., Gn.

[0024] (Debugging method flow) The flow of the debugging method S1 according to this embodiment will be described with reference to Fig. 2. Fig. 2 is a flow chart showing the flow of the debugging method S1.

[0025] The debugging method S1 is a method for debugging a plurality of constraints C1, C2, . . . , Cm imposed on an optimization problem P. In this embodiment, the debugging method S1 is performed by a debugging device 1.

[0026] As shown in FIG. 2, the debugging method S1 includes a division process S11 and a specification process S12.

[0027] The division process S11 is a process for dividing the constraint conditions C1, C2, ..., Cm into groups G1, G2, ..., Gn when there is no solution to the optimization problem P under the constraint conditions C1, C2, ..., Cm. In the debugging device 1 according to this embodiment, the division process S11 is executed by the division unit 11.

[0028] The identification process S12 is a process for identifying a group Gj' in which a solution to the optimization problem P exists when excluded. In the identification process S12, (1) a selection process S121 for selecting a group Gi from a plurality of groups G1, G2, ..., Gn, and (2) a determination process S122 for determining whether a solution to the optimization problem P exists under constraint conditions belonging to groups G1, G2, ..., Gj-1, Gj+1, ..., Gn other than the selected group Gi among a plurality of constraint conditions C1, C2, ..., Cm, are included. These processes are repeated for each j in the range of 1 to n. The group Gj' identified in the identification process S12 as a group Gj' in which a solution to the optimization problem P exists when excluded is a group Gj' in which a solution to the optimization problem P does not exist under constraint conditions belonging to groups G1, G2, ..., Gj'-1, Gj'+1, ..., Gn other than the group Gj'. In the debugging device 1 according to this embodiment, the identification process S12 is executed by the identification unit 12.

[0029] The optimization problem P may be an optimization problem for which it is known in advance that there is no solution under the multiple constraints C1, C2, ..., Cm, or an optimization problem for which it is not known in advance that there is no solution under the multiple constraints C1, C2, ..., Cm. In the latter case, before executing the division process S11 for dividing the multiple constraints C1, C2, ..., Cm into multiple groups G1, G2, ..., Gn, a determination process may be executed to determine whether or not there is a solution to the optimization problem P under the multiple constraints C1, C2, ..., Cm.

[0030] (Effects of the debugging device and debugging method) In a conventional debugging device, for each constraint Ci (1≦i≦m), it is determined whether or not the constraint Ci is an inappropriate constraint, whereas in the debugging device 1 according to this embodiment, for each group Gj (1≦j≦n), it is determined whether or not the group Gj includes an inappropriate constraint. Therefore, in a conventional debugging device, the optimization problem is solved m times until the determination is completed, whereas in the debugging device 1 according to this embodiment, the optimization problem is solved n times until the determination is completed.

[0031] As described above, the number n of groups G1, G2, ..., Gn is smaller than the number m of constraints C1, C2, ..., Cm. Therefore, the debugging device 1 according to this embodiment can reduce the number of times the optimization problem is solved until the determination is completed compared to conventional debugging devices. As a result, the debugging device 1 according to this embodiment can reduce the time required to complete the determination compared to conventional debugging devices. The debugging method S1 according to this embodiment can also achieve the same effect.

[0032] (Example of division processing) Some specific examples of the division process S11 will be described.

[0033] The number of constraints to be included in each group Gj is p j When the above is predetermined, the following specific example is possible.

[0034] Specific Example 1: The constraints to be included in each group Gj are determined based on the index i of each constraint Ci. For example, constraints C1 to Cp1 are included in group G1, and constraints Cp1+1 to Cp1+p2 are included in group G2. Constraints to be included in groups G3 to Gn are determined in the same way.

[0035] Specific Example 2: Randomly determine the constraint conditions included in each group Gj. For example, include p1 constraint conditions randomly selected from m constraint conditions in group G1, and include p2 constraint conditions randomly selected from the remaining m - p1 constraint conditions in group G2. Determine the constraint conditions included in groups G3 to Gn in the same way.

[0036] Also, when paying attention to the content of each constraint condition Ci, the following specific examples can be considered.

[0037] Specific Example 3: Determine the constraint conditions included in each group Gj so that the same type of constraint conditions belong to the same group. For example, consider two constraint conditions that can be converted from one constraint condition to the other by variable swapping as the same type of constraint conditions, and determine the constraint conditions included in each group Gj so that the same type of constraint conditions belong to the same group. In this case, examples of the set of the same type of constraint conditions include, for example, the pair of "x i +2x i+1 ≧1" and "x i’ +2x i’+1 ≧1" (i ≠ i'), etc.

[0038] (Variant Example 1) In this embodiment, for each of the m constraint conditions C1 to Cm, the problem of determining whether it is an inappropriate constraint condition has been considered, but the scope of the present invention is not limited to this. That is, for each combination of m' constraint conditions selected from the m constraint conditions C1 to Cm, the problem of determining whether it is an inappropriate combination is also included in the scope of the present invention. Here, m' is a specific natural number satisfying 1 < m' < m. In this case, the number of times of solving the optimization problem in the conventional debugging device reaches m!(m - m')! / m'! times.

[0039] In contrast, in the debugging device 1 according to the present embodiment, for each of the n' groups selected from the n groups G1 to Gn, it is determined whether it is an inappropriate combination. Here, n' is a specific natural number satisfying 1 < n' < n. In this case, the specifying unit 12 determines whether a solution to the optimization problem P exists under the constraint conditions included in the groups other than the groups constituting the combination, for each combination of the n' groups selected from the n groups G1, G2,..., Gn. Therefore, the number of times of solving the optimization problem in the debugging device 1 according to the present embodiment can be suppressed to n!(n - n')! / n'! times (since n < m, n!(n - n')! / n'! ≪ m!(m - m')! / m'!). Therefore, according to the debugging device 1 according to the embodiment, the time required to complete the determination can be significantly shortened compared with the conventional debugging device.

[0040] Note that the above-described modification to the present embodiment can also be applied to each of the embodiments described later.

[0041] (Modification Example 2) In the present embodiment, for each of the m constraint conditions C1 to Cm, the problem of determining whether it is an inappropriate constraint condition has been considered, but the scope of the present invention is not limited thereto. That is, the problem of determining whether each combination of any number of constraint conditions selected from the m constraint conditions C1 to Cm is an inappropriate combination is also included in the scope of the present invention. In this case, the number of times of solving the optimization problem in the conventional debugging device reaches m times.

[0042] In contrast, the debugging device 1 according to this embodiment determines whether or not an arbitrary number of groups selected from n groups G1 to Gn are inappropriate combinations. In this case, the identifying unit 12 determines whether or not a solution to the optimization problem P exists under constraints included in groups other than the groups that make up the combination, for each combination of an arbitrary number of groups selected from n groups G1, G2, ..., Gn. Therefore, the number of times the debugging device 1 according to this embodiment solves the optimization problem is 2 n times (n <mなので、2 n ≪2 m Therefore, according to the debug device 1 of the embodiment, the time required to complete the determination can be significantly reduced compared to conventional debug devices.

[0043] The above modifications to this embodiment can also be applied to the other embodiments described below.

[0044] (Variation 3) The debugging device 1 according to this embodiment may further include an output unit. The output unit is configured to present to a user information representing the group Gj' identified by the identification unit 12, information representing the index j' of the group Gj', information representing the constraint conditions included in the group Gj, or information representing the index of the constraint conditions. The output unit may output this information as an image via a display or as sound via a speaker.

[0045] The above modifications to this embodiment can also be applied to the other embodiments described below.

[0046] [Embodiment 2] A second embodiment of the present invention will be described in detail with reference to the drawings. Note that components having the same functions as those described in the first embodiment are given the same reference numerals, and their description will be omitted as appropriate.

[0047] In this embodiment, when the variables to be optimized in the optimization problem P (for example, variables of the objective function) include discrete variables (for example, integers), a relaxed problem P' in which the discrete variables are replaced with continuous variables is used for debugging the constraints C1, C2, ..., Cm. If the relaxed problem P' has no solution, it is mathematically guaranteed that the optimization problem P also has no solution.

[0048] (Debugging device configuration) The configuration of the debugging device 1A according to this embodiment will be described with reference to Fig. 3. Fig. 3 is a block diagram showing the configuration of the debugging device 1A.

[0049] The debugging device 1A is configured by adding a generating unit 13 to the debugging device 1 according to the first embodiment. The generating unit 13 is configured to realize the generating means in this embodiment.

[0050] The generating unit 13 is configured to generate a relaxed problem P' from the optimization problem P by replacing the variables to be optimized from discrete variables with continuous variables.

[0051] The dividing unit 11 determines whether a solution to the optimization problem P exists under a plurality of constraints C1, C2, ..., Cm, using the relaxation problem P' generated by the generating unit 13. For example, the dividing unit 11 determines whether a solution to the relaxation problem P' exists under a plurality of constraints C1, C2, ..., Cm, and determines that a solution to the optimization problem P does not exist if a solution to the relaxation problem P' does not exist. If a solution to the relaxation problem P' does not exist, the dividing unit 11 divides the plurality of constraints C1, C2, ..., Cm into a plurality of groups G1, G2, ..., Gn.

[0052] Note that even if a solution to the relaxed problem P′ exists, there may be a case where a solution to the optimization problem P does not exist. Therefore, when a solution to the relaxed problem P′ exists, the dividing unit 11 may further determine whether or not a solution to the optimization problem P exists.

[0053] The identifying unit 12 uses the relaxed problem P' generated by the generating unit 13 to determine whether or not a solution to the optimization problem P exists under constraint conditions belonging to groups G1, G2, ..., Gj-1, Gj+1, ..., Gn other than group Gj among the multiple constraint conditions C1, C2, ..., Cm. For example, the identifying unit 12 determines whether or not a solution to the relaxed problem P' exists under constraint conditions belonging to groups G1, G2, ..., Gj-1, Gj+1, ..., Gn other than group Gj among the multiple constraint conditions C1, C2, ..., Cm, and determines that a solution to the optimization problem P does not exist if a solution to the relaxed problem P' does not exist.

[0054] Note that even if a solution to the relaxed problem P′ exists, there may be a case where no solution exists to the optimization problem P. Therefore, when a solution to the relaxed problem P′ exists, the identifying unit 12 may further determine whether or not a solution to the optimization problem P exists.

[0055] (Debugging method flow) The flow of the debugging method S1A according to this embodiment will be described with reference to Fig. 4. Fig. 4 is a flow chart showing the flow of the debugging method S1A.

[0056] The debugging method S1A is configured by adding a generation process S13 to the debugging method S1 according to the first embodiment.

[0057] The generation process S13 is a process for generating a relaxed problem P′ by replacing discrete variables with continuous variables as the variables to be optimized in the optimization problem P. In the debugging device 1A, the generation process S13 is executed by the generation unit 13.

[0058] In the division process S11, it is determined whether or not a solution to the optimization problem P exists under a plurality of constraint conditions C1, C2, ..., Cm, using the relaxed problem P' generated in the generation process S13. For example, in the division process S11, it is determined whether or not a solution to the relaxed problem P' exists under a plurality of constraint conditions C1, C2, ..., Cm, and if a solution to the relaxed problem P' does not exist, it is determined that a solution to the optimization problem P does not exist.

[0059] Note that even if a solution to the relaxed problem P′ exists, there may be a case where a solution to the optimization problem P does not exist. Therefore, if a solution to the relaxed problem P′ exists, the division process S11 may further determine whether or not a solution to the optimization problem P exists.

[0060] In the identification process S12, using the relaxed problem P' generated in the generation process S13, it is determined whether or not a solution to the optimization problem P exists under constraint conditions belonging to groups G1, G2, ..., Gj-1, Gj+1, ..., Gn other than group Gj among the multiple constraint conditions C1, C2, ..., Cm. For example, in the identification process S12, it is determined whether or not a solution to the relaxed problem P' exists under constraint conditions belonging to groups G1, G2, ..., Gj-1, Gj+1, ..., Gn other than group Gj among the multiple constraint conditions C1, C2, ..., Cm, and if a solution to the relaxed problem P' does not exist, it is determined that a solution to the optimization problem P does not exist.

[0061] Note that even if a solution to the relaxed problem P′ exists, there may be a case where a solution to the optimization problem P does not exist. Therefore, when a solution to the relaxed problem P′ exists, the identification process S12 may further determine whether or not a solution to the optimization problem P exists.

[0062] (Effects of the debugging device and debugging method) The debugging device 1 according to the first embodiment solves an optimization problem P with discrete variables, whereas the debugging device 1A according to the present embodiment solves a relaxed problem P' with continuous variables. An optimization problem P in which the variables to be optimized include discrete variables is a problem belonging to the NP-hard class, whereas a relaxed problem P' in which the variables to be optimized include all continuous variables is a problem belonging to the P class. Therefore, the debugging device 1 according to the present embodiment has the further advantage of being able to identify a group including an inappropriate constraint condition in a shorter time than the debugging device 1 according to the first embodiment, or being able to identify a group including an inappropriate constraint condition within a realistic time even when the debugging device 1 according to the first embodiment is unable to identify a group including an inappropriate constraint condition within a realistic time.

[0063] [Embodiment 3] A third embodiment of the present invention will be described in detail with reference to the drawings. Note that components having the same functions as those described in the first embodiment are given the same reference numerals, and their description will be omitted as appropriate.

[0064] (Debugging device configuration) The configuration of the debugging device 1B according to this embodiment will be described with reference to Fig. 5. Fig. 5 is a block diagram showing the configuration of the debugging device 1B.

[0065] The debug device 1B is configured by adding a dividing unit 14 and an identifying unit 15 to the debug device 1 according to the first embodiment.

[0066] The dividing unit 14 is a means for dividing the constraints belonging to the group Gj' identified by the identifying unit 12, among the multiple constraints C1, C2, ..., Cm, into multiple subgroups Gj'1, Gj'2, ..., Gj'q. If the number of constraints included in the group Gj' is p, the number of subgroups q is a natural number between 2 and p. When q=p, each subgroup Gj'k includes one constraint. In this case, each subgroup Gj'k can be identified with the constraints included in that subgroup Gj'k.

[0067] The identification unit 15 is a means for identifying a subgroup Gj'k' from which a solution to the optimization problem P exists when excluded. The identification unit 12 repeats, for each k in the range of 1 to q, the following steps: (1) a selection process for selecting one subgroup Gi'k from multiple subgroups Gj'1, Gj'2, ..., Gj'q; and (2) a determination process for determining whether a solution to the optimization problem P exists under constraints included in subgroups Gi'1, Gi'2, ..., Gi'k-1, Gi'k+1, ..., Gi'q other than the selected subgroup Gi'k, among multiple constraints C1, C2, ..., Cm. The subgroup identified by the identification unit 15 as the subgroup Gj'k' from which a solution to the optimization problem P exists when excluded is a subgroup from which a solution to the optimization problem P does not exist under constraints included in subgroups Gi'1, Gi'2, ..., Gi'k'-1, Gi'k'+1, ..., Gi'q other than the selected subgroup Gi'k.

[0068] (Debugging method flow) The flow of the debugging method S1B according to this embodiment will be described with reference to Fig. 6. Fig. 6 is a flow chart showing the flow of the debugging method S1B.

[0069] The debugging method S1B is configured by adding a division process S14 and a specification process S15 to the debugging method S1 according to the first embodiment.

[0070] The division process S14 is a process for dividing the constraints belonging to the group Gj' identified by the identification process S12, among the multiple constraints C1, C2, ..., Cm, into multiple subgroups Gj'1, Gj'2, ..., Gj'q. If the number of constraints included in the group Gj' is p, the number of subgroups q is a natural number between 2 and p. When q = p, each subgroup Gj'k includes one constraint. In this case, each subgroup Gj'k can be identified with the constraint included in that subgroup Gj'k. In the debugging device 1B, the division process S14 is executed by the division unit 14.

[0071] The identification process S15 is a process for identifying a subgroup Gj'k' whose exclusion results in a solution to the optimization problem P. In the identification process S15, (1) a selection process for selecting one subgroup Gi'k from multiple subgroups Gj'1, Gj'2, ..., Gj'q, and (2) a determination process for determining whether a solution to the optimization problem P exists under constraints included in subgroups Gi'1, Gi'2, ..., Gi'k-1, Gi'k+1, ..., Gi'q other than the selected subgroup Gi'k among multiple constraints C1, C2, ..., Cm, are repeated for each k between 1 and q. A subgroup identified in the identification process S15 as a subgroup Gj'k' for which a solution to the optimization problem P exists when excluded is a subgroup for which there is no solution to the optimization problem P under the constraints contained in the subgroups Gi'1, Gi'2, ..., Gi'k'-1, Gi'k'+1, ..., Gi'q other than the subgroup Gi'k'. In the debugging device 1B, the identification process S15 is executed by the identification unit 15.

[0072] (Effects of the debugging device and debugging method) In the debugging device 1 according to the first embodiment, whether or not a constraint is appropriate is determined on a group basis, whereas in the debugging device 1 according to the present embodiment, whether or not a constraint is appropriate is determined on a subgroup basis. Therefore, the debugging device 1B according to the present embodiment has the further advantage of being able to determine whether or not a constraint is appropriate in smaller units (subgroup units) than the debugging device 1B according to the first embodiment.

[0073] [Reference form 1] A first embodiment of the present invention will be described in detail with reference to the drawings. This embodiment is the basis for the embodiments described below.

[0074] (Configuration of the optimization device) The configuration of the optimization device 2 according to this embodiment will be described with reference to Fig. 7. Fig. 7 is a block diagram showing the configuration of the optimization device 2.

[0075] The optimization device 2 is a device for solving an optimization problem of maximizing or minimizing the value of an objective function f(x) under m (m is any natural number) constraints C1, C2, ..., Cm. Here, m is any natural number, and x = (x1, x2, ..., x Γ ) is a variable vector. The constraint Ci is, for example, the inequality Aix+bi≧0. Here, i is a natural number between 1 and m, Ai is a coefficient matrix, and bi is a coefficient vector. In other words, in each constraint, the sum of the coefficient matrix and the coefficient vector is a non-negative value.

[0076] The optimization device 2 includes an adding unit 21, a converting unit 22, and a calculating unit .

[0077] The adding unit 21 is configured to generate a new objective function f'(x, p1, p2, ..., pm) by adding a new variable p corresponding to each constraint condition Ci (i is a natural number between 1 and m) to the objective function f(x). The objective function f(x) is also referred to as a first objective function, and the new objective function f'(x, p1, p2, ..., pm) is also referred to as a second objective function. In other words, the adding unit 21 is configured to add at least one or more new variables corresponding to at least one or more constraint conditions to the first objective function to generate a second objective function.

[0078] The new objective function f'(x, p1, p2, ..., pm) is, for example, f'(x, p1, p2, ..., pm) = f(x) + p1 + p2 + ... + pm. In other words, the second objective function is the sum of the first objective function and the new variables.

[0079] The conversion unit 22 is configured to convert each constraint condition Ci into a new constraint condition C'i imposed on the corresponding new variable pi. In other words, the conversion unit 22 is configured to convert each constraint condition into a new constraint condition imposed on the corresponding new variable pi.

[0080] The new constraint C'i is, for example, the inequality pi ≧ 0 and the inequality pi ≧ −Aix + bi. In other words, the new constraint is expressed as an inequality in which the corresponding new variable is non-negative and uses a linear sum of a coefficient matrix, a variable, and a coefficient vector.

[0081] The calculation unit 23 is configured to calculate values ​​of the variable x and each new variable pi of the new objective function f'(x, p1, p2, ..., pm) that maximize or minimize the new objective function f'(x, p1, p2, ..., pm) under the new constraints C'1, C'2, ..., C'm. In other words, the calculation unit 23 is configured to calculate values ​​of the variables of the second objective function and each new variable that maximize or minimize the second objective function under the new constraints.

[0082] (Optimization method flow) The flow of the optimization method S2 according to this embodiment will be described with reference to Fig. 8. Fig. 8 is a flow chart showing the flow of the optimization method S2.

[0083] The optimization method S2 is a method for solving an optimization problem of maximizing or minimizing the value of an objective function f(x) under m constraints C1, C2, ..., Cm. In this embodiment, the optimization method S2 is performed by an optimization device 2.

[0084] As shown in FIG. 8, the optimization method S2 includes an addition process S21, a conversion process S22, and a calculation process S23.

[0085] The addition process S21 is a process for generating a new objective function f'(x, p1, p2, ..., pm) by adding a new variable p corresponding to each constraint condition C to the objective function f(x). In other words, the addition process S21 is a process for adding at least one or more new variables corresponding to at least one or more constraint conditions to the first objective function to generate a second objective function. The new objective function f'(x, p1, p2, ..., pm) is, for example, f'(x, p1, p2, ..., pm) = f(x) + p1 + p2 + ... + pm. In this embodiment, the addition process S21 is executed by the addition unit 21 of the optimization device 2.

[0086] The conversion process S22 is a process for converting each constraint condition Ci into a new constraint condition C'i imposed on the corresponding new variable pi. In other words, the conversion process S22 is a process for converting each constraint condition into a new constraint condition imposed on the corresponding new variable pi. The new constraint condition C'i is, for example, the inequality pi≧0 and the inequality pi≧−Aix+bi. In this embodiment, the conversion process S22 is executed by the conversion unit 22 of the optimization device 2.

[0087] The calculation process S23 is a process for calculating values ​​of the variable x and each new variable pi of the new objective function f'(x, p1, p2, ..., pm), which maximize or minimize the new objective function f'(x, p1, p2, ..., pm) under the new constraint conditions C'1, C'2, ..., C'm. In other words, the calculation process S23 is a process for calculating values ​​of the variables of the second objective function and each new variable, which maximize or minimize the second objective function under the new constraint conditions. In this embodiment, the calculation process S23 is executed by the calculation unit 23 of the optimization device 2.

[0088] (Effects of the optimization device and optimization method) The optimization problem of maximizing or minimizing the value of the new objective function f'(x, p1, p2, ..., pm) under the new constraints C'1, C'2, ..., C'm is a relaxed version of the optimization problem of maximizing or minimizing the value of the original objective function f(p1, p2, ..., pm) under the original constraints C1, C2, ..., Cm. Therefore, the optimization problem of maximizing or minimizing the value of the new objective function f'(x, p1, p2, ..., pm) under the new constraints C'1, C'2, ..., C'm always has a solution. Therefore, according to the optimization device 2 of this embodiment, even if the optimization problem of maximizing or minimizing the value of the original objective function f(p1, p2, ..., pm) under the original constraints C1, C2, ..., Cm does not have a solution, an approximate solution (a solution obtained by loosely applying the constraints C1, C2, ..., Cm) can always be obtained.

[0089] Furthermore, the value of the new variable pi that maximizes or minimizes the value of the new objective function f'(x, p1, p2, ..., pm) represents the degree of violation of the corresponding constraint condition Ci. Therefore, according to the optimization device 2 of this embodiment, the degree of violation of each constraint condition Ci can be obtained along with the above-mentioned approximate solution.

[0090] The optimization method S2 according to this embodiment also provides the same effects as those of the optimization device 2 according to this embodiment.

[0091] [Reference form 2] A second embodiment of the present invention will be described in detail with reference to the drawings. Note that components having the same functions as those described in the first embodiment are given the same reference numerals, and their description will be omitted as appropriate.

[0092] (Configuration of the optimization device) The configuration of an optimization device 2A according to this embodiment will be described with reference to Fig. 9. Fig. 9 is a block diagram showing the configuration of the optimization device 2A.

[0093] The optimization device 2A is configured by adding an output unit 24 to the optimization device 2 according to the first embodiment.

[0094] The output unit 24 is configured to output, among the values ​​calculated by the calculation unit 23, the values ​​of the variable vector x other than the new variables p1, p2, ..., pm as an approximate solution to the optimization problem that maximizes or minimizes the value of the objective function f(x) under the constraints C1, C2, ..., Cm. The output unit 24 is also configured to output, among the values ​​calculated by the calculation unit 23, the value of each new variable pi as a violation degree with respect to the corresponding constraint Ci. The output unit 24 may output these values ​​as an image using a display or as sound using a speaker.

[0095] (Optimization method flow) The configuration of the optimization method S2A according to this embodiment will be described with reference to Fig. 10. Fig. 10 is a flow diagram showing the flow of the optimization method S2A.

[0096] The optimization method S2A is configured by adding an output process S24 to the optimization method S2 according to the first embodiment.

[0097] The output process S24 is a process for outputting the value of the variable vector x, among the values ​​calculated in the calculation process S23, as an approximate solution to the optimization problem that maximizes or minimizes the value of the objective function f(x) under the constraints C1, C2, ..., Cm. The output process S24 is also a process for outputting the value of each new variable pi, among the values ​​calculated in the calculation process S23, as the degree of violation of the corresponding constraint Ci. In the output process S24, these values ​​may be output as an image using a display or as sound using a speaker.

[0098] (Effects of the optimization device and optimization method) The optimization device 2A according to this embodiment has the additional advantage of being able to notify the user of an approximate solution to an optimization problem that maximizes or minimizes the value of the objective function f(x) under constraints C1, C2, ..., Cm, along with the degree of violation of each constraint Ci. The optimization method S2A according to this embodiment also has the additional advantage similar to that of the optimization device 2A according to this embodiment.

[0099] [Combination of the embodiment and the reference embodiment] In the debugging device 1, the dividing unit 11 and the identifying unit 12 solve the optimization problem to determine whether or not a solution exists. At this time, the optimization device 2 can be used as a solver for solving the optimization problem. In this case, the dividing unit 11 and the identifying unit 12 determine that a solution exists for the optimization problem if the violation degrees for all constraint conditions are 0, and determine that a solution does not exist for the optimization problem if the violation degree for any one constraint condition is not 0. Alternatively, they determine that a solution does not exist for the optimization problem if the violation degrees for all constraint conditions are below a predetermined threshold, and determine that a solution does not exist for the optimization problem if any one constraint condition is violated but exceeds the predetermined threshold.

[0100] [Reference form 3] (Configuration of the constraint evaluation device) The configuration of the constraint condition evaluation device 3 according to this embodiment will be described with reference to Fig. 11. Fig. 11 is a block diagram showing the configuration of the constraint condition evaluation device 3.

[0101] The constraint evaluation device 3 is a device for evaluating the degree of satisfaction Si, which indicates the degree to which a solution to an optimization problem satisfies each constraint Ci in an optimization problem in which the value of an objective function f(x) is maximized or minimized under m constraints C1, C2, ..., Cm. Here, m is any natural number, i is a natural number between 1 and m, and x = (x1, x2, ..., x Γ ) is a variable vector. The constraint Ci to be evaluated is a constraint that can be expressed as gi(x)≧0 among the m constraints C1, C2, . . . , Cm.

[0102] As shown in FIG. 11, the constraint evaluation device 3 includes a calculation unit 31, an evaluation unit 32, and a presentation unit 33.

[0103] The calculation unit 31 is configured to calculate the value of a variable x that maximizes or minimizes the value of an objective function f(x) under m constraints C1, C2, ..., Cm, i.e., to solve an optimization problem.

[0104] The evaluation unit 32 is configured to calculate a satisfaction degree Si for each constraint condition Ci among the m constraint conditions C1, C2, ..., Cm that can be expressed in the form gi(x) ≥ 0. The evaluation unit 32 calculates the satisfaction degree Si, for example, by substituting the value of the variable x calculated by the calculation unit 31 (i.e., the solution to the optimization problem) for gi(x) appearing on the left side of the constraint condition Ci.

[0105] The presentation unit 33 is configured to present to the user the degree of fulfillment S calculated by the evaluation unit 32 for each constraint condition C i among the m constraint conditions C1, C2, ..., Cm that can be expressed in the form gi(x)≧0, or an index calculated from the degree of fulfillment S i. For example, the presentation unit 33 sorts the m constraint conditions C1, C2, ..., Cm in descending or ascending order of the degree of fulfillment S i and displays them on a display. Alternatively, the presentation unit 33 creates a graph (e.g., a pie chart) showing the degree of fulfillment S i of each constraint condition C i and displays the created graph on a display. Alternatively, the presentation unit 33 creates a heat map showing the degree of fulfillment S i of each constraint condition C i and displays the created heat map on a display.

[0106] (Flow of constraint evaluation method) The flow of the constraint condition evaluation method S3 according to this embodiment will be described with reference to Fig. 12. Fig. 12 is a flow diagram showing the flow of the constraint condition evaluation method S3.

[0107] The constraint evaluation method S3 is a method for evaluating the degree of satisfaction Si, which indicates the degree to which a solution to an optimization problem satisfies each constraint Ci, in an optimization problem of maximizing or minimizing the value of an objective function f(x) under m constraints C1, C2, ..., Cm. In this embodiment, the constraint evaluation method S3 is performed by a constraint evaluation device 3.

[0108] As shown in FIG. 12, the constraint condition evaluation method S3 includes a calculation process S31, an evaluation process t, and a presentation process S33.

[0109] The calculation process S31 is a process for calculating the value of the variable x that maximizes or minimizes the value of the objective function f(x) under m constraints C1, C2, ..., Cm. In other words, it is a process for solving an optimization problem. In the constraint evaluation device 3 according to this embodiment, the calculation process S31 is executed by the calculation unit 31.

[0110] The evaluation process S32 is a process for calculating a satisfaction level Si for each constraint condition Ci among m constraint conditions C1, C2, ..., Cm that can be expressed in the form of gi(x) ≥ 0. In the evaluation process S32, for example, the satisfaction level Si is calculated by substituting the value of the variable x calculated in the calculation process S31 (i.e., the solution of the optimization problem) into gi(x) appearing on the left side of the constraint condition Ci. In the constraint condition evaluation device 3 according to this reference embodiment, the evaluation process S32 is executed by the evaluation unit 32.

[0111] The presentation process S33 is a process for presenting to the user the degree of fulfillment S calculated in the evaluation process S32 for each constraint condition C i that can be expressed as gi(x)≧0 among the m constraint conditions C1, C2, ..., Cm, or an index calculated from the degree of fulfillment S i. For example, in the presentation process S33, the m constraint conditions C1, C2, ..., C m are sorted in descending or ascending order of the degree of fulfillment S i and displayed on a display. Alternatively, in the presentation process S33, a graph (e.g., a pie chart) showing the degree of fulfillment S i of each constraint condition C i is created and displayed on a display. Alternatively, in the presentation process S33, a heat map showing the degree of fulfillment S i of each constraint condition C i is created and displayed on a display. In the constraint condition evaluation device 3 according to this reference embodiment, the presentation process S33 is executed by the presentation unit 33.

[0112] (Effects of the constraint evaluation device and the constraint evaluation method) The satisfaction degree Si of the constraint condition Ci described above takes a large value when the solution to the optimization problem satisfies the constraint condition Ci with a large margin, and takes a small value when the solution to the optimization problem barely satisfies the constraint condition Ci. The constraint condition evaluation device 3 according to this embodiment can present the satisfaction degree Si having such properties to the user. This allows the user to determine whether each constraint condition Ci is an appropriate constraint or an inappropriate constraint by referring to the satisfaction degree Si. This allows the debugging of the constraint conditions C1, C2, ..., Cm to proceed efficiently.

[0113] [Software implementation example] Some or all of the functions of the debugging devices 1, 1A, 1B, the optimization devices 2, 2A, and the constraint evaluation device 3 may be realized by hardware such as an integrated circuit (IC chip), or by software.

[0114] In the latter case, the debugging devices 1, 1A, and 1B, the optimization devices 2 and 2A, and the constraint evaluation device 3 are realized, for example, by a computer that executes instructions of a program, which is software that realizes each function. An example of such a computer (hereinafter referred to as computer C) is shown in FIG. 13. The computer C includes at least one processor C1 and at least one memory C2. The memory C2 stores a program P for causing the computer C to operate as the debugging devices 1, 1A, and 1B, the optimization devices 2 and 2A, and the constraint evaluation device 3. In the computer C, the processor C1 reads and executes the program P from the memory C2, thereby realizing each function of the debugging devices 1, 1A, and 1B, the optimization devices 2 and 2A, and the constraint evaluation device 3.

[0115] The processor C1 may be, for example, a central processing unit (CPU), a graphic processing unit (GPU), a digital signal processor (DSP), a micro processing unit (MPU), a floating point number processing unit (FPU), a physics processing unit (PPU), a tensor processing unit (TPU), a quantum processor, a microcontroller, or a combination thereof. The memory C2 may be, for example, a flash memory, a hard disk drive (HDD), a solid state drive (SSD), or a combination thereof.

[0116] The computer C may further include a RAM (Random Access Memory) for expanding the program P during execution and for temporarily storing various data. The computer C may also include a communication interface for transmitting and receiving data to and from other devices. The computer C may also include an input / output interface for connecting input / output devices such as a keyboard, mouse, display, and printer.

[0117] Furthermore, the program P can be recorded on a non-transitory tangible recording medium M that can be read by the computer C. Such a recording medium M can be, for example, a tape, a disk, a card, a semiconductor memory, or a programmable logic circuit. The computer C can acquire the program P via such a recording medium M. The program P can also be transmitted via a transmission medium. Such a transmission medium can be, for example, a communication network or broadcast waves. The computer C can also acquire the program P via such a transmission medium.

[0118] [Appendix 1] The present invention is not limited to the above-described embodiments, and various modifications are possible within the scope of the claims. For example, embodiments obtained by appropriately combining the technical means disclosed in the above-described embodiments are also included in the technical scope of the present invention.

[0119] [Appendix 2] Some or all of the above-described embodiments can also be described as follows: However, the present invention is not limited to the following described aspects.

[0120] (Appendix 1) 1. A debugging device comprising: a dividing means for dividing a plurality of constraints into a plurality of groups when a solution to an optimization problem does not exist under the plurality of constraints; and an identifying means for selecting at least one group from the plurality of groups and repeatedly determining whether a solution to the optimization problem exists under constraints included in groups other than the selected group, thereby identifying a group that, when excluded, contains a solution to the optimization problem.

[0121] (Appendix 2) 2. The debugging device of claim 1, further comprising: a generating means for generating a relaxation problem in which a variable to be optimized in the optimization problem is a continuous variable; and if a solution to the relaxation problem does not exist under the plurality of constraints, the dividing means divides the plurality of constraints into a plurality of groups.

[0122] (Appendix 3) 3. The debugging device according to claim 1, wherein the dividing means divides the plurality of constraints into a plurality of groups such that constraints of the same type belong to the same group.

[0123] (Appendix 4) 4. The debugging device according to claim 3, wherein the dividing means considers two constraints that include the same number of variables and that can be converted from one constraint to the other by swapping the variables to be constraints of the same type.

[0124] (Appendix 5) 5. The debugging device according to any one of appendices 1 to 4, wherein the dividing means divides the plurality of constraints included in the group identified by the identifying means into a plurality of subgroups, and the identifying means selects one subgroup from the plurality of subgroups and identifies a subgroup that, when excluded, contains a solution to the optimization problem by repeating a process of determining whether a solution to the optimization problem exists under constraints included in a subgroup other than the selected subgroup.

[0125] (Appendix 6) 1. A debugging method comprising: a debugging device, when a solution to an optimization problem does not exist under a plurality of constraints, dividing the plurality of constraints into a plurality of groups; selecting at least one group from the plurality of groups; and repeating a process of determining whether a solution to the optimization problem exists under constraints included in a group other than the selected group, thereby identifying a group that, when excluded, results in a solution to the optimization problem.

[0126] (Appendix 6a) 7. The debugging method of claim 6, further comprising generating a relaxation problem in which variables to be optimized in the optimization problem are continuous variables, and if a solution to the relaxation problem does not exist under the plurality of constraints, dividing the plurality of constraints into a plurality of groups.

[0127] (Appendix 7) A program that causes a computer to function as a debugging device, the program causing the computer to function as: a dividing means that, when a solution to an optimization problem does not exist under a plurality of constraints, divides the plurality of constraints into a plurality of groups; and an identifying means that, by selecting at least one group from the plurality of groups and repeating a process of determining whether a solution to the optimization problem exists under constraints included in groups other than the selected group, identifies a group that, when excluded, contains a solution to the optimization problem.

[0128] (Appendix 7a) 8. The program according to claim 7, further functioning as a generation means for generating a relaxation problem in which a variable to be optimized in the optimization problem is a continuous variable, and when a solution to the relaxation problem does not exist under the plurality of constraints, the division means divides the plurality of constraints into a plurality of groups.

[0129] (Appendix 8) A debugging device comprising at least one processor, wherein the processor executes a division process for dividing a plurality of constraints into a plurality of groups when a solution to an optimization problem does not exist under the plurality of constraints, and an identification process for selecting at least one group from the plurality of groups and repeatedly determining whether a solution to the optimization problem exists under constraints included in groups other than the selected group, thereby identifying a group that, when excluded, contains a solution to the optimization problem.

[0130] The debugging device may further include a memory that stores a program for causing the processor to execute the dividing process and the identifying process. The program may be recorded on a computer-readable, non-transitory, tangible recording medium. [Explanation of symbols]

[0131] 1,1A,1B Debugging Device 11, 14 division part 12, 15 Specific part 13 Generation part

Claims

1. a dividing means for dividing the plurality of constraints into a plurality of groups when no solution exists for the optimization problem under the plurality of constraints; an identification means for selecting at least one group from the plurality of groups, and repeating a process of determining whether or not a solution to the optimization problem exists under constraints included in groups other than the selected group, thereby identifying a group that, when excluded, contains a solution to the optimization problem; 1. A debugging device comprising:

2. a generating means for generating a relaxation problem in which a variable to be optimized in the optimization problem is a continuous variable; if a solution to the relaxation problem does not exist under the plurality of constraints, the dividing means divides the plurality of constraints into a plurality of groups.

2. The debugging device according to claim 1.

3. the dividing means divides the plurality of constraint conditions into a plurality of groups so that constraint conditions of the same type belong to the same group; 3. The debugging device according to claim 1 or 2.

4. the dividing means regards two constraints that include the same number of variables and can be converted from one constraint to the other by exchanging the variables as constraints of the same type; 4. The debugging device according to claim 3.

5. the dividing means divides the plurality of constraints included in the group identified by the identifying means into a plurality of subgroups; the identifying means selects one subgroup from the plurality of subgroups, and repeats a process of determining whether or not a solution to the optimization problem exists under constraints included in subgroups other than the selected subgroup, thereby identifying a subgroup that, when excluded, would contain a solution to the optimization problem.

3. The debugging device according to claim 1.

6. The debugging device dividing the plurality of constraints into a plurality of groups if no solution to the optimization problem exists under the plurality of constraints; selecting at least one group from the plurality of groups, and repeating a process of determining whether a solution to the optimization problem exists under constraints contained in groups other than the selected group, thereby identifying a group for which a solution to the optimization problem exists when excluded; Debugging methods, including:

7. A program that causes a computer to function as a debugging device, The computer a dividing means for dividing the plurality of constraints into a plurality of groups when no solution exists for the optimization problem under the plurality of constraints; an identification means for selecting at least one group from the plurality of groups, and repeating a process of determining whether or not a solution to the optimization problem exists under constraints included in groups other than the selected group, thereby identifying a group that, when excluded, contains a solution to the optimization problem; A program that functions as a

Citation Information

Patent Citations

  • Optimization device, optimization program, and optimization method

    JP2022094763A

  • Rule consistency verification device and rule consistency verification method

    WO2016110946A1

  • Software inspection apparatus

    WO2016121074A1