Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pick up the salt shaker #40

Closed
nesnoj opened this issue Jul 8, 2016 · 4 comments
Closed

pick up the salt shaker #40

nesnoj opened this issue Jul 8, 2016 · 4 comments
Assignees
Labels
bug Prio1 Priority Level 1
Milestone

Comments

@nesnoj
Copy link
Member

nesnoj commented Jul 8, 2016

Parts of Dingo are not deterministic - for different runs with same input data, different grids are generated. So let's get back control of the salt shaker to gain explicit instead of implicit salt!

  1. Review results step by step to determine reasons
  2. Probably node order has impact - eventually sort it prior to mv_connect
@nesnoj
Copy link
Member Author

nesnoj commented Jul 21, 2016

I found it!
..cleaned up the salt in 68c54c5.
closed.

@nesnoj nesnoj closed this as completed Jul 21, 2016
@gplssm
Copy link
Contributor

gplssm commented Jul 21, 2016

This solution is valid for a static input data set. But, if something changes there resulting MV grids generated by Dingo may be different.

On the example of changed IDs in the load_area data set:

  • It is probable that load_area IDs will change if for example new MV stations are added
  • This may lead to different results obtained from the routing in Dingo

Either clearly state that MV grids generated by Dingo belong to one particular input data (or are a part of this data set) or try to keep all IDs constant in the datasets prior to Dingo.
Alternative or: try to iterate over a different column than id within Dingo.

@nesnoj
Copy link
Member Author

nesnoj commented Dec 21, 2016

Current status:

  1. Topology of MV grid including strings diverting from main ring is deterministic.
  2. The major part of the MV topology within LV load areas seems to be deterministic (checked with >10 runs). However, in some larger LV load areas there are small parts that differ for several runs.
    Example:

Run 1:
mv_grid_in_load_area1
Run 2:
mv_grid_in_load_area2

This behaviour is related to the methods in mv_connect_satellites() and mv_connect_stations() (called in MVGridDingo.routing() for every MV grid). If one of the two functions mentioned above is omitted during execution the grid seems to be fully deterministic hence the combination of both functions seem to spill some salt..
Detail from diving into mv_connect_stations(): During connection of stations within a load area, the nearest connection objects for every station are determined using find_nearest_conn_objects(). The returned stack changes for different runs.

Conducted measures:

  • The topology of a grid strongly depends on the order in which all single steps are conducted. One important measure is to avoid implicit "salt" (seemingly random results), e.g. by sorting the results of a generator prior to further use. Therefore, in (hopefully) all necessary parts of the code this basic idea was considered. Example: e0c410d
  • To compare the result (MV grid's graph) of two different runs there's a basic function compare_graphs(). It can save a graph (using mode='write') as gpickle and compare (using mode='compare') the graph of a second run with the saved one. The comparison is done in a very basic manner and does only include nodes and edges. NetworkX provides some functions to check if two graphs are isomorphic but it fails to hande Dingo's classes (repr()).

Further steps:

The milestone "Salt shaker" contains all related issues.

Summary: Most wanted Christmas present: A dustpan for all the salt

boltbeard pushed a commit that referenced this issue May 28, 2018
@boltbeard boltbeard added the Prio1 Priority Level 1 label Jan 16, 2019
gplssm pushed a commit that referenced this issue Jul 25, 2019
* Change of table LV transformer

* fix in assignment of loads to generators to make it a deterministic procedure

* Revert "Change of table LV transformer"

This reverts commit 639bed2

* Update v0-1-11.rst

* Update v0-1-11.rst

* Update v0-1-11.rst

* Update v0-1-11.rst

* Update v0-1-11.rst
@mltja
Copy link
Member

mltja commented Mar 3, 2023

Fixed or obsolete, add new issues of not deterministic behavior to the salt shaker milestone.

@mltja mltja closed this as completed Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Prio1 Priority Level 1
Projects
None yet
Development

No branches or pull requests

4 participants