FIELD OF THE INVENTION

The invention belongs to the field of distributed energy trading and particularly relates to quantitative guidance for distributed trading and actual energy dispatch matching rules, and point-to-point energy trading models.

BACKGROUND OF THE INVENTION

With the gradual promotion of distributed energy trading, more and more energy trading links are deployed among users, and a financial-based energy trading market is established. The energy network can perform actual physical transactions for users based on the results of financial market transactions. The transmission has greatly improved the mobility of energy and promoted reform and development in the energy sector.

However, there are still many difficulties in matching transactions and scheduling. Point-to-point transactions between users do not care about the actual physical constraints, while energy network scheduling is a process that needs to meet the physical realization of each energy network, that is, the actual physical constraints and energy flow constraints are strictly considered in the optimal scheduling. Therefore, the actual transaction contract may not completely match the security dispatch. The energy trading system needs to interact with the dispatch during the design process, taking into account the constraints issued by the dispatch.

At the same time, the matching in distributed transactions is a point-to-point problem. How to match and meet the quotation needs of multiple users at the same time has not been solved well. Traditional transactions are executed based on the transaction center, which cannot guarantee the clarity of the process and security. The above-mentioned problems must be solved to promote distributed transactions. Otherwise, the willingness of ordinary users and energy producers to enter the distributed trading market will be greatly weakened, and the distributed transaction cannot be truly realized.

SUMMARY OF THE INVENTION

To solve the problems above, the purpose of the invention is to provide a distributed energy transaction matching method based on energy network constraints and multiple knapsack model and implement algorithms based on blockchain technology to solve the existing problems in distributed transactions, providing new solutions for distributed energy trading and scheduling matching and peer-to-peer transaction matching.

To achieve the above objective, the invention adopts the following technical solutions:

The distributed energy transaction matching method includes the following steps:

(1) By designing an augmented optimization model of energy scheduling, the transaction volume of users is restricted to the smaller value of the declared volume and the energy network limit volume to add security checks for distributed transactions;

(2) Based on the traditional single knapsack model, for the goal of maximizing market transaction value, design a multiple knapsack model fit more with point-to-point transactions to match transactions between multiple buyers and sellers.

The method for matching distributed energy transactions based on energy network constraints and multiple knapsack problems, wherein the augmented optimization model in step (1) is:

{maxx,y⁢f⁡(x,y)+ρT⁡(ysp-y)s.t.⁢gi⁡(x,y)=0,i=1,…⁢,Neq⁢hj⁡(x,y)≤0,j=1,…⁢,Nieq0≤y≤ysp}

Where x is the decision variable of the system, y is the load and energy production of the system, yspis the transaction energy volume determined by the contract, y=yspindicates that the system's scheduling boundary condition is the transaction volume determined by the contract, and giand hjare equality and inequality constraints of network system security. The augmented optimization model takes y as the system optimization variable, considers the modification of the existing transaction volume, and ensures that the modification amount is as small as possible so that the impact on the transaction is smaller. After the energy network is checked, the correction amount of the transaction can only reduce or cancel the transaction volume, but cannot force the user to increase transaction volume, so the constraint of 0≤y≤yspis obtained.

The method for matching distributed energy transactions based on energy network constraints and multiple knapsack model, wherein the objective function of the multiple knapsack model in step (2) is:

{maxPg,Pd⁢⁢∑j=1Nd⁢λd,j⁢Pd,j-∑i=1Ng⁢λg,i⁢Pg,is.t.⁢∑i=1Ng⁢Pg,i=∑j=1Nd⁢Pd,j0≤Pg,i≤Pg,imax,0≤Pd,j≤Pd,jmax}

λd,jis the price of the jthuser, λg,iis the price of the ithproducer, Pd,jis the matched transaction volume of the jthuser, Pg,ithe matched transaction volume of the jthproducer, Ngand Ndis the number of producers and users, Pd,jmaxand Pg,imaxis the maximum possible transaction volume of the jthuser and ithproducer.

The method for matching distributed energy transactions based on energy network constraints and multiple knapsack model, characterized in that the solving algorithm of the multiple knapsack model is described as:

Convert the point-to-point energy transaction into a multiple knapsack problem. When Nd>Ng, there are Ndkinds of commodities placed in Ngboxes with a capacity of Pg,imaxone after another. The weight of each commodity j is Pj, and the value of unit weight is λj. The value of the goods is sorted from high to low, and the high-value goods are placed first until the weight reaches the requirement, the next box is replaced and the execution is repeated. When Nd≤Ng, Ngtypes of goods are placed in Ndboxes with a capacity of Pd,jmaxone after another. The weight of a commodity i is Pi, and the value of unit weight is λi. Sort the value of the commodity from small to large, and put the small value commodity first, until the weight reaches the requirement, change the box and repeat the execution until the condition is not met.

A distributed energy transaction matching method based on energy network constraints and multiple knapsack model is characterized in that the multiple knapsacks solve the point-to-point transaction problem, which is used in conjunction with the decentralized blockchain technically similar features, the algorithm of the multiple knapsack model is written in the Ethereum smart contract using the “Solidity” to solve.

The beneficial effects of the invention are embodied in:

(1) The invention proposes a distributed energy transaction matching method based on energy network constraints and multiple knapsack model. This method can effectively solve the problem of the current energy transaction market and actual dispatching mismatch, imperfect transaction mode, etc. Also, it provides solutions for distributed trading algorithms in blockchain technology.

(2) The invention can add safety checks based on a direct matching of traditional energy transactions, fully consider the scheduling limitations of the energy network, ensure that the transaction results of the financial market meet the realization of actual physical transmission, and solve the matching problem of transactions and scheduling.

(3) The present invention can propose multiple knapsack models for point-to-point multi-party transactions based on the traditional knapsack problem to satisfy market demand and user quotation requirements. At the same time, it is realized based on decentralized blockchain technology to ensure that the transaction process is clear and transparent, safe, and reliable. It can be used in energy distributed trading occasions, so engineering personnel can carry out relevant research work accordingly.

