- added initial for filling Delay line

- added gain parameter for Pot sim
- from state change to heat init model temp with plant temp
- updated config template
This commit is contained in:
jens
2021-10-11 19:54:03 +02:00
parent 20b0363e26
commit ff90c6d90c
5 changed files with 26 additions and 13 deletions
+5 -2
View File
@@ -3,11 +3,14 @@ import numpy as np
class Delay:
def __init__(self, dt, delay, ic):
nd = int(delay/dt + 0.5)
self.delay_line = np.ones(nd+1)*ic
self.nd = int(delay/dt + 0.5)
self.delay_line = np.ones(self.nd+1)*ic
self.ri = 0
self.wi = 0
def initial(self, ic):
self.delay_line = np.ones(self.nd+1)*ic
def put(self, data):
self.delay_line[self.wi] = data
self.wi += 1