modeci_mdf.mdf.Node

class modeci_mdf.mdf.Node(id: str, input_ports: List[InputPort] = _Nothing.NOTHING, functions: List[Function] = _Nothing.NOTHING, parameters: List[Parameter] = _Nothing.NOTHING, output_ports: List[OutputPort] = _Nothing.NOTHING, *, metadata: Optional[Dict[str, Any]] = None)[source]

Bases: MdfBase

A 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:

Method generated by attrs for class Node.

Methods

get_input_port(id)

Retrieve InputPort object corresponding to the given id :param id: Unique identifier of class:InputPort object

get_output_port(id)

Retrieve OutputPort object corresponding to the given id :param id: Unique identifier of class:OutputPort object

get_parameter(id)

Get a parameter by its string id

get_parameter(id: str) Optional[Parameter][source]

Get a parameter by its string id

Parameters:

id – The unique string id of the Parameter

Returns:

The Parameter object stored on this node. None if not found.

get_input_port(id: str) InputPort[source]

Retrieve InputPort object 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 OutputPort object 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