How to express the divisibility or the mod operator in a constraint in Gurobi

381 views
Skip to first unread message

Huanfa Chen

unread,
Aug 24, 2016, 4:22:45 PM8/24/16
to Gurobi Optimization
Hi all,

I am writing a constraint about mod: x + y is a multiple of 2, which can be represented using the mod operator.

Does anyone know how to implement this constraint? 

Thanks!


Renan Garcia

unread,
Aug 24, 2016, 4:28:09 PM8/24/16
to gur...@googlegroups.com
You could use:

  x + y = 2z
  z integer

--

---
You received this message because you are subscribed to the Google Groups "Gurobi Optimization" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gurobi+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages