diff --git a/src/systems/systemstructure.jl b/src/systems/systemstructure.jl index 6d65dc9418..3c5601d055 100644 --- a/src/systems/systemstructure.jl +++ b/src/systems/systemstructure.jl @@ -1009,12 +1009,12 @@ function _mtkcompile!(state::TearingState; state = ModelingToolkit.inputs_to_parameters!(state, discrete_inputs) ModelingToolkit.markio!(state, Set(), inputs, outputs, disturbance_inputs) state = ModelingToolkit.inputs_to_parameters!(state, [inputs; disturbance_inputs]) - trivial_tearing!(state) - sys, mm = ModelingToolkit.alias_elimination!(state; fully_determined, kwargs...) if check_consistency fully_determined = ModelingToolkit.check_consistency( state, orig_inputs; nothrow = fully_determined === nothing) end + trivial_tearing!(state) + sys, mm = ModelingToolkit.alias_elimination!(state; fully_determined, kwargs...) if fully_determined && dummy_derivative sys = ModelingToolkit.dummy_derivative( sys, state; mm, check_consistency, kwargs...) diff --git a/test/stream_connectors.jl b/test/stream_connectors.jl index 493d9996e3..8449b39466 100644 --- a/test/stream_connectors.jl +++ b/test/stream_connectors.jl @@ -494,7 +494,8 @@ function OneFluidSystem(; name) connect(source_a.H, pipe_a.HA) connect(pipe_a.HB, volume_a.H) connect(source_b.H, pipe_b.HA) - connect(pipe_b.HB, volume_b.H)] + connect(pipe_b.HB, volume_b.H) + source_a.H.dm ~ 0] System(eqs, t, vars, pars; name, systems) end