Skip to content

Commit 2818750

Browse files
committed
tweaks
1 parent 1483b5c commit 2818750

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/src/basics/Events.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ AbstractSystem(eqs, ...; discrete_events = [condition1 => affect1, condition2 =>
206206
where conditions are symbolic expressions that should evaluate to `true` when an
207207
individual affect should be executed. Here `affect1` and `affect2` are each
208208
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
210210
equations can either all change states (i.e. variables) or all change
211211
parameters, but one can not currently mix state and parameter changes within one
212212
individual event.
@@ -235,7 +235,7 @@ plot(sol)
235235
Notice, with generic discrete events that we want to occur at one or more fixed
236236
times, we need to also set the `tstops` keyword argument to `solve` to ensure
237237
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.
239239

240240
Note that more general logical expressions can be built, for example, suppose we
241241
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)
250250
plot(sol)
251251
```
252252
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.
254256

255257
Let's now also add a drug at time `tkill` that turns off production of new
256258
cells, modeled by setting `α = 0.0`

0 commit comments

Comments
 (0)