Giter Site home page Giter Site logo

openego / ego Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 8.0 12.03 MB

A cross-grid-level electricity grid and storage optimization tool

Home Page: https://openegoproject.wordpress.com/

License: GNU Affero General Public License v3.0

Python 81.53% Jupyter Notebook 18.47%

ego's People

Contributors

birgits avatar clarabuettner avatar gnn avatar khelfen avatar lukasol avatar maltesc avatar mglauer avatar ulfmueller avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ego's Issues

Consider eDisGo clustering for eTraGo-eDisGo interface

Only the grids which eDisGo will calculate due to the eDisGo clustering should be relevant for the interface.

Todos:

  • eDisGo has to include the clustering
  • eDisGo has to provide a dictionary with all bus_id of the grids needed.
  • eGo creates a loop to do the eDisGo calculation on the relevant grids
    ...

nice-to-have:

  • eDisGo clustering inlcudes some key information from eTraGo in the first place such as 'installed storage p_nom_opt'

Overall system cost calculation predefinition

For the beginning we separate our System cost into:

  1. investment
  2. operational

The costs are divided into endogenous and exogenous parameter.

exogenous:

  • power plants (for comparison)
    • Investment
    • Operational

endogenous:

  • Investment costs:
    • Power grid expansion costs
    • Storages

Operational costs:

  • losses
    • Power-Heat losses (cable)
    • Voltage-dependent losses (transformer)

System costs (invest + operation)

The Investment costs are divided and calculated into

  • annualized per time step
  • total of whole life time / system time?

The investment results of Storages and Grid expansion are separate calculated per:

  • voltage level
  • note / bus ( change of resolution)
    + Country ( maybe TSO Region, federal states)

Operational costs are calculated for:

  • all power plants (sep. by types)
  • per voltage level
  • per note/bus

eGo Performance

The recently performed eGo runs show that eGo has a performance problem. Especially the simulation of some MV grids is extremely time-consuming and delays the overall calculation.

Therefore ideas are welcome in order to improve eGo's performance...

Move disagg functionality to eGo

We have been developing disaggregation methods in eTraGo. Since this functionality is mainly motivated by the interface requirements regarding eDisGo it might make sense to shift this functionality to eGo. The current disagg-uniform does not disaggregate power flows but only the nodal results, thus the result are not easily understandable in a consistent way. This makes it obvious that currently it is an interface functionality. Having this in eGo could help to not misinterpret this method...

Very little storage extension at many nodes

@birgits and I just noticed that in eTraGo a very little storage extension occurs in every node. Most of the extensions can be expected to be rounding errors or similar issues, but no actual storage units.

In order to reduce the calculation time in eDisGo, those practically insignificant storage units should be excluded. However, the question is, whether this should be done in eGo (e.g. via a threshold?), or if this should already be handled in eTraGo?

Reactive power exchange between eTraGo and eDisGo

Reactive power management is a complex topic. I opened this issue in order to discuss today's and future management practices (with a technical focus) and then derive adequate implementations. This is in particular important with regard to the interface function and the structuring of the eGo tool.

release 0.3

I would like to schedule a last major release of eGo respectively eTraGo, eDisGo, ding0, ego.io within the project of open_eGo.

I propose to have a 'release week'.
Tuesday: ego.io
Wednesday: eTraGo, ding0
Thursday: eDisGo
Friday: eGo

From my side I suggest the 3.-7. or 24. -28 of September.

What do you think?

Consistent design for config / scenario setting parameters

The scenario_setting.json in eGo defines what options/parameters are chosen for calculation.
We have to check and probably restructure this file which is sub-divided into 'global', 'eTraGo' and 'eDisGo'.
For eTraGo the settings 'args' from eTraGo are totally part of that eGo settings file. For eDisGo many config parameters are set only within eDisGo (so far). We should find a consistent and clear work flow here.

To give one example. The db-connection is part of the global eGo scenario settings. This value is set for eTraGo as well but not for eDisGo. eDisGo db connection is defined in eDisGo. So practically the tag 'global' is not being realized.

Rounding at interface level

Should the interface (specs.py) contain rounded values?

On the one hand this would improve the human readability, but lead to inaccuracy elsewhere...

Clustering and parallelization of Ding0 grids

For a complete calculation of all ding0 grids and considering the computation time cluster possibilities and clusters / representative type grids were created for eDisGo / Ding0.

Can representative grids be automatically created / determined in eDisGo?

How many mv grids needs to be calculated?
Is it possible to parallelize these calculations?
What is the current state of clustering of Ding0 grids?

eGo 0.2 installation warnings

I was testing the eGo installation and at the moment I got following warnings:

....
ding0 0.1.6 has requirement pyomo<=5.1.1,>=5.0.1, but you'll have pyomo 5.5.0 which is incompatible.
ding0 0.1.6 has requirement pypsa<=0.11.0,>=0.11.0, but you'll have pypsa 0.11.0fork which is incompatible.
ding0 0.1.6 has requirement scipy<1.0, but you'll have scipy 1.1.0 which is incompatible.
demandlib 0.1.4 has requirement numpy<=1.14.3,>=1.7.0, but you'll have numpy 1.14.5 which is incompatible.
etrago 0.6 has requirement sqlalchemy<=1.1.4,>=1.0.15, but you'll have sqlalchemy 1.2.0 which is incompatible.
edisgo 0.0.3 has requirement pypsa<=0.11.0,>=0.11.0, but you'll have pypsa 0.11.0fork which is incompatible.
...

Could you please check if you can updated pyomo as well as scipy @gplssm @birgits . For numpy I can use the lower version and update sqlalchemy for etrago. The pypsa solution would remain (pypsa=0.11.0 and pypsa 0.11.0fork ).

Thx!

How to deal with faulty MV grids in eGo

Within every eGo run, a number of MV grids are simulated. The problem is, that it can be assumed that (also in the long-term) some of these MV grid simulations fail. These failures can have a number of reasons, e.g. convergence, faulty data allocation, etc...

The question is, how these faulty grids should be considered in the eGo calculations.

I just implemented a function in eGo that returns the relative number of successfully calculated MV grids, also including the weighting of each grid (thus, a faulty grid with a high weighting is more significant). Currently, the resulting grid expansion costs are divided by this relative number of successful grids in order to "extrapolate" the costs over the faulty grids. However, this is a fairly simple solution and better results could be obtained with other, more specific solutions.

One idea from the project meeting was to choose other MV grids from the same cluster and use those as the representative grid instead if the original grid fails. Of course, this entails many more problems and is only applicable for the clustering, but not if all grids are chosen.

I think, I will leave the current solution (relative number of successful grids) for now, until new suggestions are made, or any decisions are taken...

eDisGo and Ding0 integration

For the further development of eGo we need to implement eDisGo with an iterative functionality which allows us to calculated all or clustered/ chosen ding0 grids.

Following questions and task should be solved:

  • creation, storage (oedb, pickle, csv) and integration of multiple dingo grids
  • allocation of function and implementation (What is part of eDisGo / eGo )
  • How to implement the iteration function in term of calc. Speed / use of precalculated results ?
  • calculation of the total system costs (investment + operating costs) of grids and storages
  • ...

Create result container / Class for eGo

In order to handle and organize the results of eGo a results container (e.g. pandas DF or own Class) needs to be implemented which is based on the output of eTraGo and eDisGo as PyPSA 0.11 results data.

Define eGo app

according to WP 5.1

we need a file that calculates total system costs considering the results of eTraGo and eDisGo.

Draft of folder and file structure:

  • eGo/
    • readme.rst
    • setup.py
    • requirements.txt
  • eGo/ego/
    • ego_main.py
  • eGo/ego/examples
    • eDisGo
    • eTraGo
    • renpassG!S
  • eGo/ego/tools/
    • economics.py
    • plots.py
    • results.py
    • ...
  • eGo/doc/
    • index.rst
    • eGo_UML.graphml
    • ...

disaggregation meets eDisGo interface

@gnn implemented a 'simple' disaggregation method. Of course we tried to meet the requirements of the eTraGo-eDisGo interface since it is designed for it. The correct operation has to be checked. The eTraGo branch on which the disagg-uniform is working

Plotting for eGo

I open this issue in order to discuss and develop useful plots for eGo.

Include edisgo grid expansion parameter `timesteps_pfa` in scenario_settings

I changed the parameter timesteps_pfa for the grid reinforcement costs calculation after curtailment and storage integration to only be conducted for the two worst time steps at the HV/MV substation (see here) in order to reduce computation time. As we haven't further analysed if this is a valid option @ulfmueller and I thought it would be better to add this parameter to the scenario_settings and leave it to the user to decide wether to use it or include all timesteps in determination of grid expansion needs. @maltesc could you please do this?

ETraGoSpecs (eTraGo-eDisGo-Interface)

In addition to #2, the interface function get_etragospecs is implemented in:
eGo/ego/tools/specs.py (see: specs.py)

However, I need help with extending the function and verifying a few parameters (I don't necessarily need the exact answer - also a hint to the corresponding code section might help)

  1. Information is needed on how to merge Ding0 grids with eTraGo buses. Is there a table that associates Ding0 grid IDs with transmission grid bus IDs?

  2. What exactly is the column e_annual in table model_draft.ego_grid_pf_hv_result_load? What is the unit?

  3. Is there a definition of 'extendable storage'? In my point of view this is the extendable short term storage (batteries) and thus there should be only one per TG bus. However, e.g. at bus 27334 there are 6. For eDisGo the installed capacities and active power series of the batteries are of particular interest.

  4. eDisGo needs the Curtailment for wind and solar. In the eTraGo results I find the installed capacity and the corresponding dispatch. Where can I find the hourly potential in order to calculate the curtailment?

  5. Zählpfeilsystem in eTraGo results in my point of view: storage charged = negative P and discharged = positive P. Is this correct (I have only seen dummy results yet)?

Parallel computations abort unexpectedly

When doing MV grid computations in parallel, some of the computations abort unexpectedly. That means they finish before the actual computation is done or the given timeout is reached.

How will snapshot clustering affect eDisGo?

if snapshot clustering will be used in eTraGo how will eDisGo deal with that?

Is it sufficient to supply only the calculated snapshots e.g. a number of clustered days?
Are there any requirements from eDisGo side for the time scale or can it deal with a role as a 'taker'?

Weather ID for Interface and eDisGo

The interface function get_etragospecs_direct() considers different weather cells for each generator aggregate.

Currently, this information comes from the mview model_draft.ego_supply_aggr_weather_mview, based on the generator single table model_draft.ego_supply_pf_generator_single. The problem is, that neither the table nor the mview are versioned.

Before I shift the big generator single table into the versioned schema, I am thinking about alternative ways of identifying the weather IDs for each generator aggregate. Does anyone have an idea? @gplssm, have you solved the weather ID allocation in eDisGo somehow?

RTD's - Theoretical background for eDisGo

For the readthedocs documentation few descriptions of the Clustering and Storage distribution are needed and should be documented in Theoretical background of eGo if not described in eDisGo.

Function bus_id to mv_grid_id for ding0 grids integration

In order to implement a iteration of the ding0 grids a function wgich creates the relation between bus_id and mv_grid_id or a relation table is needed.

The SQL code for this looks as following:

SELECT
bus.bus_id,
grid.subst_id
FROM
grid.ego_dp_mv_griddistrict grid,
grid.ego_pf_hv_bus bus
WHERE
ST_Intersects(grid.geom, ST_Transform(bus.geom,3035))
AND bus.scn_name ='NEP 2035'
AND grid.version = 'v0.3.0'
AND bus.version = 'v0.3.0'

Redesign eGo for an more user friendly application

Due to the power week new application / function were implemented which are sometimes duplicates or only slightly different to others. Therefore a reorganize of result and application / function selection of the eGo tool is needed for an more user friendly application and usage.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.