program
A multi-head neural network with gradient-based optimization addresses the computational challenges of mixed-integer nonlinear programming, enabling efficient and accurate operational planning in complex systems.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- TOKYO GAS CO LTD
- Filing Date
- 2026-02-27
- Publication Date
- 2026-07-24
AI Technical Summary
Calculating optimal solutions for mixed-integer nonlinear programming problems in complex systems like energy production processes is computationally intensive and difficult to formulate within a practical timeframe, especially when the systems are large and complex.
A program utilizing a multi-head neural network with a common layer connected to input and output layers for continuous and binary variable estimation, incorporating gradient-based optimization methods and penalty terms to efficiently learn parameters, allowing for robust estimation of continuous and binary variables.
Enables accurate and efficient estimation of solutions to mixed-integer nonlinear programming problems, improving operational planning in complex systems by reducing computational intensity and ensuring constraint satisfaction.
Smart Images

Figure 0007894590000001_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a program.
Background Art
[0002] [[ID=The present invention aims to estimate a solution with practical accuracy in a mixed integer non-linear programming problem.
Means for Solving the Problem
[0005] The invention according to claim 1 is a program for causing a computer to realize the following functions using a neural network. The neural network is a neural network for estimating continuous variables and binary variables with respect to state variables of a mixed integer non-linear programming problem. The neural network has a common layer connected to an input layer and a plurality of heads branched from the common layer and connected to each of a plurality of output layers. The output layer of a binary head, which is one of the heads of the neural network, has a function of switching and estimating a binary value using a previously given value as a threshold. The program has a function of estimating the continuous variable by a continuous head, which is another one of the heads of the neural network, and a function of estimating the binary variable by the binary head. The invention according to claim 2 is the program according to claim 1, wherein the program has a function of obtaining a set of initial states in each of a plurality of scenarios indicating a situation from the state at the initial time of the state variable to the state at a specific time, a function of obtaining a set of state variables accompanying the progress of the scenario for each scenario by a previously given function, and a function of estimating continuous variables and binary variables corresponding to each of the state variables for each scenario by the neural network. The invention according to claim 3 is the program according to claim 2, wherein the program has a function of calculating costs in the state variables, the continuous variables, and the binary variables for each scenario, and a function of performing learning of parameters of the multi-head neural network so that the costs are reduced. The invention described in claim 4 is the program described in claim 3, which has the function of learning parameters by adding a function that expresses the inequality constraints on the state variables, binary variables, and continuous variables for each scenario in a form that allows the gradient to be calculated when learning the parameters of the multi-head neural network. The invention described in claim 5 is the program described in claim 1, which has the following functions for the output layer of the binary head: a function to estimate the binary value by switching a pre-given value as a threshold in forward propagation and to search for the binary variable using a gradient in backpropagation; and a function to apply an activation function to the output layer of the binary head to facilitate the search for the binary variable. The invention described in claim 6 is the program described in claim 1, wherein when the program is applied to a nonlinear programming problem whose solution is a continuous variable, it uses only the neural network having a continuous head; when it is applied to a 0-1 integer programming problem whose solution is a binary variable, it uses only the neural network having a binary head; and when it is applied to a mixed-integer linear programming problem and a mixed-integer nonlinear programming problem whose solutions are a continuous variable and a binary variable, it uses both the neural network having a continuous head and the neural network having a binary head. [Effects of the Invention]
[0006] According to the present invention, solutions to mixed-integer nonlinear programming problems can be estimated with practical accuracy. [Brief explanation of the drawing]
[0007] [Figure 1] This figure shows an example configuration of the heat source system according to this embodiment. [Figure 2] This figure shows an example of the hardware configuration of a control device to which this embodiment is applied. [Figure 3] This figure shows an example of the hardware configuration of an operator terminal to which this embodiment is applied. [Figure 4](a) and (b) are diagrams illustrating conventional mixed-integer nonlinear programming problems. [Figure 5] Figures (a) and (b) illustrate the formulation of the multi-scenario optimization problem in this embodiment, which is a differentiable problem in which the parameters of a neural network, a machine learning model, are directly learned. [Figure 6] This figure illustrates the learning process of a multi-head neural network using a Straight-Through Estimator in this embodiment. [Figure 7] (a) and (b) are diagrams showing examples of learning curves for training scenarios during the training of a multi-head neural network in this embodiment. [Figure 8] Figures (a) through (f) show the results of a simulation performed for a typical test scenario. [Figure 9] This is a flowchart illustrating the neural network learning process in the heat source system of this embodiment. [Figure 10] This flowchart illustrates the formulation of an operation plan using a neural network in the heat source system of this embodiment. [Modes for carrying out the invention]
[0008] Embodiments of the present invention will be described in detail below with reference to the attached drawings. Figure 1 shows an example of the configuration of a heat source system 1 according to this embodiment. The heat source system 1 is an example of an energy supply system that supplies energy to an energy consumer 10. Examples of the heat source system 1 include district heating and cooling, which supplies chilled water or hot water to multiple buildings within a certain area. In the example shown in Figure 1, cooling energy is supplied to the consumer 10 as energy.
[0009] The heat source system 1 comprises multiple chillers 20 for cooling water, a supply water pipeline 21 for sending the cooled water (hereinafter referred to as "chilled water") to the customer 10, and a condensate pipeline 22 for returning the water used by the customer 10 to the chillers 20. A chilled water pump 24 is provided in the supply water pipeline 21 to drive the chilled water. The heat source system 1 also includes a bypass route 23 that connects the supply water pipeline 21 and the condensate pipeline 22 and adjusts the differential pressure.
[0010] In the heat source system 1, each of the multiple chillers 20 is equipped with a cooling tower 25 as an auxiliary device and a cooling water pipeline 26 for circulating cooling water between the chiller 20 and the cooling tower 25. A cooling water pump 27 is provided in the cooling water pipeline 26 to provide driving force to the cooling water. The temperature of the cooling water rises due to heat exchange in the chiller 20. The cooling tower 25 cools the cooling water whose temperature has risen. The refrigeration unit 20 is a device that produces cold air to be supplied to the customer 10, and is an example of a device that supplies energy to the customer 10.
[0011] Furthermore, the heat source system 1 includes a thermal storage tank 30 and a CGS 40. The thermal storage tank 30 is a device that stores excess cold produced by the chiller 20 as cooling water, for example, when cold is produced in excess of the demand. The thermal storage tank 30 releases the stored cooling water for cold. For example, it releases the water when cold is needed due to a sudden increase in demand.
[0012] CGS40 is a so-called cogeneration system. CGS40 is a system that generates electricity using natural gas, oil, LPG, etc., as fuel, using methods such as engines, turbines, and fuel cells, and simultaneously recovers the waste heat generated during the process. CGS40 can supply the waste heat generated simultaneously with the supply of electricity as thermal energy to the heat source system 1. This thermal energy can then be used to power the chiller 20. Therefore, by subtracting the thermal energy supplied from CGS40 from the energy required to power the chiller 20, it is possible to model the highly efficient operation of the chiller 20.
[0013] The CGS40 is activated when the heat source system 1 requires electricity, and it determines the output distribution and supplies electricity according to the required or specified amount. For example, the cogeneration system supplies electricity when there is a risk that the electricity consumption of the heat source system will exceed the contracted power. In this case, the amount of thermal energy supplied from the CGS40 is calculated, for example, using the thermoelectric ratio, which represents the ratio of thermal energy to supplied electricity.
[0014] Furthermore, the heat source system 1 includes an operator terminal 50 operated by an operator and a control device 100 that controls the operation of each piece of equipment in the heat source system 1. The control device 100 controls the startup state and the amount of heat produced by the chiller 20. The control device 100 also controls the chilled water pump 24 and the cooling water pump 27 to control the flow rate of chilled water and cooling water.
[0015] The control device 100 calculates the startup status and output distribution of the multiple chillers 20, thermal storage tanks 30, and CGS 40. The startup status refers to whether or not each of the multiple chillers 20, thermal storage tanks 30, and CGS 40 is in operation. The control device 100 determines the combination of chillers 20, thermal storage tanks 30, and CGS 40 to be operated. Output distribution is the apportionment of the amount of heat produced in each chiller 20 and thermal storage tank 30. Output distribution also refers to the distribution of the power output of the CGS 40.
[0016] The control device 100 then calculates the optimal startup state and output distribution for each of the multiple chillers 20, the heat storage tank 30, and the CGS 40, taking into consideration the different performance and characteristics of the multiple chillers 20, the thermoelectric ratio of the CGS 40 and the amount of thermal energy supplied from the CGS 40, and the cooling output from the heat storage tank 30.
[0017] The startup status and output distribution of the multiple chillers 20, thermal storage tanks 30, and CGS 40 are calculated, for example, by optimization calculations using mixed-integer nonlinear programming. Optimization calculation is a method that describes the objective function, constraints, and decision variables in mathematical formulas and solves these formulas to obtain decision variables that satisfy the constraints and maximize or minimize the objective function.
[0018] The control device 100 formulates the control of the heat source system 1 as a mixed-integer nonlinear programming problem and calculates the startup status and output distribution of the multiple chillers 20, the thermal storage tank 30, and the CGS 40 by solving the formulated equations. The control device 100 models constraints such as the performance and characteristics of the multiple chillers 20. The control device 100 adds a constraint to the mixed-integer nonlinear programming problem, for example, that the sum of the contracted power and the power supplied by the CGS 40 exceeds the power consumption of the heat source system 1. This constraint on the CGS allows for the determination of an operational plan for the equipment that supplies the power necessary for the stable operation of the heat source system.
[0019] The control device 100 then calculates the startup status and output distribution of multiple chillers 20 to satisfy the energy demand forecast at the consumer 10 and minimize primary energy consumption. The energy demand forecast may be obtained from an external device or created by the control device 100.
[0020] The calculation results for the startup status and output distribution of the multiple chillers 20, thermal storage tanks 30, and CGS 40 are output to, for example, the operator terminal 50. The operator performs operations such as inputting command values based on the calculation results.
[0021] The primary energy consumption of CGS40 is calculated using, for example, the power generation efficiency, which represents the efficiency of power output. This primary energy consumption is then added after being converted to match the objective function of the mixed-integer nonlinear programming problem, as needed. For example, the primary energy consumption may be added directly, or it may be added after being converted to costs or carbon dioxide emissions.
[0022] The control device 100 is equipped with a neural network 200. The neural network 200 is a machine learning model that mimics the learning mechanisms of living organisms. The control device 100 uses the neural network 200 to calculate the startup status and output distribution of multiple refrigerators 20. Details of the neural network 200 and the optimization calculation using mixed-integer nonlinear programming by the neural network 200 will be described later.
[0023] <Control device hardware configuration> Figure 2 shows an example of the hardware configuration of the control device 100 to which this embodiment is applied. As shown in the figure, the control device 100 includes a processor 101, which is an arithmetic means, and a main memory 102 and an auxiliary memory 103, which are storage means. Various arithmetic circuits such as a CPU (Central Processing Unit), GPU (Graphics Processing Unit), ASIC (Application Specific Integrated Circuit), and FPGA (Field-Programmable Gate Array) can be used as the processor 101. The processor 101 reads the program stored in the auxiliary memory 103 into the main memory 102 and executes it. For example, RAM (Random Access Memory) can be used as the main memory 102. For example, a magnetic disk drive or SSD (Solid State Drive) can be used as the auxiliary memory 103. The control device 100 also includes a communication interface 104 for sending and receiving information to and from external devices via a network.
[0024] <Hardware configuration of operator terminals> Figure 3 shows an example of the hardware configuration of an operator terminal 50 to which this embodiment is applied. As shown in the figure, the operator terminal 50 includes a processor 51, which is a calculation means, and a main memory 52 and an auxiliary memory 53, which are storage means. Various calculation circuits such as a CPU, GPU, ASIC, FPGA, etc. can be used as the processor 51. The processor 51 reads the program stored in the auxiliary memory 53 into the main memory 52 and executes it. RAM can be used as the main memory 52, for example. A magnetic disk drive or SSD can be used as the auxiliary memory 53, for example.
[0025] The operator terminal 50 also includes a display device (display) 54, an input device 55 for operator input operations, and a communication interface 56 for sending and receiving information to and from an external device via a network. For example, a touch panel integrated with the display device 54 can be used as the input device 55. Alternatively, a keyboard or mouse may be used as the input device 55. Note that the hardware configurations shown in Figures 2 and 3 are merely examples and are not limited thereto. For example, a configuration that includes non-volatile memory such as flash memory or ROM (Read Only Memory) as storage devices is also possible.
[0026] In this embodiment, each process is executed on any computer. Any computer may be implemented as a processor as hardware, a program as software, or a combination thereof. Any computer may be a general-purpose computer, a computer designed for a specific purpose, a workstation, or any other system capable of performing each of these processes.
[0027] The processor is configured to perform various processes in cooperation with the program. The processor can function as each unit or each means in this embodiment. The execution order of the processes performed by the processor is not limited to the order described in this embodiment and can be changed as needed.
[0028] A processor can be configured with one or more hardware components. The types of hardware that make up a processor are not limited to any particular type. For example, a processor may be a CPU (=Central Processing Unit), an MPU (=Micro Processing Unit), a programmable logic device such as an FPGA (=Field Programmable Gate Array), a dedicated circuit for performing specific processing such as an ASIC (=Application Specific Integrated Circuit), a GPU (=Graphics Processing Unit), or hardware such as an NPU (=Neural Processing Unit).
[0029] A processor can be configured not only with a combination of multiple hardware components of the same type, but also with a combination of multiple hardware components of different types. When multiple hardware components are configured to perform one or more processes of a given processor, these components may reside in physically separate devices or in the same device. Hardware is composed of electrical circuits and other components, such as semiconductor elements. In any embodiment, the execution order of each process by the processor is not limited to the order described in each embodiment, and can be changed as necessary.
[0030] The program can be firmware, or it can be software such as microcode. The program may be, for example, a group of program modules. Each function constituting the group of program modules may be implemented by a processor configured to execute each function. The program in each embodiment may be program code or multiple code segments stored in one or more non-temporary computer-readable media (e.g., semiconductor memory, magnetic or optical storage media, or other storage).
[0031] A program may be divided and stored on multiple non-temporary computer-readable media located on devices that are physically separated from each other. Program code or multiple code segments may be represented by any combination of procedures, functions, subprograms, routines, subroutines, modules, software packages, classes, instructions, data structures, and program statements. Program code or multiple code segments may be connected to other code segments or hardware circuits by sending and receiving information, data, arguments, parameters, or memory contents. The present invention is also applicable to programs and program products.
[0032] <Traditional mixed-integer nonlinear programming problems> Figures 4(a) and 4(b) illustrate conventional mixed-integer nonlinear programming problems. Figure 4(a) shows a generally accepted mixed-integer nonlinear programming problem P(x0). Figure 4(b) shows the optimal control input vector.
[0033] Planning the operation of complex systems such as energy production processes and chemical processes, like the heat source system 1 of this embodiment, is a mixed-integer nonlinear programming problem that determines the output (continuous value) and start / stop (binary value (0 / 1)) of the equipment at future N. If the time set is K={0,1,···,N-1}, the mixed-integer nonlinear programming problem P(x0) given the initial state x0 of this system can generally be formulated as shown in Figure 4(a).
[0034] In the equation shown in Figure 4(a), k represents the time index. Also, x(k) is n at time k. x This represents a state variable vector in dimensionality. x(k) is, for example, a state variable vector indicating the cold energy stored by the heat storage tank 30. Also, u(k) is n at time k. u This represents a continuous variable vector of dimensionality. u(k) is, for example, a continuous variable vector representing the cooling output of the refrigerator 20. z(k) is the n at time k. zIt is a binary variable vector of dimensionality. z(k) is, for example, a binary variable vector indicating the operation and shutdown of the refrigerator 20.
[0035] Furthermore, in the equation shown in Figure 4(a), l(x(k),u(k),z(k)) represents the cost function at time k. The cost function is an evaluation index that evaluates the solution based on x(k),u(k),z(k). The cost function is the objective function in the mixed-integer nonlinear programming problem P(x0). The cost function l(x(k),u(k),z(k)) is, for example, an equation that calculates the difference between the predicted cooling output demand and the cooling output calculated from the refrigeration energy stored in the heat storage tank 30, the electricity supplied from the CGS, the cooling output of the chiller 20, the operation and shutdown of the chiller 20, etc.
[0036] Furthermore, in the equation shown in Figure 4(a), st represents the constraint condition that the solution to the cost function, which is the objective function, must satisfy. The constraint condition x(k+1)=f(x(k),u(k),z(k)) represents the state equation of the process. This state equation is an equation in which, for example, substituting the values of x(k),u(k),z(k) into f(x(k),u(k),z(k)) yields x(k+1). The constraint condition h(x(k),u(k),z(k)) represents n at time k. h This represents a vector function that expresses the inequality constraints. h(x(k),u(k),z(k)) is, for example, a function of the surplus or deficit of cooling output relative to demand.
[0037] Furthermore, among the equations shown in Figure 4(a), the constraint condition is x(k)∈X⊆R nx This shows that x(k) is an element of the executable region X of the state variable, and that X is part of R, which represents a vector of all natural numbers in nx dimensions. Also, u(k)∈U⊆R nu This shows that u(k) is an element of the feasible region U of a continuous variable, and that the feasible region U of u(k) is part of R of order nu. Also, z(k)∈{0,1} nzThis shows that z(k) is part of a vector of 0s and 1s in ,nz dimensions. ∀k∈K shows that all k are part of the time set K=(0, 1, ...N-1).
[0038] By solving the mixed-integer nonlinear programming problem shown in Figure 4(a), the optimal control input vector shown in Figure 4(b) is obtained. Then, from Figure 4(b), only the control input [u*(0;x0),z*(0;x0)] from this first step is adopted as the driving plan, and the next state x(1)=f(x(0),u*(0;x0),z*(0;x0)) is calculated, updating the initial state from x0 to x(1). By solving the mixed-integer nonlinear programming problem P(x0) again for this updated initial state x0, a new optimal control input vector is calculated. By repeating this process N times, a driving plan up to N steps into the future is formulated. This method is called model predictive control, and by repeating this process, a driving plan can be formulated indefinitely.
[0039] However, calculating the optimal solution to a mixed-integer nonlinear programming problem is computationally intensive, and it is particularly difficult to formulate an operational plan within a practical timeframe when the target system is large and complex.
[0040] <Formulation of a differentiable multi-scenario optimization problem that directly learns the parameters θ of a machine learning model> Figures 5(a) and 5(b) illustrate the formulation of a multi-scenario optimization problem, which is a differentiable problem for directly learning the parameters θ of the neural network 200, a machine learning model in this embodiment. Figure 5(a) shows the multi-scenario mixed integer nonlinear programming problem Pm(X). Figure 5(b) shows Pg(X), in which the inequality constraints of Pm(X) are incorporated into a cost function using a penalty term based on the RectifiedLinearUnit (ReLU) function (f(x)=max(0,x)). Note that explanations of matters described in Figure 4 may be omitted.
[0041] In Fig. 5(a), an approach of directly learning is adopted by solving the parameters θ of the neural network 200 for estimating the control input through a multi-scenario optimization problem. The multi-scenario mixed integer non-linear programming problem Pm(X) shown in Fig. 5(a) sets the set of S scenarios as S = {1, 2, …, S}, and formulates the mixed integer non-linear programming problem P(x0) given the set X = {x 1,0 , x 2,0 , …, x S,0} of S initial states. The initial state is the state at the initial time, and a scenario indicates the situation from the state at the initial time in x(k) to the state at a specific time. When the scenarios are different, the situations from the state at the initial time to the state at a specific time in x(k) are different respectively. The initial time is, for example, the time point of k = 0, and the specific time is, for example, the time point of k = N.
[0042] Here, x s (k) is the state variable at time k in scenario s, u s (k) is the continuous variable at time k in scenario s, and z s (k) is the binary variable at time k in scenario s. [u s (k), z s (k)] = ζ(θ, x s (k)) is an expression showing the relationship between the input x s (k) to ζ representing the neural network 200 with parameters θ, and the outputs u s (k), z s (k) obtained from the input.
[0043] When Fig. 5(a) is used for the neural network 200, as the function of the program including the neural network 200, there is a function to obtain the set X = {x 1,0 , x 2,0 , …, x S,0} of the initial states in each of the multiple scenarios indicating the situation from the state at the initial time of the state variable to the state at a specific time. Also, as the function of the program including the neural network 200, for each scenario, x s(k+1) = f(x s (k),u s (k), z s (k)) gives a set of state variables [x s (0), x s (1), ..., x s It has a function to find (N). The function of the program including Neural Network 200 is to use the neural network to find a continuous variable [u] corresponding to each state variable for each scenario. s (0),u s (1), ..., u s (N-1)] and binary variable [z s (0), z s (1), ..., z s It has a function to output (N-1). The program, which includes Neural Network 200, has a function to calculate the cost for state variables, continuous variables, and binary variables for each scenario and to train the parameters θ of Neural Network 200 to reduce the cost.
[0044] Then, as an example of processing by the processor 101 using the neural network 200, the processor 101 using the neural network 200 solves the multi-scenario mixed integer nonlinear programming problem Pm(X) shown in Figure 5(a) as follows. First, given the initial state x s,0 For this, the machine learning model ζ(θ,x s (k)) is used repeatedly N times, and first, [x over N future times s (0), x s (1), ..., x s (N)],[u s (0),u s (1), ..., u s (N-1)],[z s (0), z s (1), ..., z s We find (N-1)). Next, we find [x for all S initial states]. s (0), x s (1), ..., x s (N)],[u s (0),u s (1), ..., u s(N-1)],[z s (0), z s (1), ..., z s Using (N-1), the average cost corresponding to each initial state is calculated. Then, the neural network 200 learns by finding the parameter θ that minimizes this average cost. Note that the average cost is just one example of a cost.
[0045] The method shown in Figure 5(a) can be applied to a mixed-integer nonlinear programming problem to exploratoryly calculate the optimal parameters θ. On the other hand, when the parameter dimension is enormous, the search range becomes wide due to the characteristic of Pm(X) that it searches for a solution that always satisfies the inequality constraints, making it difficult to find the optimal parameters.
[0046] Therefore, we apply gradient-based optimization methods, such as Adam's, which offer an advantage in balancing convergence speed and optimality. To find the gradient of this multi-scenario mixed-integer nonlinear programming problem Pm(X), we use the automatic differentiation function of machine learning libraries such as PyTorch. The automatic differentiation function is a feature that automatically calculates the gradient of functions such as the RectifiedLinearUnit (ReLU) function (f(x)=max(0,x)) and enables parameter learning.
[0047] In other words, by transforming a multi-scenario mixed-integer nonlinear programming problem P(X) into a form that can be differentiated using an automatic differentiation function, it becomes possible to efficiently learn the parameters θ using gradient-based optimization methods. To this end, the inequality constraints of Pm(X) are incorporated into the cost function as penalty terms using the ReLU function, thereby formulating a new problem Pg(X) as shown in Figure 5(b).
[0048] Figure 5(b) shows a new problem Pg(X). Pg(X) is a similar equation to Pm(X) shown in Figure 5(a), and consists of an energy consumption term that shows the energy consumed by each piece of equipment such as the refrigerator 20 explained in Figure 1, and a penalty term that is a function that expresses the inequality constraints of Pm(X) in a form in which the gradient can be calculated when training the parameters of the multi-head neural network. Here, wi in the penalty term is the weight related to the penalty of the i-th inequality constraint. In this case, the penalty term is not limited to the above form, but can be in a form in which the gradient can be calculated using the automatic differentiation function. Generally, the more a machine learning model ζ(·) is trained on various scenarios, the more robust the model becomes. In the method in Figure 5(b), the initial state x s,0 By randomly generating a large number of these while taking into account the characteristics of the process (such as the upper and lower limits of the state variables) and optimizing the parameter θ, robustness can be increased, which is a significant advantage in terms of practicality.
[0049] <Multi-head neural network for estimating continuous and binary variables> Figure 6 illustrates the learning process of a multi-head neural network using a Straight-Through Estimator in this embodiment. Mixed-integer nonlinear programming problems require the construction of a machine learning model ζ(·) to estimate the decision variables, as these are continuous and binary variables. While various machine learning models can be applied, this section describes a multi-head neural network, an example of an improvement in neural network 200.
[0050] Figure 6 shows a multi-head neural network. A multi-head neural network is an example of neural network 200, in which the neural network's hidden layers have a common layer connected to the input layer and multiple heads that branch off from the common layer and connect to each of the multiple output layers. A multi-head neural network is sometimes simply referred to as neural network 200.
[0051] The neural network 200 in Figure 6 has an input layer 601 and a common layer 602. The neural network 200 also has a continuous head 603 and a binary head 604 as examples of multiple heads. The neural network 200 also has an output layer 603a for the continuous head and an output layer 604a for the binary head as examples of multiple output layers. The common layer 602, continuous head 603, and binary head 604 are examples of hidden layers.
[0052] The input layer 601 is the layer that receives information to be input to the neural network 200. Figure 6 shows x as the input information, as explained in Figure 5(a). s (k) is shown. The common layer 602 takes the x input to the input layer 601. s (k) is a layer that performs common processing before processing in the continuous head 603 and the binary head 604. Common processing includes, for example, processing to improve the estimation accuracy of both continuous and binary variables. The activation functions of the input layer 601 and the common layer 602 are functions that transform the input non-linearly. For example, the SILU function is used.
[0053] Furthermore, the continuous head 603 performs a common process in the common layer 602. s (k) is a continuous variable u s This is the layer that estimates (k). The output layer 603a of the continuous head is the layer that estimates u s (k) is the layer that outputs to the outside. For example, the output layer 603a of the continuous head is the layer that outputs the estimated u s (k) is output to the main memory 102 of the control device 100. The activation functions of the continuous heads 603 other than the output layer 603a of the continuous heads are functions that transform the input nonlinearly. For example, the SILU function is used. For the activation function of the output layer 603a of the continuous heads, for example, the Sigmoid function, which will be described later, is used.
[0054] Furthermore, the binary head 604 performs common processing in the common layer 602 x s (k) is a binary variable z sThis is the layer that estimates (k). The output layer 604a of the binary head estimates z s (k) is the layer that outputs to the outside. For example, the output layer 604a of the binary head outputs the estimated z s (k) is output to the main memory 102 of the control device 100. For the binary heads 604 other than the output layer 604a of the binary head, a function that transforms the input non-linearly is used as the activation function. For example, the SILU function is used. For the activation function of the output layer 604a of the binary head, for example, the Sigmoid function or the Gumbel-Sigmoid function described later is used.
[0055] One advantage of this neural network 200 is that it can optimize the parameter θ based on the interrelationship between continuous and binary values. In this case, the activation function of the output layer 603a of the continuous head is a sigmoid function that converts the output between 0 and 1, and the activation function of the output layer 604a of the binary head is a step function that switches between 0 and 1 at a threshold. However, this step function is not differentiable, and gradient-based optimization of the parameter θ cannot be performed in this form.
[0056] Therefore, we use the Sigmoid function (σ) to convert the output to 0-1. sig The output layer 604a of the binary head uses (x)=1 / (1+exp(-x))) as its activation function. In the forward propagation, it estimates by switching between 0 and 1 with a threshold of 0.5, and in the backpropagation, it searches for the binary variable using the gradient of the sigmoid function. This Straight-Through Estimator is applied to the output layer 604a of the binary head. This gradient-based optimization method using the Straight-Through Estimator allows for both prediction of the binary variable and optimization of the parameter θ using the gradient.
[0057] Here, if the neural network 200 uses only the continuous head 603 without using the binary head 604 among both heads of the neural network 200, it can be applied to a non-linear programming problem, which is a problem with a continuous variable as the solution. Also, if the neural network 200 uses only the binary head 604 without using the continuous head 603 among both heads of the neural network 200, it can be applied to a 0-1 integer programming problem, which is a problem with a binary variable as the solution. Furthermore, if the neural network 200 has both the continuous head 603 and the binary head 604, it can be applied to a mixed integer non-linear programming problem and a mixed integer linear programming problem, which are problems with continuous variables and binary variables as the solutions.
[0058] <Acceleration of Search for Binary Variables Using the Gumbel-Sigmoid Function> While the gradient-based optimization method described above can efficiently learn the parameter θ for estimating 0 / 1, it cannot be denied that there is a possibility of falling into a local solution when the dimension of the binary variable is large. Therefore, in order to promote the global optimization of the parameter θ, in FIG. 6, it is shown that the Gumbel-Sigmoid function (σgum(x)=σsig((x + g1 - g2) / τ)) is applied as the activation function of the output layer of the binary head 604 instead of the Sigmoid function. Here, g1 and g2 are random numbers sampled from the standard Gumbel distribution, and τ is the temperature parameter. When τ is large, σgum(x) becomes a value near 0.5 determined by the random numbers of g1 and g2, so 0 / 1 is probabilistically determined. On the other hand, when τ is small, σgum(x) is deterministically determined to a value close to 0 or 1. Thus, by gradually changing τ from a large value to a small value, first, the parameter θ is optimized while promoting global search, and as the learning progresses, the parameter θ is optimized to deterministically estimate 0 / 1. Thereby, it is possible to prevent the parameter θ from falling into a local solution as much as possible. Note that the function to replace the Sigmoid function is not limited to the Gumbel-Sigmoid function, and any function that promotes search including some random numbers may be used.
[0059] <Highly practical neural network training using a two-stage learning strategy> Here, the optimization problem Pg(X) shown in Figure 5(b) includes the inequality constraint as a penalty term in the cost function, so it does not necessarily satisfy the constraint. Therefore, in order to increase the likelihood of calculating a solution that satisfies the constraint, from initial training and fine tuning A two-stage parameter learning strategy is introduced. The first stage, initial learning, is the gradient-based optimization method described above, where the parameters θ of the entire neural network 200 are learned by gradually decreasing τ. The second stage, fine tuning, fixes the parameters of the common layer 602 and binary head 604 in Figure 6, and learns only the parameters of the continuous head 603. At this time, the weight wi of the penalty term is set to be larger than that in initial learning.
[0060] This allows us to optimize the parameters of the continuous head 603 to satisfy the constraints of Pg(X) as much as possible by optimizing only the parameters of the continuous head 603 based on the parameters θ that estimate the globally optimal combination of binary variables optimized in the initial training. In other words, the main adjustment of the parameters can be done by learning the parameters for the initial training, which is the first stage, and the parameters can be fine-tuned in the fine-tuning stage, which is the second stage.
[0061] <Simulation Prerequisites> Figures 7 to 11 illustrate an example of a simulation using heat source system 1. First, the preconditions for the simulation are explained. The neural network 200 is trained using a gradient-based optimization method that combines Pg(X) in Figure 5(b) and the multi-head neural network in Figure 6. The total number of epochs is 2000, with the first 1200 epochs being the first stage of initial training and the remaining 800 epochs being the second stage of fine tuning. The neural network 200 consists of four hidden layers in the common layer 602, and one hidden layer each in the continuous head 603 and binary head 604, with each hidden layer having 512 neurons.
[0062] Furthermore, as a prerequisite, input data for the neural network 200 may include, for example, operational information regarding the operation of the chiller 20. This operational information may include information regarding the start / stop of the chiller 20, the start / stop of the CGS 40, and the characteristics of the chiller, such as the load factor and performance of the chiller 20. In addition, input data for the neural network 200 may include, for example, demand forecasts that predict the future energy demand of the consumer 10. This demand forecast may include, for example, the amount of cold energy stored in the thermal storage tank 30, predicted values for future cold energy demand, predicted values for electricity used other than for the operation of the district heating and cooling system in the future, predicted values for the future wet-bulb temperature, and coefficients for converting secondary energy to primary energy at each future time point. This input data consists of values of state variables.
[0063] Furthermore, 10,000 scenarios are randomly generated from this input data for the training, evaluation, and testing of Neural Network 200. Each of the 10,000 scenarios differs in the on / off state of each device included in the input data, as well as the values of each device. These scenarios are used as input data for Neural Network 200. Scenarios used to train Neural Network 200 are sometimes called training scenarios. Scenarios used to evaluate the accuracy of Neural Network 200's inference are sometimes called evaluation scenarios. Scenarios used to test Neural Network 200 are sometimes called test scenarios.
[0064] The continuous output data of the neural network 200 includes the cooling output of the chiller 20, the proportion of the chiller 20's cooling output supplied to the region (the remainder being stored as heat), the cooling output from the heat storage tank 30, and the power output of the CGS 40. The binary output data of the neural network 200 includes the start / stop of the chiller 20, the start / stop of the CGS 40, and the start / stop of heat dissipation from the heat storage tank 30. Note that the input and output of the neural network 200 are just an example, and other input and output data may be used.
[0065] <Verification of the usefulness of this embodiment by comparing learning curves> Figures 7(a) and 7(b) show examples of learning curves for training scenarios during the learning of a multi-head neural network in this embodiment. In the graphs of Figures 7(a) and 7(b), the vertical axis represents the estimated cost in Pg(X), and the horizontal axis represents the number of epochs. The penalty in Figures 7(a) and 7(b) represents the cost of the penalty term in Pg(X). The energy consumption in Figures 7(a) and 7(b) represents the cost of the energy consumption term in Pg(X). The total represents the overall cost in Pg(X). Figure 7(a) shows the learning curve when the Sigmoid function is applied to the output layer 604a of the binary head of neural network 200. Figure 7(b) shows the learning curve when the Gumbel-Sigmoid function is applied to the output layer 604a of the binary head of neural network 200.
[0066] As shown in Figure 7(a), when the Sigmoid function is applied to the output layer 604a of the binary head, the cost of the penalty term remains around 100 even during fine tuning after 1200 epochs, and the total cost is also large. This means that at the completion of initial training, the parameter θ estimates a combination of binary variables that violates the constraints, and even after fine tuning with weight wi multiplied by 100, constraint violations continue to occur. In other words, the parameter θ is stuck in a local optimum. In contrast, as shown in Figure 7(b), when the Gumbel-Sigmoid function is applied to the output layer 604a of the binary head, the cost of the penalty term is almost 0 at the completion of fine tuning. This means that the optimal parameter θ with few constraint violations is found during initial training.
[0067] Table 1 below shows the performance evaluation of a multi-head neural network when the number of neurons in the hidden layer is changed, using 10,000 training and evaluation scenarios.
[0068] [Table 1]
[0069] As shown in Table 1, when the Sigmoid function is applied to the output layer 604a of the binary head, the cost does not decrease even as the number of neurons increases. On the other hand, when the Gumbel-Sigmoid function is applied to the output layer 604a of the binary head 604, the cost decreases, and the overall value is small. Thus, the usefulness of the designed multi-head neural network has been confirmed.
[0070] <Improved estimation accuracy with increasing number of training scenarios> Table 2 below shows the training cost and evaluation cost when the neural network parameters are learned using training scenarios of 100, 1000, and 10000. In this case, the evaluation scenario was calculated using the same 10000 scenarios.
[0071] [Table 2]
[0072] Table 2 shows that the evaluation cost decreases as the number of training scenarios increases. Therefore, training a neural network with a sufficient number of training scenarios offline can improve robustness, which offers significant practical advantages.
[0073] <Verification of the usefulness of this embodiment in test scenarios> Figures 8(a) to 8(f) show the results of a simulation performed for a typical test scenario. The vertical axis of Figures 8(a) to 8(f) shows cooling output and power output, and the horizontal axis shows time. Figures 8(a) to 8(f) use four chillers 20.
[0074] In Figures 8(a) to (f), these four chillers 20 may be referred to as "Chiller A," "Chiller B," "Chiller C," and "Chiller D." Here, the energy efficiency of the cooling output is highest in the order of Chiller A, Chiller B, Chiller C, and Chiller D. Chiller A supplies excess thermal energy to the heat storage tank 30. Chiller D receives waste heat from the CGS 40 as thermal energy, so in that case, its energy efficiency is higher, and it can operate more efficiently than, for example, Chiller A.
[0075] Figures 8(a), (b), and (c) show the results obtained by the conventional mixed-integer nonlinear programming problem shown in Figures 4(a) and (b). In the conventional mixed-integer nonlinear programming problem, the computation time for one run is limited to a maximum of 20 minutes. Figures 8(d), (e), and (f) show the results obtained by the multi-head neural network shown in Figure 6, which was trained using the optimization problem Pg(X) in Figure 5(b).
[0076] Figure 8(a) shows the cooling output to the region for chillers A to D and the thermal storage tank calculated by a mixed-integer nonlinear programming problem, and Figure 8(d) shows the cooling output to the region for chillers A to D and the thermal storage tank 30 calculated by a multi-head neural network trained using the optimization problem Pg(X). Figures 8(a) and (d) show the cooling output of "chiller A", "chiller B", "chiller C", and "chiller D" for each time period. Figures 8(a) and (d) also show the cooling demand for each time period.
[0077] Figure 8(b) shows the cooling output of chiller A to the thermal storage tank 30 and the amount of stored thermal energy in the thermal storage tank 30, calculated by a mixed-integer nonlinear programming problem. Figure 8(e) shows the cooling output of chiller A to the thermal storage tank 30 and the amount of stored thermal energy in the thermal storage tank 30, calculated by a multi-head neural network trained using the optimization problem Pg(X). Figures 8(b) and (e) show the upper limit of the amount of heat that the thermal storage tank 30 can store. They also show the amount of stored thermal energy accumulated in the thermal storage tank 30 at each time point.
[0078] Figure 8(c) shows the power output of CGS40, and Figure 8(f) shows the power output of CGS40 calculated by a multi-head neural network trained using the optimization problem Pg(X). Figures 8(c) and (f) show the upper limit of electricity that can be purchased from external sources for each time period. Figures 8(c) and (f) also show the upper limit of electricity that can be purchased from external sources for each time period plus the power from CGS. Furthermore, Figures 8(c) and (f) show the total power of cooling equipment, such as the combined power of chillers A to D, and the power of peripheral equipment, such as lighting fixtures in the facility where chillers A to D are installed.
[0079] As shown in Figure 8(a), the conventional mixed-integer nonlinear programming problem can calculate the cooling output that meets the demand using four chillers A-D and a heat storage tank 30, but there is variation in the operation and output of chillers A-D, and it can be seen that chiller C is operating unnecessarily at 13:00. In contrast, as shown in Figure 8(d), the optimization problem Pg(X) in this embodiment results in smooth operation of chiller 20, and chiller C does not operate unnecessarily at 13:00. Furthermore, as shown in Figures 8(b), (c), (e), and (f), the operating status of the heat storage tank 30 and CGS40 is similar between the results of the optimization problem Pg(X) and the mixed-integer nonlinear programming problem, and it can be considered that both are operating appropriately.
[0080] Furthermore, a comparison of energy costs (primary energy consumption) and computation time is shown in Table 3 below. Table 3 shows the conventional method using a mixed-integer nonlinear programming problem, and the optimization problem Pg(X) in Figure 5(b) and the multi-head neural network method shown in Figure 6 as examples of this embodiment. Note that GJ represents gigajoules and s represents seconds.
[0081] [Table 3]
[0082] The results in Table 3 show that a solution with a similar primary energy consumption can be calculated in a remarkably short time of 0.49 seconds. Mixed integer nonlinear programming problems cannot yield optimal results in 20 minutes, and calculating a 24-hour operation plan takes at least 1200 seconds × 24 times = 28800 seconds. Therefore, in this embodiment, a practical operation plan for the heat source system 1 can be formulated quickly. For example, in this embodiment, even while the chiller 20 and other components are in operation, a practical operation plan for the heat source system 1 several minutes later can be formulated in real time.
[0083] Figure 9 is a flowchart showing the learning process of the neural network 200 in the heat source system 1 in this embodiment. The control device 100 of the heat source system 1 acquires the neural network 200 to be trained (step 901). For example, it acquires a neural network 200 that has not yet been trained. Next, the control device 100 inputs state variables to the neural network 200 as training data (step 902). The state variables are, for example, the input data described in the prerequisites. Then, the control device 100 trains the neural network 200 using the continuous and binary variables output by the neural network 200 and an optimization problem including a cost function (step 903). The continuous and binary variables are, for example, the output data described in the prerequisites. The optimization problem including a cost function is, for example, Pg(X) and Pm(X) described in Figures 5(a) and (b). The learning method is, for example, the learning method described in Figures 4 to 6. Then, the control device 100 acquires the trained neural network 200 (step 904).
[0084] Figure 10 is a flowchart showing the formulation of an operation plan using a neural network 200 in the heat source system 1 in this embodiment. First, the control device 100 receives the formulation of an operation plan from the operator terminal 50 or the like (step 101). Then, the control device 100 acquires the neural network 200 (step 102). The control device 100 acquires a trained neural network 200, for example, learned by the process in Figure 9. Then, the control device 100 inputs state variables to the neural network 200 as inference data (step 103). The state variables are, for example, the input data described in the preconditions. Then, the control device 100 acquires output data from the neural network 200 as the inference result (step 104). The inference result is, for example, the output data described in the preconditions. Then, the control device 100 formulates an operation plan from the inference result (step 105). The operation plan is the operation plan shown in Figures 8(a) to (f). Alternatively, the trained neural network 200 may output the formulated driving plan. The operator terminal 50 then acquires the formulated driving plan, and the operator performs operations such as inputting command values based on the formulated driving plan. [Explanation of symbols]
[0085] 1…Heat source system, 10…Consumer, 20…Refrigeration unit, 21…Intake pipeline, 22…Condensate pipeline, 23…Bypass route, 24…Chilled water pump, 25…Cooling tower, 26…Cooling water pipeline, 27…Cooling water pump, 30…Thermal storage tank, 40…CGS, 50…Operator terminal, 100…Control device, 200…Neural network
Claims
1. A program that uses a neural network to implement the following functions for a computer: The aforementioned neural network is A neural network that estimates continuous and binary variables for state variables in a mixed-integer nonlinear programming problem, The neural network has a common layer connected to an input layer, and multiple heads branching off from the common layer and connected to each of the multiple output layers. The output layer of the binary head, which is one of the heads of the neural network, has a function to switch and estimate binary values using a pre-given value as a threshold. The aforementioned program, The neural network has a function to estimate the continuous variable using a continuous head, which is another head of the neural network. The binary head has a function to estimate the binary variable, A program that has a name.
2. The program has a function to obtain a set of initial states in each of a plurality of scenarios that show the state of the state variable from the initial time to the state at a specific time, For each of the aforementioned scenarios, a function is provided to determine the set of state variables corresponding to the progression of that scenario using a pre-defined function. The program according to claim 1, having a function of estimating a continuous variable and a binary variable corresponding to each of the state variables for each of the scenarios using the neural network.
3. The program has a function to calculate the cost in the state variable, the continuous variable, and the binary variable for each scenario. The program according to claim 2, further comprising a function for learning the parameters of the neural network in such a way as to reduce the aforementioned cost.
4. The program according to claim 3, which has a function to learn parameters by adding a function that expresses the inequality constraints on the state variables, binary variables, and continuous variables for each scenario in a format that allows the gradient to be calculated when learning the parameters of the neural network.
5. The program has the following functions for the output layer of the binary head: during forward propagation, it estimates the binary value by switching it using a pre-given value as a threshold, and during backpropagation, it searches for the binary variable using the gradient. The program according to claim 1, further comprising the function of applying an activation function to the output layer of the binary head to facilitate the search for the binary variable.
6. When the program is applied to a nonlinear programming problem whose solution is the continuous variable, it uses only the neural network having the continuous head. When applied to a 0-1 integer programming problem whose solution is the aforementioned binary variable, only the neural network having the binary head is used. The program according to claim 1, which, when applied to a mixed-integer linear programming problem and a mixed-integer nonlinear programming problem whose solutions are the continuous and binary variables, uses both the neural network having a continuous head and the neural network having a binary head.