-------- Forwarded Message --------
From: Alan Zinober <[email protected]>
To: [email protected]
Subject: Either...or logic
Date: Wed, 19 Jun 2013 09:54:28 +0100
Suppose
set S; # eg S = {1,3,4,6,8}
N = card(S);
var x{i in S} binary; # x = 1 if the item i is active ; x = 0 if
no items are included
I have a logical constraint having the form:
either
sum{i in S} x[i] = N
or
sum{i in S} x[i] = 0
In words either all the items x[i] are included or none are.
This will be repeated many times in my model. What is the optimal manner of
implementing this in the model?
Alan
--
Sent from my MacBook Pro
_______________________________________________
Help-glpk mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-glpk