[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-glpk] GLPM and conditional constraints
From: |
Andrew Makhorin |
Subject: |
Re: [Help-glpk] GLPM and conditional constraints |
Date: |
Mon, 23 Aug 2010 17:17:38 +0400 |
> I want to program a constraint which is applied only if a condition is met:
> I have 2 parameters named headcount[d,c,f] and forecast{d,c,f] and a
> variable named T[d,c,f].
> constraint : If (headcount[d,c,f]/forecast[d,c,f])-1<0.08 then T[d,c,f]=0.
> How do i code it please?
s.t. foo{d in D, c in C, f in F : headcount[d,c,f]/forecast[d,c,f])-1<0.08}:
T[d,c,f]=0;