Hi all, Does anyone have an example of implementation of Heuristic Algorithm (e.g. GA or SA) in GAMS?
is it possible to run a GA or SA MATLAB code in GAMS code?
How to use meta heuristic (GA) MATLAB code in GAMS?
Questions on using the GAMS APIs (Python, .NET, etc.)
3 posts • Page 1 of 1
GAMS has the solver LocalSolver connected that implements a local search algorithm. If you want to use external algorithms it is relatively easy if your model is simple and can be described by a few sets and parameters: Just export the data to GDX, read it in to Matlab and pass it on to the algorithm in an appropriate form. If you want to pass on GAMS equations algebra and variables (a model instance that is generated with a solve statement), this is much harder. You will need to access the model instance (and the equation logic) via some API. The COIN-OR GAMSLinks project (https://projects.coin-or.org/GAMSlinks) shows how to do this. The Couenne link takes the GAMS algebra apart to feed this into the solver and can probably serve as a template to connect to a local search algorithm. This is not easy...