Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitffcc2a6

Browse files
committed
fix gh1161 by creating copy correctly
1 parentaa92b65 commitffcc2a6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎control/optimal.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -746,9 +746,9 @@ def _compute_states_inputs(self, coeffs):
746746
states=self.last_states
747747
else:
748748
states=self._simulate_states(self.x,inputs)
749-
self.last_x=self.x
750-
self.last_states=states
751-
self.last_coeffs=coeffs
749+
self.last_x=self.x.copy()# save initial state
750+
self.last_states=states# always a new object
751+
self.last_coeffs=coeffs.copy()# save coefficients
752752

753753
returnstates,inputs
754754

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp