def setUp(self) -> None: self.n = 5 # number of input values to delay self.step = 2 # steps of delay self.time = 1.0 # delay period in second self.data = DummyValue(0) self.data.v = np.zeros(self.n) self.dstep = Delay(u=self.data, mode='step', delay=self.step) self.dstep.list2array(self.n) self.dtime = Delay(u=self.data, mode='time', delay=self.time) self.dtime.list2array(self.n) self.avg = Average(u=self.data, mode='step', delay=1) self.avg.list2array(self.n) self.v = self.dstep.v self.vt = self.dtime.v self.va = self.avg.v self.n_forward = 5 self.tstep = 0.2 self.dae_t = 0 self.k = 0.2
def setUp(self) -> None: self.n = 5 self.u1 = DummyValue(0) self.u1.v = np.zeros(self.n) self.u2 = Algeb(tex_name='u2') self.u2.v = np.array([-2, -1, 0, 1, 2])
def setUp(self) -> None: self.n = 5 self.data = DummyValue(0) self.data.v = np.zeros(self.n) self.der = Derivative(u=self.data) self.der.list2array(self.n) self.v = self.der.v self.n_forward = 10 self.k = 0.2 self.t_step = 0.1 self.dae_t = 0
def setUp(self) -> None: self.list = DummyValue(0) self.list.v = [0, 0, None, 2, 5.] self.array = DummyValue(0) self.array.v = np.array(self.list.v)
def setUp(self) -> None: self.p1 = DummyValue(0) self.p1.v = np.array([2, 4.5, 3, 8]) self.p2 = DummyValue(0) self.p2.v = np.array([1, 2., 3, 1.0])