ding0.grid.mv_grid package¶
Subpackages¶
Submodules¶
ding0.grid.mv_grid.mv_connect module¶
ding0.grid.mv_grid.mv_routing module¶
-
ding0.grid.mv_grid.mv_routing.ding0_graph_to_routing_specs(graph)[source]¶ Build data dictionary from graph nodes for routing (translation)
Parameters: graph (NetworkX Graph Obj) – NetworkX graph object with nodes Returns: dict– Data dictionary for routing.See also
ding0.grid.mv_grid.models.models.Graph()- for keys of return dict
-
ding0.grid.mv_grid.mv_routing.routing_solution_to_ding0_graph(graph, solution)[source]¶ Insert solution from routing into graph
Parameters: - graph (NetworkX Graph Obj) – NetworkX graph object with nodes
- solution (BaseSolution) – Instance of BaseSolution or child class (e.g. LocalSearchSolution) (=solution from routing)
Returns: NetworkX Graph Obj – NetworkX graph object with nodes and edges
-
ding0.grid.mv_grid.mv_routing.solve(graph, debug=False, anim=None)[source]¶ Do MV routing for given nodes in graph.
Translate data from node objects to appropriate format before.
Parameters: - graph (NetworkX Graph Obj) – NetworkX graph object with nodes
- debug (bool, defaults to False) – If True, information is printed while routing
- anim (AnimationDing0) – AnimationDing0 object
Returns: NetworkX Graph Obj – NetworkX graph object with nodes and edges
See also
ding0.tools.animation.AnimationDing0()- for a more detailed description on anim parameter.