Why does Pastas recompute the simulation when tmin/tmax are provided in plot methods? #914
-
@AnneDeGraaf raised an interesting question about why Pastas recomputes the simulation instead of just clipping the axes to the provided limits. Quoting from #868:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This is a really good question. We discussed this during a Pastas developers meeting, and it took us a while to remember that this is intentional :). The short answer is: we want users to be able to create plots with simulations outside of the calibration period of the model. Say we have data from 1980 to 2020, but we want to calibrate on the period 2000-2010 # we build some model, ml
ml.solve(tmin="2000", tmax="2010") Now we can inspect the results of the calibration: ml.plots.results() But let's say we want to inspect how well our model is able to simulate the period after 2010. This requires recomputing the simulation. ml.plots.results(tmin="2010", tmax="2020") Similarly, the same goes if we want to test our model on the period before 2000 ml.plots.results(tmin="1990", tmax="2000") So the upside is we can use our plotting routines to quickly inspect the fit of our model outside the model calibration period. The downside is that in rare cases, the warmup period is too short, and modifying the tmin/tmax causes the plot results to differ. A warning will be added in Pastas that warns the users of this after a solve call (#784). |
Beta Was this translation helpful? Give feedback.
This is a really good question. We discussed this during a Pastas developers meeting, and it took us a while to remember that this is intentional :).
The short answer is: we want users to be able to create plots with simulations outside of the calibration period of the model.
Say we have data from 1980 to 2020, but we want to calibrate on the period 2000-2010
Now we can inspect the results of the calibration:
But let's say we want to inspect how well our model is able to simulate the period after 2010. This requires recomputing the simulation.
Similarly, the same goes…