Open matthiaskoenig opened 5 months ago
looks like unit validation cannot know what the result of a function defined in the distrib package is. I am not aware of any plugin system in libSBML that allows packages to extend unit validation. Will have to discuss with @skeating
Thanks.
I tried the following 'uniform(0, 1) dimensionless', i.e. annotating the unit of the csymbol similar to constants in math expressions (e.g.
1 dimensionless`). Not sure if something like this could work to communicate the unit.
it feels like the proper thing to do would be to have the distrib plugin provide information about the csymbols and the unit input/output relationship. adding dimensionless like in your example would prove troublesome in more involved expressions, potentially.
Hi all, is there some simple solution to support unit validation for the distributions? I have some models using the distrib features with units and these errors make it hard to unit validate the models. Best Matthias
Hi all, I have an SBML model with an initial assignment from a uniform distribution (model attached). spt_random.zip Despite having set the units on the distributions I get a unit validation warning. It seems like the unit validation does not work with the distributions.
Here the basic structure. An initial assignment from a
uniform(0 dimensionless, 1 dimensionless)
to a parameter which is dimensionless. I.e. the distribution and the parameter are compatible, but still get the warning below.Probably similar things happen with the other csymbol distributions.
Best Matthias