Basically, I failed to trying to implement individual global MINLP solvers (alphaBB, ANTIGONE, BARON, Couenne, LindoAPI, and SCIP) in C++/Xcode/Mac system. On the other hand, I realize that GAMS already integrate a lot of solvers. So I am thinking of using C++/Xcode/Mac system to construct models and let GAMS solve that. What would be the standard practice in this respect? Thank you.


1 Answer 1


Standard practice tends to be one of:

  • formulate the model in GAMS and solve it in GAMS
  • formulate the model in C++ and solve it in C++

In either case, you can read data from a text file and use it to populate your model instead of hard-coding inputs.

GAMS does have a C++ API. At one point, I've used it, and based on that experience, I wouldn't recommend it, simply because mixed-language programming tends to be challenging to maintain. Nevertheless, if you wanted to generate data in C++, and then use the GAMS API to import that data into GAMS, you could do that as well.

Some of the solvers you cite are not available from C++. For instance, BARON interfaces with GAMS and MATLAB, but does not have a callable C++ interface. ANTIGONE also has a GAMS interface, but no publicly available C++ interface. (Perhaps you have a version directly from the authors?) alphaBB is an algorithm for solving MINLPs, but I don't know of software called alphaBB that solves MINLPs.

I don't have any experience using Xcode as an IDE for software development, but at minimum, you should be able to get Couenne and SCIP to work on a Mac by compiling them and linking your software appropriately. If you are having trouble with this step, I'd recommend decoupling data generation and MINLP model formulation. Generate the data using a C++ program, and then read the data in GAMS and formulate your MINLP in GAMS, then call GAMS to solve your model.

  • $\begingroup$ This is very very helpful. Thank you very much. "Generate the data using a C++ program", do you mean using GAMS c++ API? OR shall I recode everything, which seems to be reinventing the wheel. $\endgroup$
    – user40780
    Feb 6, 2015 at 16:05
  • $\begingroup$ @user40780: I mean, if you're using C++, avoid the GAMS API. Write the output of your C++ program to a file. Use GAMS to read in that output file. $\endgroup$ Feb 6, 2015 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.