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
function ModelingToolkit.connect(in, ap_name::Symbol, out)
101
-
return0~AnalysisPoint(in, out, ap_name)
108
+
ap =AnalysisPoint(in, out, ap_name)
109
+
returnAnalysisPoint() ~ ap
102
110
end
103
111
104
112
function ModelingToolkit.vars(ap::AnalysisPoint; op = Differential)
@@ -135,12 +143,14 @@ function expand_analysis_points(sys)
135
143
sys
136
144
end
137
145
146
+
#=
138
147
function ModelingToolkit.namespace_expr(ap::AnalysisPoint, sys, n = nameof(sys)) where {T}
139
-
in= ModelingToolkit.renamespace(n, ap.in)
140
-
out = ModelingToolkit.renamespace(n, ap.out)
148
+
in = ap.in === nothing ? ap.in : ModelingToolkit.renamespace(n, ap.in)
149
+
out = ap.out === nothing ? ap.out : ModelingToolkit.renamespace(n, ap.out)
141
150
name = Symbol(n, :_, ap.name)
142
151
AnalysisPoint(in, out, name)
143
152
end
153
+
=#
144
154
145
155
function Base.:(==)(ap1::AnalysisPoint, ap2::AnalysisPoint)
146
156
return ap1.in == ap2.in && ap1.out == ap2.out # Name doesn't really matter if inputs and outputs are the same
@@ -153,29 +163,36 @@ end
153
163
Compute the sensitivity function in analysis point `ap`. The sensitivity function is obtained by introducing an infinitesimal perturbation `d` at the input of `ap`, linearizing the system and computing the transfer function between `d` and the output of `ap`.
154
164
155
165
!!! danger "Experimental"
156
-
The analysis-point interface is currently experimental and at any time subject to breaking changes not respecting semantic versioning.
166
+
The analysis-point interface is currently experimental and at any time subject to breaking changes not respecting semantic versioning.
157
167
158
168
# Arguments:
159
169
- `kwargs`: Are sent to `ModelingToolkit.linearize`
160
170
161
171
See also [`get_comp_sensitivity`](@ref), [`get_looptransfer`](@ref).
Compute the complementary sensitivity function in analysis point `ap`. The complementary sensitivity function is obtained by introducing an infinitesimal perturbation `d` at the output of `ap`, linearizing the system and computing the transfer function between `d` and the input of `ap`.
186
203
187
204
!!! danger "Experimental"
188
-
The analysis-point interface is currently experimental and at any time subject to breaking changes not respecting semantic versioning.
205
+
The analysis-point interface is currently experimental and at any time subject to breaking changes not respecting semantic versioning.
189
206
190
207
# Arguments:
191
208
- `kwargs`: Are sent to `ModelingToolkit.linearize`
@@ -218,7 +235,7 @@ end
218
235
Compute the (linearized) loop-transfer function in analysis point `ap`, from `ap.out` to `ap.in`.
219
236
220
237
!!! danger "Experimental"
221
-
The analysis-point interface is currently experimental and at any time subject to breaking changes not respecting semantic versioning.
238
+
The analysis-point interface is currently experimental and at any time subject to breaking changes not respecting semantic versioning.
222
239
223
240
# Arguments:
224
241
- `kwargs`: Are sent to `ModelingToolkit.linearize`
@@ -249,7 +266,7 @@ Open the loop at analysis point `ap` by breaking the connection through `ap`.
249
266
`open_sys` will have `u ~ ap.out` as input and `y ~ ap.in` as output.
250
267
251
268
!!! danger "Experimental"
252
-
The analysis-point interface is currently experimental and at any time subject to breaking changes not respecting semantic versioning.
269
+
The analysis-point interface is currently experimental and at any time subject to breaking changes not respecting semantic versioning.
253
270
254
271
# Arguments:
255
272
- `kwargs`: Are sent to `ModelingToolkit.linearize`
@@ -307,12 +324,10 @@ function ModelingToolkit.linearize(sys, input::AnalysisPoint, output::AnalysisPo
0 commit comments