GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — DLQR and DLQE by sawyerbfuller · Pull Request #670 · python-control/python-control Conversation
|
|
Any indication, why you can't have Slycot on your M1? No conda packages? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Not sure. conda has been spending a lot of time "solving" the environment and then not succeeding (I don't remember the error message) when I try to install slycot with conda-forge. Will try again |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| @slycotonly | ||
| def test_care_antistabilizing(self, matarrayin): | ||
| """Test anti-stabilizing feedbacks, continuous""" |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
How about instead of duplicating code lines, you parameterize test_care and test_dare with something like
@pytest.mark.parametrize( "stabilizing", [True, pytest.param(False, marks=slycotonly), ] def test_care(self, matarrayin, stabilizing): ... X, L, G = care(A, B, Q, R, S, E, stabilizing=stabilizing) sgn = {True: -1, False: 1}[stabilizing] assert np.all((sgn * np.real(L)) > 0)
?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
thanks for the suggestion & code sketch. done
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| if not stabilizing: | ||
| return care_slycot(A, B, Q, R, S, E, stabilizing) | ||
| else: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This always favors the SciPy version over Slycot for stabilizing=True. I guess the SLICOT routine should be more efficient than calling 3 solvers for X, G, L.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Might be nicer to implement a method keyword as suggested in #255.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I guess the significant number of uncovered lines as reported by coveralls comes from this change.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
One of my grad students actually encountered that bug with slycot’s dare. I’ll see if I can find the bug. Ok if we leave adding a method keyword to a different PR?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I'm would be okay with deferring the method keyword to a later PR.
But I don't like leaving code in the repo which is essentially untested or disabled.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| raise ControlArgument("Q must be a symmetric matrix.") | ||
| raise ControlDimension("Q must be a symmetric matrix.") |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
That's not a dimension error. ControlDimension would have been raised above.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
True. I was trying to make it so both slycot and scipy versions raised the same kind of error (ValueError) rather than different types (ControlArgument is a TypeError), so that we could run the same test on both. win-win solution: I'll just change that to a ValueError because I think it can be argued that being non-symmetric is more of a value error than a type error.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Coverage increased (+0.1%) to 93.655% when pulling 0d4ff4c on sawyerbfuller:dlqr2 into 8356044 on python-control:master. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Marked this as ready for a review to merge. Still working on getting slycot working on my mac (reinstall anaconda didn't do it) so I think a PR that adds a method keyword will have to wait until I get that resolved. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Some (minor) overlapping changes in #673, which allows the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@murrayrm I like the idea of "overloading" Happy to rebase this one on top of #673, or vice versa, but it may be a few days before I have time to do anything on it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@sawyerbfuller FYI, if you rebase this, you might want to wait until #683 is merged since that has a lot of relevant changes in both |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…ug in non-slycot care. lqr, lqe, dlqr, dlqe now get tested without slycot.
…when arrays are not of the correct dimension
There was an error while loading. Please reload this page.
|
Rebased on latest master. A couple of other things we could do before merging:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@murrayrm thanks for moving this one toward the finish line. One remark in regards to a change on line 280 in The question is, what if |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Oops. Reverted. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Discrete Time LQR Option
There was an error while loading. Please reload this page.