Dear all,
This is a question about best practices for NESTML. I would like to build in the equations block a Kernel, such as for instance:
"kernel inh_time_end = ((-0.00002*t*t)/(pow(tau,2.0)) + 0.0087*t/tau + 0.006)/tau"
, but modulated by the heaviside function H depending on 200 - t (i.e., H(200.0 ms -t)). To sum up, I would like to get the following kernel:
"kernel inh_time_end_modulated = H(200.0 ms -t)*((-0.00002*t*t)/(pow(tau,2.0)) + 0.0087*t/tau + 0.006)/tau"
There does not appear to be a direct implementation of the heaviside function H in nestml. I tried to build my own function to convert booleans to 1.0 or 0.0 in my NestML model, upon the condition "200.0 ms > t", and use that instead of the heaviside, but the model is really slow to build on my laptop. I tried other versions with if conditions in the update block, or ternary operators, but they all led to bugs. So, I am unsure of the correct practice to implement an heaviside-modulated polynomial kernel. If anyone has a good and fast solution to propose I would be very happy to learn about it !
Thank you very much, Kind regards, Jeanne BARTHELEMY