Closed alebaran closed 4 years ago
I'll consider adding an option to control whether you want to clear or recalculate dependent cells.
What is the idea behind automatic recalculation?
Btw. I have experience with another python library with dependency grid quantlib
. It doesn't have automatic recalculation function.
When you use modelx interactively on IPython console, it's annoying when you change one part a model and the rest of it vanishes. You need to manually populate same cells again.
What's the other python library? Is it in QuantLib?
How do they use it in console? Do you mean that they use .frame
option to explore results?
QuantLib indeed
Yes. Just like the way you would normally use Excel.
In this case I would trigger recalculation, when .frame
is called
modelx v0.2.0 adds an option to activate/deactivate dependents recalculation. https://modelx.readthedocs.io/en/latest/releases/relnotes_v0_2_0.html
Thank you very much
Thank you for releasing new version and all the improvement. There is one item, which creates a problem for me:
The model I built has hundreds of parameters. After performing a base run, I do a number of sensitivity runs, in which several parameters are changed together. It often doesn't make sense to change one parameter without changing the other. It isn't beneficial to have the model automatically recalculating after each parameter is changed. It slows down the execution a lot and in some cases may lead to breakage of the model (as the parameter should only be changed together with the other one).
This change goes against the basic design principle of modelx that it only calculates what has been asked for. For example, in the base run I may produce 100 results, but in the sensitivity run I only need 1 number. But I can't control it, if everything is always recalculated.