Skip to content

Commit f663b2e

Browse files
fix: use new problem constructor syntax
1 parent ff2ed42 commit f663b2e

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/ModelingToolkit.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ PrecompileTools.@compile_workload begin
234234
using ModelingToolkit
235235
@variables x(ModelingToolkit.t_nounits)
236236
@named sys = System([ModelingToolkit.D_nounits(x) ~ -x], ModelingToolkit.t_nounits)
237-
prob = ODEProblem(mtkcompile(sys), [x => 30.0], (0, 100), [], jac = true)
237+
prob = ODEProblem(mtkcompile(sys), [x => 30.0], (0, 100), jac = true)
238238
@mtkmodel __testmod__ begin
239239
@constants begin
240240
c = 1.0

src/linearization.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function linearization_function(sys::AbstractSystem, inputs,
7373
end
7474

7575
prob = ODEProblem{true, SciMLBase.FullSpecialize}(
76-
sys, op, (nothing, nothing), p; allow_incomplete = true,
76+
sys, merge(op, anydict(p)), (nothing, nothing); allow_incomplete = true,
7777
algebraic_only = true, guesses)
7878
u0 = state_values(prob)
7979

src/systems/callbacks.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -870,8 +870,9 @@ function compile_equational_affect(
870870
u_getter = getsym(affsys, [sys_map[u] for u in dvs_to_update])
871871
p_getter = getsym(affsys, [sys_map[p] for p in ps_to_update])
872872

873-
affprob = ImplicitDiscreteProblem(affsys, [dv => 0 for dv in unknowns(affsys)],
874-
(0, 0), [p => 0.0 for p in parameters(affsys)];
873+
affprob = ImplicitDiscreteProblem(
874+
affsys, Pair[unknowns(affsys) .=> 0; parameters(affsys) .=> 0],
875+
(0, 0);
875876
build_initializeprob = false, check_length = false, eval_expression,
876877
eval_module, check_compatibility = false)
877878

0 commit comments

Comments
 (0)