Skip to content

Commit e408e06

Browse files
refactor: make AnalysisPoint more type-stable
1 parent bc517bf commit e408e06

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ModelingToolkit.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,10 @@ include("systems/model_parsing.jl")
174174
include("systems/connectiongraph.jl")
175175
include("systems/connectors.jl")
176176
include("systems/state_machines.jl")
177-
include("systems/analysis_points.jl")
178177
include("systems/imperative_affect.jl")
179178
include("systems/callbacks.jl")
180179
include("systems/system.jl")
180+
include("systems/analysis_points.jl")
181181
include("systems/codegen_utils.jl")
182182
include("problems/docs.jl")
183183
include("systems/codegen.jl")

src/systems/analysis_points.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ struct AnalysisPoint
7171
The outputs of the connection. In the context of ModelingToolkitStandardLibrary.jl,
7272
these are all `RealInput` connectors.
7373
"""
74-
outputs::Union{Nothing, Vector{Any}}
74+
outputs::Union{Nothing, Vector{System}, Vector{SymbolicT}}
7575

7676
function AnalysisPoint(input, name::Symbol, outputs; verbose = true)
7777
# input to analysis point should be an output variable
@@ -230,7 +230,7 @@ typically is not (unless the model is an inverse model).
230230
warning if you are analyzing an inverse model.
231231
"""
232232
function connect(in::AbstractSystem, name::Symbol, out, outs...; verbose = true)
233-
return AnalysisPoint() ~ AnalysisPoint(in, name, [out; collect(outs)]; verbose)
233+
return AnalysisPoint() ~ AnalysisPoint(in, name, System[out; collect(outs)]; verbose)
234234
end
235235

236236
function connect(

0 commit comments

Comments
 (0)