René's URL Explorer Experiment


Title: update model_reduction to allow input/output selection + unstable warning (vs exception) by murrayrm · Pull Request #1074 · python-control/python-control · GitHub

Open Graph Title: update model_reduction to allow input/output selection + unstable warning (vs exception) by murrayrm · Pull Request #1074 · python-control/python-control

X Title: update model_reduction to allow input/output selection + unstable warning (vs exception) by murrayrm · Pull Request #1074 · python-control/python-control

Description: This PR updates the model_reduction function to add some additional functionality. From the docstring: This function produces a reduced-order model of a system by eliminating specified inputs, outputs, and/or states from the original system. The specific states, inputs, or outputs that are eliminated can be specified by either listing the states, inputs, or outputs to be eliminated or those to be kept. Specific updates: Changed the ELIM positional parameter to elim_states (positional or keyword). Added keep_states to allow specifying the list of states to keep instead of those to eliminate. Added elim_inputs, elim_outputs, keep_inputs, keep_outputs to allow selection of inputs and outputs. Specifications of states, inputs, and outputs can be done by a list of integers (original implementation) as well as slices or lists of signal names (new). In the case of eliminating states, inputs, or outputs from an unstable system, a warning is issued (versus an exception) and this warning can be suppressed using warn_unstable=False. Removed the copyright info from the top of modelsimp.py since we know just use the LICENSE file. Add unit tests and documentation updates. Cleaned up import order (isort -m2) and removed extraneous spaces. This PR was motivated by an example from FBS2e (see steering.py), where I wanted to extract the dynamics of a subsystem (and the original system had an eigenvalue at the origin). It is possible to accomplish the same result by using the old implementation (assuming the exception is changed to a warning) and then indexing the system directly to handle the inputs and outputs, but it seemed natural to include in a single function call.

Open Graph Description: This PR updates the model_reduction function to add some additional functionality. From the docstring: This function produces a reduced-order model of a system by eliminating specified inputs, ou...

X Description: This PR updates the model_reduction function to add some additional functionality. From the docstring: This function produces a reduced-order model of a system by eliminating specified inputs, ou...

Opengraph URL: https://github.com/python-control/python-control/pull/1074

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ff2fb048-adf3-e2ee-888d-962a2e7de251
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCBDC:3300CE:1312A2F:1B27902:697A391A
html-safe-noncec503afa9eacdc0ffcaafe164ca6186020f415baa442022b4296fa2f91d7d7ee6
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQkRDOjMzMDBDRToxMzEyQTJGOjFCMjc5MDI6Njk3QTM5MUEiLCJ2aXNpdG9yX2lkIjoiNTc4NDU4NTQ5MjE2Njc1MjUzOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacf09e626fe396bcae2d397b8aa63678a35ba8a5f63d05ee5cbac4b70ed6446956
hovercard-subject-tagpull_request:2216155026
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python-control/python-control/pull/1074/files
twitter:imagehttps://avatars.githubusercontent.com/u/293362?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/293362?s=400&v=4
og:image:altThis PR updates the model_reduction function to add some additional functionality. From the docstring: This function produces a reduced-order model of a system by eliminating specified inputs, ou...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneaf6de804ceb83ad30bb9b348cdeaccaa30cdcb566762d5e74e21e2bad88885d0
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python-control/python-control git https://github.com/python-control/python-control.git
octolytics-dimension-user_id2285872
octolytics-dimension-user_loginpython-control
octolytics-dimension-repository_id22791752
octolytics-dimension-repository_nwopython-control/python-control
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id22791752
octolytics-dimension-repository_network_root_nwopython-control/python-control
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2d980605f0959039ddebcbcf522b072508302977
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python-control/python-control/pull/1074/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-control%2Fpython-control%2Fpull%2F1074%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython-control%2Fpython-control%2Fpull%2F1074%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python-control%2Fpython-control
Reloadhttps://github.com/python-control/python-control/pull/1074/files
Reloadhttps://github.com/python-control/python-control/pull/1074/files
Reloadhttps://github.com/python-control/python-control/pull/1074/files
python-control https://github.com/python-control
python-controlhttps://github.com/python-control/python-control
Notifications https://github.com/login?return_to=%2Fpython-control%2Fpython-control
Fork 447 https://github.com/login?return_to=%2Fpython-control%2Fpython-control
Star 2k https://github.com/login?return_to=%2Fpython-control%2Fpython-control
Code https://github.com/python-control/python-control
Issues 87 https://github.com/python-control/python-control/issues
Pull requests 8 https://github.com/python-control/python-control/pulls
Discussions https://github.com/python-control/python-control/discussions
Actions https://github.com/python-control/python-control/actions
Projects 0 https://github.com/python-control/python-control/projects
Wiki https://github.com/python-control/python-control/wiki
Security 0 https://github.com/python-control/python-control/security
Insights https://github.com/python-control/python-control/pulse
Code https://github.com/python-control/python-control
Issues https://github.com/python-control/python-control/issues
Pull requests https://github.com/python-control/python-control/pulls
Discussions https://github.com/python-control/python-control/discussions
Actions https://github.com/python-control/python-control/actions
Projects https://github.com/python-control/python-control/projects
Wiki https://github.com/python-control/python-control/wiki
Security https://github.com/python-control/python-control/security
Insights https://github.com/python-control/python-control/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython-control%2Fpython-control%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython-control%2Fpython-control%2Fissues%2Fnew%2Fchoose
murrayrmhttps://github.com/murrayrm
python-control:mainhttps://github.com/python-control/python-control/tree/main
murrayrm:modred_unstable-28Nov2024https://github.com/murrayrm/python-control/tree/modred_unstable-28Nov2024
Conversation 11 https://github.com/python-control/python-control/pull/1074
Commits 8 https://github.com/python-control/python-control/pull/1074/commits
Checks 13 https://github.com/python-control/python-control/pull/1074/checks
Files changed https://github.com/python-control/python-control/pull/1074/files
Please reload this pagehttps://github.com/python-control/python-control/pull/1074/files
update model_reduction to allow input/output selection + unstable warning (vs exception) https://github.com/python-control/python-control/pull/1074/files#top
Show all changes 8 commits https://github.com/python-control/python-control/pull/1074/files
aad5502 allow state elimination on unstable systems with warning murrayrm Nov 29, 2024 https://github.com/python-control/python-control/pull/1074/commits/aad5502925d408665969bcd4ae98ee13e601976d
e6824d7 update unit tests murrayrm Nov 29, 2024 https://github.com/python-control/python-control/pull/1074/commits/e6824d79f1d2f5a7acf6a552bfb88892f1096d45
77b25d5 initial refactoring of model_reduction (no changes in functionality) murrayrm Dec 2, 2024 https://github.com/python-control/python-control/pull/1074/commits/77b25d58fd0cbe1644303f5a7d7e0774f65bf614
ae43212 add input/output removal + unit tests murrayrm Dec 3, 2024 https://github.com/python-control/python-control/pull/1074/commits/ae43212b8f7e60c6bcf51f113c85edf2f4f62ad4
310798e update documentation for basic functionality murrayrm Dec 3, 2024 https://github.com/python-control/python-control/pull/1074/commits/310798e63c80d0121d490430135601925fcf6960
b96a039 add slice processing murrayrm Dec 3, 2024 https://github.com/python-control/python-control/pull/1074/commits/b96a0392d6d8a21425aad9ff736cb0ba58cf3ad1
412ef97 add signal name processing murrayrm Dec 3, 2024 https://github.com/python-control/python-control/pull/1074/commits/412ef9754d033b4fb75589c47b9411475663604f
eff6c40 updates to address @slivingston review comments murrayrm Dec 7, 2024 https://github.com/python-control/python-control/pull/1074/commits/eff6c40d46b6909314b3280c65a164cbea36e7f4
Clear filters https://github.com/python-control/python-control/pull/1074/files
Please reload this pagehttps://github.com/python-control/python-control/pull/1074/files
Please reload this pagehttps://github.com/python-control/python-control/pull/1074/files
canonical.py https://github.com/python-control/python-control/pull/1074/files#diff-7ab606b9c3273578a728d8e003216b33270cdcb851e70beb6460bc4fd3afb7d7
modelsimp.py https://github.com/python-control/python-control/pull/1074/files#diff-47ef25709027cfe03ce27958643e45485de7bf664578a305643715bdceba9b78
docstrings_test.py https://github.com/python-control/python-control/pull/1074/files#diff-f098dc1536e0667ba32b96b805f95b4ee82c1c1c81e0547799106131b713028f
modelsimp_test.py https://github.com/python-control/python-control/pull/1074/files#diff-f5ee5e873243b37690868ede3ea4a02a0e4e6b5670095107af0415f40cd86b65
control/canonical.pyhttps://github.com/python-control/python-control/pull/1074/files#diff-7ab606b9c3273578a728d8e003216b33270cdcb851e70beb6460bc4fd3afb7d7
View file https://github.com/murrayrm/python-control/blob/eff6c40d46b6909314b3280c65a164cbea36e7f4/control/canonical.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python-control/python-control/pull/1074/{{ revealButtonHref }}
https://github.com/python-control/python-control/pull/1074/files#diff-7ab606b9c3273578a728d8e003216b33270cdcb851e70beb6460bc4fd3afb7d7
https://github.com/python-control/python-control/pull/1074/files#diff-7ab606b9c3273578a728d8e003216b33270cdcb851e70beb6460bc4fd3afb7d7
Please reload this pagehttps://github.com/python-control/python-control/pull/1074/files
Please reload this pagehttps://github.com/python-control/python-control/pull/1074/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.