Convert units and quantities between standard SysML v2 and Python with Syside Automator and Pint.
- Get/set quantity* as
attributevalue, specified using PintQuantityobjects - Get/set unit as
attributevalue, specified using PintUnitobjects - Supports numerical values, as well as
inf(*in SysML v2) andNaN(set asnullin SysML v2) - Conversion functions between SysML v2 units and Pint
Unit, and string parsing functions - Derive preferred units for a quantity type, for example
kgfor anISQ::massquantity - Syside Automator
ReferencePrinterfor printing unit references using their short name - Extensive caching to make units lookup fast
*: a quantity is a combination of a numerical value (the "magnitude") and units, for example: 10 kg, -1.0 m/s**2.
Note: this package uses Syside Automator for parsing SysML v2 models. Syside Automator is commercial software, so you have to obtain a license first. For academic uses you can request an academic license.
- Install the package from PyPI:
Note: currently Syside Automator only supports Python 3.12
pip install sysmlv2-units - Make sure you activate Syside Automator
Refer to the documentation.
If you use this library in your work, please cite the paper that first introduces the use of these capabilities:
Bussemaker, J.H. et al., 2026, April. System Architecture Optimization Using SysML v2: Language Extension and Implementation. IEEE SysCon 2026, Halifax, Canada. doi: 10.1109/SysCon66367.2026.11503593
The project is coordinated by: Jasper Bussemaker (jasper.bussemaker at dlr.de)
If you find a bug or have a feature request, please file an issue using the Github issue tracker. If you require support for using the library or want to collaborate, feel free to contact me.
Contributions are appreciated too:
- Fork the repository
- Add your contributions to the fork
- Update/add documentation
- Add tests and make sure they pass (tests are run using
pytest)
- Sign a Contributor License Agreement (CLA): please contact me for the template
- Issue a pull request