neurophysik / jitcdde

Just-in-time compilation for delay differential equations
Other
56 stars 14 forks source link

Parameter jump example to adress #46 #47

Closed mwappner closed 2 years ago

mwappner commented 2 years ago

In #46 we discussed adding an example that implements all the different ways we could come up with to make a parameter have a jump at a given time point during integration. I've done

  1. Two separate integrations
  2. Use control parameters
  3. Use input
  4. Use conditional
  5. Use callbacks

I've also added a line to the docu pointing to this example, but didn't write a full documentation section, i don't think it fits there. The code is decently documented, but we can always document more, of course.

What I'm still missing is comments on the different methods: when to prefer one over another? For instance, I'd never recomend 1 over 2 since they are basically the same thing, but one of them requires twice as much compilation. I read (from you) that callbacks tend to be slow, so I don't know when to recommend them over input or conditional. And I have no idea how those two compare to one another and to 2. Of course, for this toy example, any of these choices would be good enough, but having an expert comment to orient newcomers (and to orient me as well) would be useful. What advantages and limitations may each example have?

Wrzlprmft commented 2 years ago

Thank you for your work. Sorry that my reply took so long. It came at an inopportune moment and then slipped through all the cracks of my system.

Anyway, I changed a few things:

Please double-check everything. Then we can merge.