help-glpk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] RE: RE: Floating point precision?


From: Chelaru, Laura
Subject: [Help-glpk] RE: RE: Floating point precision?
Date: Fri, 23 Jul 2010 10:14:12 -0400

Yup, that did it, not sure why I wasn't doing that to begin with. Thanks for 
your help!

-Laura

-----Original Message-----
From: glpk xypron [mailto:address@hidden
Sent: Thursday, July 22, 2010 4:45 PM
To: Chelaru, Laura
Subject: Re: RE: Floating point precision?

Hello Laura,

> The d[i]'s are percentages, so technically they can range between 0-1.
Please, replace
subject to Bin_d1 {i in I1}: d[i] <= 100*BIN2[i];
subject to Bin_d2 {i in I1}: d[i] >= k - 100*(1-BIN2[i]);
by
subject to Bin_d1 {i in I1}: d[i] <= BIN2[i];
subject to Bin_d2 {i in I1}: d[i] >= k * BIN2[i];

This will result in better scaling and could give you up to two
extra digits of precision.

> A few of the d's are around 10^(-8), so those I can write off as rounding
> errors. In a few instances, the "errors" are higher (0.0005), and that
> should not happen.

Some tolerance in GLPK are as high as 1e-5, e.g.:

double tol int (default: 1e-5)
Absolute tolerance used to check if optimal solution to the current LP
relaxation is integer feasible.

Best regards

Xypron

-------- Original-Nachricht --------
> Datum: Thu, 22 Jul 2010 15:55:40 -0400
> Betreff: RE: Floating point precision?

> Thanks for the reply, I didn't catch that detail.
> The d[i]'s are percentages, so technically they can range between 0-1.
> Taking the '100' out however didn't fix the issue.
>
> A few of the d's are around 10^(-8), so those I can write off as rounding
> errors. In a few instances, the "errors" are higher (0.0005), and that
> should not happen.
>
> Any other ideas?
>
> -Laura
>
> -----Original Message-----
> From: glpk xypron [mailto:address@hidden
> Sent: Thursday, July 22, 2010 3:25 PM
> To: Chelaru, Laura; address@hidden
> Subject: Re: Floating point precision?
>
> Hello Laura,
>
> the glpsol online helps says:
>   Options specific to simplex solver:
>    --exact           use simplex method based on exact arithmetic
>
> The exact option is ignored for MIPs
>
> > subject to Bin_d1 {i in I1}: d[i] <= 100*BIN2[i];
> > subject to Bin_d2 {i in I1}: d[i] >= k - 100*(1-BIN2[i]);
> Check the value range of d[i]. Could a smaller number then
> 100 be used?
>
> Best regards
>
> Xypron
>
>
> -------- Original-Nachricht --------
> > Datum: Thu, 22 Jul 2010 10:58:44 -0400
> > Betreff: Floating point precision?
>
> > Hi,
> >
> > I'm kind of new at this, so please bear with me. I am running a MIP
> using
> > the GLPK standalone solver. One of the constraints in my program is that
> a
> > set of variables have to be greater than 'k' if they are positive. I've
> > noticed that a couple of the variables fall within the [0, k] interval,
> and
> > I'm not sure why. I have specified using exact arithmetic.
> >
> > These are the constraints I'm using:
> > subject to Bin_d1 {i in I1}: d[i] <= 100*BIN2[i];
> > subject to Bin_d2 {i in I1}: d[i] >= k - 100*(1-BIN2[i]);
> >
> > where var BIN2 {i in I3} binary;
> > and k is around 0.01;
> >
> > Thanks for your help,
> > Laura
> >
>
> --
> GMX DSL: Internet-, Telefon- und Handy-Flat ab 19,99 EUR/mtl.
> Bis zu 150 EUR Startguthaben inklusive! http://portal.gmx.net/de/go/dsl
>
> ********************
> NOTICE OF CONFIDENTIALITY
> This communication including any information transmitted with it is
> intended only for the use of the addressees and is confidential.
> If you are not an intended recipient or responsible for delivering
> the message to an intended recipient, any review, disclosure,
> conversion to hard copy, dissemination, reproduction or other use
> of any part of this communication is strictly prohibited, as is the
> taking or omitting of any action in reliance upon this communication.
> If you receive this communication in error or without authorization
> please notify us immediately by return e-mail or otherwise and
> permanently delete the entire communication from any computer,
> disk drive, or other storage medium.
>
> If the above disclaimer is not properly readable, it can be found at
> www.td.com/legal
>
> AVERTISSEMENT DE CONFIDENTIALITE
> Ce courriel, ainsi que tout renseignement ci-inclus, destiné uniquement
> aux destinataires susmentionnés,  est confidentiel.  Si vous
> n'êtes pas le destinataire prévu ou un agent responsable de la
> livraison de ce courriel, tout examen, divulgation, copie, impression,
> reproduction, distribution, ou autre utilisation d'une partie de ce
> courriel est strictement interdit de même que toute intervention ou
> abstraction à cet égard.  Si vous avez reçu ce message par erreur ou
> sans autorisation, veuillez en aviser immédiatement l'expéditeur par
> retour de courriel ou par un autre moyen et supprimer immédiatement
> cette communication entière de tout système électronique.
>
> Si l'avis de non-responsabilité ci-dessus n'est pas lisible, vous
> pouvez le consulter à www.td.com/francais/legale

--
Neu: GMX De-Mail - Einfach wie E-Mail, sicher wie ein Brief!
Jetzt De-Mail-Adresse reservieren: http://portal.gmx.net/de/go/demail

********************
NOTICE OF CONFIDENTIALITY
This communication including any information transmitted with it is 
intended only for the use of the addressees and is confidential. 
If you are not an intended recipient or responsible for delivering 
the message to an intended recipient, any review, disclosure, 
conversion to hard copy, dissemination, reproduction or other use 
of any part of this communication is strictly prohibited, as is the 
taking or omitting of any action in reliance upon this communication. 
If you receive this communication in error or without authorization 
please notify us immediately by return e-mail or otherwise and 
permanently delete the entire communication from any computer, 
disk drive, or other storage medium.

If the above disclaimer is not properly readable, it can be found at 
www.td.com/legal
                                                           
AVERTISSEMENT DE CONFIDENTIALITE                   
Ce courriel, ainsi que tout renseignement ci-inclus, destiné uniquement 
aux destinataires susmentionnés,  est confidentiel.  Si vous 
n'êtes pas le destinataire prévu ou un agent responsable de la 
livraison de ce courriel, tout examen, divulgation, copie, impression, 
reproduction, distribution, ou autre utilisation d'une partie de ce 
courriel est strictement interdit de même que toute intervention ou 
abstraction à cet égard.  Si vous avez reçu ce message par erreur ou 
sans autorisation, veuillez en aviser immédiatement l'expéditeur par 
retour de courriel ou par un autre moyen et supprimer immédiatement 
cette communication entière de tout système électronique.

Si l'avis de non-responsabilité ci-dessus n'est pas lisible, vous 
pouvez le consulter à www.td.com/francais/legale



reply via email to

[Prev in Thread] Current Thread [Next in Thread]