modeci_mdf.mdf.Node
- class modeci_mdf.mdf.Node(id: str, input_ports: List[InputPort] = NOTHING, functions: List[Function] = NOTHING, parameters: List[Parameter] = NOTHING, output_ports: List[OutputPort] = NOTHING, *, metadata: Dict[str, Any] | None = None)[source]
Bases:
MdfBaseA self contained unit of evaluation receiving input from other nodes on :class:`InputPort`(s). The values from these are processed via a number of :class:`Function`(s) and one or more final values are calculated on the :class:`OutputPort`(s)
- Variables:
id (str) – A unique identifier for the node.
input_ports (List[modeci_mdf.mdf.InputPort]) – Dictionary of the
InputPortobjects in the Nodeparameters (List[modeci_mdf.mdf.Parameter]) – Dictionary of :class:`Parameter`(s) for the node
functions (List[modeci_mdf.mdf.Function]) – The :class:`Function`(s) for computation the node
output_ports (List[modeci_mdf.mdf.OutputPort]) – The :class:`OutputPort`(s) containing evaluated quantities from the node
Method generated by attrs for class Node.
Methods
get_input_port(id)Retrieve
InputPortobject corresponding to the given id :param id: Unique identifier of class:InputPort objectget_output_port(id)Retrieve
OutputPortobject corresponding to the given id :param id: Unique identifier of class:OutputPort objectget_parameter(id)Get a parameter by its string
id- get_input_port(id: str) InputPort[source]
Retrieve
InputPortobject corresponding to the given id :param id: Unique identifier of class:InputPort object- Returns:
InputPort object if the entered id matches with the id of class:InputPort present in the class:Node
- Return type:
class
- get_output_port(id: str) OutputPort[source]
Retrieve
OutputPortobject corresponding to the given id :param id: Unique identifier of class:OutputPort object- Returns:
OutputPort object if the entered id matches with the id of class:OutputPort present in the class:Node
- Return type:
class