Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supporting connections for compositional modeling #774

Open
isaacsas opened this issue Jan 26, 2024 · 2 comments
Open

supporting connections for compositional modeling #774

isaacsas opened this issue Jan 26, 2024 · 2 comments

Comments

@isaacsas
Copy link
Member

It seems like the only thing we are missing for compositional modeling to work smoothly is a notion of connections between systems, which here would really just mean aliasing that sys1.x == sys2.x, and at some point eliminating one of the two variables in the composed ReactionSystem model. I wonder if we should just reuse the MTK connection object idea, with expand_connections handling generating a system that eliminates one variable. The only issue is checking for circular definitions, but I'd imagine maybe we can hook into some of the MTK simplification functionality to make such checks?

@ChrisRackauckas
Copy link
Member

The only issue is checking for circular definitions, but I'd imagine maybe we can hook into some of the MTK simplification functionality to make such checks?

That's effectively the alias elimination pass.

Yeah this sounds good. A definition of connection is required though. Maybe it's that any matching species name is matched?

@isaacsas
Copy link
Member Author

Isn’t the default usage of connect(sys1.a, sys2.b) that they are equal (unless there is metadata that they are flow variables or such)? I was thinking we just allow these as input equations, and then add an ability to eliminate them for composed ReactionSystem models (and auto-eliminate when flattening to convert to other system types).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants