Small fixes based on Caltech CDS 112 course by murrayrm · Pull Request #849 · python-control/python-control
This PR contains some small fixes that I discovered while teaching CDS 112 at Caltech in Winter 2023:
- Fixed bug in
create_statefbk_iosystemthat didn't proper handle 1D gain schedules. flatsys.point_to_pointgenerates an error if you specify a cost or constraint with less than 3 time points.- Sampling a
LinearIOSystemreturns aLinearIOSystem(before it returned aStateSpacesystem). - Added an
add_unusedkeyword parameter tointerconnectthat allows unused inputs or outputs to be added as inputs or outputs of the interconnected system (useful for doing a "partial" interconnection). create_mpc_iosystemnow allows system and signal names to be specified via appropriate keywords.- Changed
typekeyword forcreate_statefbk_iosystemtocontroller_type(linear or nonlinear). Usingtypegenerates a deprecation warning. - Added
control_indicesandstate_indicestocreate_statefbk_iosystemto allow partial interconnection (eg, for inner/outer loop construction). - Updated unit tests, docstrings, and comments.
This was linked to issues
Jan 14, 2023| type : 'linear' or 'nonlinear', optional | ||
| controller_type : 'linear' or 'nonlinear', optional |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an API change. The milestone should be 0.10.0 (or 1.0.0) then.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I put in code to handle legacy calls, so type will still work. See line 732.
Rebased onto current main, in order to resolve conflicts due to #857
murrayrm
marked this pull request as ready for review
murrayrm
deleted the
cds112_fixes-12Jan2023
branch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters