Genetic algorithm-based simulation bid-winning power optimization method and system
Patent Information
- Application Number
- CN202211360678.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-02
- Publication Date
- 2026-09-25
- Estimated Expiration
- 2042-11-02
AI Technical Summary
[0006]针对现有技术的不足,本发明提供了一种基于遗传算法的模拟中标出力优化方法和系统,解决了现有的模拟中标出力优化方法运行耗时长的问题
[0105]本发明提供了一种基于遗传算法的模拟中标出力优化方法和系统。与现有技术相比,具备以下有益效果:
Smart Images

Figure CN115659819B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of simulated bid-winning output optimization technology, specifically to a simulated bid-winning output optimization method and system based on a genetic algorithm. Background Technology
[0002] With the deepening of the new electricity reform, in a power market where transmission and distribution are separated, power generation companies need to bid for grid connection, while power supply companies need to bid for electricity purchase. The operating revenue and coal consumption obtained by power generation and power supply companies when adopting different bidding strategies can vary significantly. Therefore, choosing the right bidding strategy to minimize coal consumption or maximize operating revenue is a common concern for both power generation and power supply companies.
[0003] Existing bidding algorithms in the electricity market include queuing, equal-bid, linear programming, network flow programming, dynamic programming, and dual programming, but each method has its own focus and different conditions of application.
[0004] Previous technologies did not specify the correction methods for segmented output pricing and winning bid output. Furthermore, when calculating the fitness function, genetic algorithms generally need to correct the segmented output and pricing of all individuals first. This correction process may lead to a reduction in the number of segments. Therefore, the calculation can only calculate and correct the segmented output and pricing of all individuals one by one, and simulate the winning bid output and climb rate correction of all individuals one by one. This calculation process is relatively cumbersome, and the program's calculation speed is relatively slow and time-consuming. Summary of the Invention
[0005] (a) Technical problems to be solved
[0006] To address the shortcomings of existing technologies, this invention provides a method and system for optimizing simulated bid-winning output based on genetic algorithms, which solves the problem of long running time in existing simulated bid-winning output optimization methods.
[0007] (II) Technical Solution
[0008] To achieve the above objectives, the present invention provides the following technical solution:
[0009] Firstly, a method for optimizing the output of a simulated bid based on a genetic algorithm is provided, the method comprising:
[0010] S1. Obtain a segmented power output quotation matrix XP that satisfies the quotation range and the unit output range based on the initial population encoded in binary; and the segmented power output quotation matrix XP contains the output value and quotation of all units corresponding to each chromosome in all segments;
[0011] S2. Based on the output-price matrix XP of the current population, the output matrix X and the price matrix P are obtained by splitting the output matrix XP. The upper limit matrix ubx and the lower limit matrix lbx are obtained based on the unit output range.
[0012] S3. Obtain the segmented output matrix X of each unit based on the output matrix X. g and segmented pricing matrix P g ;
[0013] S4. Based on the minimum segmentation interval gap, the upper limit output matrix ubx, and the lower limit output matrix lbx, calculate the segmented output matrix X for each unit. g After correction, the segmented output matrix XC of each unit is obtained. g ;
[0014] S5. Obtain the piecewise power output matrix XC g The output difference between adjacent segments is used to obtain the segment output difference matrix for each unit. And the segmented output difference matrix The price corresponding to the segment with a value of 0 is adjusted to equal the price of the previous segment, resulting in the adjusted segmented price matrix PC. g ;
[0015] S6. Based on the clearing price matrix M and the corrected segmented pricing matrix PC g And the corrected piecewise power output matrix XC g Construct a global segmented pricing matrix PA g Global piecewise power output matrix XA g Clear the electricity price matrix MA; then, based on the global segmented pricing matrix PA... g Global piecewise power output matrix XA g The global clearing price matrix MA is used to obtain the winning bid output matrix R. g ;
[0016] S7. Based on the unit's ramp rate, the awarded output matrix R g After making corrections, the corrected winning bid output matrix RC is obtained. g ;
[0017] S8, Based on the modified winning bid output matrix RC g Obtain the corresponding power generation and coal consumption; and based on the fitness function and the corrected winning bid output matrix RC g The corresponding power generation and coal consumption are used to calculate the fitness of all chromosomes in the current population;
[0018] S9. Determine if the maximum number of iterations has been reached. If yes, output the current optimal chromosome; otherwise, update the current population using a genetic algorithm and return to S2.
[0019] Furthermore, the output matrix X is:
[0020]
[0021] The price matrix P is:
[0022]
[0023] The upper limit matrix of output power is:
[0024] ubx = [x 1,max , ..., x 1,max , ..., x G,max , ..., x G,max ] 1×GL
[0025] The lower limit matrix of output lbx is:
[0026] lbx = [x 1,min , ..., x 1,min , ..., x G,min , ..., x G,min ] 1×GL
[0027] And the segmented output matrix Xg of the unit g is:
[0028]
[0029] The segmented pricing matrix P of unit g g for:
[0030]
[0031] in,
[0032] This represents the output value of unit g in segment l within the nth chromosome;
[0033] This represents the price quoted by crew g in segment l within the nth chromosome.
[0034] x g,min x g,max These represent the lower and upper limits of the output value of unit g, respectively;
[0035] g=1, 2,...,G; l=1,2,...,L; n=1,...,N; GL=G×L.
[0036] Furthermore, the segmented output matrix X for each unit g The correction formula is as follows:
[0037]
[0038] XC g [:,-1]=ubx g
[0039] And the modified segmented output matrix XC of each unit g for:
[0040]
[0041] in,
[0042] XC g [:,-1]=ubx g This means that the value of segment L is corrected to the upper limit of the unit g's output;
[0043] lbx g =x g,min This indicates the lower limit of the output of unit g;
[0044] ubx g =x g,max This indicates the upper limit of the output of unit g;
[0045] round indicates that a value is rounded to the nearest specified number of digits.
[0046] gap represents the minimum segmentation interval;
[0047] XC g This represents the segmented output matrix of the corrected unit g;
[0048] This represents the output value of unit g in segment l within the nth chromosome after correction.
[0049] Furthermore, S5 includes:
[0050] S5.1, Based on the modified piecewise power output matrix XC g Obtain the segmented output difference matrix of each unit And based on the segmented pricing matrix P g Obtain the segmented price difference matrix
[0051] The segmented power difference matrix for:
[0052]
[0053] The segmented price difference matrix for:
[0054]
[0055] S5.2, divide the segmented output difference matrix Values greater than 0 are set to 1 to obtain the first temporary matrix.
[0056] S5.3, Based on the first temporary matrix For segmented price difference matrix After correction, the segmented price difference matrix is obtained. And the corrected segmented price difference matrix for:
[0057]
[0058] S5.4, In the corrected segmented price difference matrix Insert the segmented price matrix P in the first column g The first column yields the second temporary matrix. And the second temporary matrix for:
[0059]
[0060] S5.5, For the second temporary matrix The corrected segmented price matrix PC is obtained by summing the results row by row. g ; and the corrected segmented pricing matrix PC g for:
[0061]
[0062]
[0063]
[0064] in,
[0065] This represents the output difference of unit g in segment l and segment l-1 within the nth chromosome.
[0066] This represents the price difference between segment l and segment l-1 for crew g on chromosome n.
[0067] This represents the price difference between segment l and segment l-1 for unit g in the corrected nth chromosome;
[0068] Represents the segmented pricing matrix P g In the nth chromosome, the price quoted by unit g in segment 1;
[0069] This indicates the price quoted by unit g in segment l within the corrected nth chromosome.
[0070] l = 2, 3, ..., L.
[0071] Furthermore, the clearing price matrix M is:
[0072] M = [[m1], [m2], ..., [m Q ]]
[0073] The global segmented pricing matrix PA g for:
[0074]
[0075] The global piecewise power output matrix XA g for:
[0076]
[0077] The global clearing electricity price matrix MA is:
[0078]
[0079] The calculation steps for simulating the output force include:
[0080] S6.1 Calculate the global clearing price matrix MA and the global segmented price matrix PA g The difference is used to obtain the price difference matrix DP;
[0081]
[0082] S6.2 Record the index of the last value greater than or equal to 0 in the price difference matrix DP to obtain the index matrix IDX, and extract the force matrix XA. g The value corresponding to the index IDX is used as the winning bid output, resulting in the winning bid output matrix R. g ;
[0083]
[0084]
[0085] in,
[0086] This represents the index corresponding to time q in the nth chromosome;
[0087] m q This represents the clearing price at time q;
[0088] Global segmented pricing matrix PAg In each row The quantity is Q;
[0089] Global piecewise power output matrix XA g In each row The quantity is Q;
[0090] In the global clearing price matrix MA, [m] q , ..., m q The length of ] is L;
[0091] Let represent the output value of unit g at time q in the nth chromosome; n = 1, ..., N, q = 1, ..., Q, and Q represents the total number of times.
[0092] Furthermore, based on the unit's ramp rate, the winning bid output matrix Rg is corrected to obtain the corrected winning bid output matrix RC. g ,include:
[0093] S7.1 Calculate the target output matrix R g The difference is used to obtain the winning bid output difference matrix R. diff ;
[0094] S7.2 Record the difference matrix R of the output force. diff In the index matrix, the indexes where the absolute difference exceeds the climbing rate are used to obtain the index matrix. The smallest column index 'a' in the index matrix is taken as the cutoff position for this correction. diff Values exceeding the climbing rate are corrected to the maximum climbing rate, resulting in RC. diff The matrix is then used to insert the first column element R[:, 0] of the piecewise output matrix into RC. diff The starting position is used to obtain RC. diff ;
[0095]
[0096] S7.3, for RC diff The output matrix RC is obtained by cumulative summation, and then the current winning output matrix R is updated. g Up to index a;
[0097] S7.4 Repeat S7.1 to S7.3 until all outputs meet the climbing rate constraint, and obtain the corrected indexed output matrix RC. g .
[0098] Furthermore, the fitness of the chromosome is:
[0099]
[0100] FitV represents the total coal consumption for power generation at a power plant.
[0101] coal g,q This represents the amount of coal consumed by unit g at time q;
[0102] elec g,q This represents the amount of electricity generated by unit g at time q.
[0103] Secondly, a simulated bid-winning output optimization system based on a genetic algorithm is provided. The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the above method.
[0104] (III) Beneficial Effects
[0105] This invention provides a method and system for optimizing simulated bid output based on a genetic algorithm. Compared with existing technologies, it has the following advantages:
[0106] 1) This invention proposes a genetic algorithm-based method for optimizing bid-winning output. Building upon the genetic algorithm, it incorporates power generation constraints, output interval constraints, and ramp-up rate constraints into the fitness function. While satisfying these constraints, it provides users with a bidding strategy that minimizes coal consumption and a bid-winning output scheme for each time period. A matrix algorithm is used to address the output interval and ramp-up rate constraints. Compared to traditional algorithms, this method significantly improves computational speed, better meets user experience needs, and achieves benefits such as energy conservation, emission reduction, and improved operational efficiency. Attached Figure Description
[0107] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0108] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0109] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention are described clearly and completely. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0110] This application provides a method and system for optimizing simulated bid-winning output based on a genetic algorithm, which solves the problem of long running time in existing simulated bid-winning output optimization methods.
[0111] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.
[0112] Example 1:
[0113] like Figure 1 As shown, this invention provides a simulated bid-winning output optimization method based on a genetic algorithm. This method is executed by a computer and includes:
[0114] S1. Obtain a segmented output pricing matrix XP that satisfies the pricing range and the unit output range based on the initial population encoded in binary; and the segmented output pricing matrix XP contains the output values and prices of all units corresponding to each chromosome in all segments;
[0115] S2. Based on the output-price matrix XP of the current population, the output matrix X and the price matrix P are obtained by splitting the output matrix XP. The upper limit matrix ubx and the lower limit matrix lbx are obtained based on the unit output range.
[0116] S3. Obtain the segmented output matrix X of each unit based on the output matrix X. g and segmented pricing matrix P g ;
[0117] S4. Based on the minimum segmentation interval gap, the upper limit output matrix ubx, and the lower limit output matrix lbx, calculate the segmented output matrix X for each unit. g After correction, the segmented output matrix XC of each unit is obtained. g ;
[0118] S5. Obtain the piecewise power output matrix XC g The output difference between adjacent segments is used to obtain the segment output difference matrix for each unit. And the segmented output difference matrix The price corresponding to the segment with a value of 0 is adjusted to equal the price of the previous segment, resulting in the adjusted segmented price matrix PC. g ;
[0119] S6. Based on the clearing price matrix M and the corrected segmented pricing matrix PC g And the corrected piecewise power output matrix XC g Construct a global segmented pricing matrix PA g Global piecewise power output matrix XA g Clear the electricity price matrix MA; then, based on the global segmented pricing matrix PA...g Global piecewise power output matrix XA g The global clearing price matrix MA is used to obtain the winning bid output matrix R. g ;
[0120] S7. Based on the unit's ramp rate, the awarded output matrix R g After making corrections, the corrected winning bid output matrix RC is obtained. g ;
[0121] S8, Based on the modified winning bid output matrix RC g Obtain the corresponding power generation and coal consumption; and calculate the fitness of all chromosomes in the current population based on the fitness function and the power generation and coal consumption corresponding to the corrected indexed output matrix RCg.
[0122] S9. Determine if the maximum number of iterations has been reached. If yes, output the current optimal chromosome; otherwise, update the current population using a genetic algorithm and return to S2.
[0123] The beneficial effects of this embodiment are:
[0124] 1) The proposed method for optimizing bid-winning output based on a genetic algorithm in this embodiment incorporates power generation constraints, output interval constraints, and ramp-up rate constraints into the fitness function. While satisfying these constraints, it provides users with a bidding strategy that minimizes coal consumption and a bid-winning output scheme for each time period. A matrix algorithm is used to address the output interval and ramp-up rate constraints. Compared to traditional algorithms, this method significantly improves computational speed, better meets user experience needs, and achieves benefits such as energy conservation, emission reduction, and improved operational efficiency.
[0125] The implementation process of the embodiments of the present invention will be described in detail below:
[0126] S1. Obtain the segmented output pricing matrix XP that satisfies the pricing range and the unit output range based on the initial population encoded in binary.
[0127] In practical implementation, the segmented output pricing matrix XP can be obtained in the following way:
[0128] S1.1 Obtain the upper and lower limits of the initial population and chromosomes;
[0129]
[0130] chrom n This represents the nth chromosome, where n = 1, ..., N;
[0131] chrom n =[x 1,1 , ..., x 1,L p1,1 , ..., p 1,L , ..., x G,1 , ..., x G,L p G,1 , ..., p G,L ]
[0132] x g,l The output value corresponding to segment l of unit g is represented by a binary code;
[0133] p g,l The report value corresponding to segment l of unit g is represented by a binary code;
[0134] g=1,2,…,G, l=1,2,…,L;
[0135] N represents the population size, G represents the total number of units, and L represents the number of segments.
[0136] Furthermore, the upper and lower bound constraints of the chromosome specifically include: the lower bound matrix lb for output bid and the upper bound matrix ub for output bid, which can be represented as:
[0137] lb=[x 1,min , ..., x 1,min p min , ..., p min , ..., x G,min , ..., x G,min p min , ..., p min ]
[0138] ub = [x 1,max , ..., x 1,max p max , ..., p max , ..., x G,max , ..., x G,max p max , ..., p max ]
[0139] lb represents the lower limit matrix of power output bids;
[0140] ub represents the output price ceiling matrix;
[0141] x g,min x g,max These represent the lower and upper limits of the output value of unit g, respectively;
[0142] p min p max These represent the lower and upper limits of the price quote, respectively.
[0143] S1.2. Accumulate and sum the output values and bid prices of each unit across all segments to construct an output-bid cumulative sum matrix corresponding to each chromosome;
[0144] Specifically:
[0145] The cumulative sum of output quotes corresponding to the nth chromosome. It can be represented as:
[0146]
[0147] in:
[0148] This represents the sum of the output values of unit g across all segments; and the calculation formula is:
[0149]
[0150] g=1,2,…,G, l=1,2,…,L.
[0151] This represents the sum of the bids for unit g across all segments; and the calculation formula is:
[0152]
[0153] g=1,2,…,G, l=1,2,…,L.
[0154] S1.3 Based on the proportion of each segment, the output value and price are scaled to the upper and lower limits of output and price to obtain the segmented output-price matrix XP;
[0155] The calculation method is as follows:
[0156]
[0157] The resulting segmented output pricing matrix XP can be represented as:
[0158]
[0159] in:
[0160] This represents the output value of unit g in segment l within the nth chromosome;
[0161] This represents the price quoted by crew g in segment l within the nth chromosome.
[0162] This represents the output value and price of unit g across all segments in the nth chromosome.
[0163] S2. Based on the output-price matrix XP of the current population, the output matrix X and the price matrix P are obtained by splitting the output matrix XP. The upper limit matrix ubx and the lower limit matrix lbx are obtained based on the unit output range.
[0164] In practice, the following steps may be included:
[0165] S2.1, Split the power output and price quotation matrix XP into a power output matrix X and a price quotation matrix P;
[0166] It can be represented as:
[0167]
[0168]
[0169] S2.2 Obtain the upper limit matrix ubx and the lower limit matrix lbx based on the lower limit matrix lb and the upper limit matrix ub;
[0170] ubx = [x 1,max , ..., x 1,max , ..., x G,max , ..., x G,max ] 1×GL
[0171] lbx = [x 1,min , ..., x 1,min , ..., x G,min , ..., x G,min ] 1×GL
[0172] S3. Obtain the segmented output matrix X of each unit based on the output matrix X. g and segmented pricing matrix P g .
[0173] In practical implementation, the segmented output matrix X of unit g g It can be represented as:
[0174]
[0175] The segmented pricing matrix P of unit g g It can be represented as:
[0176]
[0177] in,
[0178] This represents the output value of unit g in segment l within the nth chromosome;
[0179] This represents the price quoted by crew g in segment l within the nth chromosome.
[0180] x g,min x g,max These represent the lower and upper limits of the output value of unit g, respectively;
[0181] g=1, 2,...,G; l=1, 2,...,L; n=1,...,N; GL=G×L.
[0182] S4. Based on the minimum segment interval gap, the upper limit output matrix ubx, and the lower limit output matrix lbx, the segmented output matrix Xg of each unit is corrected to obtain the corrected segmented output matrix XCg of each unit.
[0183] The segmented output matrix is randomly generated by the genetic algorithm and may not meet the minimum interval requirement. Here, the segments are corrected based on the interval gap value and the lower and upper limits of the output to ensure that the output of each segment is an integer multiple of the minimum interval. In specific implementation, the correction formula is as follows:
[0184]
[0185] XC g [:,-1]=ubx g
[0186] And the modified segmented output matrix XC of each unit g for:
[0187]
[0188] in,
[0189] XC g [:,-1]=ubx g This means that the value of segment L will be corrected to the upper limit of the output of unit h;
[0190] lbx g =x g,min This indicates the lower limit of the output of unit g;
[0191] ubx g =x g,max This indicates the upper limit of the output of unit g;
[0192] round indicates that a value is rounded to the nearest specified number of digits.
[0193] gap represents the minimum segmentation interval;
[0194] XC g This represents the segmented output matrix of the corrected unit g;
[0195] This represents the output value of unit g in segment l within the nth chromosome after correction.
[0196] S5. Obtain the piecewise power output matrix XC g The output difference between adjacent segments is used to obtain the segment output difference matrix for each unit. And the segmented output difference matrix The price corresponding to the segment with a value of 0 is adjusted to equal the price of the previous segment, resulting in the adjusted segmented price matrix PC. g .
[0197] Since the segmented output requirements are monotonically increasing, the normal operation process requires deleting segments that do not meet the increasing condition (including output and corresponding price). In order to use matrix operations, the number of segments that do not meet the increasing condition is set to be equal to the output and price of the previous segment. This ensures that the matrix size remains unchanged and does not affect subsequent calculations.
[0198] In practice, it is necessary to calculate the difference between the output of each segment. If the difference is equal to 0, it means that the output of the current segment is equal to the output of the previous segment. In this case, the price of the corresponding segment needs to be adjusted to be equal to the price of the previous segment, thus achieving the purpose of placing a position. This placement does not affect the final calculation result. Therefore, the following steps can be adopted:
[0199] S5.1, Based on the modified piecewise power output matrix XC g Obtain the segmented output difference matrix of each unit And based on the segmented pricing matrix P g Obtain the segmented price difference matrix
[0200] The segmented output difference matrix for:
[0201]
[0202] The segmented price difference matrix for:
[0203]
[0204] S5.2, divide the segmented output difference matrix Values greater than 0 are set to 1 to obtain the first temporary matrix.
[0205] S5.3, Based on the first temporary matrix For segmented price difference matrix After correction, the segmented price difference matrix is obtained. And the corrected segmented price difference matrix It can be represented as:
[0206]
[0207] S5.4 Because the difference matrix is a temporary matrix, it will have one less column than the original matrix. Therefore, in the corrected segmented pricing difference matrix... Insert the segmented price matrix P in the first column g The first column yields the second temporary matrix. And the second temporary matrix for:
[0208]
[0209] S5.5, Regarding the second temporary matrix The corrected segmented price matrix PC is obtained by summing the results row by row. g ; and the corrected segmented pricing matrix PC g It can be represented as:
[0210]
[0211]
[0212]
[0213] in,
[0214] This represents the output difference of unit g in segment l and segment l-1 within the nth chromosome.
[0215] This represents the price difference between segment l and segment l-1 for crew g on chromosome n.
[0216] This represents the price difference between segment l and segment l-1 for unit g in the corrected nth chromosome;
[0217] Represents the segmented pricing matrix P g In the nth chromosome, the price quoted by unit g in segment 1;
[0218] This indicates the price quoted by unit g in segment l within the nth chromosome after correction.
[0219] l = 2, 3, ..., L.
[0220] S6. Based on the clearing price matrix M and the corrected segmented pricing matrix PC g And the corrected piecewise power output matrix XC g Construct a global segmented pricing matrix PA g Global piecewise power output matrix XA g Clear the electricity price matrix MA; then, based on the global segmented pricing matrix PA... g Global piecewise power output matrix XA g The global clearing price matrix MA is used to obtain the winning bid output matrix R. g .
[0221] In practical implementation, the clearing price matrix M can be represented as:
[0222] M = [[m1], [m2], ..., [m Q ]]
[0223] Then, for the corrected piecewise power output matrix XC g The revised segmented pricing matrix PC g The clearing price matrix M is dimensionally expanded to include information from all populations, all time periods, and all segments, resulting in the global segmented price matrix PA. g Global piecewise power output matrix XA g Global clearing price matrix MA.
[0224] The global segmented pricing matrix PA g It can be represented as:
[0225]
[0226] The global piecewise power output matrix XA g It can be represented as:
[0227]
[0228] The global clearing electricity price matrix MA can be represented as:
[0229]
[0230] Then simulate the winning output to obtain the winning output matrix R. g A bid can only be won if the bid is less than or equal to the clearing price. At that time, the segment can be awarded a bid; the output under this bid is an output range, and the maximum value of this range is taken; normally, starting from the maximum bid, it is compared with the clearing price in turn, and only when it is less than the clearing price can the bid be awarded a bid. However, IDX starts from the minimum bid, so the index of the last element greater than or equal to 0 is taken, and the output corresponding to this index is the winning output value. Therefore, the specific calculation process is as follows:
[0231] S6.1 Calculate the global clearing price matrix MA and the global segmented price matrix PA g The difference is used to obtain the price difference matrix DP;
[0232]
[0233] S6.2, According to the principle that when the bid price is less than or equal to the clearing price, i.e. The principle for determining which segment can win the bid is to take the output of the segment with the largest winning bid value as the winning bid output. Therefore, the index of the last value greater than or equal to 0 in the price difference matrix DP is recorded to obtain the index matrix IDX. The value corresponding to the index IDX in the force matrix XAg is the winning bid output, resulting in the winning bid output matrix R. g ;
[0234]
[0235]
[0236] in,
[0237] This represents the index corresponding to time q in the nth chromosome;
[0238] m q This represents the clearing price at time q;
[0239] Global segmented pricing matrix PA g In each row The quantity is Q;
[0240] Global piecewise power output matrix XA g In each row The quantity is Q;
[0241] In the global clearing price matrix MA, [m] q , ..., m q The length of ] is L;
[0242] Let q represent the output value of unit g at time q in the nth chromosome; n = 1, ..., N, q = 1, ..., Q, where Q represents the total number of times.
[0243] Specifically, the index of the largest winning bid in the corresponding segment of the price difference matrix DP can be recorded using the matrix IDX. The output at the corresponding position on the output matrix corresponding to this index is the winning bid output.
[0244] For example:
[0245] Find the winning bid segment from the price spread matrix DP (the bold text in DP), record the index position of the winning bid segment in the matrix IDX, and then in the output matrix XA...1 Extract the output corresponding to the index in IDX, i.e., XA. 1 The red text indicates that the output matrix R can be derived from this. g ;
[0246]
[0247]
[0248]
[0249]
[0250] In this index matrix IDX, all indices start from 0.
[0251] S7. Based on the unit's ramp rate, the awarded output matrix R g After making corrections, the corrected winning bid output matrix RC is obtained. g .
[0252] In practice, the following steps are included:
[0253] S7.1 Calculate the target output matrix R g The difference is used to obtain the winning bid output difference matrix R. diff The calculation method is similar to that of the segmented output difference matrix.
[0254]
[0255] S7.2 Record the difference matrix R of the output force. diff The index matrix is obtained by finding the index where the absolute value of the difference exceeds the value of the climbing rate. The smallest column index 'a' in the index matrix is taken as the cutoff position for this correction. R... diff Values exceeding the climbing rate are corrected to the maximum climbing rate, resulting in RC. diff The matrix is then used to insert the first column element R[:, 0] of the piecewise output matrix into RC. diff The starting position is used to obtain RC. diff ;
[0256]
[0257] S7.3, for RC diff The output matrix RC is obtained by cumulative summation, and then the current winning output matrix R is updated. g At index a, the updated target output matrix R is obtained. g That is, R g [:,:a+1]=RC g [:,:a+1。
[0258] S7.4 Repeat S7.1 to S7.3 until all outputs meet the climbing rate constraint, and obtain the corrected indexed output matrix RC. g .
[0259] For example:
[0260] Assuming the climbing speed is 70, record R. diff Indexes of values with an absolute difference greater than 70, such as R diff The indices of the bold text are [2, 4, ..., 1]. We take the smallest index a = 1 and then correct the first a columns in the index output matrix RC.
[0261]
[0262] The iterative process is as follows: First, correct 90 to 70, then recalculate the difference matrix R. diff At this point, a = 2, so -80 is corrected to -70, and the difference matrix R is calculated again. diff
[0263]
[0264] At this point, a = 4, so 80 is corrected to 70, and the difference matrix R is recalculated. diff
[0265]
[0266] This process continues until the absolute value of all differences is less than or equal to 70, at which point the correction process ends.
[0267] All the indexes mentioned above start from 0.
[0268] S8, Based on the modified winning bid output matrix RC g Obtain the corresponding power generation and coal consumption; and based on the fitness function and the corrected winning bid output matrix RC g The corresponding power generation and coal consumption are used to calculate the fitness of all chromosomes in the current population.
[0269] In practice, the power generation and coal consumption of each unit can be calculated by fitting a quadratic curve of power generation and coal consumption based on the unit's load rate and power supply coal consumption data.
[0270] And the fitness of the chromosome is:
[0271]
[0272] FitV represents the total coal consumption for power generation at a power plant.
[0273] coal g,qThis represents the amount of coal consumed by unit g at time q;
[0274] elec g,q This represents the amount of electricity generated by unit g at time q.
[0275] A higher fitness value indicates lower coal consumption for power generation.
[0276] S9. Determine if the maximum number of iterations has been reached. If yes, output the current optimal chromosome; otherwise, update the current population using a genetic algorithm and return to S2.
[0277] Genetic algorithms are heuristic search algorithms that draw inspiration from natural selection and genetic mechanisms in the biological world. They can find suitable solutions in a large-scale solution space. During the search process, the optimal solution in the solution space is obtained. Through iteration, new individuals are generated, and the local optimal solution is combined with the new individuals to achieve the goal of finding the global optimal solution.
[0278] Taking the winning output scheme of 5 generating units as an example, the parameters of the 5 generating units are shown in Table 1:
[0279] Table 1
[0280] Output lower limit MW 230 230 230 380 390 Output upper limit MW 630 630 630 1000 1000
[0281] The price range is from a minimum of 0 yuan / MWh to a maximum of 1500 yuan / MWh.
[0282] By scaling the output and price within their upper and lower limits, the final output segments and prices are both monotonically increasing. The resulting segmented output-price matrix XP is:
[0283]
[0284] The output matrix X and the price matrix P obtained by splitting are:
[0285]
[0286]
[0287] Then, the upper limit matrix ubx and the lower limit matrix lbx of the unit output are extracted from the upper limit constraint matrix ub and the lower limit constraint matrix lb;
[0288] lbx=[230.230.230.230.230....390.390.390.390.390.]
[0289] ubx=[630.630.630.630.630....1000.1000.1000.1000.1000.]
[0290] The following data uses Unit 1 as an example:
[0291]
[0292]
[0293] lbx 1 =230
[0294] ubx 1 =630
[0295] The corrected segmented output matrix XC of Unit 1 1 for:
[0296]
[0297] Then the piecewise output difference matrix for:
[0298]
[0299] Similarly, the segmented price difference matrix for:
[0300]
[0301] Segmented pricing matrix P 1 The first column can be represented as:
[0302]
[0303] Then the second temporary matrix for:
[0304]
[0305] Then, sum them up row by row to obtain the corrected segmented price matrix PC. 1 for:
[0306]
[0307] The clearing electricity price matrix M is:
[0308]
[0309] This leads to the global segmented pricing matrix PA. 1 Global piecewise power output matrix XA 1 The global clearing price matrix MA has two matrices, each with a size of 1000×96×10.
[0310] Furthermore, since there are no values in this example data that exceed the ramp rate, the idx matrix is empty, therefore the winning output matrix R is...g ,as follows:
[0311]
[0312] The corrected power output matrix RC g for:
[0313]
[0314] The power generation and coal consumption calculated according to the algorithm are as follows:
[0315]
[0316]
[0317] Ultimately, after optimization using a genetic algorithm, the average coal consumption for power generation was reduced by approximately 12 g / kWh, as shown in the table below:
[0318]
[0319] The table below shows the runtime of the three models. The constraints and unit operating parameters are exactly the same in all three models. The models simultaneously simulate the output of 5 units, with 10 segments, a population size of 1000, and 10 iterations. The computer has 4 cores.
[0320]
[0321]
[0322] The above verification shows that the method of this application is fast, efficient, and highly applicable. Furthermore, the optimized method significantly reduces coal consumption for power supply, thus achieving the goal of energy conservation and emission reduction.
[0323] Example 2:
[0324] A simulated bid-winning output optimization system based on a genetic algorithm, the system comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the above method when executing the computer program.
[0325] It is understood that the simulated bid-winning output optimization system based on genetic algorithm provided in this embodiment of the invention corresponds to the simulated bid-winning output optimization method based on genetic algorithm described above. The explanation, examples, and beneficial effects of the relevant content can be referred to the corresponding content in the simulated bid-winning output optimization method based on genetic algorithm, and will not be repeated here.
[0326] In summary, compared with the prior art, the present invention has the following beneficial effects:
[0327] 1) This invention proposes a genetic algorithm-based method for optimizing bid-winning output. Building upon the genetic algorithm, it incorporates power generation constraints, output interval constraints, and ramp-up rate constraints into the fitness function. While satisfying these constraints, it provides users with a bidding strategy that minimizes coal consumption and a bid-winning output scheme for each time period. A matrix algorithm is used to address the output interval and ramp-up rate constraints. Compared to traditional algorithms, this method significantly improves computational speed, better meets user experience needs, and achieves benefits such as energy conservation, emission reduction, and improved operational efficiency.
[0328] It should be noted that, through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the prior art, can be embodied in the form of software products. These computer software products can be stored in computer-readable storage media, such as ROM / RAM, magnetic disks, optical disks, etc., and include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or certain portions of the embodiments. In this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further restrictions, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0329] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A simulated bid-winning output optimization method based on genetic algorithm, characterized in that, The method includes: S1. Obtain a segmented output pricing matrix that satisfies the pricing range and the unit output range based on the initial population encoded in binary. ; and the segmented output pricing matrix It includes the output values and prices of all units corresponding to each chromosome in all segments; S2, Output-Price Matrix Based on the Current Population Decomposition yields the output matrix and pricing matrix And obtain the upper limit matrix of output based on the unit output range. and the lower limit matrix of output ; S3, Based on power output matrix Obtain the segmented output matrix of each unit Based on the price matrix Obtain the segmented pricing matrix for each unit. ; S4, Based on minimum segmentation interval Output upper limit matrix and the lower limit matrix of output Segmented output matrix for each unit After making corrections, the segmented output matrix of each unit is obtained. Among them, the segmented output matrix for each unit The correction formula is as follows: Furthermore, the modified segmented output matrix of each unit for: in, This indicates that the segments will be divided. The value was corrected to the unit The upper limit of output; Indicates the unit The lower limit of output; Indicates the unit The upper limit of output; This indicates that the value is rounded to the specified number of decimal places. Indicates the minimum segment interval; Indicates the corrected unit The piecewise power output matrix; Indicates the corrected number In the chromosomes, the crew In segments l The corresponding output value; ; ; N represents the population size, G represents the total number of units, and L represents the number of segments. S5. Obtain the segmented power output matrix The output difference between adjacent segments is used to obtain the segment output difference matrix for each unit. ; and the segmented output difference matrix The prices corresponding to segments with a value of 0 are adjusted to equal the prices of the preceding segments, resulting in the adjusted segmented price matrix. ; S6, Based on Clearing Price Matrix The revised segmented pricing matrix and the corrected piecewise power output matrix Construct a global segmented pricing matrix Global segmented power output matrix Global clearing electricity price matrix Then, based on the global segmented pricing matrix Global segmented output matrix Global clearing electricity price matrix Obtain the winning bid output matrix ; S7. Based on the unit's ramp rate, the winning output matrix is... After making corrections, the corrected winning bid output matrix is obtained. ; S8. Based on the corrected bid-winning power matrix Obtain the corresponding power generation and coal consumption; and based on the fitness function and the corrected winning bid output matrix... The corresponding power generation and coal consumption are used to calculate the fitness of all chromosomes in the current population; S9. Determine if the maximum number of iterations has been reached. If yes, output the current optimal chromosome; otherwise, update the current population using a genetic algorithm and return to S2.
2. The simulated bid-winning output optimization method based on genetic algorithm as described in claim 1, characterized in that, The output matrix for: The quotation matrix for: The upper limit matrix of output for: The lower limit matrix of output for: And the unit Piecewise power output matrix for: The unit Segmented pricing matrix for: in, Indicates the first In the chromosomes, the crew In segments l The corresponding output value; Indicates the first In the chromosomes, the crew In segments l The corresponding quote; , They represent the generating units. The lower and upper limits of the output; 。 3. The simulated bid-winning output optimization method based on genetic algorithm as described in claim 2, characterized in that, S5 include: S5.1, Based on the modified piecewise power output matrix Obtain the segmented output difference matrix of each unit ; And based on the segmented pricing matrix Obtain the segmented price difference matrix ; The segmented output difference matrix for: The segmented price difference matrix for: S5.2, divide the segmented output difference matrix Values greater than 0 are set to 1 to obtain the first temporary matrix. ; S5.3, Based on the first temporary matrix For segmented price difference matrix After correction, the segmented price difference matrix is obtained. ; and the corrected segmented price difference matrix for: S5.4, In the corrected segmented price difference matrix Insert segmented pricing matrix into the first column The first column yields the second temporary matrix. And the second temporary matrix for: S5.5, For the second temporary matrix The corrected segmented pricing matrix is obtained by summing the data row by row. ; and the revised segmented pricing matrix for: in, Indicates the first In the chromosomes, the crew In segments With segmentation The difference in output, ; Indicates the first In the chromosomes, the crew In segments With segmentation The price difference, ; Indicates the corrected number In the chromosomes, the crew In segments With segmentation The price difference; Represents the segmented pricing matrix The Middle In the chromosomes, the crew In segments The corresponding quote; Indicates the corrected number In the chromosomes, the crew In segments The corresponding quote; 。 4. The simulated bid-winning output optimization method based on genetic algorithm as described in claim 3, characterized in that, The clearing electricity price matrix for: The global segmented pricing matrix for: The global segmented power output matrix for: The global clearing electricity price matrix for: The calculation steps for simulating the output force include: S6.1 Calculate the global clearing price matrix With global segmented pricing matrix The difference is used to obtain the price difference matrix. ; S6.2 Record the price difference matrix DP The index matrix is obtained by finding the index of the last value greater than or equal to 0 in the matrix. Extract the force matrix Chinese index The corresponding values are used as the winning bid outputs to obtain the winning bid output matrix. ; in, Indicates the first In each chromosome, at time The corresponding index; Indicates at time The clearing price; Global segmented pricing matrix In each row The quantity is ; Global piecewise power output matrix In each row The quantity is ; Global clearing electricity price matrix middle The length is ; Indicates the first In the chromosomes, the crew At any moment The winning bid output value; ,and Indicates the total number of moments.
5. The simulated bid-winning output optimization method based on genetic algorithm as described in claim 4, characterized in that, The above refers to the unit's ramp rate, and the winning output matrix. After making corrections, the corrected winning bid output matrix is obtained. ,include: S7.1 Calculate the target output matrix The difference is used to obtain the winning bid output difference matrix. ; S7.2 Record the difference matrix of the target output force. In the index matrix, the indexes whose absolute difference exceeds the climbing rate are used to obtain the index matrix. The smallest column index in the index matrix is then selected. a As the cutoff point for this revision, Values exceeding the climbing rate are corrected to the maximum climbing rate, resulting in... The matrix, then the first column elements of the piecewise output matrix. Insert into The starting position is obtained. ; S7.3, to By summing the results, we obtain the corrected output matrix. Then update the current winning bid output matrix. To Index Place; S7.4 Repeat S7.1~S7.3 until all outputs satisfy the climbing rate constraint, and obtain the corrected indexed output matrix. .
6. The simulated bid-winning output optimization method based on genetic algorithm as described in claim 1, characterized in that, The fitness of the chromosome is: This indicates the total coal consumption for power generation at the power plant; Indicates the unit At any moment Coal consumption; Indicates the unit At any moment The amount of electricity generated.
7. A simulated bid-winning output optimization system based on a genetic algorithm, the system comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method described in any one of claims 1-6.
Citation Information
Patent Citations
A monthly centralized bidding mechanism solving method based on a coevolutionary algorithm
CN109886751A
Real-time clearing method and device for electric power real-time market and storage medium
CN115271396A