Hello Everyone,
I am new to using GAMS + CPlex + C++. I have however used other modeling platforms like SCIP.
I am using GAMS + Cplex on the C++ API to get multiple near optimal solutions. I have configured this and it runs correctly. The issue is when I try to set a generation time limit, the program runs for the desired time but fails to capture the final solutions generated in the time limit set.
- This issue is generated with all the MIPs problems I tried. I have attached a sample MIP Problem gotten from https://miplib.zib.de/
- My cplex.opt options file has the below values set:
- solnpool generatedSoln.gdx
- solnpoolcapacity 5000
- solnpoolgap 0.1
- solnpoolpop 2
- solnpoolintensity 4
- populatelim 100000
- ResLim 5
- *tilim 5
\
- I tried both the ResLim and tilim
- For the particular problem I attached below, I confirmed that at 5 secs, some solutions are generated but not all possible solutions are generated.
- I also tried setting solnpoolpop to 1 such that it generates all the solutions found as the solving progresses. The problem with this is that it generates way too little number of solutions.
- When I give a sufficient time limit, I do not encounter the error. Sufficient in this case means enough time for Cplex to end the search for optimal solution by itself without considering my time limit.
Is there a way to tell cplex to save the solutions as they are been generated into the .gdx file such that when my time limit is reached, I have the solutions found so far in my .gdx file?
The error I get is also attached below; The error basically says it doesn’t see the .gdx file I am trying to read.
My codes are setup on MAC OS.
set1ch.gms (4.6 KB)
set1ch.gdx (36.8 KB)