Add capacity exports for electricity, hydrogen, gas, and heat networks#1767
Conversation
noracato
left a comment
There was a problem hiding this comment.
Super clean. Smartly solved with the ParticipantCapacitiesCSVSerializer module. Nice work!
| get :network_gas, to: 'curves#network_gas', as: :network_gas_download | ||
| get :residual_load, to: 'curves#residual_load', as: :residual_load_download | ||
| get :hydrogen_integral_cost, to: 'curves#hydrogen_integral_cost', as: :hydrogen_integral_cost_download | ||
| get :merit_order_capacities, to: 'curves#merit_order_capacities', as: :merit_order_capacities_download |
There was a problem hiding this comment.
Shouldn't we just name this electricity_capacities?
There was a problem hiding this comment.
I followed the internal naming convention of the existing curves we were creating a capacities file for, The "Electricity load curves" just happens to be named "merit_order" internally.
I see your point but not sure is worth it since then the right thing would be to also change the original curve file as well for consistency.
There was a problem hiding this comment.
Yes, I agree. I would be up for renaming them all for consistency:
| Hourly download | Capacity downloads |
|---|---|
| electricity_profiles | electricity_capacities |
| network_gas_profiles | network_gas_capacities |
| hydrogen_profiles | hydrogen_capacities |
| heat_network_profiles | heat_network_capacities |
What do you think @aaccensi @noracato? We should check implications throughout the model, for example for PyETM.
There was a problem hiding this comment.
Does this mean it is safe to rename all the existing file names as show below? I seem to recall that one time I changed a data export file name, it had to be reverted so it would not affect existing workflows.
merit_order.csvtoelectricity_profiles.csvheat_network.csvtoheat_network_profiles.csvnetwork_gas.csvto network_gas_profiles.csvhydrogen.csvtohydrogen_profiles.csv
There was a problem hiding this comment.
It will break workflows, like you say @aaccensi if we replace the routes.
We can add a route instead, so it is backwards compatible for API users
get :merit_order, to: 'curves#electricity_profiles' # backwards compatible
get :electricity_profiles, to: 'curves#electricity_profiles', as: :electricity_profiles_download|
Items to discuss:
|
|
The controller actions and CSV filenames have been renamed to use consistent suffixes:
Note: Old endpoints kept as backwards-compatible aliases. |
|
Awesome. Let's add the new names to the docs as well, and inform @louispt1 to ask if there is any impact on PyETM |
If I do not recall wrongly, PyETM did pulled curve files by calling to /scenarios/{id}/curves/{curve_name}.csv with the curve_names defined somewhere in the excel file. That said, since we left the old routes pointing at the updated controller actions names they will work with both the old file curve_names and the new ones. |
|
Ooh I think some people will be quite happy with these changes (especially merit_order --> electricity_profiles). I will update the examples in the documentation for pyetm. There are some hardcoded aliases in pyetm that maps some of these carriers that will need to be updated. And the ongoing problem that new endpoints are not currently 'auto-discovered' by pyetm. |
Explanation:
For storage nodes (like |
|
Following discussion: To do for @aaccensi:
To do for @mabijkerk:
|
Add hydrogen carrier fixture to test etsource so specs don't raise NameError when the fallback chain reaches hydrogen_based_input_capacity.
|
The installed capacity calculation simply uses the existing |
|
I would have preferred to wait with the merging of these PRs. There were still some things I would like to have checked first. |
Context
The hourly curve exports allow users to download the load per participant per hour for electricity, hydrogen, network gas, and heat networks. However, there was no way to download the installed and peak capacity of each participant. This set of PRs adds 4 new CSV exports, one per carrier group, with that information.
Implemented changes
ParticipantCapacitiesCSVSerializermodule with the capacity CSV logic (key, installed_capacity, peak_capacity per participant)MeritCapacitiesCSVSerializer(inheritsMeritCSVSerializer) as a carrier-agnostic base for merit-order capacity exportsElectricityCSVSerializerandElectricityCapacitiesCSVSerializeras named subclasses for the electricity hourly and capacity exports respectivelyHeatNetworkParticipantCapacitiesCSVSerializercombining lt/mt/ht into a single file, consistent withHeatNetworkCSVSerializerReconciliationCapacitiesCSVSerializer(inheritsReconciliationCSVSerializer) for hydrogen and network gas capacity exportsCausalityCurvesCSVSerializer::Adapterviaattr_readerelectricity_capacities,hydrogen_capacities,network_gas_capacities,heat_network_capacitiesParticipantCapacitiesCSVSerializerproduction_parametersexport (action, serializer, route, and spec)hydrogen_based_input_capacityfallback toQernel::NodeApi::Cost::input_capacityand update the spec fixtures so node test don't break given this changeRelated
Related
Set of 2 pull requests:
Checklist