help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] Division


From: Kasper Tordrup
Subject: Re: [Help-glpk] Division
Date: Fri, 21 Oct 2011 08:50:38 +0200

Thx for the answers guys.
They helped a lot.

And yes, there is an error. o should be > 0 but for some reason if I change that, GLPK says "strict bound not allowed"?
o is in the range 1..3
C is expected to be in 1..10 plus/minus
S could be as large as 200K-300K

Best regards,
Kasper

On Thu, Oct 20, 2011 at 1:09 AM, Michael Hennebry <address@hidden> wrote:
On Wed, 19 Oct 2011, Kasper Tordrup wrote:

s.t. phase{u in U, j in 1..3}: sum{s in S} ((ps[s] * y[s,j,u]) / o[s,u]) =
d[j,u];

But since division with o[s,u] is not linear I can't do that.
So can anyone explain how one could make the constraint linear?

set S;
set U;
param ps {s in S}, integer, > 0;
var y {s in S, j in 1..3, u in U}, binary;
var o {s in S, u in U}, integer, >= 0;
var d {j in 1..3, u in U}, integer, >= 0;

It took me a while to analyze Xypron's solution.
It works if you make the change:

s.t. c{u in U, j in 1..3, s in S}: sum{o in O} y[s,j,u,o] <= 1;
The original y[s,j,u] is allowed to be zero.

--
Michael   address@hidden
"Pessimist: The glass is half empty.
Optimist:   The glass is half full.
Engineer:   The glass is twice as big as it needs to be."



--
Kasper Tordrup - Stud. M. Sc.
IMADA @ University of Southern Denmark
address@hidden - +45 27 44 58 49



reply via email to

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