GAMSPy issues

Questions on using the GAMS APIs (Python, .NET, etc.)
Post Reply
abb.omidi
User
User
Posts: 39
Joined: 6 years ago

GAMSPy issues

Post by abb.omidi »

Dear support team,

First, thank you so much for developing and supporting such a nice tool that works as easily as GAMS Studio.
I am trying to implement and run a tiny example, a simple transportation model, to see how this new feature works. Let's say, I have frequently used Google Colab.

1) When I install GAMSPy (!pip install gamspy) it shows some errors like:

Code: Select all

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
lida 0.0.10 requires fastapi, which is not installed.
lida 0.0.10 requires kaleido, which is not installed.
lida 0.0.10 requires python-multipart, which is not installed.
lida 0.0.10 requires uvicorn, which is not installed.
llmx 0.0.15a0 requires cohere, which is not installed.
llmx 0.0.15a0 requires openai, which is not installed.
llmx 0.0.15a0 requires tiktoken, which is not installed.
tensorflow-probability 0.22.0 requires typing-extensions<4.6.0, but you have typing-extensions 4.8.0 which is incompatible.
After the installation was completed, It seems the package worked, and all defined sets, parameters, and the model ran without throwing any error. Could you please, is there any way to fix this issue? (As it may cause some inconsistency behavior, particularly, in the bigger models). An editable MRE is https://colab.research.google.com/drive ... Zg8F9Fdggn).

2) Also, GAMS provides a .lst file after optimization is terminated. Is there a way to write and see this .lst file in GAMSPy?
3) As it shows in the output log, the only solver that can be used to solve LP and MIP is CPLEX. It seems other solvers cannot be called even by calling (solver = "..."). I appreciate how can I call other solvers?


Best regards
Abbas
msoyturk
User
User
Posts: 3
Joined: 4 months ago

Re: GAMSPy issues

Post by msoyturk »

Hi Abbas,

1-) lida and limx requirements should be fixed by Google Colab (or you can simply install the packages listed yourself but I doubt you need them). For Tensorflow Probability, they already solved the problem in the new version (they were pinning the typing-extensions module version to typing-extensions<4.6.0). You can simply upgrade Tensorflow Probability package (pip install tensorflow-probability --upgrade). Overall, these dependency issues should not affect the work you do unless you are using the packages mentioned in the error logs.
2-) You can specify a working_directory while creating the Container. For example: container = Container(working_directory="my_directory"). All GAMS specific files (including .lst file) will be under the working directory you specified.
3-) The solver you specify must be able to solve the problem type specified. For example, solver="CONOPT" would use CONOPT to solve the model because CONOPT can solve LP models. If you want to see the installed solvers on your machine, you can run `gamspy list solvers`. To learn which problems can each solver solve, you can check https://www.gams.com/latest/docs/S_MAIN ... ODEL_TYPES

If you want to add another solver to your gamspy installation, you can run, e.g., `gamspy install highs`. Then, you can set solver="HIGHS" to use that solver. You can find all solvers that GAMSPy supports by running `gamspy list solvers -a`

Best,
Muhammet
Last edited by msoyturk 4 months ago, edited 1 time in total.
abb.omidi
User
User
Posts: 39
Joined: 6 years ago

Re: GAMSPy issues

Post by abb.omidi »

Dear Muhammet,

Thank you so much for your detailed explanation.
I will check that and get back to you if I have any issues.

Best regards
Abbas
Post Reply