使用 google or-tools in Java 的除法不等式约束

Division inequality constraint using google or-tools in Java

我正在尝试使用 Google OR-Tools GLOP solver:

解决一个简单的优化问题
Goal = MAXIMIZE (X+Y)
Constraint: X/(X+Y) >= 10

我找不到除法的例子。 我怎样才能在 Java 中做到这一点?

你写的约束不是线性的。 但您可以将其重写为:

maximize (x + y)

such that: 
    x >= 10 * (x + y)