Comments (4)
We need a placeholder for all the various data in a CellML XML file (variables, units, ODE, and algebraic equations) during parsing and code generation. We can add a read
function and not expose the user to CellModel
.
generate_functions
is a helper function, mainly for debugging purposes. Many CellML files have bugs and won't compile completely. It can be difficult to find the bugs based on the MTK error messages and variable names, especially as some CellML models are rather large and convoluted (40-50 state variables with hundreds of equations). I think it is a good idea to have the possibility of generating a human-readable file that can be tweaked and debugged manually. Of course, most users should just plug the CellML file into a function like read
and not worried about all the internal stuff.
from cellmltoolkit.jl.
Yeah I opened a draft PR for this. It seems like there is a lot of duplicated code in here that is only here because CellModel doesn't subtype System. list_states
list_params
flat_equations
seem to be almost exactly MTKs' accessor functions.
To me, it seems like the only CellModel field that is different from MTK is units
, as I believe that we don't need to worry about whether it is an ODE or algebraic equation. I have the impression that MTK should handle it now.
Would you be willing to help me sort out some of my CI errors and how to make read
or in this case load_cellml
"just work"?
from cellmltoolkit.jl.
I agree. We can ignore units for now. Eventually, it needs to be integrated with Unitful.jl or something similar.
I suggest a two-step process. We can add a read
function on top of the current CellML system to hide the details and stabilize the API. Then, we can port the internals to MTK functions.
from cellmltoolkit.jl.
Great, I think this is a good plan. I'd love some review on my PR which is a first shot at step 1.
I implemented the read in load_cellml
, but was having trouble with my env and CI, so I wasn't able to get tests to pass. Help on this would be appreciated.
from cellmltoolkit.jl.
Related Issues (18)
- Register HOT 5
- Connecting CellML models with ModelingToolkit equations HOT 7
- TagBot trigger issue HOT 27
- `modelingtoolkitize` UndefVarError with CellMLToolkit HOT 9
- Generalizing XML parsing to SBML HOT 20
- Tracker for Coverage over CellML Model Repository HOT 12
- register 2.3 HOT 20
- Benchmarking lowering process
- Component model HOT 6
- Corrias `ERROR: KeyError: key CellMLToolkit.Var(:ImportedEformation, :t) not found` HOT 4
- Parameters in equations are not marked as parameters HOT 5
- DomainError: Exponentiation yielding a complex result requires a complex argument. HOT 1
- At ODESystem/CellModel construction time, use `list_states` and `list_params` as defaults in constructor HOT 1
- How to get observables? HOT 2
- Smith et al 2004 model not readable HOT 6
- Instability when claculating local sensitivites HOT 2
- Cannot change parameter and pass parameters to model HOT 6
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 cellmltoolkit.jl.