GAMS Kestrel Issue

Problems with modeling
Post Reply
abb.omidi
User
User
Posts: 28
Joined: 3 years ago

GAMS Kestrel Issue

Post by abb.omidi » 6 months ago

Dear support team,

I tried to use GAMS and Kestrel a while and it worked fine. Recently, I downloaded the new GAMS version (30.1.0 re01a340 WEX-WEI x86 64bit/MS Windows) and I activated it by using a trial licence. Now, I'm trying to solve an optimization model using GAMS/Kestrel. When I run the GAMS to solve the model it has the following error:
--- Starting compilation
--- GAMS..Kestrel.gms(43) 3 Mb
--- Starting execution: elapsed 0:00:00.013[LST:48]
--- GAMS..Kestrel.gms(38) 4 Mb
--- Generating MIP model sequence[LST:48]
--- GAMS..Kestrel.gms(43) 4 Mb
--- 58 rows 73 columns 272 non-zeroes
--- 36 discrete-columns
--- Executing KESTREL: elapsed 0:00:00.033[LST:266]

--- Kestrel fatal error: GAMS cntr-file version 41, 42, 44, 46, 47 or 48 required

ERR: Solver rc 1
--- Restarting execution
--- GAMS..Kestrel.gms(43) 2 Mb
--- Reading solution for model sequence[LST:281]
*** Status: Normal completion[LST:330]
--- Job GAMS..Kestrel.gms Stop 04/03/20 17:55:45 elapsed 0:00:02.128
The input is:

Code: Select all

MODEL test/ all /;
Option mip=kestrel;
$onecho > kestrel.opt
kestrel_solver Cplex
neos_server www.neos-server.org:3333
$offecho
test.optfile=1;
SOLVE test using MIP minimizing PRS;
Would you please,
1) What does it mean and how can I fix this issue?
2) Can Gurobi solver be invoked through the kestrel using the GAMS new versions? (In the previous version it did not)

Regards
A. Omidi

User avatar
bussieck
Moderator
Moderator
Posts: 504
Joined: 4 years ago

Re: GAMS Kestrel Issue

Post by bussieck » 6 months ago

Hi,

This is indeed a bug and it is already fixed for the next GAMS release. If you are on Windows, you can replace the gmske_nx.exe in the GAMS system directory with the one I provide here: https://www.dropbox.com/s/kd2csnv04uvig ... x.exe?dl=0

If you are on Linux/Mac you have to edit the gmske_ux.out file in the GAMS system directory and add the "49" into the list of accepted control file versions:

Code: Select all

    if self.cntver not in [41, 42, 44, 46, 47, 48, 49]:
      self.Fatal("GAMS cntr-file version 41, 42, 44, 46, 47, 48, 49 required")
Moreover, you have to add the following lines before the line that reads "# downgrade the cntr-file version 48 to 47" (around line 268):

Code: Select all

    # downgrade the cntr-file version 49 to 48
    if self.cntver == 49:
      # 49 -> 48
      lines[0] = "48\n"
      self.cntver = 48
Thanks for unearthing this.

-Michael

User avatar
bussieck
Moderator
Moderator
Posts: 504
Joined: 4 years ago

Re: GAMS Kestrel Issue

Post by bussieck » 6 months ago

No Gurobi cannot be invoked via Kestrel. This is a (license) restriction enforced by Gurobi. You need to use the web interface and submit your entire model to NEOS to use the free Gurobi solver on NEOS.

-Michael

abb.omidi
User
User
Posts: 28
Joined: 3 years ago

Re: GAMS Kestrel Issue

Post by abb.omidi » 6 months ago

Dear Dr Bussieck,

Many thanks for your detailed explanations. The issue was fixed and the model was solved by the kestrel.
I have another issue and I was wondering if, you could advise me about that.

I have tried to solve a scheduling problem and regard to, the model is a large scale, I would like to use the MIP-start to speed up the solving time. What I'm trying to do is, adjusting the B&B gap (OPTCR) to the 0.7 and solving the model. Then storing the level of the variables into a parameter and using these results as the MIP-start to solve the model once again by optcr=0.0.
I ran a small instance, once without the MIP-start and again with the above method. The problem was solved in 2 Mins and 30 Secs respectively. The snippet code I used is:

Code: Select all

MODEL test_warm/ all /;
Options limrow= 0, limcol= 0, solprint= off, solvelink= 5, mip=cplex, optcr= 0.70, optca= 0.70, threads= 4;
SOLVE test_warm using MIP minimizing PRS;
Parameter results(i,j,k); results(i,j,k)= x.l(i,j,k);
display x.l, results;

***
* using cold start phase II
***
MODEL test_cold/ all /;
x.fx("depot",j,k) = results("depot",j,k);
$onecho > cplex.opt
mipstart 1
$offecho
test_cold.optfile=1;
Options limrow= 0, limcol= 0, solprint= off, solvelink= 5, mip=cplex, optcr= 0.00, optca= 0.00, threads= 4;
SOLVE test_cold using MIP minimizing PRS;
DISPLAY "Optimal Tour Found", X.l;
My questions are:
1) Is the above method suitable to use on the large scale models?
2) How can I use the heuristics to find the initial solution and feeding that into the model? I mean by GAMS and its solvers and without using the external program because even for the small instances finding the initial solution using the gap control was taking much time.
3) When I try feeding all of the initial solutions into the model,

Code: Select all

x.fx(i,j,k) = results(i,j,k);
and I check the solution, I found that this is just a feasible solution and the solver does not use them as a MIP-start. Would you please, how can do that and if I'm wrong, please correct me? Should I have to use something like this?

Code: Select all

x.fx("depot",j,k) = results("depot",j,k);
If so, how is it possible by using the solvers like Gurobi and Cplex through whose APIs? (I mean {x.fx(i,j,k) = results(i,j,k);})

Thanks in advance
A. Omidi

Post Reply