Open nickerso opened 6 years ago
Currently we've got a fix in place for item 1. For items 2-4 we need to enhance the XMMLreader so that it reads in the unit factor information for each unit. Then we'll be able to identify unit synonymy better and not write out base units unnecessarily. We'll also be able to preserve all the unit factor info when going from MML to OWL to CellML.
These errors were discovered when using SemGen to translate a SemSim OWL model that had come from a JSim MML model description into CellML for this example: https://models.physiomeproject.org/workspace/4e3. Checking the git history for that workspace will show the changes made to correct the units - although that model still has issues with the generated math that cause OpenCOR to crash when loading the model (see opencor/opencor#1487).
A summary of the issues with units is given here:
_
) – e.g.,mol^2/(J*s*cm^2)
is an invalid CellML units name.K
was defined as a new base unit rather than use the existingkelvin
,amp
instead of usingampere
, etc.). In the corrected version I removed the@base_unit
’s and defined the units as a direct mapping to the standard base (from memory only, haven’t actually checked I got it all right!).