Bug report #242
-
class Delay in discrete.pyWhen there is multiple delay time, the class Delay cannot work well. I added a variable In the discrete.py, line 1261 - 1266 if dae_t - self.t[0] > self.delay:
t_interp = dae_t - self.delay
idx = np.argmax(self.t >= t_interp) - 1
v_interp = interp_n2(t_interp,
self.t[idx:idx+2],
self._v_mem[:, idx:idx + 2]) The Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
This seems to be a known issue. See the doc string in Delay: self.delay needs to be a scalar. I think you can implement a DelayVec for the desired function. You can use for loops in check_var or check_eq and design suitable data structure. To store the values within the delay window, using a dictionary with the keys being the idxes and the values being a list of values can be a good choice. |
Beta Was this translation helpful? Give feedback.
This seems to be a known issue. See the doc string in Delay: self.delay needs to be a scalar.
I think you can implement a DelayVec for the desired function. You can use for loops in check_var or check_eq and design suitable data structure. To store the values within the delay window, using a dictionary with the keys being the idxes and the values being a list of values can be a good choice.