Main /
ModelDDEEditorHere is how to use of the ODE editor for the DDE: {$ y'(t) = - y(t-1) $} with constant pre-initial conditions y = 1 for t<0. Step 1: Declare your variables as usual Step 2: Enter the equations Here is the first difference with respect to ODEs. You will need past values of the state to enter the DDE. Just use these values as if the past state were a function of the independent variable. This function (y(t) in our example) is defined automatically by EJS whenever it detects you are defining a DDE (when you specify the delays - see below) and can be used also in other parts of your simulation, such as the view, for instance. But it is important to remember that the function is only correctly defined for past instants of time. You can also write preliminary code, if needed, choose your favorite solver algorithm, fine-tune its parameters, and add events as usual. Step 3: Add DDE specific information This is the most important step in correctly specifying a DDE. You need to click the Advanced button of the ODE editor and choose the DDE tab of the ODE parameters dialog. In it, you need to enter:
|