Cédric St-Jean
Cédric St-Jean
Did you see https://docs.sciml.ai/ModelingToolkit/dev/examples/remake/ ? The details are a bit baroque, but it does provide a parameter optimization example.
Broadly, it's that `stream` connectors are error prone and hard to debug: - Because I use `inlet.conc ~ -999999`, I've had `InitialValueProblems` converge to a backflow solution. Yes, I should...
Relatedly, while `return fig` works great on a small window, `Row(fig)` shows a figure that is slightly too large. Also of note that while playing with the above code, my...
> The problem is that tank.inlet.conc is not present in the simplified system, so MTK doesn't know how to compute it. That's correct. `room.tank.inlet.conc` is not present in the original...
```julia julia> sol(10, idxs=[instream(test_room.reactor.inlet.conc)]) 1-element Vector{SymbolicUtils.BasicSymbolic{Float64}}: instream(-10.0) ``` MTK treated `instream` as a wrapper, and evaluated `test_room.reactor.inlet.conc` to -10, whereas it should be treating `instream(test_room.reactor.inlet.conc)` as a variable in itself,...
I did! I stopped using stream connectors and my life got so much better. If your flow is unidirectional, you can do it too! Just replace `connect` with `connect_flow`, and...
Another work-around is to introduce an `inlet_conc ~ instream(inlet.conc)` variable (observable)
It would be cool to have something like `MacroTools.@forward` for writing these methods automatically!