Skip to content

Commit 1ee0844

Browse files
committed
update NewsMD
1 parent c6cb71c commit 1ee0844

File tree

2 files changed

+20
-1
lines changed

2 files changed

+20
-1
lines changed

NEWS.md

+19
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,22 @@
1+
# ModelingToolkit v10 Release Notes
2+
3+
### Callbacks
4+
5+
Callback semantics have changed.
6+
- There is a new `Pre` operator that is used to specify which values are before the callback.
7+
For example, the affect `A ~ A + 1` should now be written as `A ~ Pre(A) + 1`. This is
8+
**required** to be specified - `A ~ A + 1` will now be interpreted as an equation to be
9+
satisfied after the callback (and will thus error since it is unsatisfiable).
10+
11+
- All parameters that are changed by a callback must be declared as discrete parameters to
12+
the callback constructor, using the `discrete_parameters` keyword argument.
13+
14+
```julia
15+
event = SymbolicDiscreteCallback(
16+
[t == 1] => [p ~ Pre(p) + 1], discrete_parameters = [p])
17+
```
18+
19+
120
# ModelingToolkit v9 Release Notes
221

322
### Upgrade guide

docs/src/basics/Events.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ the event occurs). These can both be specified symbolically, but a more [general
2525
functional affect](@ref func_affects) representation is also allowed, as described
2626
below.
2727

28-
## Symbolic Callback Semantics (changed in V10)
28+
## Symbolic Callback Semantics
2929

3030
In callbacks, there is a distinction between values of the unknowns and parameters
3131
*before* the callback, and the desired values *after* the callback. In MTK, this

0 commit comments

Comments
 (0)