[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-glpk] [Fwd: Re: fraction with vars]
From: |
Andrew Makhorin |
Subject: |
[Help-glpk] [Fwd: Re: fraction with vars] |
Date: |
Wed, 07 Aug 2013 08:49:01 +0400 |
-------- 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
Hi,
> On Sat, 28 Apr 2012, Michael Hennebry wrote:
>
>> Another way is to replace the variables by their logarithms:
>>
>> ln x_suj = ln p_s + ln y_suj - ln w_su
>>
>> and then, depending on the context, model the exponenta
>>
>> z = exp(ln z)
>>
>> by a piecewise linear function using SOS2 constraints; see
>> http://lists.gnu.org/archive/html/help-glpk/2007-06/msg00005.html
>> http://winglpk.sourceforge.net/media/glpk-sos2_02.pdf
>
> To me, the other suggestions seem better.
> They are a bit smaller and still all-integer.
> I think that something similar with fewer variables could be done,
> but more analysis would be needed.
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
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'?
Thanks,
Gustavo Cavalcanti
- [Help-glpk] [Fwd: Re: fraction with vars],
Andrew Makhorin <=