Skip to content

Change name of converted LinearIOSystems #903

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jun 6, 2023

Conversation

murrayrm
Copy link
Member

@murrayrm murrayrm commented Jun 4, 2023

This PR implements that change suggested in PR #884 and issue #901 regarding changing the system name when a transfer function is converted to a state space system and vice versa. Converted systems now have "$converted" appended to the system name. This is only done when you do an explicit conversation via ss or tf. Implicit conversions from a TransferFunction to a StateSpace object, for example as part of using interconnect use the original name.

In addition, prefix/suffix processing has been moved into the NamedIOSystem class, under _copy_names and _name_or_default methods.

@murrayrm murrayrm requested a review from sawyerbfuller June 4, 2023 15:48
@murrayrm murrayrm linked an issue Jun 4, 2023 that may be closed by this pull request
@coveralls
Copy link

Coverage Status

coverage: 94.628% (+0.005%) from 94.623% when pulling d32a3db on murrayrm:namedio-03Jun2023 into 184d83d on python-control:main.

Copy link
Contributor

@sawyerbfuller sawyerbfuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new method, _copy_names is something I have needed on a few different occasions and will put to use. This looks like a good solution.

@murrayrm murrayrm merged commit 3435304 into python-control:main Jun 6, 2023
@murrayrm murrayrm added this to the 0.9.4 milestone Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add rename system method to NamedIOSystems
3 participants