File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -54,13 +54,16 @@ function generate_rhs(sys::System; implicit_dae = false,
5454 # Handle observables in algebraic equations, since they are shifted
5555 shifted_obs = Equation[distribute_shift (D (eq)) for eq in obs]
5656 obsidxs = observed_equations_used_by (sys, rhss; obs = shifted_obs)
57- extra_assignments = [Assignment (shifted_obs[i]. lhs, shifted_obs[i]. rhs)
58- for i in obsidxs]
57+ ddvs = map (D, dvs)
58+
59+ append! (extra_assignments,
60+ [Assignment (shifted_obs[i]. lhs, shifted_obs[i]. rhs)
61+ for i in obsidxs])
5962 else
6063 D = Differential (t)
64+ ddvs = map (D, dvs)
6165 rhss = [_iszero (eq. lhs) ? eq. rhs : eq. rhs - eq. lhs for eq in eqs]
6266 end
63- ddvs = map (D, dvs)
6467 else
6568 if ! override_discrete && ! is_discrete_system (sys)
6669 check_operator_variables (eqs, Differential)
You can’t perform that action at this time.
0 commit comments