help-glpk
[Top][All Lists]
Advanced

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

Re: [Help-glpk] conditional constraint and GLPK


From: Xypron
Subject: Re: [Help-glpk] conditional constraint and GLPK
Date: Tue, 31 Aug 2010 20:34:01 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6

Hello Drakuzz,

var x, binary;
param M := 1000; #sufficiently big number;
param p;
var x;
var t;
var h;

s.t. c1 :
T <= P + M * x;
s.t. c2 :
H <= P + M * (1 - x);

Best regards

Xypron

Drakuzz wrote:
Hello list,
When trying to modelize my problem i can't find how to do it.
I have a parameter called T and two variables named P and H.
I want to add a constraint that is only enabled when the condition is met,
but the condition involves a variable :
If T>P, then P>H, else no constraints. It seems simple but i'm lost here.
Can you help me please?




reply via email to

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