[Top][All Lists]

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

[Help-glpk] Odd/even variable constraint?

From: Rory Winston
Subject: [Help-glpk] Odd/even variable constraint?
Date: Wed, 2 Apr 2008 18:01:53 +0400


Does anyone know how I can express a constraint that a variable must be odd
or even, i.e. in the form 2*n-1 or 2*n + 1? I am trying to write a mathprog
script to find pythagorean triples subject to certain constraints, and i
would like to express some conditions on my variables, namely, that one must
be an odd integer, and the other must be an even integer.

View this message in context:
Sent from the Gnu - GLPK - Help mailing list archive at

reply via email to

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