@@ -626,7 +626,7 @@ def final_point_eval(x, u):
626
626
('collocation' , 5 , 'u0' , 'endpoint' ),
627
627
('collocation' , 5 , 'input' , 'openloop' ),# open loop sim fails
628
628
('collocation' , 10 , 'input' , None ),
629
- ('collocation' , 10 , 'u0' , None ), # from documenentation
629
+ ('collocation' , 10 , 'u0' , None ), # from documentation
630
630
('collocation' , 10 , 'state' , None ),
631
631
('collocation' , 20 , 'state' , None ),
632
632
])
@@ -716,9 +716,11 @@ def vehicle_output(t, x, u, params):
716
716
717
717
# Make sure we started and stopped at the right spot
718
718
if fail == 'endpoint' :
719
+ assert not np .allclose (result .states [:, - 1 ], xf , rtol = 1e-4 )
719
720
pytest .xfail ("optimization does not converge to endpoint" )
720
721
else :
721
722
np .testing .assert_almost_equal (result .states [:, 0 ], x0 , decimal = 4 )
723
+ np .testing .assert_almost_equal (result .states [:, - 1 ], xf , decimal = 2 )
722
724
723
725
# Simulate the trajectory to make sure it looks OK
724
726
resp = ct .input_output_response (
0 commit comments