@@ -357,7 +357,7 @@ def _update_params(self, params, warning=False):
357357 if warning :
358358 warn ("Parameters passed to InputOutputSystem ignored." )
359359
360- def _rhs (self , t , x , u , params = {} ):
360+ def _rhs (self , t , x , u ):
361361 """Evaluate right hand side of a differential or difference equation.
362362
363363 Private function used to compute the right hand side of an
@@ -369,7 +369,7 @@ def _rhs(self, t, x, u, params={}):
369369 NotImplemented ("Evaluation not implemented for system of type " ,
370370 type (self ))
371371
372- def dynamics (self , t , x , u ):
372+ def dynamics (self , t , x , u , params = {} ):
373373 """Compute the dynamics of a differential or difference equation.
374374
375375 Given time `t`, input `u` and state `x`, returns the value of the
@@ -400,9 +400,10 @@ def dynamics(self, t, x, u):
400400 -------
401401 dx/dt or x[t+dt] : ndarray
402402 """
403+ self ._update_params (params )
403404 return self ._rhs (t , x , u )
404405
405- def _out (self , t , x , u , params = {} ):
406+ def _out (self , t , x , u ):
406407 """Evaluate the output of a system at a given state, input, and time
407408
408409 Private function used to compute the output of of an input/output
@@ -414,7 +415,7 @@ def _out(self, t, x, u, params={}):
414415 # If no output function was defined in subclass, return state
415416 return x
416417
417- def output (self , t , x , u ):
418+ def output (self , t , x , u , params = {} ):
418419 """Compute the output of the system
419420
420421 Given time `t`, input `u` and state `x`, returns the output of the
@@ -437,6 +438,7 @@ def output(self, t, x, u):
437438 -------
438439 y : ndarray
439440 """
441+ self ._update_params (params )
440442 return self ._out (t , x , u )
441443
442444 def feedback (self , other = 1 , sign = - 1 , params = {}):
@@ -2248,7 +2250,7 @@ def ss(*args, **kwargs):
22482250 Convert a linear system into space system form. Always creates a
22492251 new system, even if sys is already a state space system.
22502252
2251- ``ss(updfcn, outfucn )``
2253+ ``ss(updfcn, outfcn )``
22522254 Create a nonlinear input/output system with update function ``updfcn``
22532255 and output function ``outfcn``. See :class:`NonlinearIOSystem` for
22542256 more information.
0 commit comments