Merge pull request #826 from murrayrm/smallfixes-04Aug2022 · python-control/python-control@49b0077
@@ -626,7 +626,7 @@ def final_point_eval(x, u):
626626 ('collocation', 5, 'u0', 'endpoint'),
627627 ('collocation', 5, 'input', 'openloop'),# open loop sim fails
628628 ('collocation', 10, 'input', None),
629- ('collocation', 10, 'u0', None), # from documenentation
629+ ('collocation', 10, 'u0', None), # from documentation
630630 ('collocation', 10, 'state', None),
631631 ('collocation', 20, 'state', None),
632632 ])
@@ -716,9 +716,11 @@ def vehicle_output(t, x, u, params):
716716717717# Make sure we started and stopped at the right spot
718718if fail == 'endpoint':
719+assert not np.allclose(result.states[:, -1], xf, rtol=1e-4)
719720pytest.xfail("optimization does not converge to endpoint")
720721else:
721722np.testing.assert_almost_equal(result.states[:, 0], x0, decimal=4)
723+np.testing.assert_almost_equal(result.states[:, -1], xf, decimal=2)
722724723725# Simulate the trajectory to make sure it looks OK
724726resp = ct.input_output_response(