GAMS/CPLEX return infeasibility while DICOPT give a solution

Problems with modeling
Post Reply
feifan
User
User
Posts: 14
Joined: 6 months ago

GAMS/CPLEX return infeasibility while DICOPT give a solution

Post by feifan » 6 days ago

Hi, all,

My model is a MISOCP problem. When I used GAMS/CPLEXD to solve the model, the solver returned infeasibility. However, when I fixed my binary decision variables as zero and solved it again using CPLEXD, it did give a feasible solution. Especially, the DICOPT solver could give a feasible solution. So, what happened to the CPLEXD solver?

I am looking forward to your help. Please use the attached code and data file ( because .inc file cannot be uploaded, I copy the data in the text file).
Attachments
data.txt
(95.36 KiB) Downloaded 4 times
Untitled_42.gms
(6.46 KiB) Downloaded 7 times

Fred
Posts: 86
Joined: 2 years ago

Re: GAMS/CPLEX return infeasibility while DICOPT give a solution

Post by Fred » 6 days ago

Hi,

What version did you use? With the latest GAMS 26.1.0/CPLEXD, Cplex solves the problem even if I remove all variable fixes.

Code: Select all

--- Job Untitled_42.gms Start 03/13/19 07:04:46 26.1.0 rf2b37b9 WEX-WEI x86 64bit/MS Windows
GAMS 26.1.0   Copyright (C) 1987-2019 GAMS Development. All rights reserved
[...]
--- Starting compilation
--- Untitled_42.gms(5) 2 Mb
--- . data.txt(2400) 3 Mb
--- Untitled_42.gms(225) 3 Mb
--- Starting execution: elapsed 0:00:00.009
--- Untitled_42.gms(2620) 91 Mb

--- Generating MIQCP model MasterProblem
--- Untitled_42.gms(2624) 96 Mb

---   12,966 rows  7,230 columns  33,625 non-zeroes
---   9,580 nl-code  3,832 nl-non-zeroes
---   374 discrete-columns
--- Untitled_42.gms(2624) 94 Mb
--- Executing CPLEXD: elapsed 0:00:03.856

IBM ILOG CPLEX   26.1.0 rf2b37b9 Released Feb 02, 2019 WEI x86 64bit/MS Window

--- GAMS/Cplex licensed for continuous and discrete problems.
--- Space for names approximately 0.51 Mb
--- Use option 'names no' to turn use of names off
--- GMO memory 5.54 Mb (peak 5.54 Mb)
--- Dictionary memory 0.00 Mb
--- Cplex 12.8.0.0 link memory 0.39 Mb (peak 1.65 Mb)
--- Starting Cplex...
CPXPARAM_Advance                                 0
CPXPARAM_Simplex_Limits_Iterations               2000000000
CPXPARAM_TimeLimit                               1000
CPXPARAM_Threads                                 1
CPXPARAM_Parallel                                1
CPXPARAM_Tune_TimeLimit                          200
CPXPARAM_MIP_Tolerances_AbsMIPGap                0.01
CPXPARAM_MIP_Tolerances_MIPGap                   0.01
CPXPARAM_MIP_Display                             4
Tried aggregator 3 times.
MIQCP Presolve eliminated 6207 rows and 1696 columns.
MIQCP Presolve modified 550 coefficients.
Aggregator did 2039 substitutions.
Reduced MIQCP has 7541 rows, 7275 columns, and 24332 nonzeros.
Reduced MIQCP has 336 binaries, 0 generals, 0 SOSs, and 0 indicators.
Reduced MIQCP has 944 quadratic constraints.
Presolve time = 0.05 sec. (30.58 ticks)
Probing fixed 33 vars, tightened 194 bounds.
Probing time = 0.00 sec. (8.49 ticks)
Clique table members: 920.
MIP emphasis: balance optimality and feasibility.
MIP search method: dynamic search.
Parallel mode: none, using 1 thread.

Iteration log . . .
Iteration:     1   Dual objective     =         -4085.000000
Perturbation started.
Iteration:   101   Dual objective     =         -4085.000000
Iteration:   458   Dual objective     =         -4084.999770
Iteration:   758   Dual objective     =         -4084.999648
Iteration:  1067   Dual objective     =         -4084.999521
Iteration:  1384   Dual objective     =         -4084.999380
Iteration:  1886   Dual objective     =         -4079.999197
Iteration:  2509   Dual objective     =         -4079.999071
Iteration:  2824   Dual objective     =         -4079.998956
Iteration:  3449   Dual objective     =         -4079.998917
Iteration:  3898   Dual objective     =         -4079.998862
Iteration:  4118   Dual objective     =         -4079.998779
Iteration:  4311   Dual objective     =         -4079.998745
Iteration:  4439   Dual objective     =         -4079.931458
Iteration:  4521   Dual objective     =         -4079.931456
Iteration:  4707   Dual objective     =         -4079.931454
Iteration:  4893   Dual objective     =         -4079.931452
Iteration:  5093   Dual objective     =         -4079.931451
Iteration:  5318   Dual objective     =         -4079.931451
Removing perturbation.
Root relaxation solution time = 0.11 sec. (203.92 ticks)

        Nodes                                         Cuts/
   Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap

      0     0    -4079.9327     0                  -4095.0000     5343         
      0     0    -4079.9327     6                   Cone: 663     5703         
      0     0    -4079.9327     6                  Cone: 1320     6238         
      0     0    -4079.9327     6                  Cone: 1978     6708         
      0     0    -4079.9327     6                  Cone: 2610     7157         
      0     0    -4079.9327     6                  Cone: 3249     7673         
      0     0    -4079.9327     6                  Cone: 3835     8164         
      0     0    -4079.9327     6                  Cone: 5348    18851         
      0     0    -4079.9327     6                  Cone: 5878    19223         
      0     0    -4079.9327     6                  Cone: 6417    24312         
      0     0    -4079.9327     6                  Cone: 7002    24816         
      0     0    -4079.9327     0                  Cone: 7535    27997         
      0     0    -4079.9327     6                  Cone: 8060    53260         
      0     0    -4079.9327     0                  Cone: 8545    66172         
      0     0    -4079.9327     0                  Cone: 9000    66987         
      0     0    -4079.9327     0                  Cone: 9355    73959         
      0     0    -4079.9327     0                  Cone: 9746    90942         
      0     0    -4079.9327     0                 Cone: 10142   113127         
      0     0    -4079.9327     0                 Cone: 10509   134636         
      0     0    -4079.9327     0                 Cone: 10872   153636         
      0     0    -4079.9327     6                 Cone: 11220   174832         
      0     0    -4079.9327     0                 Cone: 11573   192985         
      0     0    -4079.9327     0                 Cone: 11935   210219         
      0     0    -4079.9327     6                  -4079.9327   210219         
*     0+    0                        -4079.9327    -4079.9327             0.00%
Found incumbent of value -4079.932694 after 39.09 sec. (45214.61 ticks)

Cone linearizations applied:  6431

Root node processing (before b&c):
  Real time             =   39.09 sec. (45215.28 ticks)
Sequential b&c:
  Real time             =    0.00 sec. (0.00 ticks)
                          ------------
Total (root+branch&cut) =   39.09 sec. (45215.28 ticks)
MIQCP status(102): integer optimal, tolerance.
Cplex Time: 39.09sec (det. 45215.30 ticks)

Returning a primal only solution to GAMS (marginals all set to NA).
Solution satisfies tolerances.

MIP Solution:        -4079.932694    (210219 iterations, 0 nodes)
Best possible:       -4079.932695
Absolute gap:            0.000002
Relative gap:            0.000000

--- Restarting execution
--- Untitled_42.gms(2624) 90 Mb
--- Reading solution for model MasterProblem
***
*** Solver did not provide marginals for model MasterProblem
***
--- Untitled_42.gms(2624) 91 Mb
--- Executing after solve: elapsed 0:00:43.261
--- Untitled_42.gms(2625) 92 Mb
--- Profile Summary (36 records processed)
     2.500   0.096GB      2559 Equation   RadialNode (89)
     0.094   0.093GB      2520 Equation   obj (1)
     0.093   0.092GB      2625 Display    
     0.078   0.094GB      2524 Equation   ActivePowerBal (948)
     0.078   0.094GB      2624 GAMS Fini   
     0.063   0.094GB      2525 Equation   VarPowerBal (948)
     0.062   0.095GB      2531 Equation   VolDropLine (863)
     0.047   0.095GB      2544 Equation   ActivePowLimL (863)
     0.047   0.095GB      2547 Equation   ActivePowLimUs (95)
     0.047   0.096GB      2552 Equation   VarPowLimUs (95)
*** Status: Normal completion
--- Job Untitled_42.gms Stop 03/13/19 07:05:29 elapsed 0:00:43.350
Best,
Fred

feifan
User
User
Posts: 14
Joined: 6 months ago

Re: GAMS/CPLEX return infeasibility while DICOPT give a solution

Post by feifan » 6 days ago

Hi, Fred, thanks for your answers.

I use the old version GAMS 24.5.6. Is the infeasibility issue caused by the old version?

Unfortunately, I don't have license for the latest GAMS. Then, what am I gonna do?

Kind regards,
feifan


Fred wrote:
6 days ago
Hi,

What version did you use? With the latest GAMS 26.1.0/CPLEXD, Cplex solves the problem even if I remove all variable fixes.

Code: Select all

--- Job Untitled_42.gms Start 03/13/19 07:04:46 26.1.0 rf2b37b9 WEX-WEI x86 64bit/MS Windows
GAMS 26.1.0   Copyright (C) 1987-2019 GAMS Development. All rights reserved
[...]
--- Starting compilation
--- Untitled_42.gms(5) 2 Mb
--- . data.txt(2400) 3 Mb
--- Untitled_42.gms(225) 3 Mb
--- Starting execution: elapsed 0:00:00.009
--- Untitled_42.gms(2620) 91 Mb

--- Generating MIQCP model MasterProblem
--- Untitled_42.gms(2624) 96 Mb

---   12,966 rows  7,230 columns  33,625 non-zeroes
---   9,580 nl-code  3,832 nl-non-zeroes
---   374 discrete-columns
--- Untitled_42.gms(2624) 94 Mb
--- Executing CPLEXD: elapsed 0:00:03.856

IBM ILOG CPLEX   26.1.0 rf2b37b9 Released Feb 02, 2019 WEI x86 64bit/MS Window

--- GAMS/Cplex licensed for continuous and discrete problems.
--- Space for names approximately 0.51 Mb
--- Use option 'names no' to turn use of names off
--- GMO memory 5.54 Mb (peak 5.54 Mb)
--- Dictionary memory 0.00 Mb
--- Cplex 12.8.0.0 link memory 0.39 Mb (peak 1.65 Mb)
--- Starting Cplex...
CPXPARAM_Advance                                 0
CPXPARAM_Simplex_Limits_Iterations               2000000000
CPXPARAM_TimeLimit                               1000
CPXPARAM_Threads                                 1
CPXPARAM_Parallel                                1
CPXPARAM_Tune_TimeLimit                          200
CPXPARAM_MIP_Tolerances_AbsMIPGap                0.01
CPXPARAM_MIP_Tolerances_MIPGap                   0.01
CPXPARAM_MIP_Display                             4
Tried aggregator 3 times.
MIQCP Presolve eliminated 6207 rows and 1696 columns.
MIQCP Presolve modified 550 coefficients.
Aggregator did 2039 substitutions.
Reduced MIQCP has 7541 rows, 7275 columns, and 24332 nonzeros.
Reduced MIQCP has 336 binaries, 0 generals, 0 SOSs, and 0 indicators.
Reduced MIQCP has 944 quadratic constraints.
Presolve time = 0.05 sec. (30.58 ticks)
Probing fixed 33 vars, tightened 194 bounds.
Probing time = 0.00 sec. (8.49 ticks)
Clique table members: 920.
MIP emphasis: balance optimality and feasibility.
MIP search method: dynamic search.
Parallel mode: none, using 1 thread.

Iteration log . . .
Iteration:     1   Dual objective     =         -4085.000000
Perturbation started.
Iteration:   101   Dual objective     =         -4085.000000
Iteration:   458   Dual objective     =         -4084.999770
Iteration:   758   Dual objective     =         -4084.999648
Iteration:  1067   Dual objective     =         -4084.999521
Iteration:  1384   Dual objective     =         -4084.999380
Iteration:  1886   Dual objective     =         -4079.999197
Iteration:  2509   Dual objective     =         -4079.999071
Iteration:  2824   Dual objective     =         -4079.998956
Iteration:  3449   Dual objective     =         -4079.998917
Iteration:  3898   Dual objective     =         -4079.998862
Iteration:  4118   Dual objective     =         -4079.998779
Iteration:  4311   Dual objective     =         -4079.998745
Iteration:  4439   Dual objective     =         -4079.931458
Iteration:  4521   Dual objective     =         -4079.931456
Iteration:  4707   Dual objective     =         -4079.931454
Iteration:  4893   Dual objective     =         -4079.931452
Iteration:  5093   Dual objective     =         -4079.931451
Iteration:  5318   Dual objective     =         -4079.931451
Removing perturbation.
Root relaxation solution time = 0.11 sec. (203.92 ticks)

        Nodes                                         Cuts/
   Node  Left     Objective  IInf  Best Integer    Best Bound    ItCnt     Gap

      0     0    -4079.9327     0                  -4095.0000     5343         
      0     0    -4079.9327     6                   Cone: 663     5703         
      0     0    -4079.9327     6                  Cone: 1320     6238         
      0     0    -4079.9327     6                  Cone: 1978     6708         
      0     0    -4079.9327     6                  Cone: 2610     7157         
      0     0    -4079.9327     6                  Cone: 3249     7673         
      0     0    -4079.9327     6                  Cone: 3835     8164         
      0     0    -4079.9327     6                  Cone: 5348    18851         
      0     0    -4079.9327     6                  Cone: 5878    19223         
      0     0    -4079.9327     6                  Cone: 6417    24312         
      0     0    -4079.9327     6                  Cone: 7002    24816         
      0     0    -4079.9327     0                  Cone: 7535    27997         
      0     0    -4079.9327     6                  Cone: 8060    53260         
      0     0    -4079.9327     0                  Cone: 8545    66172         
      0     0    -4079.9327     0                  Cone: 9000    66987         
      0     0    -4079.9327     0                  Cone: 9355    73959         
      0     0    -4079.9327     0                  Cone: 9746    90942         
      0     0    -4079.9327     0                 Cone: 10142   113127         
      0     0    -4079.9327     0                 Cone: 10509   134636         
      0     0    -4079.9327     0                 Cone: 10872   153636         
      0     0    -4079.9327     6                 Cone: 11220   174832         
      0     0    -4079.9327     0                 Cone: 11573   192985         
      0     0    -4079.9327     0                 Cone: 11935   210219         
      0     0    -4079.9327     6                  -4079.9327   210219         
*     0+    0                        -4079.9327    -4079.9327             0.00%
Found incumbent of value -4079.932694 after 39.09 sec. (45214.61 ticks)

Cone linearizations applied:  6431

Root node processing (before b&c):
  Real time             =   39.09 sec. (45215.28 ticks)
Sequential b&c:
  Real time             =    0.00 sec. (0.00 ticks)
                          ------------
Total (root+branch&cut) =   39.09 sec. (45215.28 ticks)
MIQCP status(102): integer optimal, tolerance.
Cplex Time: 39.09sec (det. 45215.30 ticks)

Returning a primal only solution to GAMS (marginals all set to NA).
Solution satisfies tolerances.

MIP Solution:        -4079.932694    (210219 iterations, 0 nodes)
Best possible:       -4079.932695
Absolute gap:            0.000002
Relative gap:            0.000000

--- Restarting execution
--- Untitled_42.gms(2624) 90 Mb
--- Reading solution for model MasterProblem
***
*** Solver did not provide marginals for model MasterProblem
***
--- Untitled_42.gms(2624) 91 Mb
--- Executing after solve: elapsed 0:00:43.261
--- Untitled_42.gms(2625) 92 Mb
--- Profile Summary (36 records processed)
     2.500   0.096GB      2559 Equation   RadialNode (89)
     0.094   0.093GB      2520 Equation   obj (1)
     0.093   0.092GB      2625 Display    
     0.078   0.094GB      2524 Equation   ActivePowerBal (948)
     0.078   0.094GB      2624 GAMS Fini   
     0.063   0.094GB      2525 Equation   VarPowerBal (948)
     0.062   0.095GB      2531 Equation   VolDropLine (863)
     0.047   0.095GB      2544 Equation   ActivePowLimL (863)
     0.047   0.095GB      2547 Equation   ActivePowLimUs (95)
     0.047   0.096GB      2552 Equation   VarPowLimUs (95)
*** Status: Normal completion
--- Job Untitled_42.gms Stop 03/13/19 07:05:29 elapsed 0:00:43.350
Best,
Fred

User avatar
bussieck
Moderator
Moderator
Posts: 268
Joined: 2 years ago

Re: GAMS/CPLEX return infeasibility while DICOPT give a solution

Post by bussieck » 5 days ago

Update! Seriously, there is a great article by ORNinja (Marc-Andre Carle) that makes a case for working with the latest software when doing relevant research, see http://www.thequestforoptimality.com/or ... tion-2017/. The Cplex version 12.6.2.0 in 24.5.6 had an issue with the aggregator (not in general but with some numerically challenging models). So turn it off "aggind 0" in a cplexd.opt option file or better fix your numerical issues. Cplex (with datacheck=2 option) gives you some advice about model flaws:

Code: Select all

CPLEX Warning  1045: Detected nonzero <= the maximum value of either CPX_PARAM_EPRHS or CPX_PARAM_EPOPT at constraint 'VarPowerBal(lp936,z51)', variable 'rlp(lp936)'.
CPLEX Warning  1045: Detected nonzero <= the maximum value of either CPX_PARAM_EPRHS or CPX_PARAM_EPOPT at constraint 'VarPowerBal(lp936,z51)', variable 'X_z(z51)'.
CPLEX Warning  1045: Detected nonzero <= the maximum value of either CPX_PARAM_EPRHS or CPX_PARAM_EPOPT at constraint 'VarPowerBal(lp944,z51)', variable 'rlp(lp944)'.
CPLEX Warning  1045: Detected nonzero <= the maximum value of either CPX_PARAM_EPRHS or CPX_PARAM_EPOPT at constraint 'VarPowerBal(lp944,z51)', variable 'X_z(z51)'.
CPLEX Warning  1045: Detected nonzero <= the maximum value of either CPX_PARAM_EPRHS or CPX_PARAM_EPOPT at constraint 'VolDropLine(lp10,lp12)', variable 'I_s(lp10,lp12)'.
CPLEX Warning  1045: Detected nonzero <= the maximum value of either CPX_PARAM_EPRHS or CPX_PARAM_EPOPT at constraint 'VolDropLine(lp10,lp13)', variable 'I_s(lp10,lp13)'.
CPLEX Warning  1045: Detected nonzero <= the maximum value of either CPX_PARAM_EPRHS or CPX_PARAM_EPOPT at constraint 'VolDropLine(lp20,lp23)', variable 'I_s(lp20,lp23)'.
CPLEX Warning  1045: Detected nonzero <= the maximum value of either CPX_PARAM_EPRHS or CPX_PARAM_EPOPT at constraint 'VolDropLine(lp30,lp34)', variable 'I_s(lp30,lp34)'.
CPLEX Warning  1045: Detected nonzero <= the maximum value of either CPX_PARAM_EPRHS or CPX_PARAM_EPOPT at constraint 'VolDropLine(lp30,lp35)', variable 'I_s(lp30,lp35)'.
CPLEX Warning  1045: Detected nonzero <= the maximum value of either CPX_PARAM_EPRHS or CPX_PARAM_EPOPT at constraint 'VolDropLine(lp37,lp38)', variable 'I_s(lp37,lp38)'.
CPLEX Warning  1045: Too many warnings of this type have been detected.  All further warnings of this type will be ignored.
-Michael

Post Reply