You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionmake_affect(affect::Vector{Equation}; iv =nothing, algeeqs = Equation[])
244
244
isempty(affect) &&returnnothing
245
-
isempty(algeeqs) &&@warn"No algebraic equations were found. If the system has no algebraic equations, this can be disregarded. Otherwise pass in `algeeqs` to the SymbolicContinuousCallback constructor."
245
+
isempty(algeeqs) &&@warn"No algebraic equations were found for the callback defined by $(join(affect, ", ")). If the system has no algebraic equations, this can be disregarded. Otherwise pass in `algeeqs` to the SymbolicContinuousCallback constructor."
246
246
247
247
explicit =true
248
248
affect =scalarize(affect)
@@ -259,6 +259,8 @@ function make_affect(affect::Vector{Equation}; iv = nothing, algeeqs = Equation[
259
259
collect_vars!(dvs, params, eq, iv)
260
260
explicit =false
261
261
end
262
+
any(isirreducible, dvs) && (explicit =false)
263
+
262
264
ifisnothing(iv)
263
265
iv =isempty(dvs) ? iv :only(arguments(dvs[1]))
264
266
isnothing(iv) &&@warn"No independent variable specified and could not be inferred. If the iv appears in an affect equation explicitly, like x ~ t + 1, then it must be specified as an argument to the SymbolicContinuousCallback or SymbolicDiscreteCallback constructor. Otherwise this warning can be disregarded."
@@ -858,16 +860,19 @@ function compile_equational_affect(aff::Union{AffectSystem, Vector{Equation}}, s
Copy file name to clipboardExpand all lines: src/systems/discrete_system/implicit_discrete_system.jl
+1-1
Original file line number
Diff line number
Diff line change
@@ -292,7 +292,7 @@ function shift_u0map_forward(sys::ImplicitDiscreteSystem, u0map, defs)
292
292
v = u0map[k]
293
293
if!((op =operation(k)) isa Shift)
294
294
isnothing(getunshifted(k)) &&
295
-
error("Initial conditions must be for the past state of the unknowns. Instead of providing the condition for $k, provide the condition for $(Shift(iv, -1)(k)).")
295
+
@warn"Initial condition given in term of current state of the unknown. If `build_initializeprob = false, this may be overriden by the implicit discrete solver."
0 commit comments