GamsPy and Gurobi Link

How can I link Gurobi with gamspy? I already have a Gurobi license on my machine and I know the path to the license file. I’ve tried to follow all the steps related to the guides on the GAMS website, but I only have gamspy, and nothing related to the regular GAMS is installed on my computer. I also don’t have the YAML configuration file on my machine. How can I link Gurobi with gamspy?

You don’t need a regular GAMS installed on your machine. If you already have a GAMS license with GUROBI, you can send an email to sales@gams.com with your GAMS license and get a GAMSPy license with GUROBI. Then, you can install the license as usual (gamspy install license <access_code or path to the license>).

Maybe I am missing something but here is the story. I already have the academic GamsPy license installed in my local machine. But I dont have the regular GAMS license and I am not intended to buy one, or I havent installed any part of the regular GAMS. In addition, I already have Gurobi licence in my local machine. Can’t I link gurobi and GamsPy without having the regular GAMS?

If you already have the academic GAMSPy license, then you should just follow the instructions on Installation and Licensing — GAMSPy documentation

The relevant section is called “Additional steps when using solver link licenses”. If this doesn’t work, please send the output of the model.solve(output=sys.stdout) for further debugging.

I have already set the environment variable ‘GRB_LICENSE_FILE’ to path of my gurobi license file as discussed in the link you shared. When I check it from terminal, it is able to locate it. But once I try to run it in gamspy, it gives license error. To be clear, I have a valid gurobi license.

I understand but without the logs it is very hard to understand what the issue is. Can you share the output of the solve and the environment variable value as follows:

import os
import sys
import gamspy as gp

Here you define your model
...
...
print(os.getenv("GRB_LICENSE_FILE"))
model.solve(output=sys.stdout)

Edited.

I guess I resolved the issue. I had gurobi 10 licence in my local but gamspy requires the version 11 i guess. I renewed the license and now it is working.

2 Likes