Open zepedropaulos opened 2 weeks ago
Hello,
Thanks for all these issues.
Unfortunately I am not certain there are some person who can answer all these questions. This code has been used occasionnally to generate dataand fixes on fixes on fixes has been made whenever error were encountered.
In other words, the technical debt is huge for this project. We are more than willing to accept any PR that tries to clean it up as it is not the priority at the moment (due to lack of available time)
I'll try to give some answers when I have some, but they will be disappointing I am afraid.
To summarize, the best way, if you want to use chronix2grid at the moment is not to follow any process in the readme, in the notebooks or anywhere else.
The most "up to date" way to use it is to create a grid2op environment without time series but with the correct files, and then to invoke:
env = grid2op.make(A/PATH/TO/AN/ENV/NEEDING/TIME_SERIES)
env.generate_data(nb_year=1)
Then, once done, you inspect the generated time series. If they look good, you generate lots of data with, for example
env.generate_data(nb_year=32)
If not, then you change some config files of chronix2grid. Regenerate the data and inspect them again.
This is highly manual process but this is how the last generated data have been released since 2022.
This allows to get started with data "fine tuned to your problem" as a first "baseline". Usually, what has been done in l2rpn competitions is to add some (undocumented, untested, within a "if not legacy" block, etc.) code to "improve" data generation for example.
Hi José, About your questions related to the meaning of some config parameters (16 and 21), you can find the answers here: https://chronix2grid.readthedocs.io/en/latest/DESCRIPTION.html#economic-dispatch-generation-hydro-nuclear-and-thermic-generators
For question 20, I think that the idea was to reduce the network to a sigle node as the network representation is not needed for solving this dispatch problem. By doing so, you also reduce the loads to a single aggregated load. The problem solved here "only" tries to balance production with loads, but over a scenario (not independant snapshots) by considering the ramps as constraints.
For the questions related to the wind model generation model, the best answers we have are in this document from 2020 I shared with you
Hi,
We have several questions on the code structuring and function functionality inconsistencies:
Pattern-based methods
General/Noise Generation
1.
In some environment examples, the coordinates of generators (in absolute values) exceed the limits of the mesh, which is Lx=Ly=1000. If we are considering a 1000x1000 mesh, how does considering roughly [-1000,1000] coordinates (~2000 in size) work with this pre-defined mesh size? What function deals with this issue?
2.
Some of the coordinates of all the generators in the provided environment are negative. After reviewing the code, no treatment for negative coordinates was found.
An example of that lack of treatment is the noise generated in the mesh, only considering positive coordinates within the interval x=[0,Lx] and y=[0,Ly].
The points where independent noise will be created are defined (35-50):
And generate noise in those coordinates: (generation_utils.py, Line 53-74):
3.
What exactly is the purpose of the
add_dim
(add dimension) function?(generate_solar_wind.py, Line 23)Does it only help with the spatial noise interpolation for generators at the mesh's limits? (generation_utils.py, Line 100-103)
Instead of predefined mesh dimensions, would it be better to generate mesh dimensions based on the farthest coordinate to enable full spatial interpolation calculations from the start?
4.
The documentation states that the neighbour selection is only based on the one-nearest, but after some code analysis, it seems four-nearest is used. What should we assume? (generation_utils.py, Line 111-135)
5.
What is the role of
scale_solar_coord_for_correlation
, which increasesadd_dim
by scaling solar coordinates? (generate_solar_wind.py, Line 23 -36)Solar Generation
6.
Regarding the bias value of the spatially and temporally correlated noise, considering it as an average efficiency value of solar generators, what is this value based on? If this is indeed its purpose, wouldn’t it be more accurate to calculate the average efficiency of solar generators to assign a precise value to the bias value? In this situation, the efficiency values and the respective weight of each generator in the total solar production would be provided as input. (solar_wind_utils.py, Line 89-93)
7.
It is used a solar pattern file dated 2007. Shouldn't this file be updated to a more recent date?
8.
The Additional Independent Noise isn't used as documented. The relevant code is commented, noting that added noise was insignificant (smooth_dist/PMax is small). (solar_wind_utils.py, Line 95-98)
Wind Generation
9.
When calculating the seasonal pattern for wind generation, the following equation is used (solar_wind_utils, Line 49):
The variable start_min, which represents the offset from the start of the simulation, should not be added instead of subtracted? This is the approach taken in calculating the seasonal pattern for load generation. (consumption_utils, Line 67)
10.
A clearer explanation of the wind production formula is needed, especially regarding the constants (0.1, 4, and 0.3) and why only medium/long wind noise includes the 0.3 sum.
11.
Short wind is not summed by the value of 0.3 nor multiplied by the wind pattern like the other types of noise, why?
12.
An explanation is required for the division of the wind pattern into oscillating (30%) and constant (70%) parts.
Load Generation
13.
Regarding the comment written: It specifies that if the "use_legacy" method it set to "TRUE," it will only function correctly when simulating “2050”. What does it means? (consumption_utils.py, line 21).
14.
When using the legacy method, the day_lag variable is intended to cancel the offset between the load weekly pattern and the simulation within the day of the week. However, the lines that compute day_lag are commented out, causing a default value of 0 to be used instead. Why is the day_lag calculation not being used?
15.
In the "new usage" method (use_legacy = FALSE), the output isn't interpolated to achieve the target temporal resolution, dt (as it is in the "legacy usage"). (consumption_utils.py, Lines 167-174)
Economic Dispatch
16.
A more detailed explanation is needed regarding the reason for using reactive compensation. (utils.py - Reformat_load, Line 159)
17.
Clarification is needed in this ramp data processing. (utils.py - preprocess_net, Line 254/255) Note: There is no option to provide a value for input_data_resolution, as it always defaults to 5 minutes. (run_economic_dispatch.py, Line 70)
18.
Is it possible to provide snapshot data as user input? If not, it will always be used a default value for frequency, 5 min. (utils.py, Lines 103 - 123)
19.
Should snapshots have a frequency related to the real-time data frequency, df? The snapshot structure (range) is applied to the load index, therefore, both need to be set to the same frequency. (utils.py, Line 179)
20.
Only one load was added during the initialization of PypsaDispatcher, a single load named "agg_load" with no associated value (Line 47). Since then, nothing related to Load in the network has been changed, as the load values were always modified in a separate variable. Therefore, what is the reason for removing the load added to the network if immediately afterward an identical one is added? (utils.py, Line 250)
21.
No reference to slack_pmin and slack_pmax was found as possible input parameters. (run_economic_dispatch.py, Line 76/82)