ding0.grid.mv_grid.models package

Submodules

ding0.grid.mv_grid.models.models module

Based on code by Romulo Oliveira copyright (C) 2015, https://github.com/RomuloOliveira/monte-carlo-cvrp Originally licensed under the Apache License, Version 2.0. You may obtain a copy of the license at http://www.apache.org/licenses/LICENSE-2.0

class ding0.grid.mv_grid.models.models.Graph(data)[source]

Bases: object

Class for modelling a CVRP problem data

Parameters:data (type) – TSPLIB parsed data
depot()[source]

Returns the depot node.

Returns:type – Depot node
distance(i, j)[source]

Returns the distance between node i and node j

Parameters:
Returns:

float – Distance between node i and node j.

edges()[source]

Returns a generator for iterating over edges

Yields:type – Generator for iterating over edges.
nodes()[source]

Returns a generator for iterating over nodes.

Yields:type – Generator for iterating over nodes.
class ding0.grid.mv_grid.models.models.Node(name, demand)[source]

Bases: object

CVRP node (MV transformer/customer)

Parameters:
  • name – Node name
  • demand – Node demand
clone()[source]

Returns a deep copy of self

Function clones:

  • allocation
  • nodes
Returns:type – Deep copy of self
demand()[source]

Returns the node demand

Returns:float – Node’s demand
name()[source]

Returns node name

Returns:str – Node’s name
route_allocation()[source]

Returns the route which node is allocated

Returns:type – Node’s route
class ding0.grid.mv_grid.models.models.Route(cvrp_problem)[source]

Bases: object

CVRP route, consists of consecutive nodes

Parameters:cvrp_problem (type) – Descr
allocate(nodes, append=True)[source]

Allocates all nodes from nodes list in this route

Parameters:
  • nodes (type) – Desc
  • append (bool, defaults to True) – Desc
calc_circuit_breaker_position(debug=False)[source]

Calculates the optimal position of a circuit breaker on route.

Parameters:debug (bool, defaults to False) – If True, prints process information.
Returns:int – position of circuit breaker on route (index of last node on 1st half-ring preceding the circuit breaker)

Note

According to planning principles of MV grids, a MV ring is run as two strings (half-rings) separated by a circuit breaker which is open at normal operation. Assuming a ring (route which is connected to the root node at either sides), the optimal position of a circuit breaker is defined as the position (virtual cable) between two nodes where the conveyed current is minimal on the route. Instead of the peak current, the peak load is used here (assuming a constant voltage).

The circuit breakers are used here for checking tech. constraints only and will be re-located after connection of satellites and stations in ding0.grid.mv_grid.tools.set_circuit_breakers

References

can_allocate(nodes, pos=None)[source]

Returns True if this route can allocate nodes in nodes list

Parameters:
  • nodes (type) – Desc
  • pos (type, defaults to None) – Desc
Returns:

bool – True if this route can allocate nodes in nodes list

clone()[source]

Returns a deep copy of self

Function clones:

  • allocation
  • nodes
Returns:type – Deep copy of self
deallocate(nodes)[source]

Deallocates all nodes from nodes list from this route

Parameters:nodes (type) – Desc
demand()[source]

Returns the current route demand

Returns:type – Current route demand.
insert(nodes, pos)[source]

Inserts all nodes from nodes list into this route at position pos

Parameters:
  • nodes (type) – Desc
  • pos (type) – Desc
is_interior(node)[source]

Returns True if node is interior to the route, i.e., not adjascent to depot

Parameters:nodes (type) – Desc
Returns:bool – True if node is interior to the route
last(node)[source]

Returns True if node is the last node in the route

Parameters:nodes (type) – Desc
Returns:bool – True if node is the last node in the route
length()[source]

Returns the route length (cost)

Returns:int – Route length (cost).
length_from_nodelist(nodelist)[source]

Returns the route length (cost) from the first to the last node in nodelist

nodes()[source]

Returns a generator for iterating over nodes

Yields:type – Generator for iterating over nodes
tech_constraints_satisfied()[source]

Check route validity according to technical constraints (voltage and current rating)

It considers constraints as

  • current rating of cable/line
  • voltage stability at all nodes

Note

The validation is done for every tested MV grid configuration during CVRP algorithm. The current rating is checked using load factors from [1]. Due to the high amount of steps the voltage rating cannot be checked using load flow calculation. Therefore we use a simple method which determines the voltage change between two consecutive nodes according to [2]. Furthermore it is checked if new route has got more nodes than allowed (typ. 2*10 according to [3]).

References

[1]Deutsche Energie-Agentur GmbH (dena), “dena-Verteilnetzstudie. Ausbau- und Innovationsbedarf der Stromverteilnetze in Deutschland bis 2030.”, 2012
[2]M. Sakulin, W. Hipp, “Netzaspekte von dezentralen Erzeugungseinheiten, Studie im Auftrag der E-Control GmbH”, TU Graz, 2004
[3]Klaus Heuck et al., “Elektrische Energieversorgung”, Vieweg+Teubner, Wiesbaden, 2007
[4]FGH e.V.: “Technischer Bericht 302: Ein Werkzeug zur Optimierung der Störungsbeseitigung für Planung und Betrieb von Mittelspannungsnetzen”, Tech. rep., 2008

Module contents