modeci_mdf.execution_engine.EvaluableGraph

class modeci_mdf.execution_engine.EvaluableGraph(graph: Graph, verbose: Optional[bool] = False)[source]

Bases: object

Evaluates a Graph with the MDF execution engine. This is the top-level interface to the execution engine.

Parameters:
  • graph – A directed graph consisting of Node(s) connected via Edge(s)

  • verbose – If set to True Provides in-depth information else verbose message is not displayed

Methods

evaluate([time_increment, array_format, ...])

Evaluates a Graph.

evaluate_edge(edge[, time_increment, ...])

Evaluates edges in graph

parse_condition(condition)

Convert the condition in a specific format

evaluate(time_increment: Optional[Union[int, float]] = None, array_format: str = 'numpy', initializer: Optional[Dict[str, Any]] = None)[source]

Evaluates a Graph. This is the top-level interface to the execution engine.

Parameters:
  • time_increment – Time step for next execution

  • array_format – A n-dimensional array

  • initializer – sets the initial value of parameters of the node

evaluate_edge(edge: Edge, time_increment: Optional[Union[int, float]] = None, array_format: str = 'numpy')[source]

Evaluates edges in graph

Parameters:
  • time_increment – Time step for next execution

  • array_format – A n-dimensional array

parse_condition(condition: Union[Condition, Dict]) Condition[source]

Convert the condition in a specific format

Parameters:

condition – Specify the condition under which a Component should be allowed to execute

Returns:

Condition in specific format