Skip to content

Commit

Permalink
update error message
Browse files Browse the repository at this point in the history
  • Loading branch information
hdavid16 committed Feb 7, 2024
1 parent 27a5099 commit 03f3653
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/constraints.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,11 @@ function _check_expression(expr::Ex) where {Ex <: JuMP.AbstractJuMPScalar}
_interrogate_variables(v -> push!(vars, v), expr)
if any(JuMP.is_binary.(vars))
error(
"Disjunct constraints should not contain binary variables. " *
"Instead, use Logical variables to express any binary decisions."
"Disjunct constraints can only contain continuous or integer variables, " *
"not binary variables. If you are modeling binary decisions, " *
"you should express these using the Logical variables that serve as indicators " *
"to each of the disjuncts. If these are lower-level decisions to the disjunct " *
"being defined, these can be modeled using nested disjunctions."
)
end
return
Expand Down

0 comments on commit 03f3653

Please sign in to comment.