Title: print a connection table for interconnected systems by sawyerbfuller · Pull Request #925 · python-control/python-control · GitHub
Open Graph Title: print a connection table for interconnected systems by sawyerbfuller · Pull Request #925 · python-control/python-control
X Title: print a connection table for interconnected systems by sawyerbfuller · Pull Request #925 · python-control/python-control
Description: This PR prints out a table of each signal name, where it comes from (source), and where it goes (destination). It is intended primarily for systems that have been connected implicitly, because in that case all of the signal names have been defined. It doesn't really work for systems that have been connected explicitly, because their signal names may not be unique It was is inspired by a similar table printout in bdsim and the need to have a means to debug interconnections of many systems. Example: >>> P = ct.ss(1,1,1,0, inputs='u', outputs='y') >>> C = ct.tf(10, [.1, 1], inputs='e', outputs='u') >>> L = ct.interconnect([C, P], inputs='e', outputs='y') >>> L.connection_table() signal | source | destination -------------------------------------------------------------- e | input | system 0 u | system 0 | system 1 y | system 1 | output (edit: in the code above, signal_table has been changed to connection_table) Remarks: it does not list systems by their name by default because the because default system names (e.g. sys[17]) are not very descriptive or helpful when you're connecting systems implicitly with signal names. instead the table just references them by the order they appear in the interconnect list, with an option to print names instead. it would be convenient if instead systems were listed by the name of the variable referencing them, e.g. if the first row looked like e | input | C , but this is not straightforward in Python because it is possible to have many variable names pointing to the same object in memory. Maybe this could be achieved using a change to the library that automatically populates the 'name' field in new systems with the variable name it is first assigned to, but I am not sure if this is possible or Pythonic this PR also includes a couple of docstring cleanups to remove references to the namedio class
Open Graph Description: This PR prints out a table of each signal name, where it comes from (source), and where it goes (destination). It is intended primarily for systems that have been connected implicitly, because in t...
X Description: This PR prints out a table of each signal name, where it comes from (source), and where it goes (destination). It is intended primarily for systems that have been connected implicitly, because in t...
Opengraph URL: https://github.com/python-control/python-control/pull/925
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:de20ffb6-9bd2-e727-8065-623c7e729303 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | E616:3A47D7:12DC5B3:1AFA682:697A38C8 |
| html-safe-nonce | 9f4d022bb35c206ddf553636f569f7432e171325a45169fec7265f4904a2373d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNjE2OjNBNDdENzoxMkRDNUIzOjFBRkE2ODI6Njk3QTM4QzgiLCJ2aXNpdG9yX2lkIjoiNjc5ODk1MDg5MjI0MzEzODc2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 598cc4801fc42cf61156102c0ecad18c4884213b0364e0af4f414aef725043c8 |
| hovercard-subject-tag | pull_request:1447399020 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-control/python-control/pull/925/checks |
| twitter:image | https://avatars.githubusercontent.com/u/58706249?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/58706249?s=400&v=4 |
| og:image:alt | This PR prints out a table of each signal name, where it comes from (source), and where it goes (destination). It is intended primarily for systems that have been connected implicitly, because in t... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | af6de804ceb83ad30bb9b348cdeaccaa30cdcb566762d5e74e21e2bad88885d0 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-control/python-control git https://github.com/python-control/python-control.git |
| octolytics-dimension-user_id | 2285872 |
| octolytics-dimension-user_login | python-control |
| octolytics-dimension-repository_id | 22791752 |
| octolytics-dimension-repository_nwo | python-control/python-control |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 22791752 |
| octolytics-dimension-repository_network_root_nwo | python-control/python-control |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2d980605f0959039ddebcbcf522b072508302977 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width