You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If A->B and B->A, one of these needs to be the start point when evaluating the graph. But what does the input port of the start node get when it has an edge from the output port of the not yet run node?
One option is to define a "default_value" on one of the input ports and the graph can be "snipped" there...
Not really. It's basically that one of the nodes in a cycle (e.g. A->B->C->A) needs to be flagged as "this is the one to start evaluating the nodes at". We will do this by stating that an input node has a default value, and that this can be used to start the evaluation, e.g. if A has a default value, you don't have the problem that you first need to evaluate the output of C, but before that the output of B, but before that A...
Activity
pgleeson commentedon Apr 26, 2023
Potential extension for cyclical graphs: add parameter
cycle_default_value- the default value only to use when it's in a cycle, not standalone.Devadeut commentedon Mar 23, 2024
@pgleeson in addition to this:
snippet from src/modeci_mdf/execution_engine.py
def init(self, node: Node, verbose: Optional[bool] = False):
self.verbose = verbose
self.node = node
self.evaluable_inputs = {}
self.evaluable_parameters = OrderedDict()
self.evaluable_functions = OrderedDict()
self.evaluable_outputs = {}
Can using OrderedDict() be the reason for the existing constraint?
pgleeson commentedon Mar 25, 2024
Not really. It's basically that one of the nodes in a cycle (e.g. A->B->C->A) needs to be flagged as "this is the one to start evaluating the nodes at". We will do this by stating that an input node has a default value, and that this can be used to start the evaluation, e.g. if A has a default value, you don't have the problem that you first need to evaluate the output of C, but before that the output of B, but before that A...