mp.element_container
- class mp.element_container
Bases:
handle
mp.element_container
- Mix-in class to handle named/ordered element object array.Implements an element container that is used for MATPOWER model and data model converter objects. Provides the properties to store the constructors for each element and the elements themselves. Also provides a method to modify an existing set of element constructors.
- mp.element_container Properties:
element_classes
- cell array of element constructorselements
- amp.mapped_array
to hold the element objects
- mp.element_container Methods:
modify_element_classes()
- modify an existing set of element constructors
See also
mp.mapped_array
.- Property Summary
- element_classes
Cell array of function handles of constructors for individual elements, filled by constructor of subclass.
- elements
A mapped array (
mp.mapped_array
) to hold the element objects included inside this container object.
- Method Summary
- modify_element_classes(class_list)
Modify an existing set of element constructors.
obj.modify_element_classes(class_list)
- Input:
class_list (cell array) – list of element class modifiers, where each modifier is one of the following:
a handle to a constructor to append to
obj.element_classes
, ora char array
B
, indicating to remove any elementE
in the list for whichisa(E(), B)
istrue
, ora 2-element cell array
{A,B}
whereA
is a handle to a constructor to replace any elementE
in the list for whichisa(E(), B)
istrue
, i.e.B
is a char array
Also accepts a single element class modifier of type 1 or 2 (A single type 3 modifier has to be enclosed in a single-element cell array to keep it from being interpreted as a list of 2 modifiers).
Can be used to modify the list of element constructors in the
element_classes
property by appending, removing, or replacing entries. See Table 9.2 in the MATPOWER Developer’s Manual for more information.