@@ -181,7 +181,7 @@ def __call__(sys, u, params=None, squeeze=None):
181181
182182 """
183183# Make sure the call makes sense
184- if not sys ._isstatic () :
184+ if sys .nstates != 0 :
185185raise TypeError (
186186"function evaluation is only supported for static "
187187"input/output systems" )
@@ -199,7 +199,7 @@ def __call__(sys, u, params=None, squeeze=None):
199199def __mul__ (self ,other ):
200200"""Multiply two input/output systems (series interconnection)"""
201201# Convert 'other' to an I/O system if needed
202- other = _convert_static_iosystem (other )
202+ other = _convert_to_iosystem (other )
203203if not isinstance (other ,InputOutputSystem ):
204204return NotImplemented
205205
@@ -231,7 +231,7 @@ def __mul__(self, other):
231231def __rmul__ (self ,other ):
232232"""Pre-multiply an input/output systems by a scalar/matrix"""
233233# Convert other to an I/O system if needed
234- other = _convert_static_iosystem (other )
234+ other = _convert_to_iosystem (other )
235235if not isinstance (other ,InputOutputSystem ):
236236return NotImplemented
237237
@@ -263,7 +263,7 @@ def __rmul__(self, other):
263263def __add__ (self ,other ):
264264"""Add two input/output systems (parallel interconnection)"""
265265# Convert other to an I/O system if needed
266- other = _convert_static_iosystem (other )
266+ other = _convert_to_iosystem (other )
267267if not isinstance (other ,InputOutputSystem ):
268268return NotImplemented
269269
@@ -284,7 +284,7 @@ def __add__(self, other):
284284def __radd__ (self ,other ):
285285"""Parallel addition of input/output system to a compatible object."""
286286# Convert other to an I/O system if needed
287- other = _convert_static_iosystem (other )
287+ other = _convert_to_iosystem (other )
288288if not isinstance (other ,InputOutputSystem ):
289289return NotImplemented
290290
@@ -305,7 +305,7 @@ def __radd__(self, other):
305305def __sub__ (self ,other ):
306306"""Subtract two input/output systems (parallel interconnection)"""
307307# Convert other to an I/O system if needed
308- other = _convert_static_iosystem (other )
308+ other = _convert_to_iosystem (other )
309309if not isinstance (other ,InputOutputSystem ):
310310return NotImplemented
311311
@@ -329,7 +329,7 @@ def __sub__(self, other):
329329def __rsub__ (self ,other ):
330330"""Parallel subtraction of I/O system to a compatible object."""
331331# Convert other to an I/O system if needed
332- other = _convert_static_iosystem (other )
332+ other = _convert_to_iosystem (other )
333333if not isinstance (other ,InputOutputSystem ):
334334return NotImplemented
335335return other - self
@@ -355,6 +355,10 @@ def __truediv__(self, other):
355355else :
356356return NotImplemented
357357
358+ # Determine if a system is static (memoryless)
359+ def _isstatic (self ):
360+ return self .nstates == 0
361+
358362def _update_params (self ,params ):
359363# Update the current parameter values
360364self ._current_params = self .params .copy ()
@@ -484,7 +488,7 @@ def feedback(self, other=1, sign=-1, params=None):
484488
485489 """
486490# Convert sys2 to an I/O system if needed
487- other = _convert_static_iosystem (other )
491+ other = _convert_to_iosystem (other )
488492
489493# Make sure systems can be interconnected
490494if self .noutputs != other .ninputs or other .noutputs != self .ninputs :
@@ -932,6 +936,7 @@ def _out(self, t, x, u):
932936# Make the full set of subsystem outputs to system output
933937return self .output_map @ylist
934938
939+ # Find steady state (static) inputs and outputs
935940def _compute_static_io (self ,t ,x ,u ):
936941# Figure out the total number of inputs and outputs
937942 (ninputs ,noutputs )= self .connect_map .shape
@@ -1711,8 +1716,8 @@ def ufun(t):
17111716dt = (t - T [idx - 1 ])/ (T [idx ]- T [idx - 1 ])
17121717return U [...,idx - 1 ]* (1. - dt )+ U [...,idx ]* dt
17131718
1714- # Check to make sure this is not a static function
1715- if nstates == 0 :# No states => map input to output
1719+ # Check to make suresee if this is a static function
1720+ if sys . nstates == 0 :
17161721# Make sure the user gave a time vector for evaluation (or 'T')
17171722if t_eval is None :
17181723# User overrode t_eval with None, but didn't give us the times...
@@ -2924,8 +2929,8 @@ def _process_vector_argument(arg, name, size):
29242929return val ,nelem
29252930
29262931
2927- # Utility function to create an I/O system froma static gain
2928- def _convert_static_iosystem (sys ):
2932+ # Utility function to create an I/O system( fromnumber or array)
2933+ def _convert_to_iosystem (sys ):
29292934# If we were given an I/O system, do nothing
29302935if isinstance (sys ,InputOutputSystem ):
29312936return sys