[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Linear expressions in the integrands of iteratedexpressi
From: |
Barry Rountree |
Subject: |
Re: [Help-glpk] Linear expressions in the integrands of iteratedexpressions |
Date: |
Sun, 22 Oct 2006 22:15:52 -0400 |
User-agent: |
KMail/1.9.1 |
On Sunday 22 October 2006 20:54, you wrote:
> Can you replace
>
> s.t. blrMax:max{i in I, j in J} x[i,j] = 1;
>
> with just putting an upper bound "x[i,j] <= 1" where you define the
> variable?
That's a very good suggestion, but it doesn't quite handle
what I'm trying to do. I'm trying to code up
exclusivity without having to use "binary", e.g.
s.t. foo:sum{i in I} x[i] = 42;
s.t. bar:max{i in I} x[i] = 42;
should ensure that there is one and only one "42" in x[i],
with everything else being zero (assuming all x[i]>=0, of
course).
This can certainly be done more elegantly in an ILP than
an LP, and I don't know if an LP still scales better when
given these kind of constraints. So I'll be coding up
one of each flavor and testing.
> "max" isn't a linear operator.
Here's what I've been doing using the C interface to glpk:
given variables x>=0, y>=0, and z, z=max(x,y) looks like
-x + z >= 0
-y + z >= 0
(indirectly) minimize z
I thought that "max" would have similar functionality. If
that's not the case because it isn't a linear operator, then
I'll need back up a bit and try a different approach.
So, is "max" not intended for what I'm trying to do? Did I
get a little too giddy at the thought of abandoning my large
pieces of graph paper for a high-level language?
Thanks,
Barry
> -Marc