Skip to content

Commit f9e5fe4

Browse files
test: fix initialization of several Electrical/analog tests
1 parent 637a09c commit f9e5fe4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/Electrical/analog.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ end
7272
connect(R2.n, voltage.n, ground.g)]
7373

7474
@named model = ODESystem(connections, t,
75-
systems = [R0, R1, R2, source, short, voltage, ground])
75+
systems = [R0, R1, R2, source, short, voltage, ground]; guesses = [R2.v => 0.0])
7676
sys = structural_simplify(model)
77-
prob = ODEProblem(sys, Pair[R2.i => 0.0], (0, 2.0))
77+
prob = ODEProblem(sys, [], (0, 2.0))
7878
sol = solve(prob, Rodas4()) # has no state; does not work with Tsit5
7979
@test SciMLBase.successful_retcode(sol)
8080
@test sol[short.v] == sol[R0.v] == zeros(length(sol.t))
@@ -521,7 +521,7 @@ end
521521

522522
# Build and solve the system
523523
@mtkbuild sys = RC()
524-
prob = ODEProblem(sys, [0.0, 0.0], (0.0, 10.0)) # No state variables initially
524+
prob = ODEProblem(sys, [], (0.0, 10.0); guesses = [resistor.i => 0.0]) # No state variables initially
525525
sol = solve(prob)
526526

527527
# Perform Tests

0 commit comments

Comments
 (0)