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
error("Initial conditions for discrete variables must be for the past state of the unknown. Instead of providing the condition for $v, provide the condition for $(Shift(iv, -1)(v)).")
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)).")
223
+
end
224
+
trueu0map[Shift(iv, op.steps +1)(arguments(k)[1])] = v
225
+
end
226
+
defs = ModelingToolkit.get_defaults(sys)
227
+
for var in dvs
228
+
if (op =operation(var)) isa Shift &&!haskey(trueu0map, var)
229
+
root =arguments(var)[1]
230
+
haskey(defs, root) ||error("Initial condition for $var not provided.")
@test sol.prob.kwargs[:disc_saved_values][1].t == sol.t[1:2:end] # Test that the discrete-tiem system executed at every step of the continuous solver. The solver saves each time step twice, one state value before discrete affect and one after.
0 commit comments