help-glpk
[Top][All Lists]
Advanced

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

[Help-glpk] [Fwd: constraint with two possible values]


From: Andrew Makhorin
Subject: [Help-glpk] [Fwd: constraint with two possible values]
Date: Fri, 10 Nov 2017 11:02:26 +0300

-------- Forwarded Message --------
From: Diego González <address@hidden>
To: address@hidden
Subject: constraint with two possible values
Date: Thu, 9 Nov 2017 22:13:42 -0300

Hi, I am new with glpk and I am having trouble with a certain
constraint. Basically I need certain sum to either be a precise number
(given by a parameter) or equal to 0. Been trying different things for a
while with no success, this was my last attempt.

s.t. tiempoProyecto {a in A}: ((sum{m in M,t in T} x[a,m,t]/personal[a])
>= dedicacion[a]) or ((sum{m in M,t in T} x[a,m,t]/personal[a]) = 0);


x declaration is:
var x{a in A,m in M, t in T} binary >= 0;


all sets and params are declared in a data file.


That line gives me the error:
parte2.glpk:30: operand preceding >= has invalid type
Context: ...um { m in M , t in T } x [ a , m , t ] / personal [ a ] ) >=
MathProg model processing error


Any clue of how should I face this problem?
thanks in advance






reply via email to

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