Esempio n. 1
0
 def __init__(self, input_variable, output_variable, a, b):
     Block.__init__(self, [input_variable], [output_variable], len(a),
                    len(b) - 1)
     #        self.AddInput(input_variable)
     #        self.AddOutput(output_variable)
     self.a = a
     self.b = b
     self._M = {}  # Output matrices stored for differents time steps
Esempio n. 2
0
    def __init__(self, input_variable, output_variable, function):
        self.list_as_input = isinstance(input_variable, list)

        if self.list_as_input:
            Block.__init__(self, input_variable, [output_variable], 1, 0)
        else:
            Block.__init__(self, [input_variable], [output_variable], 1, 0)

        self.function = function
Esempio n. 3
0
 def __init__(self,
              input_variable,
              speed_variable,
              output_variable,
              max_value,
              tolerance=0):
     Block.__init__(self, [input_variable, speed_variable],
                    [output_variable], 1, 0)
     self.max_value = max_value
     self.tolerance = tolerance
Esempio n. 4
0
 def __init__(self,
              external_force,
              speed_variable,
              value_variable,
              output_variable,
              tolerance=0):
     Block.__init__(self, [external_force, speed_variable, value_variable],
                    [output_variable], 1, 0)
     #        self.max_value=max_value
     self.tolerance = tolerance
Esempio n. 5
0
 def __init__(self, input_variable, output_variable, min_value, max_value):
     Block.__init__(self, [input_variable], [output_variable], 1, 0)
     self.min_value = min_value
     self.max_value = max_value
Esempio n. 6
0
 def __init__(self, input_variable, output_variable):
     Block.__init__(self, [input_variable], [output_variable], 1, 0)
Esempio n. 7
0
 def __init__(self, inputs, output_variable, weights, offset=0):
     Block.__init__(self, inputs, [output_variable], 1, 0)
     self.weights = weights
     self.offset = offset
Esempio n. 8
0
 def __init__(self, input_variable, output_variable, function):
     Block.__init__(self, [input_variable], [output_variable], 1, 0)
     self.function = function
Esempio n. 9
0
 def __init__(self, input_variable, output_variable, value, offset=0):
     Block.__init__(self, [input_variable], [output_variable], 1, 0)
     self.value = value
     self.offset = offset
Esempio n. 10
0
 def __init__(self, input_variable, output_variable, delay):
     Block.__init__(self, [input_variable], [output_variable], 1, 0)
     self.delay = delay
     if delay < 0:
         raise ValueError