Zvonko,
you may use binary variables to solve this problem, but, x must have
a upper bound.
For example, suppose x <= 10 and x \in \{2,4,6,8,10 \}, then
define a binary variable
Y_j = 1 , if x = 2*j or 0, otherwise for j = 1,2,3,4,5
Therefore, x = 2*y_1 + 4*y_2 + 6*y_3 + 8*y_4 + 10*y_5
y_1 + y_2 + y_3 + y_4 + y_5 = 1
I hope this helps.
Antonio
Em 01/10/2014 08:31, Zvonko Bregar
escreveu:
Hi everybody,
Does there exist an
_expression_
That forces
An integer variable X
\in { 1, 2, 3, …}
To take the values only
from even numbers
X \in {2, 4, 6, …}
Regards,
--Zvonko
OPOZORILO: To elektronsko sporočilo in vse njegove morebitne
priloge lahko vsebujejo zaupne in/ali privilegirane
informacije, ki so last Elektroinštituta Milan Vidmar in so
namenjene izključno naslovniku. Če ste sporočilo prejeli
pomotoma zaradi napake v naslovu ali pri prenosu sporočila,
Vas prosimo, da nas o tem obvestite s povratno pošto. V tem
primeru vsebine prejetega sporočila ne smete uporabiti,
kopirati, tiskati, objaviti ali distribuirati, ampak ga morate
takoj uničiti.
DISCLAIMER: This e-mail is for the intended recipient only. It
contains proprietary information some or all of which may be
legally privileged. If you received this e-mail by mistake
please notify us by replying to this e-mail. Consequently, the
contents of this e-mail must be deleted and not be used,
copied, printed, disclosed or distributed.
_______________________________________________
Help-glpk mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-glpk
|
Este email está limpo de vírus e malwares porque a proteção do avast! Antivírus está ativa.
|
|