You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JiTCDDE stands for just-in-time compilation for delay differential equations (DDEs). It makes use of `the method described by Thompson and Shampine <http://dx.doi.org/10.1016/S0168-9274(00)00055-6>`_ which is based on the Bogacki–Shampine Runge–Kutta method.
2
-
JiTCDDE is designed in analogy to `JiTCODE <http://github.com/neurophysik/jitcode>`_:
3
-
It takes an iterable (or generator function) of `SymPy <http://www.sympy.org/>`_ expressions, translates them to C code, compiles them (and an integrator wrapped around them) on the fly, and allows you to operate this integrator from Python.
1
+
JiTCDDE stands for just-in-time compilation for delay differential equations (DDEs). It makes use of `the method described by Thompson and Shampine <https://doi.org/10.1016/S0168-9274(00)00055-6>`__ which is based on the Bogacki–Shampine Runge–Kutta method.
2
+
JiTCDDE is designed in analogy to `JiTCODE <https://github.com/neurophysik/jitcode>`__:
3
+
It takes an iterable (or generator function) of `SymPy <https://www.sympy.org/>`__ expressions, translates them to C code, compiles them (and an integrator wrapped around them) on the fly, and allows you to operate this integrator from Python.
4
4
If you want to integrate ordinary or stochastic differential equations, check out
5
-
`JiTCODE <http://github.com/neurophysik/jitcode>`_, or
* `Documentation <http://jitcdde.readthedocs.io>`_ – Read this to get started and for reference. Don’t miss that some topics are addressed in the `common JiTC*DE documentation <http://jitcde-common.readthedocs.io>`_.
8
+
* `Documentation <https://jitcdde.readthedocs.io>`__ – Read this to get started and for reference. Don’t miss that some topics are addressed in the `common JiTC*DE documentation <https://jitcde-common.readthedocs.io>`__.
9
9
10
-
* `Paper <https://doi.org/10.1063/1.5019320>`_ – Read this for the scientific background. Cite this (`BibTeX <https://raw.githubusercontent.com/neurophysik/jitcxde_common/master/citeme.bib>`_) if you wish to give credit or to shift blame.
10
+
* `Paper <https://doi.org/10.1063/1.5019320>`__ – Read this for the scientific background. Cite this (`BibTeX <https://raw.githubusercontent.com/neurophysik/jitcxde_common/master/citeme.bib>`__) if you wish to give credit or to shift blame.
11
11
12
-
* `Issue Tracker <http://github.com/neurophysik/jitcdde/issues>`_ – Please report any bugs here. Also feel free to ask for new features.
12
+
* `Issue Tracker <https://github.com/neurophysik/jitcdde/issues>`__ – Please report any bugs here. Also feel free to ask for new features.
13
13
14
-
* `Installation instructions <http://jitcde-common.readthedocs.io/#installation>`_. In most cases, ``pip3 install jitcdde`` or similar should do the job.
14
+
* `Installation instructions <https://jitcde-common.readthedocs.io/#installation>`__. In most cases, ``pip install jitcdde`` or similar should do the job.
15
15
16
16
This work was supported by the Volkswagen Foundation (Grant No. 88463).
Copy file name to clipboardExpand all lines: docs/index.rst
+25-25Lines changed: 25 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,13 +44,13 @@ This documentation assumes that the delay differential equation (DDE) you want t
44
44
The gist of Shampine’s and Thompson’s method [ST01]_ is this:
45
45
The differential equation is integrated adaptively with the Bogacki–Shampine pair [BS89]_, like an ODE.
46
46
After every successful integration step, the state and derivative of the integration (which is an automatic by-product) are stored.
47
-
Whenever the derivative :math:`(f)` is evaluated, the required past states :math:`\left ( y(t-τ_1), y(t-τ_2), … \right )` are obtained through piece-wise cubic `Hermite interpolation <http://en.wikipedia.org/wiki/Hermite_interpolation>`_, using previously stored pairs of state and derivative (“anchor”).
47
+
Whenever the derivative :math:`(f)` is evaluated, the required past states :math:`\left ( y(t-τ_1), y(t-τ_2), … \right )` are obtained through piece-wise cubic `Hermite interpolation <https://en.wikipedia.org/wiki/Hermite_interpolation>`__, using previously stored pairs of state and derivative (“anchor”).
48
48
In some extreme cases, they may also be extrapolated.
49
49
50
50
Note that unlike most other DDE software, JiTCDDE stores and accesses the initial past in exactly this way, i.e., as anchor points.
51
51
Thus, if you want to have maximum control, you have to initiate the past in exactly this way, i.e., you have to give at least two such anchor points (via `add_past_point`).
52
52
If you do not want or need this, there are utility functions available that automatically determine the anchors from a given function (`past_from_function`) or just set it to a fixed value (`constant_past`).
53
-
You can also use the `get_state` method to obtain a representation of the past that you can dissect and modify using `CubicHermiteSpline <https://chspy.readthedocs.io/en/latest/>`_.
53
+
You can also use the `get_state` method to obtain a representation of the past that you can dissect and modify using `CubicHermiteSpline <https://chspy.readthedocs.io/en/latest/>`__.
54
54
55
55
.. _example:
56
56
@@ -144,7 +144,7 @@ However, the error estimate is not accurate anymore as it does not take into acc
144
144
This should not be a problem if your delays change sufficiently slowly in comparison to your step size.
145
145
146
146
Note that if you want to make use of this, you must provide the maximum delay manually.
147
-
See `this file <https://github.com/neurophysik/jitcdde/blob/master/examples/state_dependent.py>`_ for an example.
147
+
See `this file <https://github.com/neurophysik/jitcdde/blob/master/examples/state_dependent.py>`__ for an example.
148
148
149
149
Multi-dimensional equations and networks
150
150
----------------------------------------
@@ -156,8 +156,8 @@ JiTCDDE is specifically designed to be able to handle large delay differential e
156
156
We give an example for a network on one-dimensional oscillators below.
157
157
As the caveats, tools, and tricks when doing this are the same as for JiTCODE; its documentation may be helpful to you, in particular the sections:
158
158
159
-
* `Handling very large differential equations <http://jitcode.readthedocs.io/en/latest/#handling-very-large-differential-equations>`_
160
-
* `A more complicated example <http://jitcode.readthedocs.io/en/latest/#module-SW_of_Roesslers>`_ (featuring multi-dimensional oscillators)
159
+
* `Handling very large differential equations <https://jitcde-common.readthedocs.io/en/latest/#networks-or-other-very-large-differential-equations>`__
160
+
* `A more complicated example <https://jitcode.readthedocs.io/en/latest/#module-SW_of_Roesslers>`__ (featuring multi-dimensional oscillators)
161
161
162
162
Example: Kuromato oscillators with distributed delays
@@ -202,7 +202,7 @@ Before you give up or report an issue, please follow the following protocol:
202
202
3. If the integration is not successful, try to locate the point where things go awry. This may be before you actually get an error message. Look for infinite values or not-a-numbers. Reduce the respective parameters that control the frequency of resizing, namely the `max_step` parameter of `step_on_discontinuities`, the `step` parameter of `integrate_blindly`, or the sampling rate of the regular integration.
203
203
4. Increase the number of computed Lyapunov exponents one at a time. Repeat Step 3 as needed. Be aware that once you are in the negative Lyapunov exponents, it may happen that the amplitude of the next exponent is orders of magnitude higher that of the preceding one – thus requiring a much more frequent rescaling to avoid numerical underflows.
204
204
205
-
As the Lyapunov vectors (separation functions) are quite difficult to interpret, they are not returned as of now (if you need them, please `make a feature request <http://github.com/neurophysik/jitcdde/issues>`_).
205
+
As the Lyapunov vectors (separation functions) are quite difficult to interpret, they are not returned as of now (if you need them, please `make a feature request <https://github.com/neurophysik/jitcdde/issues>`__).
206
206
There also two classes (`jitcdde_transversal_lyap` and `jitcdde_restricted_lyap`) that allows to calculate the largest transversal Lyapunov exponents to the synchronisation manifold and arbitrary hyperplanes, respectively.
207
207
See the `JiTCODE documentation`_ for an example on how to use the former and `the accompanying paper`_ for a mathematical background (and another example).
208
208
@@ -212,23 +212,23 @@ More Features and Examples
212
212
JiTCDDE has several more features for which there are no extensively documented examples, but that are pretty self-explanatory.
213
213
The following is a list of example scripts that may help you with specific problems:
214
214
215
-
* `Laminar Chaos <https://github.com/neurophysik/jitcdde/blob/master/examples/laminar_chaos.py>`_ and `State Dependent <https://github.com/neurophysik/jitcdde/blob/master/examples/state_dependent.py>`_ are examples employing **state-dependent delays**.
215
+
* `Laminar Chaos <https://github.com/neurophysik/jitcdde/blob/master/examples/laminar_chaos.py>`__ and `State Dependent <https://github.com/neurophysik/jitcdde/blob/master/examples/state_dependent.py>`__ are examples employing **state-dependent delays**.
216
216
217
-
* `Mackey–Glass with Jumps <https://github.com/neurophysik/jitcdde/blob/master/examples/mackey_glass_jump.py>`_ shows how to use the `jump` method to introduce discontinuities of the state.
217
+
* `Mackey–Glass with Jumps <https://github.com/neurophysik/jitcdde/blob/master/examples/mackey_glass_jump.py>`__ shows how to use the `jump` method to introduce discontinuities of the state.
218
218
219
-
* `Simple Neutral <https://github.com/neurophysik/jitcdde/blob/master/examples/simple_neutral.py>`_ and `Neutral <https://github.com/neurophysik/jitcdde/blob/master/examples/neutral.py>`_ show how to implement **neutral DDEs**. The latter additionally shows how to optimise a DDE with several delay terms with the same delay, making it considerably faster.
219
+
* `Simple Neutral <https://github.com/neurophysik/jitcdde/blob/master/examples/simple_neutral.py>`__ and `Neutral <https://github.com/neurophysik/jitcdde/blob/master/examples/neutral.py>`__ show how to implement **neutral DDEs**. The latter additionally shows how to optimise a DDE with several delay terms with the same delay, making it considerably faster.
220
220
221
-
* If you want to have **input or time-dependent parameters**, there are several options depending on the details of your problem, exemplified in `this toy problem <https://github.com/neurophysik/jitcdde/blob/master/examples/mackey_glass_parameter_jump.py>`_:
221
+
* If you want to have **input or time-dependent parameters**, there are several options depending on the details of your problem, exemplified in `this toy problem <https://github.com/neurophysik/jitcdde/blob/master/examples/mackey_glass_parameter_jump.py>`__:
222
222
223
-
* If you want a parameter to be a straightforward function of time, you can just implement this symbolically directly in the derivative. For an example, see the “regular implementation” `here <https://github.com/neurophysik/jitcdde/blob/master/examples/sunflower_callback.py>`_.
224
-
* If you want a parameter to change its value at a small number of time points (jumps), you can use the techniques outlined `here <https://jitcde-common.readthedocs.io/en/latest/#conditionals>`_, i.e., either use `jitcxde_common.conditional` to approximate a step function in time or change a control parameter at the desired time point (and then `adjust_diff`).
225
-
* For complex time dependencies, you can use `jitcdde_input <https://jitcdde.rtfd.io#input>`_
226
-
`This example <https://github.com/neurophysik/jitcdde/blob/master/examples/data_input.py>`_ demonstrates how to use this.
223
+
* If you want a parameter to be a straightforward function of time, you can just implement this symbolically directly in the derivative. For an example, see the “regular implementation” `here <https://github.com/neurophysik/jitcdde/blob/master/examples/sunflower_callback.py>`__.
224
+
* If you want a parameter to change its value at a small number of time points (jumps), you can use the techniques outlined `here <https://jitcde-common.readthedocs.io/en/latest/#conditionals>`__, i.e., either use `jitcxde_common.conditional` to approximate a step function in time or change a control parameter at the desired time point (and then `adjust_diff`).
225
+
* For complex time dependencies, you can use `jitcdde_input <https://jitcdde.rtfd.io#input>`__
226
+
`This example <https://github.com/neurophysik/jitcdde/blob/master/examples/data_input.py>`__ demonstrates how to use this.
227
227
* Finally, you can use a callback (see the next point).
228
228
229
-
* If you want to **call a Python function** within the derivative, use the `callback_functions` argument. `This example <https://github.com/neurophysik/jitcdde/blob/master/examples/sunflower_callback.py>`_ demonstrates how to use this.
229
+
* If you want to **call a Python function** within the derivative, use the `callback_functions` argument. `This example <https://github.com/neurophysik/jitcdde/blob/master/examples/sunflower_callback.py>`__ demonstrates how to use this.
230
230
231
-
* If you want to do some sort of **event detection**, the best way is to use `get_state`, and use the features of `CHSPy <https://chspy.readthedocs.io>`_ to determine the time of events as precisely as you need them. As the interpolant has the same error as the integration, you won’t gain a much better event location by integrating again at a finer step size. Particularly note the `solve`, `extrema`, and `truncate` methods of `CubicHermiteSpline`.
231
+
* If you want to do some sort of **event detection**, the best way is to use `get_state`, and use the features of `CHSPy <https://chspy.readthedocs.io>`__ to determine the time of events as precisely as you need them. As the interpolant has the same error as the integration, you won’t gain a much better event location by integrating again at a finer step size. Particularly note the `solve`, `extrema`, and `truncate` methods of `CubicHermiteSpline`.
.. [ST01] L.F. Shampine, S. Thompson: Solving DDEs in Matlab, Applied Numerical Mathematics 37, pp. 441–458 (2001), `10.1016/S0168-9274(00)00055-6 <http://dx.doi.org/10.1016/S0168-9274(00)00055-6>`_.
277
+
.. [ST01] L.F. Shampine, S. Thompson: Solving DDEs in Matlab, Applied Numerical Mathematics 37, pp. 441–458 (2001), `doi:10.1016/S0168-9274(00)00055-6 <https://doi.org/10.1016/S0168-9274(00)00055-6>`__.
278
278
279
-
.. [BS89] P. Bogacki, L.F. Shampine: A 3(2) pair of Runge–Kutta formulas, Applied Mathematics Letters 2, pp. 321–325 (1989), `10.1016/0893-9659(89)90079-7 <http://dx.doi.org/10.1016/0893-9659(89)90079-7>`_.
279
+
.. [BS89] P. Bogacki, L.F. Shampine: A 3(2) pair of Runge–Kutta formulas, Applied Mathematics Letters 2, pp. 321–325 (1989), `doi:10.1016/0893-9659(89)90079-7 <https://doi.org/10.1016/0893-9659(89)90079-7>`__.
280
280
281
-
.. [F82] J.D. Farmer: Chaotic attractors of an infinite-dimensional dynamical system, Physica D 4, pp. 366–393 (1982), `10.1016/0167-2789(82)90042-2 <http://dx.doi.org/10.1016/0167-2789(82)90042-2>`_.
281
+
.. [F82] J.D. Farmer: Chaotic attractors of an infinite-dimensional dynamical system, Physica D 4, pp. 366–393 (1982), `doi:10.1016/0167-2789(82)90042-2 <https://doi.org/10.1016/0167-2789(82)90042-2>`__.
282
282
283
-
.. [BGGS80] G. Benettin, L. Galgani, A. Giorgilli, and J.-M. Strelcyn: Lyapunov Characteristic Exponents for smooth dynamical systems and for Hamiltonian systems; A method for computing all of them. Meccanica 15, pp. 9–30 (1980), `10.1007/BF02128236 <http://dx.doi.org/10.1007/BF02128236>`_.
283
+
.. [BGGS80] G. Benettin, L. Galgani, A. Giorgilli, and J.-M. Strelcyn: Lyapunov Characteristic Exponents for smooth dynamical systems and for Hamiltonian systems; A method for computing all of them. Meccanica 15, pp. 9–30 (1980), `doi:10.1007/BF02128236 <https://doi.org/10.1007/BF02128236>`__.
0 commit comments