help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] [Fwd: Re: fraction with vars]


From: Michael Hennebry
Subject: Re: [Help-glpk] [Fwd: Re: fraction with vars]
Date: Wed, 7 Aug 2013 10:31:32 -0500 (CDT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Wed, 7 Aug 2013, Andrew Makhorin wrote:

-------- Forwarded Message --------
From: Gustavo Cavalcanti <address@hidden>
To: address@hidden
Subject: Re: [Help-glpk] fraction with vars
Date: Wed, 7 Aug 2013 00:22:06 -0300

I'm trying to solve a similar problem: the division of the variable
'a' by the variable 'b'.

I couldnt figured out how GLPK's ln() (or log()) and exp() functions
work in these cases, which we are appliyng these functions on
variables. Is any linearization/transformation necessary?

And do the piecewise linear function using SOS2 constraints stand for
fractions? I tried to follow the example

I've never done it that way and never had the urge.

x * y

so i did

a * (1 / b)

but then I dont know what to do with 1 / b.

Also, I cant see how the method appointed by Michael
(http://web.archiveorange.com/archive/v/5brOt80Ug9CHEU5WVM6q#6WwvpMWTxhPTY2D)
could be applied once we have something like

k / w_su - 1

and wouldnt be that a division of the variable 'a' by the variable 'b'?

Don't know exactly what you are trying to accomplish.
In general, to model w = x * y, where range(x) is finite and all are bounded:

x = SUM k*qx[k]
   k in range(x)

1 = SUM qx[k]
   k in range(x)

qk[range(x)] binary

if qx[k]==1, w=k*y    for k in range(x)
use the small-M method.

The size of the representation will be proportional to the size of range(x).

If x is continuous one could select a finite subset
of range(x) and subject qx to an SOS2 constraint instead of binary.
If the resulting approximation is not good enough,
one could change the subset and try again,
perhaps decreasing resolution at the ends
and increasing it near the previous solution.

--
Michael   address@hidden
"On Monday, I'm gonna have to tell my kindergarten class,
whom I teach not to run with scissors,
that my fiance ran me through with a broadsword."  --  Lily



reply via email to

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