GC_Merlin1975 module

class GC_Merlin1975.Merlin1975(grid=None, verbose_logging=30)[source]

Bases: object

Implementation of the Merlin 1975 algorithm for optimizing network configurations.

net

The network object that contains information about the distribution network.

SearchMinFlow(banned)[source]

Searches for the line with the minimum current flow that is not banned.

Parameters:

banned – List of indices of banned lines.

Returns:

The index of the line with minimum current flow if available; otherwise, -1.

Solve()[source]

Solves the optimization problem using the Merlin 1975 algorithm.

Returns:

The list of lines that are out of service after optimization.

__init__(grid=None, verbose_logging=30)[source]

Initializes the Merlin1975 class with a network object.

Parameters:
  • net – The network object for optimization.

  • verbose_logging – Logging level for debug messages.