Closed victorgarcia98 closed 2 years ago
For L-shaped, the relevant attribute you should set is RelativeTolerance
. It should be set after instantiation (I should probably show an error message if you try to set these on the model
object). So adding set_optimizer_attribute(sp, RelativeTolerance(), 1e-1
should do what you want. Sorry for the confusion.
Also, the reason for the procedure not finishing is that you are running an integer program. When the gap reaches the chosen relative tolerance, the algorithm will continue with the convexification procedure until the second-stage solution is integer where required. This could probably be reflected better in the printout. Note that the integer extensions available are experimental, so there are probably more usability issues and unsolvable instances.
Oh, you were totally right! Removing the 2nd stage problem integer variables made the L-shape to converge. Thanks a lot Martin!
Hi Martin, last week I've been working on a stochastic program using the L-Shaped implementation that you made. I've encountered an issue related with the issue #34, the optimization is not finishing, getting frozen, even when the gap is lower than one defined. I add the code snippet + the L-Shaped last status, I hope it is useful.
Thanks in advanced 😄