You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Determine whether or not input/output variable `u` is "bound" within the system, i.e., if it's to be considered internal to `sys`.
62
62
A variable/signal is considered bound if it appears in an equation together with variables from other subsystems.
63
63
The typical usecase for this function is to determine whether the input to an IO component is connected to another component,
64
-
or if it remains an external input that the user has to supply before simulating the system.
64
+
or if it remains an external input that the user has to supply before simulating the system.
65
65
66
66
See also [`bound_inputs`](@ref), [`unbound_inputs`](@ref), [`bound_outputs`](@ref), [`unbound_outputs`](@ref)
67
67
"""
68
68
functionis_bound(sys, u, stack = [])
69
69
#=
70
-
For observed quantities, we check if a variable is connected to something that is bound to something further out.
70
+
For observed quantities, we check if a variable is connected to something that is bound to something further out.
71
71
In the following scenario
72
72
julia> observed(syss)
73
73
2-element Vector{Equation}:
74
74
sys₊y(tv) ~ sys₊x(tv)
75
75
y(tv) ~ sys₊x(tv)
76
76
sys₊y(t) is bound to the outer y(t) through the variable sys₊x(t) and should thus return is_bound(sys₊y(t)) = true.
77
-
When asking is_bound(sys₊y(t)), we know that we are looking through observed equations and can thus ask
77
+
When asking is_bound(sys₊y(t)), we know that we are looking through observed equations and can thus ask
78
78
if var is bound, if it is, then sys₊y(t) is also bound. This can lead to an infinite recursion, so we maintain a stack of variables we have previously asked about to be able to break cycles
79
79
=#
80
80
u ∈Set(stack) &&returnfalse# Cycle detected
@@ -241,7 +241,7 @@ function toparam(sys, ctrls::AbstractVector)
0 commit comments