Closed borismarin closed 9 years ago
I think we haven't implemented anything yet. I was having a look at js libs which allows us to display equations and this one seems to be a de facto standard. However, the one you suggest has some very interesting features...
I am not worried about displaying, but with parsing and and handling composite expressions in order to (for example) plot stuff.
A concrete example: a LEMS model defines a "derived variable" which is a function of a state variable: f(x). Suppose now that the dynamics of x, is itself defined in terms of f(x). How can we then plot this "composite" function? We can probably delegate part of that to the backend (i.e. jLEMS), but I guess that it would be important to have such capabilities built into Geppetto. I wonder if it can be done using eval() in a smart (and safe) way...
On 4 September 2014 16:38, adrianq notifications@github.com wrote:
I think we haven't implemented anything yet. I was having a look at js libs which allows us to display equations and this one http://www.mathjax.org/ seems to be a de facto standard. However, the one you suggest has some very interesting features...
Reply to this email directly or view it on GitHub https://github.com/openworm/org.geppetto/issues/230#issuecomment-54496420 .
To review with @borismarin and @adrianq
@adrianq @borismarin I am looking at some js libs in order to solve this problem. http://www.nerdamer.com/ suggested by @borismarin looks nice but maybe this one http://mathjs.org is a more curated option (more contributors, releases, age...). I haven't implemented anything yet but at first sight both have more or less the same functionality...
I like the idea of the "scope": you can dump all model pars and funcs into a scope and evaluate as needed.
Are you talking about mathjs? it looks good to me as well. Here you have some other examples: https://github.com/josdejong/mathjs/blob/master/docs/expressions.md I am implementing sth today. Let you know...
Yes, it has a "scope" object that works as a namespace On 11 Nov 2014 09:07, "adrianq" notifications@github.com wrote:
Are you talking about mathjs? it looks good to me as well. Here you have some other examples: https://github.com/josdejong/mathjs/blob/master/docs/expressions.md I am implementing sth today. Let you know...
Reply to this email directly or view it on GitHub https://github.com/openworm/org.geppetto/issues/230#issuecomment-62519999 .
This library doesn't do proper symbolics, though. But it can potentially cover most of our needs.
what is the status regarding symbolic expression support? Could something like that be used?