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
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
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
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
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
def __init__(self, input_variable, output_variable): Block.__init__(self, [input_variable], [output_variable], 1, 0)
def __init__(self, inputs, output_variable, weights, offset=0): Block.__init__(self, inputs, [output_variable], 1, 0) self.weights = weights self.offset = offset
def __init__(self, input_variable, output_variable, function): Block.__init__(self, [input_variable], [output_variable], 1, 0) self.function = function
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
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