@@ -206,7 +206,7 @@ AbstractSystem(eqs, ...; discrete_events = [condition1 => affect1, condition2 =>
206
206
where conditions are symbolic expressions that should evaluate to ` true ` when an
207
207
individual affect should be executed. Here ` affect1 ` and ` affect2 ` are each
208
208
either a vector of one or more symbolic equations, or a functional affect, just
209
- as for continuous events. As before for any * one* event the symbolic affect
209
+ as for continuous events. As before, for any * one* event the symbolic affect
210
210
equations can either all change states (i.e. variables) or all change
211
211
parameters, but one can not currently mix state and parameter changes within one
212
212
individual event.
@@ -235,7 +235,7 @@ plot(sol)
235
235
Notice, with generic discrete events that we want to occur at one or more fixed
236
236
times, we need to also set the ` tstops ` keyword argument to ` solve ` to ensure
237
237
the integrator stops at that time. In the next section we show how one can
238
- bypass this needed by using a preset-time callback.
238
+ avoid this by using a preset-time callback.
239
239
240
240
Note that more general logical expressions can be built, for example, suppose we
241
241
want the event to occur at that time only if the solution is smaller than 50% of
@@ -250,7 +250,9 @@ sol = solve(oprob, Tsit5(); tstops = 10.0)
250
250
plot(sol)
251
251
```
252
252
Since the solution is * not* smaller than half its steady-state value at the
253
- event time, the event condition now returns false.
253
+ event time, the event condition now returns false. Here we used logical and,
254
+ ` & ` , instead of the short-circuiting logical and, ` && ` , as currently the latter
255
+ can not be used within symbolic expressions.
254
256
255
257
Let's now also add a drug at time ` tkill ` that turns off production of new
256
258
cells, modeled by setting ` α = 0.0 `
0 commit comments