RA2CE helps to quantify resilience of critical infrastructure networks, prioritize interventions and adaptation measures and select the most appropriate action perspective to increase resilience considering future conditions.
[x] I HAVE NOT added sensitive or compromised (test) data to the repository.
[x] I HAVE NOT added vulnerabilities to the repository.
[x] I HAVE discussed my solution with (other) members of the RA2CE team.
What has been done?
I reused and verified a function that solves the issue 277. Then implemented in the ra2ce architecture.
Checklist
[x] Code is formatted using our custom black and isort definitions.
[x] Tests are either added or updated.
[x] Branch is up to date with master.
[x] Updated documentation if needed.
Additional Notes (optional)
snkit is added to create Network object (nodes and edges combination both as GeoDataFrame). snkit is being used in the added simplification function.
The main reason is that an snkit object Network can store in a compact way both nodes and edges gdf. The gdf files are used/modified along the simplification process. So the use of gdf objects go beyond exporting.
snkit can be replaced in the developed simplification process but it means:
storing two separate nodes_gdf and edges_gdf objects instead of the snkit.network.Network(),
changing around 13 functions to receive either edges_gdf, nodes_gdf, or both as input or output. Moreover the typing hints should be updated.
Overall replacing snkit should not take longer than an hour or two.
In this short exploration, I can not find the direct necessity to introduce snkit. The point is that adding the snkit object creation into the network standardisation process can facilitate interventions emerging in the future. Such interventions might need to modify the topology, geometry, or attributes of a graph (read a NetworkX object). Some of these interventions can be performed more easily on gdf objects compared with NetworkX. Currently we have to convert the NetworkX graph to get the nodes or read the network_gdf which only contains edges of the NetworkX graph. So in the long-run, storing nodes_gdf and edges_gdf as an snkit object can be beneficial as we can access both nodes and edges (right now we usually store edges_gdf). It is important to mention that releasing the mentioned potential of using snkit and the extent to which it will be used are uncertain at this moment and within this short reflection.
Issue addressed
Solves #277
Code of conduct
What has been done?
I reused and verified a function that solves the issue 277. Then implemented in the ra2ce architecture.
Checklist
black
andisort
definitions.master
.Additional Notes (optional)
snkit is added to create Network object (nodes and edges combination both as GeoDataFrame). snkit is being used in the added simplification function.
The main reason is that an snkit object Network can store in a compact way both nodes and edges gdf. The gdf files are used/modified along the simplification process. So the use of gdf objects go beyond exporting.
snkit can be replaced in the developed simplification process but it means:
In this short exploration, I can not find the direct necessity to introduce snkit. The point is that adding the snkit object creation into the network standardisation process can facilitate interventions emerging in the future. Such interventions might need to modify the topology, geometry, or attributes of a graph (read a NetworkX object). Some of these interventions can be performed more easily on gdf objects compared with NetworkX. Currently we have to convert the NetworkX graph to get the nodes or read the network_gdf which only contains edges of the NetworkX graph. So in the long-run, storing nodes_gdf and edges_gdf as an snkit object can be beneficial as we can access both nodes and edges (right now we usually store edges_gdf). It is important to mention that releasing the mentioned potential of using snkit and the extent to which it will be used are uncertain at this moment and within this short reflection.