Hi
I have a model that should add new constrain to last constrains in each loop iteration. also the number of loop iterations is unknown so it’s a while loop. how can i handle it in GAMS?
Look at a TSP example (https://www.gams.com/latest/gamslib_ml/libhtml/gamslib_tsp1.html) in the GAMS model library where a sub-tour elimination constraint gets added in every iteration. You will need to overestimate the number of iterations (cc) and use a loop though. Good luck.
-Michael
This code was a little complicated.Could you describe the solution in simple way?? Thanks
There is a somewhat simpler example: cta (https://www.gams.com/latest/gamslib_ml/libhtml/gamslib_cta.html) which essentially cuts away the optimal solution a couple of time to get suboptimal solutions. -Michael