[Fwd: constraint with two possible values]

Andrew Makhorin <[email protected]>
Newsgroups gmane.comp.gnu.glpk
Message-ID <1510300946.3792.0.camel@corvax>
-------- Forwarded Message --------
From: Diego González <[email protected]>
To: [email protected]
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




_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.