Closed tsmbland closed 2 months ago
I thought maximum_iterations was the max number of times the model will attempt to clear the market (ie run all sectors and check if prices/quantities converge.
It should usually be a high number like 100 I think.
Though I'm not sure this is what has actually been implemented!
Yeah, that's what I think it's doing (although I'll need to dig into the code to verify).
100 seems reasonable. The default model used to use 100, but this was changed to 1 in #94 for some unexplained reason (may have been an unintended change that never got caught), so this is what I've been working with.
I'll change it back to 100.
@alexdewar @dalonsoa This will be a case where I add two zeros to the code and end up with 25,000 lines changed, so it will be good to come up with a solution for #351 !
Can we dig a little here? Does the solution still look sensible? There are two other parameters that might bear on what's happening here in the toml - they are tolerance = 0.1 and tolerance_unmet_demand = -0.1. @tsmbland can you take a look and let me know what these are doing? And when tolerance = 0.1 does that mean the solver stops when the difference between two iterations is less than 10%?
Closed by #386. See also #406 and #410. On my to-do list to look at the tolerance
parameter
I hadn't quite appreciated the importance of the
maximum_iterations
parameter before, and have just gone with 1 for all of the tutorials as this is what thedefault
model was already using. However, after reading this page of the documentation, it seems there's quite a fundamental difference between a value of 1 and anything >1.@ahawkes do you have a sense of what we should be using for
maximum_iterations
in the tutorial/example models?It currently defaults to 3 if it isn't specified in
settings.toml
, but I'm not sure how that number was arrived at.