Open sede-fa opened 4 months ago
Is there any reason you need to modify them after-the-fact? Can this all just happen at initialization?
At any rate the construction you have here looks a little odd. Assuming everything is functionally pure (I sure hope so!) then code like
self = eqx.tree_at(lambda m: m.unit1, self, F0)
self = eqx.tree_at(lambda m: m.unit1, self, self.unit1.run_sol()
should be equivalent to
self = eqx.tree_at(lambda m: m.unit1, self, F0.run_sol()
Hi,
I'm trying to rewrite my process flowsheet simulator in equinox. I'm able to solve individual components fine by creating my classes as follows:
However, when I want to connect components and update them sequentially I'm only doing this through repeated use of
eqx.tree_at
as follows:and this can be executed as follows:
This all executes fine, however I'm wondering if it may be possible to do this through a wrapper method like
connect(Flange1, Flange2)
that could handle the connections and also allow me to add some additional features such as graph generation using mermaid which I have in the numpy version of my framework.I know this is out of scope of equinox and a long shot, but any help would be much appreciated :)