SymbolicIndexingInterface.jl: Symbolic Indexing for Everyone | Sabharwal | JuliaCon 2024
The Julia Programming Language The Julia Programming Language
84.4K subscribers
273 views
8

 Published On Sep 30, 2024

SymbolicIndexingInterface.jl: Symbolic Indexing for Everyone by Aayush Sabharwal

PreTalx: https://pretalx.com/juliacon2024/talk...

DSLs such as ModelingToolkit allow creating models using symbolic variables and writing the relevant equations similar to how they're written mathematically. SymbolicIndexingInterface was created to allow accessing the values of these symbolic variables without having to dig through internals of the relevant libraries. The intent of `sol[x]` is much more obvious than `sol[1]`. Not to mention, the order of variables is not guaranteed and may be changed by the modeling library.

Most notably, SymbolicIndexingInterface is designed to be independent of the modeling DSL and symbolic framework, providing access to powerful indexing capabilities if a data structure implements its interface. Any type implementing the interface can be queried for the values of it's symbolic variables. Multiple variables can be queried at once using (arbitrarily nested) tuples and arrays, and the result is type-inferred if the queried collection of variables is completely concretely typed. SymbolicIndexingInterface can create functions that cache the metadata needed to access a particular symbolic quantity, allowing for efficient queries/updates to the same quantity repeatedly.

show more

Share/Embed