Comments (4)
I can certainly take a look. An option is to explicitly map the initial and final subtypes (e.g. DependentVariable => Variable
for the nonlinear system hack) and have some default for the rest.
But I think there is a bigger issue than naming and is the fact that certain DSL will also require to create their own types that eventually lower into a Variable
of a given subtype (potentially losing information in the process, which we may not want to). Making Expression
an abstract type was a great step forward as I can create my own types that generate correct Operation
s, when applying the registered functions (and lower them to Variable
at the end). But that makes me wonder whether DependentVariable
et al. should also be abstract types (or some orthogonal trait system) rather than types.
from modelingtoolkit.jl.
But that makes me wonder whether DependentVariable et al. should also be abstract types (or some orthogonal trait system) rather than types.
The issue there is that it will never be inferrable, so we'd want to avoid types as otherwise things could slow to a crawl because every piece of code becomes dynamic. As we have it, most things are non-dynamic except for Expression vectors. This is a lot like Julia's AST which uses symbols for things like functions in order to avoid overtyping. But,
But I think there is a bigger issue than naming and is the fact that certain DSL will also require to create their own types that eventually lower into a Variable of a given subtype (potentially losing information in the process, which we may not want to).
That shouldn't lose any information if we just allow information by composition. If we just allow a boxed composition pointer, then most of the generic routines can safely ignore that without an issue.
An option is to explicitly map the initial and final subtypes (e.g. DependentVariable => Variable for the nonlinear system hack) and have some default for the rest.
I don't think we need to explicitly map since making the names flexible will have other advantages anyways.
from modelingtoolkit.jl.
Generic composition is now allowed via the context
field.
from modelingtoolkit.jl.
(1) is complete.
from modelingtoolkit.jl.
Related Issues (20)
- Ambiguous methods for operations involving `DynamicQuantities.Quantity` and `Num`
- Remaking ODEProblem fails inside of Turing model
- Remaking ODEproblem causes call to `solve` to fail on remade problem HOT 1
- remake with use_defaults=true fails when defaults contain non-trivial expressions
- Systems are considered equal, even if they have different events
- `SymbolicDiscreteCallback` and `SymbolicContiniuousCallback` have different affect field names
- Solve fails after remake inside of Turing model.
- Missing metadata getters
- Cannot add both default value and description to variables created in multiline statements (but parameters work). HOT 2
- Inconsistency with scalarisation of MTK states and parameters HOT 2
- Performant way to remake ODEProblem with updated external input function? HOT 2
- Remake fails with simple parameter dict HOT 1
- Allow altering a symbolic parameter default value after creation.
- Improve printing/display of `XSystem` parameters
- Is `remake`ing an `ODEProblem` with a symbolic map of `u0` or `p` type-stable? HOT 5
- Guesses for symbolic vector variables are incorrect
- Support arbitrarily nested structural parameter conditions
- Parameters (and probably variables) occurring in events only are not inferred into ODESystems HOT 2
- remake failing for several cases with vector variables
- Problem creating problems for vector variables/parameters HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from modelingtoolkit.jl.