snl.ccss.jpowersystem
Class AbstractBus

java.lang.Object
  extended by snl.ccss.jpowersystem.AbstractBus
All Implemented Interfaces:
Bus
Direct Known Subclasses:
AbstractACPFBus, AbstractDCPFBus, AbstractPFBus

public abstract class AbstractBus
extends java.lang.Object
implements Bus

This is an abstract implementation of the Bus interface that can be extended by objects representing buses in a power sytem. It implements all the required methods in a minimal fashion so as to make it possible to add the object to a power system.

Author:
Bryan T. Richardson, Sandia National Laboratories

Constructor Summary
AbstractBus()
           
 
Method Summary
 void add(Branch branch)
          This method connects the given branch by adding the branch to the list of connected branch objects.
 void add(BusDevice device)
          This method connects the given bus device by adding the bus device to the list of connected bus device objects.
 void addTo(PowerSystem powerSystem)
          This method connects this bus to the given power system by setting its PowerSystem variable to the given power system.
 java.util.List getBranchList()
          This method returns a list of the branches connected to this bus.
 java.util.List getBusDeviceList()
          This method returns a list of the bus devices connected to this bus.
 void remove()
          This method removes this bus from the power system it currently belongs to by removing each branch and bus device connected to it and setting its PowerSystem variable to null.
 void remove(Branch branch)
          This method removes the given branch by removing it from the list of connected branch objects.
 void remove(BusDevice device)
          This method removes the given bus device by removing it from the list of connected bus device objects.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractBus

public AbstractBus()
Method Detail

getBranchList

public java.util.List getBranchList()
This method returns a list of the branches connected to this bus.

Specified by:
getBranchList in interface Bus
Returns:
List of Branch objects

getBusDeviceList

public java.util.List getBusDeviceList()
This method returns a list of the bus devices connected to this bus.

Specified by:
getBusDeviceList in interface Bus
Returns:
List of BusDevice objects

addTo

public void addTo(PowerSystem powerSystem)
This method connects this bus to the given power system by setting its PowerSystem variable to the given power system.

Specified by:
addTo in interface Bus
Parameters:
powerSystem - PowerSystem object in which this bus exists

add

public void add(Branch branch)
This method connects the given branch by adding the branch to the list of connected branch objects.

Specified by:
add in interface Bus
Parameters:
branch - Branch object that is attached to this bus

add

public void add(BusDevice device)
This method connects the given bus device by adding the bus device to the list of connected bus device objects.

Specified by:
add in interface Bus
Parameters:
device - BusDevice object that is attached to this bus

remove

public void remove()
This method removes this bus from the power system it currently belongs to by removing each branch and bus device connected to it and setting its PowerSystem variable to null.

Specified by:
remove in interface Bus

remove

public void remove(Branch branch)
This method removes the given branch by removing it from the list of connected branch objects.

Specified by:
remove in interface Bus
Parameters:
branch - Branch object to be removed from this bus

remove

public void remove(BusDevice device)
This method removes the given bus device by removing it from the list of connected bus device objects.

Specified by:
remove in interface Bus
Parameters:
device - BusDevice object to be removed from this bus