Open clinssen opened 8 months ago
Suggestion from @heplesser: to ward against confusion between variable names and unit literals, NESTML should allow unit literals to appear only directly after numeric literals, for example, V' = 2 * V - V_L
would have V as voltage, exp(-V / (1 V))
would have the voltage in the numerator, divided by 1 V to make it unitless.
Currently, physical units and their factors (nano-, micro-, kilo-, etc.) are stored in the model AST and converted by the printers during code generation.
I would suggest to replace this architecture with a transformer, that converts a model with quantities in terms of physical units, to a model containing only real-typed quantities (and int, bool, string, etc). Then, the printers and code generator do not have to deal with conversion factors.
See also #608.