Skip to content

Commit d9cb3c6

Browse files
committed
fix off by fector of 2pi error
1 parent 045055f commit d9cb3c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/initialization_test.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,12 @@ end
7676

7777
@test_throws ErrorException NetworkDynamics.initialize_component!(vf, tol=0.0; verbose=true)
7878

79-
# make empty problem
79+
# make empty problem (no free vars)
8080
vf_comp = copy(vf)
8181
set_default!(vf_comp, :Pm, get_init(vf_comp, :Pm))
8282
set_default!(vf_comp, , get_init(vf_comp, ))
8383
set_default!(vf_comp, , get_init(vf_comp, ))
84+
set_default!(vf_comp, :V, get_init(vf_comp, :V))
8485

8586
NetworkDynamics.initialize_component!(vf_comp; verbose=true)
8687
dump_initial_state(vf)
@@ -111,7 +112,7 @@ end
111112
# Verify the metadata was updated and values were applied correctly
112113
@test get_default(vf_conflict, :u_r) == 0.0
113114
@test get_default(vf_conflict, :u_i) == 1.0
114-
@test get_init(vf_conflict, ) pi/2
115+
@test get_init(vf_conflict, ) % 2pi pi/2
115116

116117
# change metadtaa by providing custom input
117118
vf_sync = copy(vf)

0 commit comments

Comments
 (0)