Why sometimes I got decimal numbers ?

Reply-to: gamsworld@googlegroups.com

Hello,

I just spotted a similar problem.

Despite setting:
option optcr=0.0;
option optca=0.0;

and the solution report
**** SOLVER STATUS 1 Normal Completion
**** MODEL STATUS 1 Optimal
**** OBJECTIVE VALUE 7.5000

some of the solution variables that are supposed to be binary get values like 1.0796E-6.

Is there any remedy to that? I cannot see the option “epint” mentioned above.

Regards,
Anna


On Thursday, August 23, 2007 6:33:54 AM UTC+2, Franz Nelissen wrote:

Kenny:

It is weird that sometimes I even define a variable as a binary
variable and use MINLP to solve, the result shows a decimal number,
like 0.3. It should be 0 or 1.

Please check the solution status. It must read something like:

**** SOLVER STATUS 1 NORMAL COMPLETION
**** MODEL STATUS 8 INTEGER SOLUTION

or

**** MODEL STATUS 1 OPTIMAL

If the solver status is 4 (TERMINATED BY SOLVER) check the number of
iterations or the resource usage (old fashioned term for CPU time):

RESOURCE USAGE, LIMIT 0.054 1000.000
ITERATION COUNT, LIMIT 9 10000

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. For
example GAMS/CPLEX by default uses an integrality tolerance of 1e-5.
That’s the reason why sometimes discrete variables come back that are
not quite integer. If you are using a recent version of GAMS/Cplex), you
can change this tolerance. The GAMS/CPLEX option for this is epint 0.
Tightening the integrality tolerance can increase the solve time for the
model significantly.

Hope this helps.

– F<ranz

\

Dr. Franz Nelissen GAMS Software GmbH
Eupener Str. 135-137, 50933 Cologne, Germany
Tel: +49-221-949-9170 Fax: +49-221-949-9171
mailto:FNel...@gams.com Http://www.gams.de/


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/ZCiMx210mR4J.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.

Reply-to: gamsworld@googlegroups.com

Hi everyone,

I am a beginner with GAMS and i don’t know how to change the integrality tolerance. Can you show me the code associated to this action please?

Thanks,
Julien

Le jeudi 23 août 2007 06:33:54 UTC+2, Franz Nelissen a écrit :

Kenny:

It is weird that sometimes I even define a variable as a binary
variable and use MINLP to solve, the result shows a decimal number,
like 0.3. It should be 0 or 1.

Please check the solution status. It must read something like:

**** SOLVER STATUS 1 NORMAL COMPLETION
**** MODEL STATUS 8 INTEGER SOLUTION

or

**** MODEL STATUS 1 OPTIMAL

If the solver status is 4 (TERMINATED BY SOLVER) check the number of
iterations or the resource usage (old fashioned term for CPU time):

RESOURCE USAGE, LIMIT 0.054 1000.000
ITERATION COUNT, LIMIT 9 10000

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. For
example GAMS/CPLEX by default uses an integrality tolerance of 1e-5.
That’s the reason why sometimes discrete variables come back that are
not quite integer. If you are using a recent version of GAMS/Cplex), you
can change this tolerance. The GAMS/CPLEX option for this is epint 0.
Tightening the integrality tolerance can increase the solve time for the
model significantly.

Hope this helps.

– F<ranz

\

Dr. Franz Nelissen GAMS Software GmbH
Eupener Str. 135-137, 50933 Cologne, Germany
Tel: +49-221-949-9170 Fax: +49-221-949-9171
mailto:FNel...@gams.com Http://www.gams.de/


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.

Reply-to: gamsworld@googlegroups.com

Hello !

EpInt is a CPLEX option. It doesn’t work like a GAMS option (option iterLim=200000000; for example)

  1. find the file cplex.opt on your computer and place it in the directory for working files

  2. with the command $onecho you can write in this file
    $onecho > cplex.opt
    EpInt 0
    $offecho

  3. You have to call the option with the following line :
    ModelName.OptFile= 1;

Now this solution work for my Model

you can find more details and other CPLEX option in this pdf :
http://www.gams.com/dd/docs/solvers/allsolvers.pdf

Regards,
Thomas


Le mercredi 8 avril 2015 17:53:15 UTC+2, Julien Cacciapalle a écrit :

Hi everyone,

I am a beginner with GAMS and i don’t know how to change the integrality tolerance. Can you show me the code associated to this action please?

Thanks,
Julien

Le jeudi 23 août 2007 06:33:54 UTC+2, Franz Nelissen a écrit :

Kenny:

It is weird that sometimes I even define a variable as a binary
variable and use MINLP to solve, the result shows a decimal number,
like 0.3. It should be 0 or 1.

Please check the solution status. It must read something like:

**** SOLVER STATUS 1 NORMAL COMPLETION
**** MODEL STATUS 8 INTEGER SOLUTION

or

**** MODEL STATUS 1 OPTIMAL

If the solver status is 4 (TERMINATED BY SOLVER) check the number of
iterations or the resource usage (old fashioned term for CPU time):

RESOURCE USAGE, LIMIT 0.054 1000.000
ITERATION COUNT, LIMIT 9 10000

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. For
example GAMS/CPLEX by default uses an integrality tolerance of 1e-5.
That’s the reason why sometimes discrete variables come back that are
not quite integer. If you are using a recent version of GAMS/Cplex), you
can change this tolerance. The GAMS/CPLEX option for this is epint 0.
Tightening the integrality tolerance can increase the solve time for the
model significantly.

Hope this helps.

– F<ranz

\

Dr. Franz Nelissen GAMS Software GmbH
Eupener Str. 135-137, 50933 Cologne, Germany
Tel: +49-221-949-9170 Fax: +49-221-949-9171
mailto:FNel...@gams.com Http://www.gams.de/


To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.