User Tools

Site Tools


solver:non_integer_results_of_a_mip

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
solver:non_integer_results_of_a_mip [2007/11/16 14:10]
Franz Nelissen
— (current)
Line 1: Line 1:
-====== Non integer results of a MIP ====== 
-Q: //I am getting results back from my MIP model, which I don’t expect. Although I define a variable to be integer, the output file shows values that they aren’t (eg, 0.194, etc).// 
  
-Please check the solution status. It must read something like:  
-<​code>​ 
-**** SOLVER STATUS 1 NORMAL COMPLETION ​ 
-**** MODEL STATUS 8 INTEGER SOLUTION ​ 
-</​code>​ 
-or  
-<​code>​ 
-**** MODEL STATUS ​     1 OPTIMAL ​ 
-</​code>​ 
- 
-If the solver status is 4 (''​TERMINATED BY SOLVER''​) check the number of iterations or the resource usage (old fashioned term for CPU time): 
-<​code>​ 
-   ​RESOURCE USAGE, LIMIT          0.054     ​1000.000 
-   ​ITERATION COUNT, LIMIT         ​9 ​        10000 
-</​code>​ 
- 
-If the solver hits one of these limits before finding an integer solution, you may get fractional values. ​ 
- 
- 
-Sometimes (slightly) non integer levels for integer variables can also appear due to the default integrality tolerance of the MIP solver. ​ All solver are using numerical methods of finite-precision arithmetic. Consequently,​ the feasibility and integrality of a solution depends on the value given to tolerances. This phenomenon is especially noticeable in models with numeric diffculties,​ for example, in models with Big M coefficients. 
- 
-Below is an example, where the binary variable ''​xbin''​ was used in a big-M formulation. After the  optimization ​ using GAMS/Cplex had finished successfully a display statement showed: 
-<​code>​ 
---- VAR xbin 
-       ​LOWER ​    ​LEVEL ​    ​UPPER ​  ​MARGINAL 
-xbin      .    6.4273E-7 ​  ​1.000 ​ 1600.000 ​     ​ 
-</​code>​ 
- 
-6.4273E-7 is smaller than the integrality tolerance of 1e-5 used by default and thus GAMS/Cplex accepted this value as being integral. 
- 
-  
-If you are using a recent version of GAMS/​Cplex),​ you can change the integrality tolerance. The GAMS/CPLEX option for this is ''​epint''​ (default = 1e-5, range: [0, 0.5]. Tightening the integrality tolerance (e.g setting ''​epint 0''​) can increase the solve time for the model significantly. ​ 
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY solver/non_integer_results_of_a_mip.1195218629.txt.gz · Last modified: 2007/11/16 14:10 by Franz Nelissen