modeci_mdf.mdf.InputPort
- class modeci_mdf.mdf.InputPort(id: str, default_value: EvaluableExpression | List | Dict | ndarray | int | float | str | None = None, shape=(), type: str | None = None, reduce: str | None = 'overwrite', *, metadata: Dict[str, Any] | None = None)[source]
Bases:
MdfBaseThe
InputPortis an attribute of a Node which allows external information to be input to the Node- Variables:
id (str) – The unique (for this Node) id of the input port,
default_value (modelspec.base_types.EvaluableExpression | List | Dict | numpy.ndarray | int | float | str | None) – Value to set at this input port if no edge connected to it.
shape (Tuple[int, ...] | None) – The shape of the input port. This uses the same syntax as numpy ndarray shapes (e.g.,
numpy.zeros(shape)would produce an array with the correct shapetype (str | None) – The data type of the input received at a port.
reduce (str | None) – Specifies how to deal with multiple inputs to one port during a single timestep: add: add up all the values; multiply: multiply the values, overwrite: just use the last value supplied (default)
Method generated by attrs for class InputPort.
Methods