andes.core.param.ExtParam#

class andes.core.param.ExtParam(model: str, src: str, indexer=None, vtype=<class 'float'>, allow_none=False, default=0.0, **kwargs)[source]#

A parameter whose values are retrieved from an external model or group.

Parameters:
modelstr

Name of the model or group providing the original parameter

srcstr

The source parameter name

indexerBaseParam

A parameter defined in the model defining this ExtParam instance. indexer.v should contain indices into model.src.v. If is None, the source parameter values will be fully copied. If model is a group name, the indexer cannot be None.

vtypetype, optional, default to float

Type of each element to be retrieved. Can be str if the ExtParam is used to access an IdxParam.

Attributes:
parent_modelModel

The parent model providing the original parameter.

__init__(model: str, src: str, indexer=None, vtype=<class 'float'>, allow_none=False, default=0.0, **kwargs)[source]#

Methods

add([value])

ExtParam has an empty add method.

get_names()

Return self.name in a list.

get_property(property_name)

Check the boolean value of the given property.

link_external(ext_model)

Update parameter values provided by external models.

restore()

ExtParam has an empty restore method

set(pos, attr, value)

Set attributes of the BaseParam class to new values at the given positions.

set_all(attr, value)

Set attributes of the BaseParam class to new values for all positions.

set_pu_coeff(coeff)

Store p.u.

to_array()

Convert to array when d_type is not str

Attributes

class_name

Return the class name.

n

Return the count of elements in the value array.