MoDyPy (rhymes with “modify”) is a Python framework for Modelling dynamic systems in Python. The framework provides methods for describing continuous-time linear and non-linear systems in state-space representation. It was originally inspired by simupy developed by Ben Margolis, but has a completely different philosophy and architecture than simupy.
The basic components of a dynamic system in MoDyPy are states and signals. States represent the internal state of the system, and signals represent the values calculated based on the state. Ports can be connected to signals, so that reusable blocks with input and output ports can be easily built. For more details refer to the documentation.
Main Features
Simple architecture based on states, signals and connectible ports
Enables hierarchical modelling
Allows the establishment of reusable building blocks
Simulator for linear and non-linear continuous- and discrete-time systems
Clock system to model periodic events and discrete-time components
Steady state determination and linearization
Library of standard blocks, including 6-degree-of-freedom rigid body motion
Tested for 100% statement and branch coverage
Installation
MoDyPy is available via the pip installer:
$ pip install modypy
To install the development version,
$ git clone https://github.com/modypy/modypy.git
$ pip install -e modypy
Examples
Simulation of a DC-motor with propeller
Check out the examples in the examples directory and the User’s Guide. These include:
- dcmotor.py
A simple example using a DC-motor driving a propeller and sampling the thrust using a zero-order hold.
- rigidbody.py
Some rigid-body simulation using moments and forces showing an object moving in a circle with constant velocity and turn-rate.
- bouncing_ball.py
An example modelling a bouncing ball, demonstrating the use of events and event-handler functions.
- quadcopter_trim.py
A larger example showcasing the steady-state-determination and linearisation of complex systems, in this case for a quadrocopter frame with four DC-motors with propellers.
They can be run from the sources using, e.g.,
$ pip install matplotlib
$ python examples/bouncing_ball.py
Note that some of the examples require matplotlib to run and display the results.
Contributing
Contributions are welcome! Check out the GitHub Project Page for issues and ideas on how to add to the project.
Contributions must adhere to the following conditions:
New features must be accompanied by appropriate pytest tests (ensure 100% statement and branch coverage!)
New features should at least carry Python Docstrings for API documentation following the general style of the existing API documentation.
Use black with a line-length of 80 to format your code. We are successively moving the project to the black style.
Contributors must accept publishing their contribution under the licensing conditions laid out in the LICENSE file.
Metadata
Release files for modypy 3.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| modypy-3.0.0.tar.gz | 775.3 kB | Without provenance | Details for modypy-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| modypy-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for modypy-3.0.0-py3-none-any.whl |
Total release size: 817.1 kB
Release files / modypy-3.0.0.tar.gz
| Download URL | modypy-3.0.0.tar.gz |
|---|---|
| Size | 775.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7445cbce019090fab802882f50e6774894dab279033d1bec172b15f05434929a
|
|
BLAKE2b-256 checksum How to use checksums |
05b4e321e88c815e013d0ea0e50e2b37fd530517e932036714965af126617220
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Release files / modypy-3.0.0-py3-none-any.whl
| Download URL | modypy-3.0.0-py3-none-any.whl |
|---|---|
| Size | 41.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c2af0996abc7d8fdb877cf8d2903272af46482c79436bc3e0d1c7608bc09db8
|
|
BLAKE2b-256 checksum How to use checksums |
ccf43d107c73b14692353da1e1d193ca7774999b1dbe952b6d0767745f8bb80b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5
|
Security for modypy 3.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.