BaseControlAction#
module wntr.network.controls
- class BaseControlAction[source]#
Bases:
Subject
A base class for deriving new control actions. The control action is run by calling run_control_action. This class is not meant to be used directly. Derived classes must implement the run_control_action, requires, and target methods.
- notify()#
Call the update method for all observers of this subject.
- abstract requires()[source]#
Returns a set of objects used to evaluate the control
- Returns:
req – The objects required to run the control action.
- Return type:
- abstract run_control_action()[source]#
This method is called to run the corresponding control action.
- subscribe(observer)#
Subscribe observer to this subject. The update method of any observers of this subject will be called when notify is called on this subject.
- Parameters:
observer (Observer)