NamedTupleInterface.update_state()

NamedTupleInterface.update_state()#

NamedTupleInterface.update_state(position, model_state)[source]#

Updates and returns a model state given a position.

Parameters:
  • position – A dictionary of variable or node names and values.

  • model_state (Any) – A dictionary of node names and their corresponding NodeState.

Return type:

Any

Warning

The model_state must be up-to-date, i.e. it must not contain any outdated nodes. Updates can only be triggered through new variable or node values in the position. If you supply a model_state with outdated nodes, these nodes and their outputs will not be updated.