Skip to content

Commit 61f5a67

Browse files
authored
Merge branch 'dev' into ck/#125-snapshotDependencies
2 parents 5568c0b + 9a58b44 commit 61f5a67

File tree

4 files changed

+102
-43
lines changed

4 files changed

+102
-43
lines changed

docs/puml/protocol/protocol.puml

Lines changed: 48 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ database Input
99
participant InputDataProvider
1010
participant OsmoGridGuardian
1111
participant LvCoordinator
12-
collections LvRegionCoordinator
13-
collections LvGridGenerator
12+
participant LvRegionCoordinator
13+
participant MunicipalityCoordinator
14+
participant DistrictCoordinator
15+
participant SubDistrictCoordinator
16+
participant LvGridGenerator
1417
participant ResultListener
1518

1619
== Init ==
@@ -22,43 +25,65 @@ note right: Death watch of\n""ResultListener""
2225

2326
== LV generation ==
2427
OsmoGridGuardian --> LvCoordinator: //Spawn//
25-
OsmoGridGuardian -> LvCoordinator: !ReqLvGrids(...)
26-
LvCoordinator -> InputDataProvider: !ReqOsm(...)
28+
OsmoGridGuardian -> LvCoordinator: <font color="red">!</font>ReqLvGrids(...)
29+
LvCoordinator -> InputDataProvider: <font color="red">!</font>ReqOsm(...)
2730
InputDataProvider <--> Input: //Read//
28-
LvCoordinator -> InputDataProvider: !ReqAssetTypes(...)
31+
LvCoordinator -> InputDataProvider: <font color="red">!</font>ReqAssetTypes(...)
2932
InputDataProvider <--> Input: //Read//
30-
InputDataProvider -> LvCoordinator: !RepOsm(...)
31-
InputDataProvider -> LvCoordinator: !RepAssetTypes(...)
32-
activate LvCoordinator
33-
note right: Partition OSM data\nby municipal boundaries
34-
LvCoordinator --> LvGridGenerator: //Spawn worker pool//
35-
LvCoordinator --> LvRegionCoordinator: //Spawn worker pool//
36-
37-
LvCoordinator -> LvRegionCoordinator: !ReqLvGrids(...)
38-
deactivate LvCoordinator
39-
LvRegionCoordinator -> LvGridGenerator: !ReqLvGrid(...)
33+
InputDataProvider -> LvCoordinator: <font color="red">!</font>RepOsm(...)
34+
InputDataProvider -> LvCoordinator: <font color="red">!</font>RepAssetTypes(...)
35+
note right: Determine the highest\nadministrative boundary //n//
36+
LvCoordinator --> LvRegionCoordinator: //Spawn//
37+
38+
LvCoordinator -> LvRegionCoordinator: <font color="red">!</font>Partition(Region)
39+
note right: //n// is the highest apparent\nadministrative boundary\nwithin OSM data
40+
LvRegionCoordinator --> LvRegionCoordinator: //Spawn//
41+
LvRegionCoordinator -> LvRegionCoordinator: <font color="red">!</font>Partition(Region, n')
42+
... **Recursively spawn and divide regions until administrative boundary of a municipality is reached** ...
43+
44+
LvRegionCoordinator --> MunicipalityCoordinator: //Spawn one per municipality//
45+
LvRegionCoordinator -> MunicipalityCoordinator: <font color="red">!</font>HandleMunicipality(Region)
46+
47+
MunicipalityCoordinator --> DistrictCoordinator: //Spawn one per district//
48+
MunicipalityCoordinator -> DistrictCoordinator: <font color="red">!</font>HandleDistrict(Region)
49+
50+
DistrictCoordinator --> SubDistrictCoordinator: //Spawn one per sub district//
51+
DistrictCoordinator -> SubDistrictCoordinator: <font color="red">!</font>HandleSubDistrict(Region)
52+
53+
SubDistrictCoordinator --> LvGridGenerator: //Spawn one per secondary//\n//substation region//
54+
SubDistrictCoordinator -> LvGridGenerator: <font color="red">!</font>BuildGridModel(Region)
55+
4056
activate LvGridGenerator
4157
... ...
42-
LvGridGenerator -> LvRegionCoordinator: !PepLvGrid(...)
58+
LvGridGenerator -> LvCoordinator: <font color="red">!</font>RepLvGrid(...)
59+
LvGridGenerator -> SubDistrictCoordinator: <font color="red">!</font>Done
60+
note left: Collects completions until\nall secondarysubstation\nregions are handled\n\nCompletion messages can\nbe realized with death watch!
4361
deactivate LvGridGenerator
4462

45-
LvRegionCoordinator -> LvCoordinator: !RepLvGrids(...)
46-
LvCoordinator -> OsmoGridGuardian: !RepLvGrids(...)
63+
SubDistrictCoordinator -> DistrictCoordinator: <font color="red">!</font>Done
64+
DistrictCoordinator -> MunicipalityCoordinator: <font color="red">!</font>Done
65+
MunicipalityCoordinator -> LvRegionCoordinator: <font color="red">!</font>Done
66+
LvRegionCoordinator -> LvRegionCoordinator: <font color="red">!</font>Done
67+
... **Report recursively until all intermediate levels are passed** ...
68+
LvRegionCoordinator -> LvCoordinator: <font color="red">!</font>Done
69+
note left: All results are apparent;\nassign sub grid numbers
70+
71+
LvCoordinator -> OsmoGridGuardian: <font color="red">!</font>RepLvGrids(...)
4772

4873
== MV generation ==
4974
... **To be defined in a later stage** ...
5075

5176
== Result handling ==
52-
OsmoGridGuardian -> ResultListener: !GridResult(...)
77+
OsmoGridGuardian -> ResultListener: <font color="red">!</font>GridResult(...)
5378
activate ResultListener
5479
... ...
55-
ResultListener -> OsmoGridGuardian: !ResultListenerDied
80+
ResultListener -> OsmoGridGuardian: <font color="red">!</font>ResultListenerDied
5681
deactivate ResultListener
57-
OsmoGridGuardian -> InputDataProvider: !Terminate(...)
82+
OsmoGridGuardian -> InputDataProvider: <font color="red">!</font>Terminate(...)
5883
InputDataProvider <--> Input: //Close//
59-
InputDataProvider -> OsmoGridGuardian: !InputDataProviderDied
84+
InputDataProvider -> OsmoGridGuardian: <font color="red">!</font>InputDataProviderDied
6085

61-
OsmoGridGuardian -> Main: !Done
86+
OsmoGridGuardian -> Main: <font color="red">!</font>Done
6287

6388
'TODO: Don't forget to spawn and initialize the ResultListener
6489

35.3 KB
Loading

docs/readthedocs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
3737
# ones.
3838
extensions = [
39-
'myst_parser',
40-
'sphinx.ext.autosectionlabel',
39+
'myst_parser',
40+
'sphinx.ext.autosectionlabel',
4141
]
4242

4343
# Prefix all autogenerated labels wit the document to get unique labels (e.g. `index:Hello`)
@@ -70,4 +70,4 @@
7070

7171

7272
def setup(app):
73-
app.add_css_file("css/theme_override.css")
73+
app.add_css_file("css/theme_override.css")

docs/readthedocs/dev/concept.md

Lines changed: 51 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,27 @@
33
... of OSMoGrid and it's implementation.
44
Here, we want to focus on the overall structure of the tool and which part does serve which purpose.
55

6+
The computational heaviest part is connecting households / loads to the street graph as well as clustering the loads based on the distances following the street graph.
7+
This is why we want to shift those parts to the smallest regions possible.
8+
To achieve this, a given region of interest is partitioned heuristically as much as possible.
9+
The concept is as follows:
10+
11+
![](../_static/figures/region_separation.png)
12+
13+
The region of interest is broken down according to the administrative boundaries until the level of municipality boundaries is reached.
14+
Moreover, these municipal boundaries are further broken down to districts.
15+
They are defined as local dense groups of houses, that do form disjoint groups.
16+
However, if those dense groups are very big, computational complexity still can be too big.
17+
So, if need be, the districts are further broken down into smaller sub-districts.
18+
Based on those (sub-)districts, cluster of loads are build, that later form the regions of secondary substations.
19+
Those clusters respect the distance between them according to the street graph, they are connected to.
20+
Lastly, the street graph is converted into a grid model.
21+
22+
Following this concept, the following actor hierarchy is implemented:
23+
624
## Actors
725
### OsmoGridGuardian
8-
- Coordination of voltage level spanning routine
26+
- Coordination of multi voltage level spanning routine
927
- Error handling
1028
- Collection of lv grids received from `LvCoordinator` and assigning subnet numbers
1129

@@ -18,26 +36,42 @@ Here, we want to focus on the overall structure of the tool and which part does
1836

1937
### LvCoordinator
2038
- Coordinates the generation of the whole low voltage level
21-
- Partitions the OSM data by municipal boundaries
22-
- Settlements only rarely cross municipality boundaries
23-
- The concept of concessional agreements on serving a municipality incentive to not let grids cross boundaries
24-
- Spawns a pool of `LvGridGenerator`s
25-
- Spawns a pool of `LvRegionCoordinator`s (needs to know the `LvGridGenerator` worker pool)
26-
- Hand over regions (here: municipalities) to `LvRegionCoordinator`s
27-
- Collect results from `LvRegionCoordinator`s and check completeness
39+
- Determines the highest available administrative boundary within the region of interest
40+
- Spawns an `LvRegionCoordinator` to split up the region of interest according to this administrative level
41+
- Collects results and checks completeness
42+
- *Outcome*: Complete region of interest + the highest available administrative boundary
2843

2944
### LvRegionCoordinator
30-
- Responsible for generation of lv grids within a defined region (might be a municipality)
31-
- Generate loads in that region
32-
- Cluster them to secondary-substation regions
33-
- Build sub-graphs according to secondary-substation regions and hands them over to `LvGridGenerator`s
34-
- Collect results from `LvGridGenerator`s, check completeness and forward them to `LvCoordinator`
45+
- Splits up the region of interest according to a given administrative boundary
46+
- If the level of a municipality is **NOT** reached:
47+
- Spawns new `LvRegionCoordinator`s per new subregion to split up for the next lower administrative boundary
48+
- *Outcome*: Subregions on administrative level `n` + the next lowest administrative level `n-1`
49+
- If the level of a municipality is reached:
50+
- Hand over the "municipalities" to `MunicipalityCoordinator`s
51+
- *Outcome*: Subregions on administrative level "municipality"
52+
53+
### MunicipalityCoordinator
54+
- Coordinates the region partitioning within the administrative boundary of a municipality
55+
- Determines dense and disjoint groups of houses as local "districts"
56+
- *Outcome*: Districts within the given municipality
57+
58+
### DistrictCoordinator
59+
- Breaks down districts even further, if still too big w.r.t. computational measures (to be defined)
60+
- *Outcome*: (Sub)districts with suitable size
61+
62+
### SubDistrictCoordinator
63+
- Responsible for handling a sub-district
64+
- A sub-district can also be a district, if that isn't too big
65+
- Derives loads from houses
66+
- Connects loads to street graph
67+
- Clusters loads while respecting the distance on the street graph
68+
- Those clusters are the regions of secondary substations
69+
- Hands over the graph to `GridGenerator`s
70+
- *Outcome*: Street subgraphs per secondary substation region
3571

3672
### LvGridGenerator
37-
- Generates a distinct, galvanically closed lv sub grid model
38-
- Building the distance matrix
39-
- Determining perpendiculars and connect loads to the street graph
40-
- Transform into electrical grid model
73+
- Generates a distinct, galvanically closed lv sub grid model from street graph
74+
- *Outcome*: Grid model per secondary substation region
4175

4276
### ResultListener
4377
- Persisting overall grid model to sinks

0 commit comments

Comments
 (0)