andes.models.group.GroupBase#

class andes.models.group.GroupBase[source]#

Base class for groups.

__init__()[source]#

Methods

add(idx, model)

Register an idx from model_name to the group

add_model(name, instance)

Add a Model instance to group.

doc([export])

Return the documentation of the group in a string.

doc_all([export])

Return documentation of the group and its models.

find_idx(keys, values[, allow_none, default])

Find indices of devices that satisfy the given key=value condition.

get(src, idx[, attr, allow_none, default])

Based on the indexer, get the attr field of the src parameter or variable.

get_field(src, idx, field)

Helper function for retrieving an attribute of a member variable shared by models in this group.

get_next_idx([idx, model_name])

Get a no-conflict idx for a new device.

idx2model(idx[, allow_none])

Find model name for the given idx.

idx2uid(idx)

Convert idx to the 0-indexed unique index.

set(src, idx, attr, value)

Set the value of an attribute of a group property.

set_backref(name, from_idx, to_idx)

Set idxes to BackRef, and set them to models.

Attributes

class_name

n

Total number of devices.