Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impact of the number of stages on solving time #698

Closed
AngeBlanchard opened this issue Oct 16, 2023 · 3 comments
Closed

Impact of the number of stages on solving time #698

AngeBlanchard opened this issue Oct 16, 2023 · 3 comments

Comments

@AngeBlanchard
Copy link

Hi Oscar,
I used to have a model with 52 stages, which I transformed into a 12-stages one, in order to have a faster convergence.
If I get it right, the training phase doesn't need as many iterations as before to converge (approx 5 times less, with the rule of thumb you give).

However, (and I'm surprised) it seems that lowering the number of stages increases the computation time per iteration (which offsets part of the gains from this model simplification)... And I don't really get it: depending on the number of stages involved, either we solve lots of small problems or few big ones (on the forward phase). It's not obvious to me why solving a few big problems should take more time than loads of small ones.

Maybe I coded it wrong ? Or is it a natural result that doesn't surprise you ?
Thanks for your insights,
Ange

@AngeBlanchard
Copy link
Author

AngeBlanchard commented Oct 16, 2023

I should maybe add that in my case, whatever the number of stages, the state space of decisions variables has the same "size", either one stage represent a week of 168 hours, either it stands for a month of 720 hours. In total, I model a full year of approximately 8760 hours in any case.

The only difference being that fewer stages mean less uncertainty (random variables live in a smaller world)

@odow
Copy link
Owner

odow commented Oct 17, 2023

It's not obvious to me why solving a few big problems should take more time than loads of small ones.
Or is it a natural result that doesn't surprise you ?

It doesn't surprise me. This is a pretty common occurrence.

In general, the runtime of a particular problem is very dependent on the details. A rule of thumb is just that. It isn't advice that should be treated as fact.

@odow
Copy link
Owner

odow commented Oct 28, 2023

Closing because this seems resolved, and I don't know if there is anything actionable.

If you can post a reproducible example of your model on https://discourse.julialang.org/c/domain/opt/13, people may have suggestions for improving the JuMP or Julia parts. You can also re-open this issue if I've mis-understood and I haven't answered the question 😄

@odow odow closed this as completed Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants