hdavid16 / DisjunctiveProgramming.jl

A JuMP extension for Generalized Disjunctive Programming
MIT License
27 stars 3 forks source link

Support the new `:=` logical constraint syntax used by JuMP #83

Closed pulsipher closed 8 months ago

pulsipher commented 9 months ago

JuMP just merged https://github.com/jump-dev/JuMP.jl/pull/3530. We should update DisjunctiveProgramming to support this syntax. It means we'll need to support:

JuMP.add_constraint(model::JuMP.Model, c::JuMP.ScalarConstraint{<:_LogicalExpr, MOI.EqualTo{Bool}}, name::String = "")

Here, we are now guaranteed for EqualTo to always be of type Bool since the automatic conversion is disabled and it will never get affine expressions since it will no longer substract the RHS.

One decision to make, would be whether we just want to use MOI.EqualTo{Bool} to be consistent with other packages or keep using IsTrue.

pulsipher commented 8 months ago

As an update, JuMP has now released this syntax with v1.16