Huite

Results 199 comments of Huite

> Given an optimization problem with non-unique solution, the solver should return the same solution every time Wouldn't it be better to make sure you have a unique solution? I.e....

I guess it's possible that storage still ends up just barely negative somehow and one of the `du` terms blows up when it sees a negative storage?

Hmm good point. It shouldn't be too late: if it converges with a negative storage, it should still be rejected. Both the callback and `isoutdomain` should be triggered. So in...

Just to make sure I'm reading properly: the upper plots show timeseries that are totally wrong? It flies off course immediately, right? And secondly: the same solver doesn't run into...

Doing some homework on the solvers: * Newton-Rhapson with ImplicitEuler is straightforward: for each Newton iteration, compute the Jacobian at $u_i$, then solve for $u_{i + 1}$ * QNDF uses...

> @Huite you say limits the step and I thought so too, but I haven't seen anything in the linesearch code that indicates that the step cannot be bigger than...

To get a slightly better feeling for these methods: https://www.stochasticlifestyle.com/differences-between-methods-for-solving-stiff-odes/

> Currently outflows of a basin don't depend on inflows (only on the storage), but to me it makes sense that that would be the case. Note that this adds...

Good point, I remember reading this. The Shampine paper is this one: https://www.sciencedirect.com/science/article/abs/pii/S0096300304009683 From the PDF, with non-garbled math: ![image](https://github.com/user-attachments/assets/ac7663ec-9e1c-4cb0-9707-f7fa64dc5c30) My first suggestion now would be to add some unit...

Uh I think setting the **total** `du` to zero might not be the best solution. I'm not privy enough to the fancier solvers which track several previous iterations, but if...