andes.models.group.GroupBase#
- class andes.models.group.GroupBase[source]#
Base class for groups.
Methods
add(idx, model)Register an idx from model_name to the group
add_model(name, instance)Add a Model instance to group.
alter(src, idx, value[, attr])Alter values of input parameters or constant service for a group of models.
as_df([vin])Export group common parameters as a pandas.DataFrame object.
as_dict([vin])Export group common parameters as a dictionary.
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, ...])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_all_idxes()Return all the devices idx in this group.
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.
get_setpoint(system, idx, name)Get the current setpoint value by resolving the controller chain.
get_status(idx)Get the effective online status of a 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, *args[, value, attr, base])Set the value of a group property, dispatching to the correct model.
set_backref(name, from_idx, to_idx)Set idxes to
BackRef, and set them to models.set_setpoint(system, idx, name, value)Set a setpoint value by resolving the controller chain.
set_status(idx, value)Set the online status of a device and propagate to dependents.
Attributes
class_namenTotal number of devices.