[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] Can GLPK use multiple object?
From: |
Manish Jain |
Subject: |
Re: [Help-glpk] Can GLPK use multiple object? |
Date: |
Tue, 20 Jul 2010 14:46:01 -0700 |
The min(x,y) constraint is also a linear constraint, and can be coded using binary variables.
obj: min x
s.t. x + y >= 8
z1 = ....
z2 < ....
-1*(1-s1)M <= y - z1 <= 0
-1*(1-s2)M <= y - z2 <= 0
s1 + s2 = 1
s1, s2 \in {0,1}
This formulation will lock y to the minimum of z1 and z2. M is a huge +ve constant in this.
Disadvantages of the above formulation:
1. s1,s2 are binary and hence this formulation could potentially be slower.
2. sometimes, the constant M can affect the tolerance / robustness of the solution. You can read more literature to learn how and why.
I would also suggest that you read about disjunctive programming which teaches how to encode if-else type of constraints in linear forms.
Hopefully it helps.
Manish Jain
University of Southern California
On Tue, Jul 20, 2010 at 2:36 PM, xiaomi
<address@hidden> wrote:
No. Not their sum. For example this problem:
Object: minimize X
Constraint: X+Y>=8, Y=min(Z1,Z2) Z1=...., Z2<.....
Do I describe Y as "Y<=Z1, Y<=Z2" ? That is not correct unless I maxmize Y in my object at the same time as minimizing X. So I asked whether multiple objects are functional.
Mansour Moufid :
2010/7/20 xiaomi <address@hidden>:
I am running a project that need to minimize more than one variable in
LP solver. Can GLPK do that? If yes, how to do so?
Minimize their sum?