Skip to content

Commit af7e0b6

Browse files
Remove unnecessary defaults
Fixes current docs
1 parent da33480 commit af7e0b6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/Electrical/utils.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
@connector Pin begin
2-
v(t) # Potential at the pin [V]
2+
v(t) # Potential at the pin [V]
33
i(t), [connect = Flow] # Current flowing into the pin [A]
44
end
55
@doc """
@@ -33,8 +33,8 @@ Component with two electrical pins `p` and `n` and current `i` flows from `p` to
3333
n = Pin()
3434
end
3535
@variables begin
36-
v(t) = 0.0
37-
i(t) = 0.0
36+
v(t)
37+
i(t)
3838
end
3939
@equations begin
4040
v ~ p.v - n.v
@@ -70,10 +70,10 @@ Current `i1` flows from `p1` to `n1` and `i2` from `p2` to `n2`.
7070
n2 = Pin()
7171
end
7272
@variables begin
73-
v1(t) = 0.0
74-
i1(t) = 0.0
75-
v2(t) = 0.0
76-
i2(t) = 0.0
73+
v1(t)
74+
i1(t)
75+
v2(t)
76+
i2(t)
7777
end
7878
@equations begin
7979
v1 ~ p1.v - n1.v
@@ -91,7 +91,7 @@ end
9191
val ~ IfElse.ifelse((0.0 <= v) & (v <= 0.8) | (2.0 <= v) & (v <= 5.0),
9292
IfElse.ifelse(v > 2.0, 1, 0), X)
9393
]
94-
ODESystem(Equation[], t, [val, v, i], [], defaults = Dict(val => 0, i => 0),
94+
ODESystem(Equation[], t, [val, v, i], [], guesses = Dict(val => 0, i => 0),
9595
name = name)
9696
end
9797
@doc """

0 commit comments

Comments
 (0)