ControlChangeTracker#

module wntr.network.controls

class ControlChangeTracker[source]#

Bases: Observer


__init__()[source]#
changes_made(ref_point)[source]#

Specifies if changes were made.

Returns:

changes

Return type:

bool

clear_all_reference_points()[source]#
deregister(control)[source]#

Deregister a control

Parameters:

control (ControlBase)

get_changes(ref_point)[source]#

A generator for iterating over the objects, attributes that were changed.

Returns:

changes – (object, attr)

Return type:

tuple

register_control(control)[source]#

Register a control

Parameters:

control (ControlBase)

remove_reference_point(key)[source]#
reset_reference_point(key)[source]#
set_reference_point(key)[source]#
update(subject)[source]#

The update method gets called when a subject (control action) is activated.

Parameters:

subject (BaseControlAction)