AlgebraicJulia / DiagrammaticEquations.jl

MIT License
9 stars 1 forks source link

Interpolate variables from surrounding scope #76

Open lukem12345 opened 1 week ago

lukem12345 commented 1 week ago

Currently, almost all example Decapodes employ small helper variables, typically scalars. The values of these variables are passed into the simulator as a named tuple.

However, this process can become clunky even in simple scenarios. For example, simple compositions may rename a variable, causing some confusion when providing this parameter.

So, we should alternatively allow Decapodes to "interpolate" the values of local variables, storing them in the name attribute. This feature is technically easy to implement under the current parsing techniques.