-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wishlist of functions from writing tutorials #509
Comments
Re:
|
I agree that this is something that could go into an auxiliary support/utility code that people could use which may get rolled into libCellML at some point in the future. I disagree with doing this type of thing based on string processing - should be done treating the MathML as XML and handling namespaces properly.
If we default to including the MathML namespace declaration on the model element when printing, then this reduces to
There is nothing in CellML itself that forbids
Again, perfectly valid CellML and typically ignored by all current simulation software except JSim. I'd expect this to be an issue that would be picked up in the units "validation" that @awickens is working on this summer. An error in the mathematical model, but not an error in the CellML... |
Agreed about Same with funky exponent units... |
@agarny Umm ... huh? Surely model developers are a fairly big slice of the user pie? Otherwise, why have I been writing tutorials for them for the last month ... :|
@nickerso Agree that it would be a huge amount better to have this done properly using XML instead! If CellML is all about reusability and reproducibility, then the more we support changes and adaptations of models via the library the better, no?
Something to add to the list of "issues" ... cf validation errors
Will do, it's an easy fix :) thanks! |
Hi all
Here's a list of things which would have been super useful to have that I've found while writing the tutorials for our common use cases. Some of them I've implemented in utility functions that will go alongside the tutorials, but I wanted to get your thoughts on whether the same functionality could/should be included in libcellml too?
String replace for names of units within MathML statements. I've used:
I'm tossing up how best to do the same for variables, as they're not neatly surrounded by quotation marks, so gets complicated when there is a variable name which is a substring of another variable name. It could be done removing whitespace and using
>
and<
as surrounds.Generic header/footer tags for MathML supplied by a macro/variable/function return. In every tutorial I have to retype the header, and it seems like it could be something we don't ask users to deal with each time (unless they want to do it manually).
Better handling of individual equations in MathML. Am I right in thinking that we don't allow either of:
a + b = c + d
a = b = c + d
If that's true, and we can only ever deal with equations of the form
a = b + c + d
, then a function that splits the MathML using the<apply><eq/>
tags and is callable using the LHS variable inside the<ci></ci>
tags would be really useful ... It would mean that we can edit the MathML from another component after importing or parsing. At the moment it's all or nothing which seems like a waste to me?Better interaction with generated files. Currently the
#include
statement in the implementation code assumes that the interface code is in a file calledmodel.h
. While there is a function in the generator where the user can change this, it's mushed in with other stuff that a user won't know about. It would be great to have a function that just changes the name of the include file without needing to know about the rest of it ... see discussion elsewhere (here and onwards).Validation tests funky exponent units . Does it make sense to have exponents with dimensional units? Should we be checking for this?
Here endeth the novel (for now) ...
The text was updated successfully, but these errors were encountered: