Development#
Install the package from the cloned repository (see Installation) with the development tools:
pip install -e ".[dev]"
Tests:
pytestcompiles the C port with gcc and compares it, and the blocks of the exported control systems, with motulator step by step. Neither PLECS nor MATLAB is needed. The tests of the MATLAB Function blocks (tests/test_matlab_function.py) need MATLAB and are skipped without it.Documentation:
pip install -e ".[doc]"andsphinx-build -b html docs/source docs/build/html. The build runs the examples of the native simulation.Comparisons: the example scripts compare the PLECS and Simulink models with motulator (see A first model). Rerun them after changing the writers or the C port.
The implementation is described in the developer notes of the repository:
examples/README.md: the structure of the PLECS models and their agreement with motulator
motulator_export/simulink/README.md: the structure of the Simulink models and their agreement with motulator
motulator_export/c/README.md: the C port of the control algorithms
motulator_export/matlab/README.md: the MATLAB port