Model.alter#
- Model.alter(src, idx, value, attr='v')[source]#
Alter values of input parameters or constant service.
If the method operates on an input parameter, the new data should be in the same base as that in the input file. This function will convert
valueto per unit in the system base whenever necessary.The values for storing the input data, i.e., the parameter's
vinfield, will be overwritten. As a result, altered values will be reflected in the dumped case file.- Parameters:
- srcstr
The parameter name to alter
- idxstr, float, int
The device to alter
- valuefloat
The desired value
- attrstr
The attribute to alter, default is 'v'.
Notes
Changed in version 0.9.14.
The
attrargument was added to allow altering specific attributes. This is useful when manipulating parameter values in the system base and ensuring that changes are reflected in the dumped case file.