GC_Baran1989 module

class GC_Baran1989.Baran1989(grid=None, TieLines=None, fitness_ratio=1, loss_factor=0.08, verbose_logging=30)[source]

Bases: object

Class for solving the Baran 1989 test feeder network problem.

net

The distribution network object.

Type:

DistributionNetwork

initial_config

The initial tie line configuration. Defaults to None.

Type:

list, optional

logger

Logger object for debug messages.

Type:

logging.Logger

Solve(order=None)[source]

Solves the Baran 1989 problem by finding the best tie line configuration that minimizes power losses.

This function iterates through all loops in the initial network and tries opening/closing tie lines within each loop. It then checks for radial connectivity and performs power flow analysis to determine the power losses. The configuration with the minimum losses is returned.

Parameters:

order (list, optional) – An order for iterating through loops (not used in this implementation). Defaults to None.

Returns:

The best tie line configuration that minimizes power losses.

Return type:

list

__init__(grid=None, TieLines=None, fitness_ratio=1, loss_factor=0.08, verbose_logging=30)[source]

Initializes the Baran1989 class.

Parameters:
  • net (DistributionNetwork) – The distribution network object.

  • TieLines (list, optional) – The initial tie line configuration. Defaults to None.

  • verbose_logging (int, optional) – The logging level for debug messages. Defaults to logging.WARNING.