Skip to content

Commit

Permalink
Merge pull request #774 from hyumo/main
Browse files Browse the repository at this point in the history
Move sys._update_params(params) before TimeResponseData return when nstate == 0
  • Loading branch information
bnavigator committed Oct 9, 2022
2 parents f758725 + 8aa271d commit 61ef12b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions control/iosys.py
Expand Up @@ -1779,6 +1779,9 @@ def input_output_response(
else:
noutputs = sys.noutputs

# Update the parameter values
sys._update_params(params)

#
# Define a function to evaluate the input at an arbitrary time
#
Expand Down Expand Up @@ -1816,9 +1819,6 @@ def ufun(t):
output_labels=sys.output_index, input_labels=sys.input_index,
transpose=transpose, return_x=return_x, squeeze=squeeze)

# Update the parameter values
sys._update_params(params)

# Create a lambda function for the right hand side
def ivp_rhs(t, x):
return sys._rhs(t, x, ufun(t))
Expand Down

0 comments on commit 61ef12b

Please sign in to comment.