GithubHelp home page GithubHelp logo

Comments (4)

shahriariravanian avatar shahriariravanian commented on June 13, 2024

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.

anandijain avatar anandijain commented on June 13, 2024

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.

shahriariravanian avatar shahriariravanian commented on June 13, 2024

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.

anandijain avatar anandijain commented on June 13, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.