You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
The text was updated successfully, but these errors were encountered: