@@ -209,7 +209,8 @@ struct ODESystem <: AbstractODESystem
209
209
parent:: Any
210
210
211
211
function ODESystem (
212
- tag, deqs, iv, dvs, ps, tspan, var_to_name, ctrls, observed, constraints, costs, coalesce, tgrad,
212
+ tag, deqs, iv, dvs, ps, tspan, var_to_name, ctrls,
213
+ observed, constraints, costs, coalesce, tgrad,
213
214
jac, ctrl_jac, Wfact, Wfact_t, name, description, systems, defaults, guesses,
214
215
torn_matching, initializesystem, initialization_eqs, schedule,
215
216
connector_type, preface, cevents,
@@ -332,15 +333,16 @@ function ODESystem(deqs::AbstractVector{<:Equation}, iv, dvs, ps;
332
333
@set! constraintsystem. systems = conssystems
333
334
end
334
335
costs = wrap .(costs)
335
-
336
+
336
337
if length (costs) > 1 && isnothing (coalesce)
337
338
error (" Must specify a coalesce function for the costs vector." )
338
339
end
339
340
340
341
assertions = Dict {BasicSymbolic, Any} (unwrap (k) => v for (k, v) in assertions)
341
342
342
343
ODESystem (Threads. atomic_add! (SYSTEM_COUNT, UInt (1 )),
343
- deqs, iv′, dvs′, ps′, tspan, var_to_name, ctrl′, observed, constraintsystem, costs, coalesce, tgrad, jac,
344
+ deqs, iv′, dvs′, ps′, tspan, var_to_name, ctrl′, observed,
345
+ constraintsystem, costs, coalesce, tgrad, jac,
344
346
ctrl_jac, Wfact, Wfact_t, name, description, systems,
345
347
defaults, guesses, nothing , initializesystem,
346
348
initialization_eqs, schedule, connector_type, preface, cont_callbacks,
@@ -403,7 +405,7 @@ function ODESystem(eqs, iv; constraints = Equation[], costs = Num[], kwargs...)
403
405
costs = wrap .(costs)
404
406
405
407
return ODESystem (eqs, iv, collect (Iterators. flatten ((diffvars, algevars, consvars))),
406
- collect (new_ps); constraintsystem, costs, kwargs... )
408
+ collect (new_ps); constraintsystem, costs, kwargs... )
407
409
end
408
410
409
411
# NOTE: equality does not check cached Jacobian
@@ -800,7 +802,7 @@ parameter of the system.
800
802
function validate_vars_and_find_ps! (auxvars, auxps, sysvars, iv)
801
803
sts = sysvars
802
804
803
- for var in auxvars
805
+ for var in auxvars
804
806
if ! iscall (var)
805
807
occursin (iv, var) && (var ∈ sts ||
806
808
throw (ArgumentError (" Time-dependent variable $var is not an unknown of the system." )))
0 commit comments