modeci_mdf.mdf.Parameter
- class modeci_mdf.mdf.Parameter(id: str, value: Optional[Union[EvaluableExpression, List, Dict, ndarray, int, float, str]] = None, default_initial_value: Optional[Union[EvaluableExpression, List, Dict, ndarray, int, float, str]] = None, time_derivative: Optional[str] = None, function: Optional[str] = None, args: Optional[Dict[str, Any]] = None, conditions: List[ParameterCondition] = _Nothing.NOTHING, *, metadata: Optional[Dict[str, Any]] = None)[source]
Bases:
MdfBase
A parameter of the
Node
, which can be: 1) a specific fixedvalue
(a constant (int/float) or an array) 2) a string expression for thevalue
referencing other namedParameter`(s). which may be stateful (i.e. can change value over multiple executions of the :class:`Node
); 3) be evaluated by an inbuiltfunction
withargs
; 4) or change from adefault_initial_value
with atime_derivative
.- Variables:
value (Optional[Union[modelspec.base_types.EvaluableExpression, List, Dict, numpy.ndarray, int, float, str]]) – The next value of the parameter, in terms of the inputs, functions and PREVIOUS parameter values
default_initial_value (Optional[Union[modelspec.base_types.EvaluableExpression, List, Dict, numpy.ndarray, int, float, str]]) – The initial value of the parameter, only used when parameter is stateful.
time_derivative (Optional[str]) – How the parameter changes with time, i.e. ds/dt. Units of time are seconds.
function (Optional[str]) – Which of the in-build MDF functions (linear etc.) this uses, See
https – //mdf.readthedocs.io/en/latest/api/MDF_function_specifications.html
args (Optional[Dict[str, Any]]) – 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...