Major refactoring the system models to a more modular form #128
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The handling of the state variables, inputs, and outputs is changed so that the subsystems become more modular. Furthermore, main-level system models are simpler and their amount is reduced significantly.
The subsystems contain set_outputs() and rhs() methods, which are called by the main-level system model, whose base class is Model(ABC). The basic drive model is Drive(Model), which contains the interconnections of the subsystems in the interconnect() method. The same Drive class can now be used with both induction and synchronous machines (as well as with a diode bridge model, two-mass mechanics or other subsystems where the interconnections remain the same ). The post-processing is moved to subsystems to make it more modular as well.