i want to use GAMS in optimization MINLP problem but I hope to use Meta heuristic algorithms like particle swarm or genetic algorithm instead of the given GAMS solvers like CPLEX, PARON
You don't need a GAMS model in order to implement an optimization algorithm - you can just as well code up your algorithms in FORTRAN and run them directly; you just need data files, and then you are up and running! :-)
I bet you could, but you'd struggle a little more to adapt to the programming language than you'd do for example with Python, Matlab or another language. Because it is not widely used for that purpose, help won't be easy to find. What you could do is to create a hybrid: program the metaheuristic on Matlab for example and if you need it (depending on the problem) to call GAMS from Matlab to optimize something inside.
Your motivation and/or reason(s) to use metaheuristics with GAMS models are not clear since GAMS has deterministic optimization methods for solving MINLP problems. One of them (BARON) can give the global optimum.
The following paper compares GAMS solvers and MS Excel Solver Premium for MINLP problems: Sharma S. and Rangaiah G.P., Designing, Retrofitting and Revamping Water Networks in Petroleum Refineries using Multiobjective Optimization, Industrial & Engineering Chemistry Research, 55, 226-236 (2016). It may be of interest to you.
You can also consider MS Excel for implementing metaheuristics algorithm in VBA. The following book chapter may be of interest to you: Sharma S., Rangaiah G.P. and Maréchal F., Multi-Objective Optimization Programs and their Application to Amine Absorption Process Design for Natural Gas Sweetening, in “Multi-Objective Optimization: Techniques and Applications in Chemical Engineering” edited by G.P. Rangaiah, Second Edition, World Scientific, 2017.
Please browse: http://cheed.nus.edu.sg/stf/chegpr/Publication-2.html and links therein for more publications on our programs and applications.
There is a software called LocalSolver (https://www.localsolver.com/) and this solver implements some heuristic algorithms to optimally solve optimization models. I know it looks strange at first glance to solve optimally by using heuristics, but LocalSolver hybridizes different optimization techniques and it integrates unique heuristic search techniques. You may be interested in this software. There is also academic licensing option for the academics.
You may do it, but it is not clear why you would want to do that. GAMS has good deterministic solvers, so if you have already coded the problem in the equation oriented framework then it is better to use solvers in GAMS. However, if you do not have equations and you are relying on some black box simulators then it is better to use any metaheuristic algorithms.
Reza Lotfi Except that you will most probably not find an optimum. WHY do you insist on using clearly inferior methods? It doesn't make any sense! Stick to deterministic solvers.
Why, Reza Lotfi? - GAMS can with almost certainty find the optimal solution, while the average metaheuristic will fail to find one. What's the point???
LPSolve - MIT or GAMS or FICO Xpress are good options to resolve MINLP problems. Furtheremore, Metaheuristics are used to resolve NP-Complete o NP-Hard problems.
Michael Patriksson I think his aim is to obtain some answer to his complex mathematical model. Sometimes you can obtain high-quality results in seconds with GA where CPLEX or other solvers can not even provide an initial basic feasible solution in several days. I have one research where any solver in GAMS could not find a feasible solution (some finished up my ram while compiling the model and stopped). Maybe his concern is not to find global optima but only a single feasible solution.
Reza Lotfi, I totally agree with you. Even you want a global optima then heuristics in gams can be useful in finding a good initial solution for the rest of the optimization procedure.
I don't think you can do that, and if you somehow can, then I doubt that it would result in satisfactory outcomes. Most metaheuristic methods require at least some intimate knowledge of the particular problem that you are solving. For instance, for genetic algorithms, you need to explicitly determine how chromosomes are coded, representing a particular aspect of the problem. You would need to write code to implement it. C++, Python, Matlab, whatever you are comfortable with.
I think (do not have experience with it) that the whole GAMS tool is intended and adapted to solve the problem through the problem formulation according to the "GAMS syntax" and using the offered solvers, i.e. GAMS tool has been designed to use a given solver for specific problem formulation. So, it can be questionable (as Cenk mentioned above) if a metaheuristic solver can handle with GAMS formulation of the problem, e.g. can the solver get objective function/constraints values and set decision variable values in the GAMS model. So, I recommend using built-in GAMS solvers if the problem can be formulated analytically in the GAMS tool. However, if the problem too complex or impossible to model analytically, e.g. objective functions are calculated by a specific/external simulation tool, then metaheuristic solvers are better if not the only option.
First question you should ask yourself is what do you want to solve, what kind of problem you can solve? It is, is an MINLP which you can model in GAMS/pyomo sintax?
It is, are you able to model the problem in these languages, and derive the algebraic equations that fully define it? If answer is yes, you should use GAMS/Pyomo.. softwares, better than metaheuristics. If you cannot model in this language, because you use some black box functions... , maybe you should use metaheuristic, for example in python.
This is already told in previous comments. If you know how to model a problem in GAMS, you will implement it in another language. If you can't model it in GAMS, you can also model it in metaheuristic optimisation libraries, since they also allow constraints and if, for loops...
There are some people who use metaheuristic optimisations because they are easier to program and implement with for example with python tools, without knowing that maybe it is not the best optimization method for their problem.