8000 Explicit cyclic foreign vars · Issue #164 · xarray-contrib/xarray-simlab · GitHub
[go: up one dir, main page]

Skip to content
Explicit cyclic foreign vars  #164
Open
@jvail

Description

@jvail

Sorry to open up a new 'battleground' - the last thing that haunts me for now:

What do you, @benbovy, think about the following idea, use case:

Let's say we have two processes A and B. A has a var x that is a foreign variable in B and B has a variable y that is a foreign variable in A. Wont work because you can not derive the DAG in that case.

What if I annotate the foreign variable B.y in A with something like is_cyclic=True . That would mean:

  • I know this introduces a cycle but I don't care
  • Just ignore me, A.y, when building the process graph, the ordering
  • But please still draw the B -> y -> A relation in the visualization (maybe with a step - 1 label, dotted line...)
  • And when executing A just pass in for y whatever is there (would be a NaN in step = 0 if y is not inout in B or the value set in B.initialize

It just happens that we have a lot of these "cycles" but typically it is just the value from step time - 1. So only quasi-cyclic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0