modeci_mdf.mdf.Parameter
- class modeci_mdf.mdf.Parameter(id: str, value: EvaluableExpression | List | Dict | ndarray | int | float | str | None = None, default_initial_value: EvaluableExpression | List | Dict | ndarray | int | float | str | None = None, time_derivative: str | None = None, function: str | None = None, args: Dict[str, Any] | None = None, conditions: List[ParameterCondition] = NOTHING, *, metadata: Dict[str, Any] | None = None)[source]
Bases:
MdfBaseA parameter of the
Node, which can be: 1) a specific fixedvalue(a constant (int/float) or an array) 2) a string expression for thevaluereferencing other namedParameter`(s). which may be stateful (i.e. can change value over multiple executions of the :class:`Node); 3) be evaluated by an inbuiltfunctionwithargs; 4) or change from adefault_initial_valuewith atime_derivative.- Variables:
value (modelspec.base_types.EvaluableExpression | List | Dict | numpy.ndarray | int | float | str | None) – The next value of the parameter, in terms of the inputs, functions and PREVIOUS parameter values
default_initial_value (modelspec.base_types.EvaluableExpression | List | Dict | numpy.ndarray | int | float | str | None) – The initial value of the parameter, only used when parameter is stateful.
time_derivative (str | None) – How the parameter changes with time, i.e. ds/dt. Units of time are seconds.
function (str | None) – Which of the in-build MDF functions (linear etc.) this uses, See https://mdf.readthedocs.io/en/latest/api/MDF_function_specifications.html
args (Dict[str, Any] | None) – Dictionary of values for each of the arguments for the function of the parameter, e.g. if the in-build function is
linear(slope), the args here could be{"slope": 3}or{"slope": "input_port_0 + 2"}conditions (List[modeci_mdf.mdf.ParameterCondition]) – Parameter specific conditions
Method generated by attrs for class Parameter.
Methods
Is the parameter stateful?
summary()Short summary of Parameter...