It is not a good idea to have the custom Quantity
ValueType extend the SysML Real primitive type, as it undermines Quantity type traceability throughout a SysML4Mathematica project. It is recommended in most cases that higher level (end use) functions (and their SysML model representations) keep a clean separation between Quantity
and Real
, even though Mathematica supports flexible pattern matching on arguments like function[arg:(_Quantity|_Real)].
Where frequently used custom utility functions in a Mathematica project do for most sensible and efficient convenience use argument patterns like function[arg:(_Quantity|_Real|_Integer)]
or function[arg_?NumberQ].
, there is no alternative but to have strongly typed variations of them in the SysML representation, for which one can use suffixes such as function$Q
, function$R
, and function$I
to indicate their ValueType "family", or they can be placed in separate Packages (but otherwise with the same name).