Merge pull request #798 from adswid/fix-find_eqpt · python-control/python-control@23a7791

@@ -822,6 +822,17 @@ def test_find_eqpts(self, tsys):

822822

np.testing.assert_array_almost_equal(

823823

nlsys_full._rhs(0, xeq, ueq)[-4:], np.zeros((4,)), decimal=5)

824824825+

# The same test as previous, but now all constraints are in the state vector

826+

nlsys_full = ios.NonlinearIOSystem(pvtol_full, None)

827+

xeq, ueq, result = ios.find_eqpt(

828+

nlsys_full, [0, 0, 0.1, 0.1, 0, 0], [0.01, 4*9.8],

829+

idx=[2, 3, 4, 5], ix=[0, 1, 2, 3], return_result=True)

830+

assert result.success

831+

np.testing.assert_array_almost_equal(

832+

nlsys_full._out(0, xeq, ueq)[[2, 3]], [0.1, 0.1], decimal=5)

833+

np.testing.assert_array_almost_equal(

834+

nlsys_full._rhs(0, xeq, ueq)[-4:], np.zeros((4,)), decimal=5)

835+825836

# Fix one input and vary the other

826837

nlsys_full = ios.NonlinearIOSystem(pvtol_full, None)

827838

xeq, ueq, result = ios.find_eqpt(