@@ -209,7 +209,8 @@ struct ODESystem <: AbstractODESystem
209209 parent:: Any
210210
211211 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,
213214 jac, ctrl_jac, Wfact, Wfact_t, name, description, systems, defaults, guesses,
214215 torn_matching, initializesystem, initialization_eqs, schedule,
215216 connector_type, preface, cevents,
@@ -332,15 +333,16 @@ function ODESystem(deqs::AbstractVector{<:Equation}, iv, dvs, ps;
332333 @set! constraintsystem. systems = conssystems
333334 end
334335 costs = wrap .(costs)
335-
336+
336337 if length (costs) > 1 && isnothing (coalesce)
337338 error (" Must specify a coalesce function for the costs vector." )
338339 end
339340
340341 assertions = Dict {BasicSymbolic, Any} (unwrap (k) => v for (k, v) in assertions)
341342
342343 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,
344346 ctrl_jac, Wfact, Wfact_t, name, description, systems,
345347 defaults, guesses, nothing , initializesystem,
346348 initialization_eqs, schedule, connector_type, preface, cont_callbacks,
@@ -403,7 +405,7 @@ function ODESystem(eqs, iv; constraints = Equation[], costs = Num[], kwargs...)
403405 costs = wrap .(costs)
404406
405407 return ODESystem (eqs, iv, collect (Iterators. flatten ((diffvars, algevars, consvars))),
406- collect (new_ps); constraintsystem, costs, kwargs... )
408+ collect (new_ps); constraintsystem, costs, kwargs... )
407409end
408410
409411# NOTE: equality does not check cached Jacobian
@@ -800,7 +802,7 @@ parameter of the system.
800802function validate_vars_and_find_ps! (auxvars, auxps, sysvars, iv)
801803 sts = sysvars
802804
803- for var in auxvars
805+ for var in auxvars
804806 if ! iscall (var)
805807 occursin (iv, var) && (var ∈ sts ||
806808 throw (ArgumentError (" Time-dependent variable $var is not an unknown of the system." )))
0 commit comments