Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .typos.toml
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
[default.extend-words]
[default.extend-words]
# Nd is the Modelica LimPID derivative-gain parameter name in the PID_Controller test fixture
Nd = "Nd"
9 changes: 7 additions & 2 deletions src/evaluator.jl
Original file line number Diff line number Diff line change
Expand Up @@ -376,9 +376,14 @@ function eval_AST(when_eq::BaseModelicaWhenEquation)
# Only fire on positive zero-crossing (condition becomes true) → Modelica edge semantics
condition_sym = eval_when_rhs(condition_ast; in_body = false)
crossing = to_zero_crossing(condition_sym)
# A when-condition is scalar, so `crossing ~ 0` is a single Equation.
# Annotate the literal as Equation[...] so it is always Vector{Equation}:
# without it inference admits a spurious Vector{Vector{Equation}} arm
# (crossing is a Union including a vector case) for which
# SymbolicContinuousCallback has no matching method.
push!(
callbacks, ModelingToolkit.SymbolicContinuousCallback(
[crossing ~ 0], affects;
Equation[crossing ~ 0], affects;
affect_neg = nothing,
discrete_parameters = discrete_params_for_cb
)
Expand Down Expand Up @@ -766,7 +771,7 @@ function eval_AST(model::BaseModelicaModel)
modified = (; off = off_sym)
)
cb = ModelingToolkit.SymbolicContinuousCallback(
[crossing ~ 0],
Equation[crossing ~ 0],
affect;
affect_neg = affect_neg,
reinitializealg = BrownFullBasicInit(),
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ run_tests(;
@safetestset "ANTLR Parser Tests" include("test_antlr_parser.jl")
return @safetestset "Error Message Tests" include("test_error_messages.jl")
end,
groups = Dict("QA" => qa_group),
qa = qa_group,
umbrellas = Dict("Quality" => ["QA"]),
# Original runtests ran QA/Quality only for those explicit GROUPs, never under
# "All"; curate "All" to Core only to preserve that.
Expand Down
Loading