This application is based upon and claims the benefit of priority of the prior Japanese Patent Application No. 2020-136427, filed on Aug. 12, 2020, the entire contents of which are incorporated herein by reference.
The embodiment discussed herein is related to a non-transitory computer-readable storage medium, an evaluation function generation method, and an information processing apparatus.
There is an Ising device (also called a Boltzmann machine) that uses an Ising-type evaluation function (also called an energy function or the like) as a device that calculates a large-scale discrete optimization problem which Neumann computers are not good at.
In calculation with the Ising device, a problem to be calculated is replaced with an Ising model which is a model representing a spin behavior of a magnetic material. Then, a Markov chain Monte Carlo method such as a simulated-annealing method or a replica exchange method (also called exchange Monte Carlo method) is used to search for a state (an optimal solution) where a value of the Ising model-type evaluation function (corresponding to energy of the Ising model) is minimized. Note that the problem replaced by the Ising model is almost the same as a problem called quadratic unconstrained binary optimization (QUBO) and can be mutually converted, and thus the following description does not distinguish between the two.
In QUBO, an objective function (an object to be minimized) and a constraint term (which becomes a very large value if a constraint condition that should be satisfied by the problem is not satisfied) are individually represented by a quadratic function using a state variable 0 or 1 (+1 or −1 in the Ising model). Then, the sum of these is to be an evaluation function.
Meanwhile, in order to transport a transport target in a shortest time in a factory or the like, there is a proposed method of formulating task assignment to each carrier machine and a movement route by using 0-1 integer programming, and calculating using an existing optimization solver.
Note that, in the past, there is a known technique for performing a route search in distribution warehouses, stores, and the like, so as to avoid interference between a plurality of mobile objects (automated carrier machines and customers).
Japanese National Publication of International Patent Application No. 2017-515195, Japanese Laid-open Patent Publication No. 2017-134794, Japanese Laid-open Patent Publication No. 2013-250941, and “Simultaneous Optimization of Dispatching and Routing for OHT Systems via State Space Representation”, Transactions of the Society of Instrument and Control Engineers, Vol. 50, No. 4, pp. 210-218, 2014 are disclosed as related art.
According to an aspect of the embodiments, a non-transitory computer-readable storage medium storing a program that causes a processor included in an information apparatus to execute a process, the process includes: acquiring layout information that expresses a movement route in which a plurality of mobile objects is movable in a directed graph, initial position information that indicates an initial position of the plurality of mobile objects, and task information that indicates a start position and an end position of each of a plurality of tasks; specifying a first moving distance in which each of the plurality of mobile objects moves from end position of one task to end position of another task for each of multiple task pairs included in the plurality of tasks, based on the layout information, the initial position information, and the task information; specifying a second moving distance of each of the plurality of mobile objects from the start position to the end position for each of the plurality of tasks, based on the layout information and the task information; and generating, based on the first moving distance and the second moving distance, an evaluation function of an Ising model obtained by adding, to an objective function, a penalty term based on a sum of squared values of a total of the second moving distance of a task assigned to each of the plurality of mobile objects, the objective function expressing a total moving distance obtained by assigning each of the plurality of tasks to any of the plurality of mobile objects.
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, the embodiment is able to reduce a calculation time of a problem of assigning tasks to a plurality of mobile objects.
In the related art, in assigning tasks to a plurality of mobile objects, in a case where a problem of finding assignment with which all tasks are completed in a shortest time is formulated using 0-1 integer programming, the number of variables contained in an expression increases rapidly as a scale of the problem becomes larger. In a real problem, in a case of calculating a problem by using such an expression, a calculation time until obtaining a solution becomes too long since the number of mobile objects and tasks will increase and the scale of the problem will increase.
In one aspect, an object of the embodiment is to provide an evaluation function generation program, an evaluation function generation method, and an information processing apparatus capable of reducing a calculation time of a problem of assigning tasks to a plurality of mobile objects.
Hereinafter, modes for carrying out the embodiment will be described with reference to the drawings.
An information processing apparatus 10 of the first embodiment generates a QUBO evaluation function (an Ising model evaluation function) that models a problem of finding assignment with which all tasks are completed in a shortest time, when assigning n pieces of task to m pieces of carrier machine, which is an example of a plurality of mobile objects. Note that, in the following example, it is assumed that, after completing the assigned task, each carrier machine returns to an initial position that is same as an initial position where the movement has been started, but the embodiment is not limited to this.
The information processing apparatus 10 includes a storage unit 11, a processing unit 12, and an Ising device 13.
The storage unit 11 is, for example, a volatile storage device that is an electronic circuit such as a random access memory (RAM), or a non-volatile storage device that is an electronic circuit such as a hard disk drive (HDD) or a flash memory.
The storage unit 11 stores a program for performing processing described later, and stores layout information 11a, initial position information 11b indicating an Initial position of a carrier machine (a mobile object), and task information 11c.
The layout information 11a is information that represents, for example, a movement route that on which m pieces of carrier machine can move in a factory, in a directed graph.
The initial position information 11b contains information indicating an initial position of the m pieces of carrier machine. The example of
The task information 11c contains a start position and an end position of each of the n pieces of task. The start position is, for example, a position where the carrier machine receives a package, and the end position is, for example, a position where the carrier machine delivers the package. In the example of
Furthermore, the storage unit 11 may store various control parameters of the Ising device 13.
The various data described above stored in the storage unit 11 may be inputted from outside the information processing apparatus 10, or may be, for example, generated in the information processing apparatus 10 on the basis of data inputted through an operation on an input device (not illustrated) by a user.
The processing unit 12 is implemented by a processor that is hardware such as a central processing unit (CPU), a graphics processing unit (GPU), and a digital signal processor (DSP). Note that, the processing unit 12 may include an electronic circuit such as an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or the like. The processing unit 12 executes a program stored in the storage unit 11 to cause the information processing apparatus 10 to perform processing shown below. Note that the processing unit 12 may be a set of a plurality of processors.
The processing unit 12 acquires the layout Information 11a, the initial position information 11b, and the task Information 11c from, for example, the storage unit 11 (step S1).
Then, the processing unit 12 calculates dt(ki, kj, r) on the basis of the layout information 11a, the initial position information 11b, and the task information 11c (step S2). The dt(ki, kj, r) is a moving distance of carrier machine r from end position of one task ki to end position of another task kj, where r is came from m pieces of carrier machine, and ki kj are came for each of multiple task pairs included in the n pieces of task.
In the process of step S2, the processing unit 12 may include, into the task described above, a task having an initial position of each of the m pieces of carrier machine as the start position and the end position (hereinafter referred to as dummy task), to calculate a moving distance (in this case, the number of tasks is to be n+m). Therefore, it is possible to shorten a calculation formula for a total moving distance (which is an objective function described later) of the m pieces of carrier machine.
In the process of step S2, the processing unit 12 first obtains a start position pt0[k, r] of each task on the basis of the task information 11c. k represents a task number and r represents a carrier machine number. In the following, when the dummy task is used, it is assumed that k=0 is the task number of the dummy task. For example, pt0[0, r] Indicates an initial position of a carrier machine with a carrier machine number r, and pt0[1, r] indicates a start position of a task with a task number k=1. When the initial position information 11b as illustrated in
In the process of step S2, next, the processing unit 12 obtains an end position pt1[k, r] of each task on the basis of the task information 11c. When the dummy task is used, for example, pt1[0, r] indicates an initial position of the carrier machine with the carrier machine number r, and pt1[1, r] indicates an end position of the task with the task number k=1. When the initial position information 11b as illustrated in
In the process of step S2, the processing unit 12 further calculates a distance dist(p[i], p[j]) on the basis of the layout information 11a. dist(p[i], p[j]) is a distance from each node p[i] included in the directed graph to another node p[j] included in the directed graph. The processing unit 12 may obtain dist(p[i], p[j]) as a shortest distance from the node p[i] to the node p[j] by using, for example, Dijkstra's algorithm or the like.
For example, a distance from a node with a node name “L1d1” to a node with a node name “L1” is 1. A distance from the node with the node name “L1d1” to a node with a node name “L2” is 5. A distance from the node with the node name “L1d1” to the node with the node name “L3” is 2. The node with the node name “L1” cannot reach the node with the node name “L1d1” because there is no edge. A distance between such nodes that do not have a reachable route is set to a very large value, for example.
Note that dist(p[i], p[j]) may be calculated in advance by another information processing apparatus or the like, or may be contained in the layout information 11a.
Then, in the process of step S2, the processing unit 12 calculates dt(ki, kj, r) for all ki, kj, and r on the basis of the following Formula (1).
In Formula (1), dist(pt1[ki, r], pt0[kj, r]) is a moving distance of the carrier machine of the carrier machine number r, from an end position of a task with a task number k=i (or an initial position of the carrier machine with the carrier machine number r) to a start position of a task with a task number k=j. dist(pt0[kj, r], pt1[k, r]) is a moving distance of the carrier machine with the carrier machine number r, from the start position of the task with the task number k=j to an end position of the task with the task number k=j.
For example, in a case of ki=0, kj=2, and r=1, dt(0, 2, 1)=dist(pt1[0, 1], pt0[2, 1])+dist(pt0[2, 1], Pt1[2, 1]) is satisfied. pt1[0, 1] is the node with the node name “L4-1”, which is an initial position of a carrier machine with a carrier machine number r=1, and pt0[2, 1] is the node with the node name “L6”, which is a start position of a task with a task number k=2. Therefore, dist(pt1[0, 1], pt0[2, 1]) is a moving distance from the node with the node name “L4-1” to the node with the node name “L6”, which is 2. Furthermore, pt1[2, 1] is the node with the node name “18”, which is an end position of the task with the task number k=2. Therefore, dist(pt0[2, 1], pt1[2, 1]) is a moving distance from the node with the node name “L6” to the node with the node name “L8”, which is 2. Therefore, dt(0, 2, 1)=2+2=4 is satisfied.
For example, in a case of ki=1, kj=3, and r=1, dt(1, 3, 1)=dist(pt1[1, 1], pt0[3, 1])+dist(pt0[3, 1], Pt1[3, 1]) is satisfied. pt1[1, 1] is the node with the node name “L3”, which is an end position of the task with the task number k=1, and pt0[3, 1] is the node with the node name “L11”, which is a start position of a task with a task number k=3. Therefore, dist(pt1[1, 1], pt0[3, 1]) is a moving distance from the node with the node name “L3” to the node with the node name “L11”. A route that is to be a shortest distance from the node with the node name “L3” to the node with the node name “L11” is “L3” →“L5”→“L6”→“L7”→“L8”→“L10”→“L11”, and a moving distance is 6. Furthermore, pt1[3, 1] is a node with a node name “L15”, which is an end position of the task with the task number k=3. Therefore, dist(pt0[3, 1], pt1[3, 1]) is a moving distance from the node with the node name “L11” to the node with the node name “L15”, which is 2. Therefore, dt(1, 3, 1)=6+2=8 is satisfied.
After the process of step S2, the processing unit 12 calculates a moving distance dk(k) from a start position to an end position of each task, for each of the n pieces of task, on the basis of the layout information 11a and the task information 11c (step S3). Note that dk(k) is the same value (not depending on a value of the carrier machine number r) for each of the m pieces of carrier machine.
The processing unit 12 calculates dk(k) for all pieces of k, for example, on the basis of the following Formula (2).
[Formula 2]
dk(k)=dist(pt0[k,1],pt1[k,1]) (2)
In a case of k=1, dk(1)=dist(pt0[1, 1], pt1[1, 1]) is to be satisfied. dist(pt0[1, 1], pt1[1, 1]) is a moving distance from the node with the node name “L8” to the node with the node name “L3”. A route that is to be a shortest distance from the node with the node name “L8” to the node with the node name “L3” is “L8”→“L10”→“L11”→“L12”→“L3”, and the moving distance is 4. Therefore, dk(1)=4 is satisfied.
Note that, in a case where the shortest distances between individual nodes are obtained in advance, for example, as the layout information 11a, a processing order of step S2 and step S3 may be interchanged.
Thereafter, the processing unit 12 generates an Ising model (QUBO) evaluation function on the basis of dt(ki, kj, r) calculated in the process of step S2 and dk(k) calculated in the process of step S3 (step S4).
The evaluation function contains an objective function that expresses a total moving distance obtained by assigning the n pieces of task to any of the m pieces of carrier machine, a constraint term that represent a constraint condition that should be satisfied by the problem, and a penalty term.
The objective function is represented by a quadratic expression for state variables (x[r, t, i] and x[r, t+1, j]), as in the following Formula (3).
In Formula (3), among dt(ki, kj, r) calculated in the process of step S2, dt(i, j, r) is a moving distance in a case of ki=i and kj=j.
In Formula (3), x[r, t, i] is a state variable indicating whether or not the carrier machine with the carrier machine number r executes the task with the task number k=i at certain time t. x[r, t+1, j] is a state variable indicating whether or not the carrier machine with the carrier machine number r executes the task with the task number k=j at time t+1. x[r, t, i] and x[r, t+1, j] take a value of 0 or 1. In a case of x[r, t, i]=0, it is indicated that the carrier machine with the carrier machine number r does not execute the task with the task number k=i at the time t. In a case of x[r, t, i]=1, it is indicated that the carrier machine executes the task with the task number k=i at the time t. In a case of x[r, t+1, j]=0, it is indicated that the carrier machine with the carrier machine number r does not execute the task with the task number k=j at the time t+1. In a case where x[r, t+1, j]=1, it is Indicated that the carrier machine executes the task with the task number k=j at the time t+1.
In a case where x[r, t, i] and x[r, t+1, j] are both 1, the total moving distance is added with the moving distance dt(i, j, r) of the carrier machine r from end position of the task with the task number k=i to end position of the task with the task number k=j. In a case where either x[r, t, i] or x[r, t+1, j] is 0, the moving distance dt(i, j, r) is not to be added to the total moving distance.
Note that the time t is not clock time but an integer that takes a value from 0 to n−1, and means an execution order of tasks in each carrier machine. Therefore, even if two carrier machines have the save time t, a clock time may be different for the two carrier machines. The time t=0 is time when the carrier machine is at the initial position, which can also be said to be time when the carrier machine is executing the dummy task.
The constraint term will be described later (see Formulas (6), (8), (10) to (12), and (14) described later).
The penalty term is expressed by the following Formula (4).
In Formula (4), η is a predetermined constant value, and may be appropriately changed in accordance with a calculation result and the like. Formula (4) is to be a value obtained by multiplying, by η, a sum of a squared values of a sum of dk[k] of a task assigned to each of the m pieces of carrier machine.
When the n pieces of task are assigned to the m pieces of carrier machine, in a case of generating an evaluation function that models a problem of finding assignment with which all tasks are completed in a shortest time, the objective function in Formula (3) alone is not enough. This is because, although the objective function described above expresses the total moving distance, assignment of the task that minimizes the total moving distance is not necessarily the assignment with which all tasks are completed in a shortest time.
Whereas, the penalty term expressed by Formula (4) is to be a value that depends on a maximum value of the moving distance among the respective moving distances of the m pieces of carrier machine. By searching for the task assignment that reduces the maximum value of the moving distance, it becomes easier to obtain a solution that may shorten time for completing all tasks. Therefore, the evaluation function is generated so as to contain the penalty term as described above.
Note that, when len (r=1) is set as a moving distance of the carrier machine with the carrier machine number r=1, a sum of squares of each moving distance is to be (len (r=1))2+(len (r=2))2+(len (r=3))2+(len (r=4))2, in a case of m=4. However, if such a term is used as the penalty term, the order will be fourth, which does not conform to QUBO, quadratic. Therefore, by expressing the moving distance of each carrier machine with the moving distance of the task itself without considering the moving distance to the start position of each task of each carrier machine, the moving distance of each carrier machine may be approximated by a linear expression, and the penalty term may conform to QUBO.
After the process of step S4, the processing unit 12 outputs evaluation function information (step S5).
In the process of step S5, the processing unit 12 obtains a coefficient of a first-order term (which becomes a vector), a coefficient of a second-order term (which becomes a matrix), and a constant term of the state variable based on the generated evaluation function, and outputs these as the evaluation function information (QUBO problem data). For example, the processing unit 12 may output the evaluation function information to the Ising device 13, or may output to the storage unit 11 to store. Furthermore, the processing unit 12 may output (transmit) the evaluation function information to a device external to the information processing apparatus 10.
The Ising device 13 searches for task assignment (a value of each state variable) that minimizes a value of the evaluation function based on the QUBO problem data.
The Ising device 13 is, for example, a device that performs the search described above by performing a Markov chain Monte Carlo method such as a simulated annealing method or a replica exchange method by using a digital circuit. Furthermore, the Ising device 13 may be a device that performs the search described above by performing quantum annealing by using a superconductive circuit, or may be a processor such as a CPU, a GPU, or a DSP that performs the search described above by executing software.
Furthermore, the processing unit 12 may perform the search described above, without providing the Ising device 13.
According to the Information processing apparatus 10 and the evaluation function generation method of the first embodiment as described above, in assigning tasks to a plurality of mobile objects, the problem of finding assignment with which all tasks are completed in a shortest time is modeled in the QUBO evaluation function including the penalty term as described above.
Since QUBO has a high-speed solution method for multivariable problems such as various Ising devices, the calculation time may be shortened as compared with a case of using the 0-1 integer programming even if the scale of the problem becomes large, by making it possible to model the problem into the QUBO evaluation function as described above.
An information processing apparatus 20 is, for example, a computer, and includes a CPU 21, a RAM 22, an HDD 23, an image signal processing unit 24, an input signal processing unit 25, a medium reader 26, a communication interface 27, and an interface 28. The units described above are connected to a bus.
The CPU 21 is a processor including an arithmetic circuit that executes program instructions. The CPU 21 loads at least part of programs and data stored in the HDD 23 into the RAM 22 to execute programs. Note that the CPU 21 may include a plurality of processor cores, the information processing apparatus 20 may Include a plurality of processors, and processes described below may be executed in parallel using the plurality of processors or processor cores.
The RAM 22 is a volatile semiconductor memory that temporarily stores programs executed by the CPU 21 and data used by the CPU 21 for arithmetic operations. Note that the information processing apparatus 20 may include a memory of a type different from the RAM, or a plurality of memories.
The HDD 23 is a non-volatile storage device that stores programs of software such as an operating system (OS), middleware, and application software, and data. The program includes, for example, a program that causes the information processing apparatus 20 to execute a process of generating an evaluation function. Note that the information processing apparatus 20 may include other types of storage devices such as a flash memory and a solid state drive (SSD), and may include a plurality of non-volatile storage devices.
The image signal processing unit 24 outputs an image to a display 24a connected to the information processing apparatus 20 in accordance with an instruction from the CPU 21. As the display 24a, a cathode-ray tube (CRT) display, a liquid crystal display (LCD), a plasma display panel (PDP), an organic electro-luminescence (OEL) display, an organic light-emitting diode (OLED) display, or the like may be used.
The input signal processing unit 25 acquires an input signal from an input device 25a connected to the information processing apparatus 20, and outputs the input signal to the CPU 21. As the input device 25a, a pointing device such as a mouse, a touch panel, a touch pad, and a trackball, a keyboard, a remote controller, and a button switch, and the like may be used. Furthermore, a plurality of types of input devices may be connected to the information processing apparatus 20.
The medium reader 26 is a reading device that reads a program or data recorded on a recording medium 26a. As the recording medium 26a, for example, a magnetic disk, an optical disk, a magneto-optical disk (MO), a semiconductor memory, or the like may be used. Examples of the magnetic disk include a flexible disk (FD) and an HDD. The optical disc Includes a compact disc (CD) and a digital versatile disc (DVD).
The medium reader 26 copies, for example, a program or data read from the recording medium 26a to another recording medium such as the RAM 22 or the HDD 23. The read program is executed by the CPU 21, for example. Note that the recording medium 26a may be a portable recording medium, and may be used for distribution of a program or data. Furthermore, the recording medium 26a and the HDD 23 may be also referred to as a computer-readable recording media.
The communication interface 27 is an interface that is connected to a network 27a and communicates with another information processing apparatus via the network 27a. The communication interface 27 may be a wired communication interface connected by a cable to a communication device such as a switch, or may be a wireless communication interface connected to a base station via a wireless link.
The interface 28 is connected to an Ising device 29, and transmits and receives data between the CPU 21 and the Ising device 29. The interface 28 may be, for example, a wired communication interface such as peripheral component interconnect (PCI) express, or may be a wireless communication interface.
Note that the information processing apparatus 10 illustrated in
The Ising device 29 searches for a value of each state variable that minimizes a value of a QUBO evaluation function on the basis of inputted QUBO problem data. The Ising device 29 is, for example, a device that performs the search described above by performing a Markov chain Monte Carlo method such as a simulated-annealing method or a replica exchange method by using a digital circuit. Furthermore, the Ising device 29 may be a device that performs the search described above by performing quantum annealing by using a superconductive circuit, or may be a processor such as a CPU, a GPU, or a DSP that performs the search described above by executing software.
Note that the Ising device 29 may be provided outside the information processing apparatus 20.
Next, functions and processing procedures of the information processing apparatus 20 will be described.
The information processing apparatus 20 includes a storage unit 20a, a data acquisition unit 20b, a QUBO generation unit 20c, a control unit 20d, a solution unit 20e, and a solution output unit 20f. The storage unit 20a may be implemented, for example, by using a storage area secured in the RAM 22 or the HDD 23 of
The storage unit 20a stores, for example, layout information, initial position information of a carrier machine, task information, search end condition information, control parameters of the solution unit 20e, and the like. The control parameters include a parallel search number when the solution unit 20e performs parallel searching, search end condition information, a schedule for changing temperature parameters when the solution unit 20e performs the simulated-annealing method, and the like. Note that the various data described above may be inputted from outside the information processing apparatus 20, or may be, for example, generated in the information processing apparatus 20 on the basis of data inputted through an operation on the input device 25a by a user.
The data acquisition unit 20b acquires various types of information described above, from the storage unit 20a.
The QUBO generation unit 20c generates a QUBO evaluation function based on the layout information, the initial position information of the carrier machine, and the task information, and outputs information of the generated evaluation function. Note that the generated QUBO information may be stored in the storage unit 20a.
The control unit 20d outputs the information of the evaluation function to the solution unit 20e, and controls the solution unit 20e based on various control parameters. Furthermore, the control unit 20d causes the solution output unit 20f to output a solution obtained by the solution unit 20e.
The solution output unit 20f outputs the solution obtained by the solution unit 20e to the display 24a under the control of the control unit 20d. Note that the solution output unit 20f may output the solution to another information processing apparatus or storage device.
Hereinafter, an example of data stored in the storage unit 20a will be described.
Furthermore,
The layout information representing the directed graph is, for example, table data as illustrated in
Next, an example of an evaluation function generation process by the information processing apparatus 20 will be described. Note that, in the following, a description is given to an example of generating a QUBO evaluation function that models a problem of assigning each of the five tasks as illustrated in
The data acquisition unit 20b acquires data including layout information, initial position information of the carrier machine, and task information, which are stored in the storage unit 20a (step S10).
The QUBO generation unit 20c calculates a start position pt0[k, r] of each task on the basis of the initial position of the carrier machine as illustrated in
In
The QUBO generation unit 20c calculates an end position pt1[k, r] of each task on the basis of the initial position of the carrier machine as illustrated in
In
Next, the QUBO generation unit 20c calculates dist(p[i], p[j]) (step S13). dist(p[i], p[j]) is a distance from each node p[i] included in the directed graph to another node p[j] included in the directed graph. The QUBO generation unit 20c may obtain dist(p[j], p[j]) as a shortest distance from the node p[i] to the node p[j] by using, for example, Dijkstra's algorithm or the like.
A distance between nodes having the same node name is 0. Furthermore, for example, the node with the node name “L1” cannot reach the node with the node name “L1d1” because there is no edge. A distance between such nodes is set to a very large value, as illustrated in
Then, the QUBO generation unit 20c calculates dt(ki, kj, r) for all ki, kj, and r, on the basis of the above-described Formula (1) (step S14).
For example, in a case of ki=0, kj=5, and r=1, dt(0, 5, 1)=dist(pt1[0, 1], pt0[5, 1])+dist(pt0[5, 1], Pt1[5, 1]) is satisfied. pt1[0, 1] indicates the node with the node name “L4-1”, which is an initial position of the carrier machine with the carrier machine number r=1, and pt0[5, 1] Indicates the node with the node name “L11”, which is a start position of the task with the task number k=5. Therefore, dist(pt1[0, 1], pt0[5, 1]) is a moving distance from the node with the node name “L4-1” to the node with the node name “L11”, which is 6. Furthermore, pt1[5, 1] is a node with a node name “L20”, which is an end position of the task with the task number k=5. Therefore, dist(pt0[5, 1], pt1[5, 1]) is a moving distance from the node with the node name “L11” to the node with the node name “L20”, which is 6. Therefore, in a case of ki=0, kj=5, and r=1 as illustrated in
Next, the QUBO generation unit 20c calculates dk(k) for all pieces of k (not including k=0) on the basis of the above-described Formula (2) (step S15).
In a case of k=1, dk(1)=dist(pt0[1, 1], pt1[1, 1]) is to be satisfied. dist(pt0[1, 1], pt1[1, 1]) is a moving distance from the node with the node name “L8” to the node with the node name “L3”. A route that is to be a shortest distance from the node with the node name “L8” to the node with the node name “L3” is “L8”→“L10”→“L11”→“L12”→“L3” from
In a case of k=2, dk(2)=dist(pt0[2, 1], pt1[2, 1]) is to be satisfied. dist(pt0[2, 1], pt1[2, 1]) is a moving distance from the node with the node name “L6” to the node with the node name “L8”, which is 2 from
In a case of k=3, dk(3)=dist(pt0[3, 1], pt1[3, 1]) is to be satisfied. dist(pt0[3, 1], pt1[3, 1]) is a moving distance from the node with the node name “L11” to the node with the node name “L15”, which is 2 from
In a case of k=4, dk(4)=dist(pt0[4, 1], pt1[4, 1]) is to be satisfied. dist(pt0[4, 1], pt1[4, 1]) is a moving distance from the node with the node name “L18” to the node with the node name “L8”, which is 2 from
In a case of k=5, dk(5)=dist(pt0[5, 1], pt1[5, 1]) is to be satisfied. dist(pt0[5, 1], pt1[5, 1]) is a moving distance from the node with the node name “L11” to the node with the node name “L20”. A route that is to be a shortest distance from the node with the node name “L1” to the node with the node name “L20” is “L11”→“L13”→“L15”→“L17”→“L8”→“L19”→“L20” from
Thereafter, the QUBO generation unit 20c generates a QUBO evaluation function based on dt(ki, kj, r) and dk(k) calculated as described above (step S16).
The objective function is represented by a quadratic expression for state variables (x[r, t, i] and x[r, t+1, j]), as in the above-described Formula (3). As in the example described above, the state variable contained in the QUBO evaluation function, which models the problem of assigning each of the five tasks to any of the four carrier machines, may be expressed as follows.
In
As can be seen from
In the process of step S16, the QUBO generation unit 20c adds the following constraint term to the evaluation function. The constraint term has a value greater than 0 when a task is assigned that does not meet a condition (a constraint condition) that should be satisfied by the problem.
For example, as the constraint condition, there are the following six.
(Constraint Condition 1)
Constraint condition 1 is a condition that a dummy task of k=0 is executed only twice for every carrier vehicle. This is for satisfying the problem setting that, as described above, the carrier vehicle departs from the initial position, and returns to the initial position again after executing all assigned tasks. Expressing Constraint condition 1 with Formula (5) is as follows.
From Formula (5), Constraint term 1 representing Constraint condition 1 may be expressed by the following Formula (6).
In Formula (6), α is a predetermined constant value, to which a relatively large value is set. Constraint term 1 becomes 0 when Constraint condition 1 for r=1 to 4 as shown in Formula (5) is satisfied, and will be a relatively large value greater than 0 when Constraint condition 1 is not satisfied.
(Constraint Condition 2)
Constraint condition 2 is a condition that the number of executions of each task is 1. Expressing Constraint condition 2 with Formula (7) is as follows.
Constraint condition 2 indicates that a total value of each column of k=1 to 5 is 1, in state variables arranged in a matrix as in
From Formula (7), Constraint term 2 representing Constraint condition 2 may be expressed by the following Formula (8).
In Formula (8), 0 is a predetermined constant value, to which a relatively large value is set. Constraint term 2 becomes 0 when Constraint condition 2 as shown in Formula (7) is satisfied, and will be a relatively large value greater than 0 when Constraint condition 2 is not satisfied.
(Constraint Condition 3)
Constraint condition 3 is a condition that the number of tasks executed by each carrier machine at certain time is 0 or 1. Constraint condition 3 can be said that the following Formula (9) is 0 or 1 for all of r=1, 2, 3, 4 and t=1, 2, 3, 4, 5.
When Formula (9) is expressed as M, Constraint condition 3 may be expressed as M (M−1)=0. Constraint condition 3 indicates that a total value of each row is 0 or 1, in state variables arranged in a matrix as in
In Formula (10), γ is a predetermined constant value, to which a relatively large value is set. Constraint term 3 becomes 0 when Constraint condition 3 as described above is satisfied, and will be a relatively large value greater than 0 when Constraint condition 3 is not satisfied.
(Constraint Condition 4)
Constraint condition 4 is a condition that each carrier machine does not execute a task after returning to the initial position. Constraint condition 4 is x[r, te, 0]=1 when te (≠0) is time when the carrier machine with the carrier machine number r returns to the initial position, and is x[r, t, k]=0 when te<t is satisfied. Constraint term 4 representing Constraint condition 4 may be expressed by the following Formula (11).
In Formula (11), 8 is a predetermined constant value, to which a relatively large value is set. Constraint term 4 becomes 0 when Constraint condition 4 as described above is satisfied, and will be a relatively large value greater than 0 when Constraint condition 4 is not satisfied.
(Constraint Condition 5)
Constraint condition 5 is a condition that each carrier machine is at the initial position when t=0 is satisfied. Constraint condition 4 indicates that x[1, 0, 0]=1, x[2, 0, 0]=1, x[3, 0, 0]=1, and x[4, 0, 0]=1 are satisfied. Constraint term 5 representing Constraint condition 5 may be expressed by the following Formula (12).
In Formula (12), E is a predetermined constant value, to which a relatively large value is set. Constraint term 5 becomes 0 when Constraint condition 5 as described above is satisfied, and will be a relatively large value greater than 0 when Constraint condition 5 is not satisfied.
(Constraint Condition 6)
Constraint condition 6 is a condition to prevent an occurrence of a situation in which no task is executed at time before execution time of a task to be executed last by each carrier machine, among assigned tasks. That is, for example, Constraint condition 6 is a condition to cause a row with only 0 to gather at the end of rows for each carrier machine r=1 to 4, as illustrated in
In the state variables arranged in a matrix as in
In a case where a sum S[t−1] of the state variable values of a row of time t−1 is 0 and the sum S[t] of the state variables of the row of the time t is 1, in other words (1−S[t−1]) S[t]−1, it is indicated that the row with only 0 is to be inserted in the middle. Therefore, it suffices that (1−S[t−1]) S[t]=0 is satisfied as Constraint condition 6 for each time t. Constraint term 6 representing Constraint condition 6 may be expressed by the following Formula (14).
In Formula (14), ζ is a predetermined constant value, to which a relatively large value is set. Constraint term 6 becomes 0 when Constraint condition 6 as described above is satisfied, and will be a relatively large value greater than 0 when Constraint condition 6 is not satisfied.
The penalty term is expressed by the above-described Formula (4).
The QUBO evaluation function is a function in which the six constraint terms described above and the penalty term are added to the objective function.
After processing in step S16, the QUBO generation unit 20c outputs QUBO problem data (step S17).
The QUBO generation unit 20c obtains a coefficient of a first-order term (which becomes a vector), a coefficient of a second-order term (which becomes a matrix), and a constant term of the state variable on the basis of the generated evaluation function, and outputs these as the QUBO problem data. The QUBO problem data outputted by the QUBO generation unit 20c may be outputted to the solution unit 20e by the control unit 20d, or may be outputted to the storage unit 20a and stored. Furthermore, the QUBO generation unit 20c may output (transmit) the QUBO problem data to a device external to the information processing apparatus 20.
Note that the processing flow illustrated in
Furthermore, the QUBO generation unit 20c may store the calculation results obtained in each of the processes of steps S11 to S15, in the storage unit 20a.
When the solution unit 20e receives the QUBO problem data from the control unit 20d, the solution unit 20e searches for a value of each state variable that minimizes a value of the evaluation function under the control of the control unit 20d, and outputs a search result as a solution. For example, the solution illustrated in
Expressing this solution on a directed graph is as follows.
As illustrated in
As illustrated in
As Illustrated in
As illustrated in
Therefore, the time at which all tasks are completed is the time corresponding to the moving distance of the carrier machine with the carrier machine number r=4.
According to the information processing apparatus 20 and the evaluation function generation method of the second embodiment as described above, an effect similar to that of the information processing apparatus 10 and the evaluation function generation method of the first embodiment may be obtained. In other words, for example, the calculation time may be shortened as compared with the case of using the 0-1 integer programming. Furthermore, various constraint conditions may be expressed by quadratic expressions for the state variables x[r, t, k] as described above, and may be added as a constraint term of the QUBO evaluation function.
Note that, in the description above, a description on a case where there are multiple shortest routes in calculation of dist(p[i], p[j]) is omitted. In that case, it is sufficient to add, to the evaluation function, a constraint term indicating a constraint condition (called 1-hot constraint condition) that a task is duplicated for the number of multiple shortest routes, and only one is selected from the duplicated tasks.
Furthermore, in the explanation described above, a description has been made with, as an example, the problem of finding assignment with which all tasks are completed in a shortest time in assigning tasks to a plurality of carrier machines, which is an example of a plurality of mobile objects, but the embodiment is not limited to this. For example, it is possible to also apply to a problem of dispatching a plurality of taxis or the like, which is another example of a plurality of mobile objects. In that case, the layout information is to be map information represented by a directed graph, the mobile object is to be a taxi, and the task is to be represented by a position where a customer gets on and a position where the customer gets off.
Furthermore, as described above, the processing contents described above may be realized by causing the information processing apparatus 20 to execute a program.
The program may be recorded on a computer-readable recording medium (for example, the recording medium 26a). As the recording medium, for example, a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like may be used. The magnetic disk includes an FD and an HDD. The optical disk includes a CD, a CD-R (recordable)/RW (rewritable), a DVD, and a DVD-R/RW. The program may be recorded on a portable recording medium and distributed. In this case, the program may be copied from the portable recording medium to another recording medium (for example, the HDD 23) and then executed.
In the foregoing, one aspect of the evaluation function generation program, the evaluation function generation method, and the information processing apparatus of the embodiment has been described on the basis of the embodiments; however, these are only examples and are not limited to the description above.
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-136427 | Aug 2020 | JP | national |