Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设以下约束:
@constraint(model, [i=1:5,j=1:5], a[i] <= b[j])
如何i == j从上面排除约束?这在 AMPL 中很简单,但我在 JuMP 中找不到任何类似的语法。
i == j
@constraint(model, [i=1:5, j=1:5; i != j], a[i] <= b[j])