From 03f36532b4bcc663ecda82871f51f877a2b22ccc Mon Sep 17 00:00:00 2001 From: Hector Perez Date: Wed, 7 Feb 2024 10:15:24 -0500 Subject: [PATCH] update error message --- src/constraints.jl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/constraints.jl b/src/constraints.jl index 34795a7..3d60cf2 100644 --- a/src/constraints.jl +++ b/src/constraints.jl @@ -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