Skip to content

Commit 718ae81

Browse files
Remove ODAEProblem from acausal tutorial
1 parent 17a3b6a commit 718ae81

File tree

1 file changed

+3
-18
lines changed

1 file changed

+3
-18
lines changed

docs/src/tutorials/acausal_components.md

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ end
104104
u0 = [
105105
rc_model.capacitor.v => 0.0,
106106
]
107-
prob = ODAEProblem(rc_model, u0, (0, 10.0))
108-
sol = solve(prob, Tsit5())
107+
prob = ODEProblem(rc_model, u0, (0, 10.0))
108+
sol = solve(prob)
109109
plot(sol)
110110
```
111111

@@ -319,25 +319,10 @@ u0 = [rc_model.capacitor.v => 0.0
319319
rc_model.capacitor.p.i => 0.0]
320320
321321
prob = ODEProblem(rc_model, u0, (0, 10.0))
322-
sol = solve(prob, Rodas4())
323-
plot(sol)
324-
```
325-
326-
MTK can numerically solve all the
327-
unreduced algebraic equations using the `ODAEProblem` (note the
328-
letter `A`):
329-
330-
```@example acausal
331-
u0 = [
332-
rc_model.capacitor.v => 0.0,
333-
]
334-
prob = ODAEProblem(rc_model, u0, (0, 10.0))
335-
sol = solve(prob, Rodas4())
322+
sol = solve(prob)
336323
plot(sol)
337324
```
338325

339-
Notice that this solves the whole system by only solving for one variable!
340-
341326
However, what if we wanted to plot the timeseries of a different variable? Do
342327
not worry, that information was not thrown away! Instead, transformations
343328
like `structural_simplify` simply change state variables into observables which are

0 commit comments

Comments
 (0)