Closed tlambert03 closed 1 year ago
this is now ready @funkey
from ilpy import Relation from ilpy.expressions import Variable u = Variable("u", index=0) v = Variable("v", index=1) e = Variable("e", index=2) expr = 2 * u - 5 * v + e / 2 >= -3 print(expr) # "2 * u - 5 * v + e / 2 >= -3" constraint = expr.constraint() assert constraint.get_value() == -3 assert constraint.get_relation() == Relation.GreaterEqual assert constraint.get_coefficients() == {0: 2.0, 1: -5.0, 2: 0.5}
see https://github.com/funkelab/motile/pull/30 for an example of how this could be used in motile
this is now ready @funkey
see https://github.com/funkelab/motile/pull/30 for an example of how this could be used in motile