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.

asked 05 Feb '15, 19:16

Chivalry's gravatar image

accept rate: 0%

I'm assuming that you want GAMS to solve some subproblems during your main algorithm (e.g., an exact algorithm within a matheuristic). In other words, your main algorithm would provide the inputs to your subproblems (the inputs could parameters or variables that should be fixed), while GAMS would solve the resulting mathematical model. Considering that, you can achieve this as follows:

  1. Build the necessary model in GAMS IDE or any text editor of your choice. This model file should be capable of reading the required inputs and exporting the necessary outputs.
  2. Using your main algorithm in C++, export your input data (i.e., model parameters) as some kind file that is recognized by GAMS (you could do it using text, Excel, or GDX files).
  3. Solve the model using GAMS via calling it from your main algorithm.
  4. Read the GAMS output (e.g., solution and marginal values) using your main algorithm.

GAMS provides all of the necessary data structures and methods to do this via its API facilities. The introduction to this approach is available from here.


answered 07 Feb '15, 12:16

Ehsan's gravatar image

Ehsan ♦
accept rate: 16%

edited 07 Feb '15, 12:17

Check out the GAMSLinks project at COIN-OR for interfacing with the Bonmin solver at COIN-OR. You could probably also extend GAMSLinks for the solver of your choice.


answered 05 Feb '15, 20:03

Matthew%20Saltzman's gravatar image

Matthew Salt... ♦
accept rate: 17%


I think the question is rather about interfacing GAMS itself from the C++ project and not about solvers called from GAMS.

(06 Feb '15, 06:57) rschwarz
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 05 Feb '15, 19:16

Seen: 1,802 times

Last updated: 07 Feb '15, 12:17

OR-Exchange! Your site for questions, answers, and announcements about operations research.