This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2020-202515, filed on Dec. 7, 2020, the entire contents of which are incorporated herein by reference.
The embodiments discussed herein are related to an optimization apparatus, an optimization method, and a non-transitory computer-readable storage medium storing an optimization program.
In some development situations for materials, drug discoveries, devices, and so on, it is requested to optimize both continuous variables and discrete variables. For example, in a situation of designing a motor, the inner diameter of a magnet, the thickness of the magnet, the size of a gap, and the like are continuous variables, while the magnet arrangement (the orientations of small magnets) and the like are discrete variables.
As a method of optimizing continuous variables, a real-coded genetic algorithm (real-coded GA) is exemplified. This method is known to enable a better solution to be obtained in a practical time when used.
A specific crossover method in the real-coded GA is, for example, a method called “REXstar”. In REXstar, a reflection point of each parent with respect to a position vector is created, a global descent direction is identified by obtaining the center of gravity of the individuals rated in the upper half from among the parents and the reflection points, and the distribution of the individuals is moved by a step size t in the global descent direction. In this way, REXstar is capable of searching for a solution in a more appropriate direction than in other crossover methods in the real-coded genetic algorithm, and therefore is considered to achieve high solution search performance.
As a specific generation alternation method in the real-coded GA, there is, for example, a method called “just generation gap (JGG)”. In JGG, np individuals are randomly selected from a population of individuals and are set as parents, and np children are selected in descending order of evaluation from children generated by performing crossover on the parents, and are set as parents for the next generation. In this way, JGG is capable of stably converging the solution with a smaller number of individuals (population size) than in the other methods.
As a technique related to optimization of discrete variables, there is a technique using an “annealing method (annealing)” capable of efficiently optimizing a combinatorial optimization problem for optimizing a combination of discrete values. For example, as the technique related to optimization of discrete variables, a technique has been proposed in which, in order to determine an optimal flight path from flight path candidates, a global search is performed using a GA, and then a local search is performed by simulated annealing (SA).
In order to efficiently optimize an optimization problem including continuous variables by using an annealing method (annealing), each of the continuous variables is divided (discretized) by a predetermined step to be expressed as discrete values and then is optimized in some cases. In this operation, since many discrete variables (bits used for calculation) have to be used when the continuous value is discretized and expressed as discrete values, which may in turn result in enormous calculation cost and difficulty of the calculation.
An example of the related art includes as follows: Japanese Laid-open Patent Publication No. 11-295098.
Another example of the related art also includes as follows: Shigenobu Kobayashi, “The Frontiers of Real-coded Genetic Algorithms”, [Journal] Artificial Intelligence, Vol. 24, No. 1, pp. 147-162, 2009.
According to an aspect of the embodiments, an optimization apparatus configured to optimize an optimization problem represented by using an objective function expression including a continuous variable composed of continuous value data and a discrete variable composed of discrete value data, the optimization apparatus including: a memory; and a processor coupled to the memory, the processor being configured to perform processing, the processing including: obtaining, as the continuous variable, an n-th generation data value group (n≥1) including a plurality of data values selected from the continuous value data; determining an evaluation value of each of the plurality of data values in the n-th generation data value group by performing optimization processing on the objective function expression by an annealing method using the n-th generation data value group; obtaining an (n+1)-th generation data value group based on the evaluation values by using a genetic algorithm, the (n+1)-th generation data value group being different from the n-th generation data value group and including a plurality of data values selected from the continuous value data; and replacing the n-th generation data value group with the (n+1)-th generation data value group as the continuous variable.
The object and advantages of the invention will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the invention.
In one aspect, an object of the present disclosure is to provide an optimization apparatus and the like capable of efficiently optimizing an optimization problem including both of continuous variables and discrete variables while saving calculation cost requested for the optimization.
(Optimization Apparatus)
The technique disclosed herein is based on the findings by the inventors that the related art entails enormous calculation cost for optimizing an optimization problem including both of continuous variables and discrete variables, and therefore is incapable of efficiently optimizing such an optimization problem. In this regard, problems and others of the related art will be described in more detail before the details of the technique disclosed herein is described.
As described above, in the development situations for materials. drug discoveries, devices, and so on, the technique for optimization such as optimization of the composition of a mixture, a search for a stable structure of candidate substances for a drug, or optimization of the shape of a device by solving a combinatorial optimization problem has been proposed. Such a combinatorial optimization problem is sometimes a combinatorial optimization problem in which both of continuous variables and discrete variables are included as variables and optimization of the continuous values and optimization of the discrete values are complexly combined.
Here, examples of the optimization of continuous values in a combinatorial optimization problem include optimization of dimensions of a device, optimization of positions where to install members, optimization of a mixture ratio of substances in material development, and the like. Examples of the optimization of discrete values in a combinatorial optimization problem include optimization of the types and numbers of materials to be used, the arrangement of members, and the like.
As a specific example of a combinatorial optimization problem including both of continuous variables and discrete variables as variables, considered herein is an example of optimizing a shape and others of a motor in designing the motor as illustrated in
In the example illustrated in
In the example illustrated in
In Example, as illustrated in
As described above, in the example illustrated in
Therefore, in order to solve (search for a solution to) a combinatorial optimization problem including both of continuous variables and discrete variables, it is requested to appropriately handle the variables in consideration of a mutual relationship between the continuous variables and the discrete variables, and to appropriately optimize both of the continuous variables and the discrete variables.
As a method of optimizing continuous variables, the real-coded genetic algorithm (real-coded GA) is exemplified as described above. In the real-coded GA, a continuous function including a continuous value as a variable is optimized by handling genes in the genetic algorithm as real-coded genes represented by a real-coded vector. In the real-coded GA, “features” of solution candidates are handled as coordinates in a parameter space, and the “similarity” between the solution candidates is evaluated as a Euclidean distance in the parameter space. By using the above real-coded GA, it is possible to increase a possibility of finding out a global solution (global minimum) and to obtain a better solution in a practical time.
The details of the real-coded GA are disclosed in literature, for example, such as “Seminar Material (Kimura), Department of Marine Systems Engineering, Graduate School of Engineering, Kyushu University, “Genetic Algorithms for Real-Coded Parameter Optimization (Japanese)” (http://sysplan.nams.kyushu-u.ac.jp/gen/edu/Algorithms/RGA_JGGandREX/RGA_JGG_REX.pdf).
As a specific crossover method in the real-coded GA, for example, the method called “REXstar” is exemplified as described above. REXstar is considered to achieve high solution search performance because REXstar is capable of searching for a solution in a more appropriate direction than in the other crossover methods in the real-coded genetic algorithm.
In REXstar, for example, given K parents, a reflection point of the center of gravity xg of each parent is created (a reflection is created) with respect to the center of gravity xg of the position vectors x1, . . . , xk of the parents. In REXstar, for example, “xb-xg” where xb denotes the center of gravity of the individuals rated in the upper half among the total of 2K individuals is determined as a global descent direction and children are generated by using the global descent direction. A magnitude of movement in the global descending direction is referred to as a step size t.
As a specific crossover expression in REXstar, for example, the following expression may be used.
In the above three expressions, n denotes the number of design variables (continuous variables), np denotes the number of parents, and U(a, b) denotes a uniform distribution in a range from a to b.
As the specific generation alternation method in the real-coded GA, for example, there is the method called “just generation gap (JGG)” as described above. JGG is capable of stably converging the solution with a smaller number of individuals (population size) than in another basic method (minimal generation gap (MGG)).
In JGG, for example, np individuals are randomly selected from a population of individuals and are set as a parent population and crossover is applied to the parent population to generate a child population including np children. In JGG, for example, np children are selected in descending order of evaluation from the child population, and are set as parents for the next generation by replacing all the parents. As described above, since the number of parents is equal to the number of children in JGG, JGG is capable of stably converging the solution with a smaller number of individuals (population size) than in the other method.
The “population (generation)” in the real-coded GA means a group (collection) of data having values of continuous variables different from each other (values of different parameters).
Details of REXstar and JGG are disclosed in, for example, the above-described literatures such as “Shigenobu Kobayashi, “The Frontiers of Real-coded Genetic Algorithms”, [Journal] Artificial Intelligence, Vol. 24, No. 1, pp. 147-162, 2009” and “Takahiro Sato, “A Study on Design Optimization of Electric Devices and Machines Based on Electromagnetic Field Analysis (Japanese)”, Doctor's Thesis in Annual Year 2014, Division of Systems and Information Engineering, Graduate School of Information Science and Technology. Hokkaido University, 2015”.
With reference to
First, in the example of the real-coded GA, an initial population is generated (S101). The initial population may be generated, for example, by generating a plurality of initial individuals in which continuous variables are randomly set.
Next, in the example of the real-coded GA, each individual in the initial population is evaluated (S102). The evaluation of each individual may be performed in a way such as, for example, a way of calculating the value of an objective function f(x) for a continuous variable x and setting the calculation result as an evaluation value, or a way of determining a value of an objective function by setting the continuous variable x set as a parameter and performing analysis using numerical calculation, and setting the analysis result as an evaluation value.
Subsequently, in the example of the real-coded GA, a plurality of individuals to be set as parents are randomly selected from the individuals of the initial population (S103). In the example of the real-coded GA, the parents are selected by using JGG at S103.
In the example of the real-coded GA, crossover using REXstar is performed to generate a child population (S104).
Next, in the example of the real-coded GA, each individual in the child population is evaluated (S105). The evaluation for each individual in the child population may be performed in the same method as in S102.
Subsequently, in the example of the real-coded GA, whether or not the generation number of the children reaches an upper limit (predetermined number) is determined (S106). The processing is advanced to S107 when it is determined that the generation number of the children is yet to reach the upper limit or is ended when it is determined that the generation number of the children reaches the upper limit.
In the example of the real-coded GA, when it is determined that the generation number of the children is yet to reach the upper limit, the parents are replaced with the individuals having high evaluations (S107). In the example of the real-coded GA. JGG is used at S107 to replace the parents with the individuals having high evaluations.
In the example of the real-coded GA, after the processing at S107 is completed, the processing is returned to S103 and calculation for the next generation is performed.
In this manner, in the example of the real-coded GA using REXstar and JGG, the optimization problem for the continuous variables is optimized.
On the other hand, as the method of optimizing discrete variables, there is the technique using the “annealing method (annealing)” as described above. For example, as a technique capable of solving a combinatorial optimization problem for optimizing a combination of discrete values at high speed, a technique of performing calculation based on the annealing method using an annealing machine or the like has been proposed.
As a method of searching for a solution to a combinatorial optimization problem by the annealing method, for example, a method using an objective function expression based on conditions and constraints in a combinatorial optimization problem has been proposed. The objective function expression is a function that takes a minimum value when the parameters (variables) in the objective function expression become an optimal combination in the combinatorial optimization problem. Therefore, it is possible to search for a solution to the combinatorial optimization problem by searching for a combination of discrete variables that give the minimum value to the objective function expression (by minimizing the objective function expression).
In order to minimize an objective function expression efficiently at high speed by the annealing method (annealing) using an annealing machine or the like, the objective function expression has to be expressed in a quadratic unconstrained binary optimization (QUBO) form in some cases. The QUBO form means a form in which an objective function expression to be maximized or minimized for variables that may each take only two values such as 0 and 1 may be expressed in quadratic terms without an explicit constraint on a range in the variable space.
In order to express the objective function expression in the QUBO form, each variable (parameter) included in the objective function expression to be optimized is requested to be a discrete value (for example, a binary variable that may take only two values such as 0 and 1).
Therefore, as described above, in order to enable efficient optimization using the annealing method (annealing) to be applied to an optimization problem including continuous variables, each of the continuous variables is divided (discretized) by a predetermined step to be expressed as discrete values, and then are optimized in some cases. In the case where the continuous value is discretized and expressed as discrete values, the step for dividing the continuous value has to be small enough to maintain the calculation accuracy. When each of the continuous variables is divided (discretized) by a predetermined step and is expressed as discrete values, many discrete variables (bits used for calculation) have to be used, which may in turn result in enormous calculation cost and difficulty of the calculation. For example, in an attempt to use an annealing machine capable of performing high-speed calculation based on the annealing method to search for a solution to a combinatorial optimization problem, it is difficult to apply the annealing machine to a combinatorial optimization problem including continuous values due to a limitation on the number of bits usable in the annealing machine.
Therefore, in the related art, even a problem that is intrinsically a combinatorial optimization problem including both of continuous variables and discrete variables is optimized by optimizing only the discrete variables while the continuous variables are fixed. For example, for optimization of a vibration-powered generator device, there has been proposed a technique of optimizing magnet arrangement (orientations of small magnets) while fixing design parameters which are continuous variables such as the positions of coils and the dimensions of the device. This technique is disclosed in “A. Maruo, H. Igarashi, H. Oshima, and S. Shimokawa. “Optimization of Planar Magnet Array Using Digital Annealer”, in IEEE Transactions on Magnetics, vol. 56, no. 3, pp. 1-4, March 2020, Art no. 7512104, doi:10.1109/TMAG.2019.2957805.”.
As described above, in the related art, it is difficult to apply the annealing method using the annealing machine to optimization of an optimization problem including both of continuous variables and discrete variables, because the number of bits requested for the calculation is enormous due to the discretization of the continuous values by division. For example, the related art entails enormous calculation cost for optimizing an optimization problem including both of continuous variables and discrete variables, and therefore fails to efficiently optimize such an optimization problem in some cases.
Therefore, the inventors have made extensive studies on an apparatus and the like capable of efficiently optimizing an optimization problem including both of continuous variables and discrete variables while saving calculation cost requested for the optimization, and have obtained the following findings.
For example, the inventors have found that the following optimization apparatus and the like are capable of efficiently optimizing an optimization problem including both of continuous variables and discrete variables while saving the calculation cost requested for the optimization.
An optimization apparatus as an example of the technique disclosed herein is an optimization apparatus that optimizes an optimization problem represented by using an objective function expression including a continuous variable composed of continuous value data and a discrete variable composed of discrete value data.
The optimization apparatus includes an optimization processing unit that optimizes the objective function expression.
The optimization processing unit
obtains, as the continuous variable, an n-th generation data value group (n≥1) including a plurality of data values selected from the continuous value data;
determines an evaluation value of each of the plurality of data values in the n-th generation data value group by performing optimization processing of the objective function expression by an annealing method using the n-th generation data value group;
obtains an (n+1)-th generation data value group based on the evaluation values by using a genetic algorithm, the (n+1)-th generation data value group being different from the n-th generation data value group and including a plurality of data values selected from the continuous value data, and
replaces the n-th generation data value group with the (n+1)-th generation data value group as the continuous variable.
In the example of the technique disclosed herein, an optimization problem represented by using an objective function expression including continuous variables composed of continuous value data and discrete variables composed of discrete value data is optimized. For example, in the example of the technique disclosed herein, an objective function expression including both of continuous variables which are continuous values and discrete variables which are discrete values is optimized.
In the example of the technique disclosed herein, an n-th generation data value group (n≥1) including a plurality of data values selected from continuous value data is obtained as the continuous variables. For example, in the example of the technique disclosed herein, the n-th generation data value group including the plurality of data values of the continuous variables (an n-th generation data structure as a parent population) is obtained.
Next, in the example of the technique disclosed herein, the evaluation value of each of the plurality of data values in the n-th generation data value group is determined by performing optimization processing of the objective function expression by the annealing method using the n-th generation data value group. For example, in the example of the technique disclosed herein, the annealing method is used to determine the evaluation value of each of the individual data values in the n-th generation data value group (parent population).
Subsequently, in the example of the technique disclosed herein, an (n+1)-th generation data value group being different from the n-th generation data value group and including a plurality of data values selected from the continuous value data is obtained based on the evaluation values by using the genetic algorithm. For example, in the example of the technique disclosed herein, the (n+1)-th generation data value group being different from the n-th generation data value group and including the plurality of data values selected from the continuous value data is obtained by using the genetic algorithm based on a data value group with the high evaluation results derived from the evaluation values in the n-th generation data value group. In the example of the technique disclosed herein, the (n+1)-th generation data value group (child population) in the generation next to the n-th generation is obtained based on the population with the high evaluation results by using the genetic algorithm as described above.
In the example of the technique disclosed herein, the n-th generation data value group is replaced with the (n+1)-th generation data value group as the continuous variables. For example, in the example of the technique disclosed herein, a population of individuals having high evaluation results in the parent population is first determined as a child population (set as a parent population for the next generation), and then the objective function expression is optimized.
As described above, in the example of the technique disclosed herein, for example, the continuous variables are optimized by the genetic algorithm (GA), and the evaluation of the data value group (population) in the GA and the optimization of the discrete variables are performed by the annealing method. For example, in the example of the technique disclosed herein, the optimization problem is divided into optimization of the continuous variables and optimization of the discrete variables, the continuous variables are optimized by the GA without discretization and the discrete variables are optimized by the annealing method using the values of the optimized continuous variables.
In the example of the technique disclosed herein, the GA that performs continuous value optimization is set as a main flow, and a combinatorial optimization of the discrete values by the annealing method as a sub-flow is performed by using the values of the continuous values included in the individuals in the GA to evaluate the individuals in the GA. In the example of the technique disclosed herein, the value of the objective function expression determined by the combinatorial optimization is returned to the main flow as the evaluation value, and thereby individuals having high evaluation results are extracted from the population (the n-th generation data value group) in the GA and are set as a population for the next generation ((n+1)-th generation data value group).
In the example of the technique disclosed herein, it is preferable to iterate the above operation of generating the n-th generation data value group and replacing the n-th generation data value group with the (n+1)-th generation data value group (generating the (n+1)-th generation data value group). For example, in the example of the technique disclosed herein, it is preferable to iterate processing of determining the evaluation value of each of the data values in the (n+1)-th generation data value group, extracting a data value group (population) in descending order of the evaluation result from the (n+1)-th generation data value group, and setting the extracted data value group as an (n+2)-th generation data value group.
In this way, the data value group (population) finally obtained is a data value group having a higher evaluation result. so that it is possible to optimize the optimization problem more appropriately by optimizing the objective function expression using this data value group.
As described above, in the example of the technique disclosed herein, it is possible to efficiently optimize the continuous variables by the above-described real-coded GA or the like without discretizing the continuous variables unlike a technique, for example, in which each of the continuous variables is divided by a predetermined step to be expressed as discrete values and is then optimized. In the example of the technique disclosed herein, for example, it is possible to efficiently evaluate individuals (each being a function that is defined by predetermined continuous value data and includes discrete variables) in the above-described real-coded GA by the annealing method, and to efficiently perform generation alternation in the real-coded GA.
Therefore, in the example of the technique disclosed herein, it is capable of efficiently optimizing both of the continuous variables and the discrete variables without having to divide and discretize the continuous variables, and therefore is capable of efficiently optimizing an optimization problem including these variables while saving the calculation cost requested for the optimization.
Hereinafter, an example of the technique disclosed herein will be described with reference to the drawings. Processing (operation) such as optimization of an objective function expression in an optimization apparatus as the example of the technique disclosed herein may be performed by, for example, an optimization processing unit included in the optimization apparatus.
The optimization apparatus disclosed herein includes the optimization processing unit, and may further include other units (means) as requested. The optimization processing unit may be implemented, for example, as a combination of a processor such as a central processing unit (CPU) and a memory such as a random-access memory (RAM) or as a part of an annealing machine.
The optimization apparatus disclosed herein is an apparatus that optimizes an optimization problem represented by using an objective function expression including continuous variables composed of continuous value data and discrete variables composed of discrete value data.
An optimization problem to be optimized by using the example of the technique disclosed herein is not particularly limited as long as the optimization problem is represented by an objective function expression including continuous variables and discrete variables, and may be appropriately selected according to the intended purpose. Examples of an optimization problem represented by an objective function expression including continuous variables and discrete variables include an optimization problem concerning a composition of a mixture, an optimization problem concerning a search for a stable structure of candidate substances for a drug, an optimization problem concerning a shape of a device, and so on. A specific example of the optimization problem concerning the shape of the device is a problem of optimizing the shapes, positions, arrangement, and the like of magnets and coils in a magnetic device such as a vibration-powered generator device.
In the objective function expression, parameters set as continuous variables and parameters set as discrete variables may be appropriately selected according to conditions and so forth of the optimization problem. In the example of the technique disclosed herein, for example, a parameter that requests many variables (bits used for calculation) when the parameter is set as discrete variables is preferably set as a continuous variable.
The continuous variables composed of continuous value data may be, for example, variables composed of a plurality of pieces of continuous value data (each piece of data that may take a continuous value). Similarly, the discrete variables composed of the discrete value data may be, for example, variables composed of a plurality of pieces of discrete value data (each piece of data that may take a discrete value).
<Obtaining of n-Th Generation Data Value Group>
In the example of the technique disclosed herein, an n-th generation data value group (n≥1) including a plurality of data values selected from the continuous value data is obtained as the continuous variables as described above.
The n-th generation data value group means a group (collection) of data pieces having values of continuous variables different from each other (data pieces on different continuous values), and may be treated as a “population (generation)” in the genetic algorithm.
Regarding the n-th generation data value group (n-th generation data structure), a first generation for performing processing on an objective function expression (a first generation data value group where n is 1; an initial population) may be obtained, for example, by randomly selecting a plurality of data pieces from continuous value data by using random numbers.
The number of data values selected as the first generation data value group (the number of initial individuals generated) is not particularly limited and may be appropriately selected according to the intended purpose, but is preferably determined based on the number of continuous variables included in the objective function expression, for example. In the example of the technique disclosed herein, for example, a proportional relationship between the number (of types) of continuous variables included in an objective function expression and the number of data values selected as the first generation data value group is preferably such that the larger the number of continuous variables, the larger the number of data values selected.
In the example of the technique disclosed herein, in iterations of replacing the n-th generation data value group with the (n+1)-th generation data value group (n is 2 or more), the (n+1)-th generation data value group (child population) newly set by the replacement is treated as the n-th generation data value group including parents for the next generation.
In this way, a data value group having higher evaluation results is used as the number of iterations of the processing increases. Thus, it is possible to more appropriately perform optimization of the optimization problem by optimizing the objective function expression using this data value group.
<Determination of Evaluation Value>
In the example of the technique disclosed herein, the evaluation value of each of the plurality of data values in the n-th generation data value group is determined by performing the optimization processing of the objective function expression by the annealing method using the n-th generation data value group as described above.
The optimization of an objective function expression by the annealing method (annealing) involves, for example, optimizing each of the data values (each of the individuals) in the n-th generation data value group by the annealing method. For example, in the example of the technique disclosed herein, the evaluation value is determined by performing combinatorial optimization of the discrete variables by the annealing method for the objective function expression in which the continuous variables are set to predetermined data values.
The evaluation value is not particularly limited as long as it is a value capable of evaluating each of the data values in the n-th generation data value group, and may be appropriately selected according to the intended purpose. For example, the evaluation value may be a function value (energy value) that the objective function expression in which the continuous variables are set to the predetermined data values takes when performing optimization processing by the annealing method.
For example, in the example of the technique disclosed herein, for an objective function expression in which continuous variables are set to predetermined data values, a combinatorial optimization of discrete variables by the annealing method is performed to obtain a minimum value or a maximum value of the objective function, so that the evaluation value may be determined.
Details of specific examples of a mathematical expression and a calculation method used for a combinatorial optimization of discrete variables by the annealing method for an objective function expression in which continuous variables are set to predetermined data values will be described later.
In the example of the technique disclosed herein, for evaluation of each of a plurality of data values (individuals) in the n-th generation data value group, it is preferable to control the number of annealing iterations for performing the evaluation according to the generation number of the data value group (population) to be evaluated. For example, in the example of the technique disclosed herein, it is preferable that the optimization processing unit control the number of executions of the optimization processing according to the generation number of the n-th generation data value group when determining the evaluation value of each of the plurality of data values in the n-th generation data value group.
When the optimization processing of the objective function expression is performed by the annealing method, the degree of optimization of the objective function expression depends on the number of annealing iterations (the number of executions of the optimization processing). For example, when the number of annealing iterations is small, the calculation for optimizing an objective function expression may be performed in a short time, but the accuracy of the optimization may be insufficient because the calculation may be ended in the middle of the optimization. On the other hand, when the number of annealing iterations is large (sufficient), the optimization of the objective function expression may be performed with sufficient accuracy although the calculation time is long.
Therefore, in the example of the technique disclosed herein, it is preferable to set the number of iterations to a small number when the generation number of the data value group to be evaluated is equal to or less than a predetermined number. In the example of the technique disclosed herein, it is preferable that the optimization processing unit reduce the number of executions of the optimization processing when the generation number of the n-th generation data value group is equal to or less than the predetermined number. For example, in the example of the technique disclosed herein, a rough evaluation value is determined by a short-time simple optimization (evaluation) when the generation number is equal to or less than the predetermined number, and a more accurate evaluation value is determined by a more accurate optimization (evaluation) with a sufficiently large number of iterations when the generation number is more than the predetermined number.
In this way, in the example of the technique disclosed herein, it is possible to switch between a short-time simple evaluation (optimization) and an intensive evaluation with high accuracy depending on desired calculation accuracy, and it is possible to perform optimization in a short time while further saving the calculation cost.
In the example of the technique disclosed herein, when the number of annealing iterations (the number of executions of the optimization processing) is controlled depending on the generation number of the n-th generation data value group, the generation numbers may be divided into three or more classes, and the number of annealing iterations for evaluation may be set to one of three or more levels. In the example of the technique disclosed herein, when the number of annealing iterations is controlled depending on the generation number of the n-th generation data value group, the number of iterations may be gradually changed such that the generation number and the number of iterations have a proportional relationship.
When the short-time simple evaluation (optimization) and the intensive evaluation are switched and used for the evaluation of the n-th generation data value group, the number of annealing iterations in each optimization (the number of executions of the optimization processing) is not particularly limited, and may be appropriately set according to the intended purpose. When the short-time simple evaluation (optimization) and the intensive evaluation are switched and used, the number of annealing iterations in each of the evaluations is preferably determined in such a way that, for example, a plurality of data values (individuals) in which continuous variables are randomly set are optimized by the annealing method.
For example, in order to determine the number of annealing iterations, for example, a plurality of objective function expressions in which continuous variables are randomly set (individuals having random data values) are prepared. For example, the number of iterations is determined with which the energy values of all the objective function expressions have no change (the energy values are fixed as a result of sufficient optimizations) in the optimizations of these objective function expressions. Then, the determined number of iterations is set as the number of iterations for the intensive evaluation (optimization) sufficient to reach an optimal solution. In the example of the technique disclosed herein, for example, the number of iterations with a calculation time sufficiently shorter than the calculation time of the number of iterations for the intensive evaluation sufficient to reach an optimal solution is set as the number of iterations for the short-time simple evaluation.
The number of objective function expressions in which the continuous variables are randomly set (individuals having random data values) is not particularly limited and may be appropriately selected according to the intended purpose. For example, it is preferable to prepare about five objective function expressions.
Whether or not the energy values in all the prepared objective function expressions become unchanged (the energy values are fixed as a result of sufficient optimizations) may be determined as appropriate. For example, the determination may be made according to a change rate of the energy value with respect to the number of iterations.
The number of iterations with a calculation time sufficiently shorter than the calculation time of the number of iterations for the intensive evaluation sufficient to reach an optimal solution may be appropriately selected depending on how much the calculation time is desired to reduce in consideration of the relationship between the number of iterations and the calculation time.
<Obtaining of (n+1)-Th Generation Data Value Group>
In the example of the technique disclosed herein, an (n+1)-th generation data value group being different from the n-th generation data value group and including a plurality of data values selected from the continuous value data is obtained based on the evaluation values by using the genetic algorithm. In the example of the technique disclosed herein, for example, the (n+1)-th generation data value group being different from the n-th generation data value group and including a plurality of data values selected from the continuous value data is obtained by using the genetic algorithm from based on a data value group having high evaluation results derived from the evaluation value in the n-th generation data value group.
A method of obtaining the (n+1)-th generation data value group based on the evaluation value is not particularly limited and may be appropriately selected according to the intended purpose. For example, the evaluation results derived from the evaluation value (obtained from the evaluation value) in the n-th generation data value group may be used. For example, the evaluation results based on the function value (energy value) that the objective function expression takes when optimized by the annealing method may be used.
For example, in a case where the minimum value of the objective function expression is obtained by the annealing method and is set as the evaluation value, the data values (individual) in the objective function expression with the smallest minimum value may be determined as data values (individual) with the highest evaluation results. In this case, for example, when the minimum value of the objective function expression is a negative value, a data value group achieving a negative value, the absolute value of which is the largest (largest minus value), may be regarded as a data value group achieving the highest evaluation results.
In the example of the technique disclosed herein, the (n+1)-th generation data value group (child population) is obtained by using the genetic algorithm based on a data value group with the highest evaluation results in the n-th generation data value group (a population of individuals with the highest evaluation results in the parent population). For example, in the example of the technique disclosed herein, the data value group for the next generation (the (n+1)-th generation data value group) is generated and obtained in such a way the data value group having the highest evaluation results in the n-th generation data value group is processed by operations such as crossover and generation alternation by using the genetic algorithm.
The genetic algorithm used to obtain the (n+1)-th generation data value group is not particularly limited as long as it is capable of obtaining a data value group being different from the n-th generation data value group and including a plurality of data values selected from the continuous value data, and may be appropriately selected according to the intended purpose. As the genetic algorithm, it is preferable to use a real-coded genetic algorithm (real-coded GA) in which the above-described “REXstar” is used as the crossover method and the above-described “JGG” is used as the generation alternation method.
In the example of the technique disclosed herein, for REXstar and JGG, it is possible to appropriately use the techniques disclosed, for example, in the literatures such as “Shigenobu Kobayashi, “The Frontiers of Real-coded Genetic Algorithms”, [Journal] Artificial Intelligence, Vol. 24, No. 1, pp. 147-162, 2009”, and “Takahiro Sato, “A Study on Design Optimization of Electric Devices and Machines Based on Electromagnetic Field Analysis (Japanese)”, Doctors Thesis in Annual Year 2014, Division of Systems and Information Engineering, Graduate School of Information Science and Technology, Hokkaido University, 2015”.
The parameters of the genetic algorithm for replacing the n-th generation data value group with the (n+1)-th generation data value group may be appropriately set, but are preferably set to appropriate values obtained by using, for example, the above-described short-time simple optimization. Examples of the parameters of the genetic algorithm include a step size, the generation number for switching the number of annealing iterations, the upper limit generation number (genetic algorithm iteration count), and the like. As described above, the step size (t) means a magnitude of movement in the global descending direction in REXstar.
For setting the parameters of the genetic algorithm to the appropriate values obtained by using the short-time simple optimization, for example, first, the short-time simple optimization is performed on a plurality of objective function expressions different in the value of step size t. It is preferable that the step size t that gives the lowest energy value as a result of the optimizations be applied to an actual optimization (the genetic algorithm for use to obtain the (n+1)-th generation data value group).
As the plurality of objective function expressions different in the value of the step size t, for example, about five objective function expressions are preferably prepared by appropriately changing the step size t within a range which the step size t may usually take.
The generation number (S) for switching the number of annealing iterations may be set to, for example, a generation number having no change in the energy value in the optimization with the step size t that gives the lowest energy value to the objective function expression among the aforementioned optimizations for obtaining the step size t.
The upper limit generation number (genetic algorithm Iteration count; G) may be determined based on, for example, the generation number S for switching the number of annealing iterations. For example, the upper limit generation number G may be set to about “G=S+(S/3)=(4/3)S” based on the generation number S for switching the number of annealing iterations.
In the example of the technique disclosed herein, the objective function expression is optimized by replacing the n-th generation data value group with the (n+1)-th generation data value group as the continuous variables as described above. Since the (n+1)-th generation data value group (the child population; the parent population for the next generation) is based on the data value group with the highest evaluation results, an optimization of the optimization problem may be more appropriately performed by optimizing the objective function expression using the (n+1)-th generation data value group.
As described above, in the example of the technique disclosed herein, it is preferable to iterate the generation of the n-th generation data value group and the replacement of the n-th generation data value group with the (n+1)-th generation data value group (generation of the (n+1)-th generation data value group). In this way, the data value group (population) finally obtained is a data value group with even higher evaluation results, so that it is possible to optimize the optimization problem more appropriately by optimizing the objective function expression using this data value group.
In the example of the technique disclosed herein, it is preferable to perform a final optimization of the objective function expression by using data values (individual) with the highest evaluation result in the (n+1)-th generation data value group (for example, a final data value group after a predetermined number of iterations is completed).
This final optimization of the objective function expression may be performed by, for example, the annealing method (annealing).
In the example of the technique disclosed herein, the objective function expression is not particularly limited as long as it includes continuous variables and discrete variables as described above, and may be appropriately selected according to the intended purpose. For example, an objective function expression represented by the following expression (1) may be preferably used. In the example of the technique disclosed herein, for example, it is preferable that the optimization processing unit perform optimization processing represented by the following expression (1).
In Expression (1),
E(s, x) is an objective function expression,
w(x)ij is a coefficient for weighting between an i-th bit and a j-th bit, a magnitude of which is determined depending on a value of x that represents a continuous variable,
si is a binary variable indicating that the i-th bit is 0 or 1,
sj is a binary variable indicating that the j-th bit is 0 or 1,
b(x)i is a numerical value representing a bias for the i-th bit, the magnitude of which is determined depending on the value of x that represents the continuous variable, and
c(x) is a constant, a magnitude of which is determined depending on the value of x that represents the continuous variable.
The above expression (1) is an objective function expression in the QUBO form including the continuous variable x and binary variables s which are an example of discrete variables. In the example of the technique disclosed herein, as described above, for example, the optimization of the continuous variable x in the above expression (1) is performed by the genetic algorithm, and the evaluation of the objective function expression (determination of the evaluation value) and the optimization of the discrete variables s are performed by the annealing method.
In this way, in the example of the technique disclosed herein, it is possible to efficiently optimize both of the continuous variable x and the discrete variables s, and thus it is possible to efficiently optimize the optimization problem including these variables while saving the calculation cost requested for the optimization.
In the annealing method, for example, the objective function expression in the QUBO form is converted into a form called an Ising model, and the combinatorial optimization problem is solved by minimizing the value of the objective function converted into the Ising model.
An expression in an Ising model (Ising model expression) converted from the objective function in the QUBO form may be, for example, an Ising model expression in the QUBO form represented by the following expression. For example, in the example of the technique disclosed herein, it is preferable that the optimization processing unit perform the optimization processing based on the Ising model expression converted from the objective function expression and represented by the following expression (2).
In Expression (2),
E(s) is an objective function expression converted into an Ising model expression,
wij is a coefficient for weighting between an i-th bit and a j-th bit,
bi is a numerical value representing a bias for the i-th bit,
si is a binary variable indicating that the i-th bit is 0 or 1,
sj is a binary variable indicating that the j-th bit is 0 or 1, and
const. is a constant
In the annealing method, for example, it is possible to efficiently search for the minimum value of the Ising model expression in a short time while variously changing each bit (element) in the Ising model expression in the QUBO form.
For example, as illustrated in
In the annealing method, it is possible to obtain the parameters that optimize the objective function expression based on the determined states of the bits and therefore to efficiently optimize the objective function expression in a short time.
Here, wij in the above expression (2) may be obtained, for example, by extracting, for each combination of xi and xj, the numerical values or the like of the respective parameters in the objective function expression before conversion to the Ising model expression, and is usually a matrix.
The first term on the right side of the above expression (2) is the sum of the products in all the combinations, without omission and duplication, of two states selectable from the states of all the bits, the products each obtained by multiplication of the states and the weight value (weight) of the two circuits.
The second term on the right side of the above expression (2) is the sum of the products in which the states of all the bits are multiplied by the bias values for the states, respectively.
For example, it is possible to obtain wo and b, by extracting the parameters in the objective function expression before the conversion to the Ising model expression and thereby convert the objective function expression into the Ising model expression represented by the above expression (2).
Then, “const.” in the above expression (2) may be set as appropriate, for example, based on the numerical value of each parameter in the objective function expression before the conversion to the Ising model expression.
Examples of the processing of converting the objective function expression of the above expression (1) into the Ising model expression of the above expression (2) include a method of expanding and converting the objective function expression by using “for loop” in a self-made program, a conversion method using a program capable of directly processing a mathematical expression, and the like.
In the example of the technique disclosed herein, the Ising model expression converted from the objective function expression as described above may be optimized (minimized) in a short time by, for example, performing an annealing method (annealing) using an annealing machine or the like. For example, in the example of the technique disclosed herein, it is preferable that the optimization processing unit perform the optimization processing by minimizing the Ising model expression converted from the objective function expression by the annealing method.
Examples of the annealing machine used to optimize the objective function expression include, for example, a quantum annealing machine, a semiconductor annealing machine using semiconductor technology, a machine that performs simulated annealing executed by software using a central processing unit (CPU) and a graphics processing unit (GPU), and so on. As the annealing machine, for example, Digital Annealer (registered trademark) may be used.
Details of the annealing method using the annealing machine will be described later.
In the example of the technique disclosed herein, for example, the evaluation value may be determined by performing the aforementioned objective function expression optimization by the annealing method (the optimization processing) on the objective function expression in which the continuous variables are set to predetermined data values (the continuous variables are determined). For example, under the condition that the number of annealing iterations is set to a predetermined number, the combinatorial optimization of the discrete variables by the annealing method may be performed to obtain the minimum value of the objective function expression, and the obtained minimum value may be determined as the evaluation value.
Hereinafter, the example of the technique disclosed herein will be described in more detail by using configuration examples of apparatuses, flowcharts, and so on.
In an optimization apparatus 100, for example, a control unit 101, a main storage device 102, an auxiliary storage device 103, an input/output (I/O) interface 104, a communication interface 105, an input device 106, an output device 107, and a display device 108 are coupled to each other via a system bus 109.
The control unit 101 performs operations (such as four arithmetic operations, comparison operations, and annealing method operations), operation control of hardware and software, and the like. The control unit 101 may be, for example, a central processing unit (CPU), a part of an annealing machine for use in the annealing method, or a combination of them.
The control unit 101 implements various functions by, for example, executing a program (such as, for example, the optimization program disclosed herein) read into the main storage device 102 or the like.
The processing performed by the optimization processing unit in the optimization apparatus disclosed herein may be performed by the control unit 101, for example.
The main storage device 102 stores various programs and stores data and others to be used for executing the various programs. As the main storage device 102, for example, a storage device including at least one of a read-only memory (ROM) and a random-access memory (RAM) may be used.
The ROM stores, for example, various programs such as a Basic Input/Output System (BIOS). The ROM is not particularly limited, and may be selected according to the intended purpose as appropriate, and examples thereof include a mask ROM, a programmable ROM (PROM), and the like.
The RAM functions as, for example, a work area in which the various programs stored in the ROM, the auxiliary storage device 103, and the like are expanded when executed by the control unit 101. The RAM is not particularly limited, and may be selected according to the intended purpose as appropriate, and examples thereof include a dynamic random-access memory (DRAM), a static random-access memory (SRAM), and the like.
The auxiliary storage device 103 is not particularly limited as long as it is capable of storing various kinds of information, and may be selected according to the intended purpose as appropriate. Examples thereof include a solid-state drive (SSD), a hard disk drive (HDD), and the like. The auxiliary storage device 103 may be a portable storage device such as a compact disc (CD) drive, a Digital Versatile Disc (DVD) drive, or a Blu-ray (Registered trademark) disc (BD) drive.
The optimization program disclosed herein is stored in the auxiliary storage device 103. is loaded onto the RAM (main memory) of the main storage device 102, and is executed by the control unit 101, for example.
The I/O interface 104 is an interface for coupling to various external devices. The I/O interface 104 allows input and output of data from and to, for example, a compact disc read-only memory (CD-ROM), a Digital Versatile Disk read-only memory (DVD-ROM), a magneto-optical (MO) disk, a Universal Serial Bus (USB) memory (USB flash drive), or the like.
The communication interface 105 is not particularly limited, and any known interface may be used as appropriate. An example thereof is a wireless or wired communication device or the like.
The input device 106 is not particularly limited as long as it is capable of receiving input of various kinds of requests and information addressed to the optimization apparatus 100, and any known device may be used as appropriate. Examples thereof include a keyboard, a mouse, a touch panel, a microphone, and so on. When the input device 106 is a touch panel (touch display), the input device 106 may also serve as the display device 108.
The output device 107 is not particularly limited, and any known device may be used as appropriate. An example thereof is a printer or the like.
The display device 108 is not particularly limited, and any known display device may be used as appropriate. Examples thereof include a liquid crystal display, an organic EL display, and the like.
In the example illustrated in
In the example illustrated in
In the example illustrated in
The annealing machine 300 optimizes (minimizes) the Ising model expression based on the received information on the values of the weight (wij) and the bias (bi), and obtains the minimum value of the Ising model expression and the states of the bits that give the minimum value. The annealing machine 300 transmits the obtained minimum value of the Ising model expression and the obtained states of the bits that give the minimum value to the computer 200 via the network 400.
Subsequently, for example, the computer 200 obtains the shape and others of the device according to the optimization problem based on the processing of setting the minimum value of the Ising model expression as the evaluation value and the states of the bits that give the minimum value to the Ising model expression.
As illustrated in
The communication function unit 120 transmits and receives various kinds of data to and from an external device, for example. For example, the communication function unit 120 may receive data on the bias and the weight in the Ising model expression converted from the objective function expression from an external device.
The input function unit 130 receives, for example, various instructions to the optimization apparatus 100. For example, the input function unit 130 may receive input of the data on the bias and the weight in the Ising model expression converted from the objective function expression.
The output function unit 140 prints and outputs, for example, information on the optimization result of the optimization problem and the like.
The display function unit 150 displays, for example, information on the optimization result of the optimization problem and the like on a display.
The storage function unit 160 stores, for example, various programs, information on the optimization result of the optimization problem, and the like.
The control function unit 170 includes an optimization processing unit 171. The control function unit 170 executes, for example, the various programs stored in the storage function unit 160 and controls operations of the entire optimization apparatus 100.
The optimization processing unit 171 performs processing such as dividing an optimization problem into optimization of the continuous variables and optimization of the discrete variables, optimizing the continuous variables by the GA without discretizing the continuous variables, and optimizing the discrete variables by the annealing method using the values of the optimized continuous variables.
With reference to
As illustrated in
Next, the optimization processing unit 171 performs a short-time simple evaluation (sub-flow 1) for each individual in the initial population (S202). Details of the short-time simple evaluation (sub-flow 1) will be described later.
Subsequently, the optimization processing unit 171 randomly selects a plurality of individuals to be set as parents from the individuals in the initial population (S203). At S203, the parents are selected by using JGG.
The optimization processing unit 171 performs crossover using REXstar to generate a child population (S204). For example, at S204, the optimization processing unit 171 creates a reflection point of each of the parents with respect to a position vector, identifies a global descent direction by obtaining the center of gravity of the individuals rated in the upper half from among the parents and the reflection points, and moves the distribution of the individuals by a step size t in the global descent direction.
Next, the optimization processing unit 171 determines whether or not the generation number of the children is equal to or less than a sub-switching value (the generation number for switching the number of iterations) S (S205). At S205, the optimization processing unit 171 advances the processing to S206 when determining that the generation number of the children is equal to or less than the sub-switching value S or advances the processing to S207 when determining that the generation number of the children is more than the sub-switching value S.
Subsequently, when determining that the generation number of the children is equal to or less than the sub-switching value S, the optimization processing unit 171 performs a short-time simple evaluation (sub-flow 1) for each individual in the child population (S206). On the other hand, when determining that the generation number of the children is more than the sub-switching value S, the optimization processing unit 171 performs an intensive evaluation (sub-flow 2) sufficient to reach an optimal solution for each individual in the child population (S207). Details of the intensive evaluation (sub-flow 2) sufficient to reach an optimal solution will be described later.
The optimization processing unit 171 determines whether or not the generation number of the children reaches an upper limit (predetermined number), and advances the processing to S209 when determining that the generation number of the children is yet to reach the upper limit, or advances the processing to S210 when determining that the generation number of the children reaches the upper limit (S208).
When determining that the generation number of the children is yet to reach the upper limit, the optimization processing unit 171 replaces the parents with the children having high evaluations (S209). At S209, the optimization processing unit 171 replaces the parents with the children having high evaluations by using JGG.
Next, after completing the processing at S209, the optimization processing unit 171 returns the processing to S203 and performs the calculation for the next generation.
When determining at S208 that the generation number of the children reaches the upper limit, the optimization processing unit 171 defines the following objective function expression (1) based on the individual having the highest evaluation result in the child population (S210).
In Expression (1),
E(s, x) is an objective function expression,
w(x)ij is a coefficient for weighting between an i-th bit and a j-th bit, a magnitude of which is determined depending on a value of x that represents a continuous variable,
si is a binary variable indicating that the i-th bit is 0 or 1,
sj is a binary variable indicating that the j-th bit is 0 or 1,
b(x)i is a numerical value representing a bias for the i-th bit, the magnitude of which is determined depending on the value of x that represents the continuous variable, and
c(x) is a constant, a magnitude of which is determined depending on the value of x that represents the continuous variable.
The optimization processing unit 171 converts the defined objective function expression into an Ising model expression represented by the following expression (2) (S211). For example, at S211, the optimization processing unit 171 obtains b (bias) and w (weight) in the following expression (2) by extracting the parameters in the defined objective function expression, and thereby converts the objective function expression into the Ising model expression represented by the following expression (2).
In Expression (2),
E(s) is an objective function expression converted into an Ising model expression,
wij is a coefficient for weighting between an i-th bit and a j-th bit,
bi is a numerical value representing a bias for the i-th bit,
si is a binary variable indicating that the i-th bit is 0 or 1,
sj is a binary variable indicating that the j-th bit is 0 or 1, and
const. is a constant.
Next, the optimization processing unit 171 minimizes the above expression (2) by using an annealing machine (S212). For example, at S212, the optimization processing unit 171 executes the ground state search (optimization calculation) using the annealing method for the above expression (2) to calculate the minimum value of the above expression (2), thereby determining the states of the bits that give the minimum value to the objective function expression.
Subsequently, the optimization processing unit 171 outputs an optimization result based on the states of the bits that give the minimum value to the above expression (2) (S213).
After completing the output of the optimization result, the optimization processing unit 171 ends the processing.
Next, with reference to
First, the optimization processing unit 171 defines the objective function expression of the above expression (1) based on an individual (data value) to be evaluated (S301).
Next, the optimization processing unit 171 optimizes the objective function expression based on the individual to be evaluated by performing a short-time simple optimization in which the number of annealing iterations is set to a small number (S302). The optimization of the objective function expression using the annealing method may be performed in the same manner as in S211 and S212 described above.
The optimization processing unit 171 sets the energy value of the objective function expression obtained by the optimization as an evaluation value of the individual to be evaluated (S303). For example, at S303, the optimization processing unit 171 determines the evaluation value by performing a combinatorial optimization of discrete variables by the annealing method to obtain the minimum value of the objective function expression.
After completing the determination of the evaluation value, the optimization processing unit 171 ends the processing.
Next, with reference to
First, the optimization processing unit 171 defines the objective function expression of the above expression (1) based on an individual (data value) to be evaluated (S401).
Next, the optimization processing unit 171 optimizes the objective function expression based on the individual to be evaluated by performing an intensive optimization sufficient to reach an optimal solution in which the number of annealing iterations is set to a large number (S402).
The optimization processing unit 171 sets the energy value of the objective function expression obtained by the optimization as an evaluation value of the individual to be evaluated (S403).
After completing the determination of the evaluation value, the optimization processing unit 171 ends the processing.
Next, with reference to
First, the optimization processing unit 171 prepares a plurality of objective function expressions (individuals having random data values) in which the continuous variables are randomly set (S501).
Next, the optimization processing unit 171 optimizes one of the objective function expressions in which the continuous variables are randomly set while changing the number of annealing iterations (S502). At S502, it is preferable that the optimization processing unit 171 change the number of iterations within a range including a number of iterations with which the objective function expression may be sufficiently optimized. The optimization of the objective function expression using the annealing method may be performed in the same manner as in S211 and S212 described above.
Subsequently, the optimization processing unit 171 outputs the energy value of the objective function expression obtained by the optimization (S503).
The optimization processing unit 171 determines whether the optimizations of all the prepared objective function expressions are completed (S504). At S504, the optimization processing unit 171 advances the processing to S505 when determining that the optimizations of all the objective function expressions are completed or returns the processing to S502 when determining that the optimizations of all the objective function expressions are yet to be completed. When the processing is returned to S502 at S504, the optimization processing unit 171 performs the processing at S502 to optimize another one of the objective function expressions yet to be optimized.
Next, the optimization processing unit 171 sets the number of iterations with which the energy values of all the objective function expressions have no change (the energy values are fixed as a result of sufficient optimizations) as the number of iterations for the intensive evaluation (sub-flow 2) sufficient to reach an optimal solution (S505).
Subsequently, the optimization processing unit 171 sets, as the number of iterations for the short-time simple evaluation (sub-flow 1), the number of iterations with a calculation time sufficiently shorter than the calculation time of the number of iterations for the intensive evaluation sufficient to reach an optimal solution (S506).
After completing the determination of the number of iterations for the sub-flow 1. the optimization processing unit 171 ends the processing.
Next, with reference to
First, the optimization processing unit 171 prepares a plurality of objective function expressions different in step size t (S601). At S601, the optimization processing unit 171 preferably prepares the objective function expressions by changing the step size t as appropriate within a range that the step size t may usually take.
Next, the optimization processing unit 171 generates children by using only the short-time simple evaluation (sub-flow 1) for the objective function expression with a certain step size t (S602). Details of S602 will be described later.
Subsequently, the optimization processing unit 171 determines whether or not the generation of children is completed for all the prepared objective function expressions (S603). At S603, the optimization processing unit 171 advances the processing to S604 when determining that the generation of the children is completed for all the objective function expressions, or returns the processing to S602 when determining that the generation of the children is yet to be completed for all the objective function expressions. When the processing is returned to S602 at S603, the optimization processing unit 171 performs the processing at S602 to generate children for another one of the objective function expressions for which the generation of children is yet to be completed.
Next, the optimization processing unit 171 determines the step size t that gives the lowest final energy value among the objective function expressions concerning the children generated by using the genetic algorithm (S604). For example, at S604, the optimization processing unit 171 determines the step size t that gives the lowest energy value as a result of the optimizations, as the step size t to be applied to an actual optimization.
Subsequently, the optimization processing unit 171 sets, as the sub-flow switching value 5, the generation number having no change in the energy value in the optimization with the step size t that gives the lowest energy value to the objective function expression (S605). For example, at S605, the optimization processing unit 171 sets, as the sub-flow switching value (the generation number for switching the number of annealing iterations) S, the generation number having no change in the energy value in the optimization with the step size t that gives the lowest energy value to the objective function expression among the above-described optimizations for obtaining the step size t
After completing the determination of the sub-flow switching value S, the optimization processing unit 171 ends the processing.
Next, an example of a detailed sequence at S602 in
At S705, the optimization processing unit 171 performs a short-time simple evaluation (sub-flow 1) for each individual in the child population.
Next, the optimization processing unit 171 determines whether or not the generation number of the children reaches the upper limit (predetermined number), and advances the processing to S707 when determining that the generation number of the children is yet to reach the upper limit, or advances the processing to S708 when determining that the generation number of the children reaches the upper limit (S706).
After performing S710, the optimization processing unit 171 outputs the energy value of the objective function expression and the generation number (S710).
The optimization processing unit 171 ends the processing after completing the output of the energy value of the objective function expression and the generation number.
Although the sequence of the processing by using the example of the technique disclosed herein has been described in accordance with the specific order in
An example of an annealing method and an annealing machine will be described below.
The annealing method is a method of obtaining a solution stochastically by using a random number value or a superposition of quantum bits. Hereinafter, a problem of minimizing a value of an evaluation function desired to be optimized will be described as an example, and the value of the evaluation function will be referred to as energy. When the value of the evaluation function is desired to be maximized, a sign of the evaluation function may be changed.
First, starting from initial states where one discrete value is assigned to each of variables, a state transition from current states (a combination of the values of the variables) to states close to the current states (for example, the states where only one of the variables is changed) is considered. A change in energy associated with the state transition is calculated, and whether to accept the state transition and change the states or to maintain the original states without accepting the state transition is stochastically determined according to the calculated value of the change in energy. When an acceptance probability for a case where the energy decreases is selected to be higher than the acceptance probability for a case where the energy increases, it is expected that a state change occurs in a direction in which the energy decreases on average and the states transition to more appropriate states over time. Thus, there is a possibility of finally obtaining an approximate solution giving energy at an optimal solution or close to an optimal value.
If the state transition is deterministically accepted in a case where the energy decreases or rejected in a case here the energy increases, the change in energy will be weakly decreasing over time. However, once a local solution is reached, the change will not occur any more. Since an extraordinarily large number of local solutions exist in a discrete optimization problem as described above, the states are often stuck at a local solution that is not very close to the optimal value. For this reason, in solving a discrete optimization problem, it is important to stochastically determine whether or not to accept the states.
In the annealing method, it has been proved that the states reach the optimal solution in the limit of an infinite number of times (number of iterations) by determining the acceptance probability of the state transition as follows.
Hereinafter, a sequence of a method of determining an optimal solution using the annealing method will be described.
(1) For an energy change (energy decrease) value (−ΔE) associated with a state transition, the acceptance probability p for the state transition is determined by any of the following functions f ( ).
T is a parameter called a temperature value and may be changed, for example, as follows.
(2) The temperature value T is logarithmically decreased according to the number of iterations t as represented by the following expression.
To denotes an initial temperature value and is desirably set to a sufficiently large value depending on the problem.
in a case where the acceptance probability expressed by the expression (1) is used and the steady states are reached after sufficient iterations, the probability of each state being occupied follows the Boltzmann distribution in a thermal equilibrium state in thermodynamics.
When the temperature gradually decreases from a high temperature, the probability of a low energy state being occupied increases. For this reason, when the temperature decreases sufficiently, it is expected to obtain the low energy states. This method is referred to as an annealing method (or simulated annealing method) because this behavior resembles a state change in annealing of a material. The stochastic occurrence of a state transition where the energy increases is equivalent to thermal excitation in physics.
An annealing machine 300 includes a state holding unit 111 that holds current states S (values of multiple state variables). The annealing machine 300 also includes an energy calculation unit 112 that calculates an energy change value {−ΔEi} for each of state transitions in a case where the state transition occurs from the current states S as a result of changing any of the values of the multiple state variables. The annealing machine 300 includes a temperature control unit 113 that controls a temperature value T and a transition control unit 114 that controls a state change. The annealing machine 300 may be configured as a part of the optimization apparatus 100 described above.
The transition control unit 114 stochastically determines whether or not to accept any one of multiple state transitions, depending on a relative relationship between the energy change value {−ΔEi} and thermal excitation energy based on the temperature value T, the energy change value {−ΔEi}, and a random number value.
The transition control unit 114 includes a candidate generation unit 114a that generates candidates for a state transition, and an acceptability determination unit 114b that stochastically determines whether or not the state transition in each of the candidates is acceptable based on the energy change value {−ΔEi} and the temperature value T. The transition control unit 114 includes a transition determination unit 114c that determines a candidate to be actually employed from the candidates determined as acceptable, and a random number generation unit 114d that generates a probability variable.
An operation in one iteration by the annealing machine 300 is as follows.
First, the candidate generation unit 114a generates one or more candidates (candidate No. {Ni}) for a state transition to the next states from the current states S held by the state holding unit 111. The energy calculation unit 112 calculates an energy change value {−ΔEi} for the state transition specified in each of the candidates by using the current states S and the candidate for the state transition. The acceptability determination unit 114b determines each of the state transitions as acceptable with the acceptance probability expressed by the above expression (1) according to the energy change value {−ΔEi} for the state transition by using the temperature value T generated in the temperature control unit 113 and the probability variable (random number value) generated in the random number generation unit 114d.
The acceptability determination unit 114b outputs the acceptability {fi} of each of the state transitions. In a case where multiple state transitions are determined as acceptable, the transition determination unit 114c randomly selects one of them by using a random number value. The transition determination unit 114c then outputs the transition number N and the transition acceptability f of the selected state transition. In a case where there is a state transition accepted, the values of the state variables stored in the state holding unit 111 are updated according to the accepted state transition.
Starting with the initial states, the above-described operation is iterated while causing the temperature control unit 113 to decrease the temperature value, and is ended when satisfying an end determination condition such as a condition where a certain number of iterations is reached or the energy falls below a predetermined value. The answer output by the annealing machine 300 is the states at the end.
The annealing machine 300 illustrated in
Regarding the transition control unit 114 illustrated in
A circuit that outputs 1 with an acceptance probability p and outputs 0 with an acceptance probability (1−p) may be implemented by using a comparator that has two inputs A and B, and that outputs 1 when A>B and outputs 0 when A<B and by inputting the acceptance probability p to the input A and inputting a uniform random number having a value in the unit interval [0, 1) to the input B. Thus, it is possible to achieve the above function when the value of the acceptance probability p calculated by using the expression (1) based on the energy change value and the temperature value T is input to the input A of the comparator.
For example, provided that f denotes a function used in the expression (1), and u denotes a uniform random number having a value in the unit interval [0, 1), a circuit that outputs 1 when f(ΔE/T) is greater than u achieves the above function.
The circuit may achieve the same function as described above even when modified as follows.
Even when the same monotonically increasing function is applied to two numbers, the two numbers maintain the same magnitude relationship. Therefore, even when the same monotonically increasing function is applied to the two inputs of the comparator, the same output is obtained. When an inverse function f−1 of f is used as this monotonically increasing function, it is seen that the circuit may be modified to a circuit that outputs 1 when −ΔE/T is greater than f−1(u). Since the temperature value T is positive, it is seen that a circuit that outputs 1 when −ΔE is greater than Tf−1(u) is usable.
The transition control unit 114 in
(Optimization Method)
An optimization method disclosed herein is an optimization method of optimizing an optimization problem represented by using an objective function expression including a continuous variable composed of continuous value data and a discrete variable composed of discrete value data.
The optimization method includes an optimization processing step of optimizing the objective function expression.
The optimization processing step includes
obtaining, as the continuous variable, an n-th generation data value group (n≥1) including a plurality of data values selected from the continuous value data;
determining an evaluation value of each of the plurality of data values in the n-th generation data value group by performing optimization processing of the objective function expression by an annealing method using the n-th generation data value group;
obtaining an (n+1)-th generation data value group based on the evaluation values by using a genetic algorithm, the (n+1)-th generation data value group being different from the n-th generation data value group and including a plurality of data values selected from the continuous value data; and
replacing the n-th generation data value group with the (n+1)-th generation data value group as the continuous variable.
The optimization method disclosed herein may be performed by, for example, the optimization apparatus disclosed herein. A preferable embodiment of the optimization method disclosed herein may be similar to a preferable embodiment of the optimization apparatus disclosed herein, for example.
(Optimization Program)
An optimization program disclosed herein is an optimization program that causes a computer to optimize an optimization problem represented by using an objective function expression including a continuous variable composed of continuous value data and a discrete variable composed of discrete value data.
The optimization program causing the computer to execute a process of optimizing the objective function expression.
The process includes
obtaining, as the continuous variable, an n-th generation data value group (n≥1) including a plurality of data values selected from the continuous value data,
determining an evaluation value of each of the plurality of data values in the n-th generation data value group by performing optimization processing of the objective function expression by an annealing method using the n-th generation data value group,
obtaining an (n+1)-th generation data value group based on the evaluation values by using a genetic algorithm, the (n+1)-th generation data value group being different from the n-th generation data value group and including a plurality of data values selected from the continuous value data, and
replacing the n-th generation data value group with the (n+1)-th generation data value group as the continuous variable.
The optimization program disclosed herein may be, for example, a program that causes a computer to execute the optimization method disclosed herein. A preferable embodiment of the optimization program disclosed herein may be similar to the preferable embodiment of the optimization apparatus disclosed herein.
The optimization program disclosed herein may be created using any of various known program languages according to a configuration of a computer system to be used, and a type, a version, and the like of an operating system.
The optimization program disclosed herein may be recorded on a recording medium such as a built-in hard disk, or an external hard disk, or may be recorded on a recording medium such as a CD-ROM, a DVD-ROM, an MO disk, or a USB memory.
In a case where the optimization program disclosed herein is recorded on the recording medium described above, the optimization program is directly used, or used by installing the optimization program on a hard disk, through a recording medium reading apparatus included in the computer system, as appropriate. The optimization program disclosed herein may be recorded in an external storage area (another computer or the like) accessible from the computer system through an information communication network. In this case, the optimization program disclosed herein and recorded in the external storage area may be directly used or be used by installing the optimization program on the hard disk from the external storage area through the information communication network, as appropriate.
The optimization program disclosed herein may be divided and recorded on a plurality of recording media for each arbitrary process.
(Computer Readable Recording Medium)
The computer readable recording medium disclosed herein is configured to record the optimization program disclosed herein.
The computer readable recording medium disclosed herein is not particularly limited, and may be selected according to the intended purpose as appropriate. Examples thereof include a built-in hard disk, an external hard disk, a CD-ROM, a DVD-ROM, an MO disk, a USB memory, and the like.
The computer readable recording medium disclosed herein may be a plurality of recording media in which the optimization program disclosed herein is divided and recorded for each arbitrary process.
Although Example of the technique disclosed herein will be described, the technique disclosed herein is not limited to this Example at all
As Example, coil positions and a magnet arrangement in a vibration-powered generator device were optimized by using an example of the optimization apparatus disclosed herein. In Example, the coil positions and the magnet arrangement in the vibration-powered generator device were optimized by using an optimization apparatus having the hardware configuration as illustrated in
Example used, as the genetic algorithm, a real-coded genetic algorithm (real-coded GA) in which the above-described “REXstar” was used as the crossover method and the above-described “JGG” was used as the generation alternation method. Digital Annealer (Registered Trademark) was used for minimization of the objective function expression (minimization of the Ising model expression of the expression (2)).
In Example, as illustrated in
Example is an example in which the center coordinates (y1, z1) of the clockwise coil CR, the center coordinates (y2, z2) of the counterclockwise coil CL, and the magnetization directions of the small magnets (arrangement of the small magnets) were optimized to maximize a magnetic flux Δφ linking the coils. In Example, the center coordinates (y1, z1) of the clockwise coil CR and the center coordinates (y2, z2) of the counterclockwise coil CL are continuous variables, and the magnetization directions of the small magnets (arrangement of the small magnets) are discrete variables.
In Example, as described above, the magnet MG was divided into the 100 small magnets as Nm=100.
An objective function expression in Example may be expressed by the following expression.
in the above expression,
H is an objective function expression to be optimized when a value thereof is maximized,
Δφ is a change amount in flux linkage of the entirety of the coils of the magnetic device, and
“→max” is a symbol meaning to maximize the objective function expression.
Next, in Example, the objective function expression was formulated in the QUBO form.
First, in Example, in order to express the optimization of the magnet arrangement as a combinatorial optimization problem with discrete variables, the arrangement of each small magnet is expressed by using a magnet region number j and a magnetization direction state number k.
In Example, in order to determine the orientation of each small magnet to be in one direction or no magnet, conditions are determined such that any one of the state variables sj,k (k=1, 2, 3, 4, 5, 6) is “1 (the orientation of the small magnet is in one direction)” or “all the state variables are 0 (no magnet)”.
The technique disclosed in “A. Maruo, H. Igarashi, H. Oshima, and S. Shimokawa, “Optimization of Planar Magnet Array Using Digital Annealer,” in IEEE Transactions on Magnetics, vol. 56, no. 3, pp. 1-4, March 2020, Art no. 7512104, doi:10.1109/TMAG.2019.2957805.” may be appropriately used concerning the optimization of the arrangement of the small magnets.
In Example, as illustrated in
In Example, when the coil is expressed as illustrated in
In the above expressions expressing the change amounts Δφright and Δφleft in the flux linkage, Δφi,j,k(y, z) denotes a change amount in flux linkage in a coil region Ni generated from magnetization of a small magnet N; in the direction expressed by a state number k, and may be calculated by the following expression.
In the above expression,
Δφi,j,k(y, z) is a change amount in flux linkage in the coil region Ni of a coil having the center coordinates “y, z”, the flux linkage generated from the magnetization of the small magnet Nj in the direction expressed by the state number k,
Bxi,j,k(y, z) denotes a magnetic flux density in the x-axis direction before change at the center point of the i-th coil region Nj in the coil having the center coordinates “y, z”, the magnetic flux density generated from the magnetization of the small magnet Nj in the direction expressed by the state number k,
Bxi,j,k(z+Δz) denotes a magnetic flux density in the x-axis direction at the center point of the i-th coil region Ni after the magnet is moved by Δz in the z-axis direction, the magnetic flux density generated from the magnetization of the small magnet Nj in the direction expressed by the state number k, and
A is the area of the coil region (cross-sectional area of the coil).
Bxi,j,k(z) in the above expression will be described in more detail.
Using Biot-Savart law, which is a physical law of electromagnetism, a magnetic flux density B (B is a vector quantity) generated at an observation point P from a magnet having magnetization M may be expressed by the following expression.
In the above expression, r is a distance from a source point (for example, the center point of a small magnet) to the observation point P.
By using the above expression, the magnetic flux density Bi,j,k(Bi,j,k is a vector quantity) generated at the center point of the i-th coil region Ni from the magnetization of the small magnet Nj in the direction expressed by the state number k may be expressed by the following expression.
In the above expression,
ri is the distance from the source point (for example, the center point of the small magnet) to the i-th coil region Ni, and
Mj,k is magnetization of the small magnet Nj in the direction expressed by the state number k.
In Example, the component of the magnetic flux density in the x-axis direction is a component linking the coils, and therefore Bxi,j,k, which is the x component of Bi,j,k in the above expression, is the magnetic flux density linking the coils. Thus, the change amount Δφ′i,j,k in the flux linkage in the coil region Ni may be expressed by using Bxi,j,k.
As is apparent from the above expression which includes the distance ri from the source point to the i-th coil region Ni, Bxi,j,k changes depending on the distance between the coil region Ni and the small magnet Nj. Thus, by determining the change amount Δφ′i,j,k in the flux linkage in the coil region Ni based on the above expression, the change amount in the flux linkage in the coil may be optimized in consideration of the distance between the coil region Ni and the small magnet Nj.
By using the above expressions, the objective function expression in Example may be represented by the following expression as the QUBO form.
In the above expression, the first term on the right side denotes a change amount in the flux linkage in the clockwise coil CR, and the second term on the right side denotes a change amount in the flux linkage in the counterclockwise coil CL In the above expression, the third term on the right side is a constraint term representing a constraint that any one of the state variables sj,k (k=1, 2, 3, 4, 5, 6) is “1” or all of the state variables are “0”. For example, the third term on the right side in the above expression is a penalty term that increases the value of the objective function expression when two or more of the state numbers k have “1” in sg (k=1, 2, 3, 4, 5, 6), or for example, when two or more of the state variables sj,k are “1”. For this reason, for example, by setting a to a large value, it is possible to perform the optimization by more reliably excluding a case where two or more of the state variables sj,k are “1”.
“→max” is a symbol meaning to maximize the objective function expression.
In order to optimize the objective function expression by the annealing method (annealing) using the annealing machine described above, the objective function expression has to be expressed in such a form that the objective function is optimized when the objective function expression is minimized. To this end, when the above objective function expression is modified so as to be optimized when minimized, the objective function expression may be represented as the following expression.
This expression is an expression modified by multiplying both sides of the objective function expression by “minus (−)” so as to be optimized when minimized.
Here, E is an objective function expression optimized when the value of E is minimized.
“→min” is a symbol meaning to minimize the objective function expression.
In the above objective function expression, the first term and the second term on the right side (change amounts in the flux linkage of the coils) are values dependent on the continuous variables y and z.
<Determination of Number of Annealing Iterations>
Next, in Example, in accordance with the flowchart illustrated in
For example, five objective function expressions in which the continuous variables “y1, z1, y2, z2” were set randomly (using random numbers) were prepared, and a short-time simple optimization was performed on each of these objective function expressions.
As illustrated in
As illustrated in
<Determination of Parameters of Genetic Algorithm>
Subsequently, in Example, the parameters of the genetic algorithm for replacing the n-th generation data value group with the (n+1)-th generation data value group were determined according to the flowcharts illustrated in
For example, the short-time simple optimizations were performed on the plurality of objective function expressions in which the value of the step size t was set to “0.1, 1, 2, 5, and 10”, respectively, until the generation number of the data value group (population) reached 100.
In Example, as illustrated in
As illustrated in
As illustrated in
<Optimization of Vibration-Powered Generator Device>
In Example, the coil positions and the magnet arrangement in the vibration-powered generator device were optimized by optimizing the objective function expression according to the flowchart illustrated in
in Example, the optimization parameters in the following list were set as described above.
In the optimization of the continuous variables by the real-coded genetic algorithm, parameters related to the number of data values (individuals) in a data value group (population) to be generated was set as follows by assigning 4, which is the number of the continuous variables, to a dimension n.
As illustrated in
As illustrated in
<Calculation Cost (Calculation Time)>
As described above, in Example, the number of initial individuals was 20, the number of parents was 5, and the number of children was 16. Therefore, in Example, evaluations by the annealing method were performed on 5 reflections derived from the parents and 16 children per generation.
Therefore, in Example, the number of individuals generated in the 1st to 60th generations is 1280 where “20+60×21=1280”. In Example, since the upper limit generation number G was set to 80, the number of individuals generated after the 60th generation is 420 where “20×21=420”. In Example, the total number of the individuals generated until the optimization is completed is 1700 where “1280+420=1700”.
In Example, as described above, the number of iterations with a sufficiently short calculation time (sub-flow 1 iteration count) was set to 105, and the number of iterations for the intensive evaluation sufficient to reach an optimal solution (sub-flow 2 iteration count) was set to 107. The calculation time (analysis time) with the number of iterations with a sufficiently short calculation time was “0.79 seconds”, and the calculation time with the number of iterations for the intensive evaluation sufficient to reach an optimal solution was “4.46 seconds”.
The total calculation time in Example was calculated to be 2884 seconds where “0.79×1280+4.46×420=2884”, for example, about 48 minutes.
For comparison, all the individuals were evaluated with the number of iterations for the intensive evaluation sufficient to reach an optimal solution (107 iterations) without switching the number of iterations in the evaluations of the individuals by the annealing method according to the generation number. In this example, the total calculation time was calculated to be 7582 seconds where “446×1700=7582”, for example, about 126 minutes.
From these results, it was confirmed that the appropriate switching of the number of iterations in the evaluations of the individuals by the annealing method according to the generation number makes it possible to significantly save the calculation cost and reduce the calculation time to half or less.
As illustrated in
In the main flow in the embodiment of the technique disclosed herein, a population (population of GA individuals; data value group) is generated for the continuous variable optimization problem by using the genetic algorithm (GA). Next, in the main flow in the embodiment of the technique disclosed herein, an evaluation using the annealing method (annealing) is performed in the sub-flow (sub 1 or sub 2) based on the data values of the continuous variables of the GA individuals having high evaluations to determine the evaluation values of the GA individuals. In the sub-flow, the number of iterations with a sufficiently short calculation time (sub 1) and the number of iterations for the intensive evaluation sufficient to reach an optimal solution (sub 2) are switched in accordance with the generation number in the GA.
Next, as illustrated in
Subsequently, in the main flow in the embodiment of the technique disclosed herein, the objective function expression is optimized by the annealing method (DA) based on the data values of the continuous variables of the finally obtained optimal GA individual (GA individual having the highest evaluation value).
In the main flow in the embodiment of the technique disclosed herein, information on a result of the optimization (arrangement of members and others in a device) is output.
In the embodiment of the technique disclosed herein, it is possible to efficiently optimize an optimization problem including both of continuous variables and discrete variables, for example, by performing the processing as illustrated in
As illustrated in
Subsequently, in the learning flow in the embodiment of the technique disclosed herein, the determined numbers of annealing (DA) iterations are recorded as learned parameters in a database.
In the learning flow in the embodiment of the technique disclosed herein, for each of the objective function expressions different in the value of the step size t in the target optimization problem, the short-time simple optimization (sub 1) and the generation of individuals by the genetic algorithm (GA) are performed. The step size t that gives the lowest energy value as a result of the optimizations and the generation number S for switching the number of iterations (sub-switching value) are determined.
Subsequently, in the learning flow in the embodiment of the technique disclosed herein, the step size t and the sub-switching value S are recorded as learned parameters in the database.
Next, in an operation flow in the embodiment of the technique disclosed herein, the optimization problem is optimized according to the main flow described above by using the parameters recorded in the database as the learned parameters, and the optimization result is output.
In the embodiment of the technique disclosed herein, it is possible to optimize an optimization problem including both of continuous variables and discrete variables, for example, after setting more appropriate parameters by performing the processing as illustrated in
The following appendices are further disclosed regarding the above embodiments.
All examples and conditional language provided herein are intended for the pedagogical purposes of aiding the reader in understanding the invention and the concepts contributed by the inventor to further the art, and are not to be construed as limitations to such specifically recited examples and conditions, nor does the organization of such examples in the specification relate to a showing of the superiority and inferiority of the invention. Although one or more embodiments of the present invention have been described in detail, it should be understood that the various changes, substitutions, and alterations could be made hereto without departing from the spirit and scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2020-202515 | Dec 2020 | JP | national |