Float64 and binary variables in constraints

Hi all,

My problem formulation consists of float64 parameters and variables and binary variables:

using JuMP
using Mosek

M = 1000.0;
@variable(m, y_connect2[t in ts, cg in cgs, lt in lts], Bin)
@variable(m, x_connect22[t in ts, cg in cgs, lt in lts] >= 0.0)

These parameters and variables are used in following constraint:
@constraint(m, aux_connect5[t in ts, cg in cgs, lt in lts], 0.0 <= x_connect22[t,cg,lt] <= M*y_connect2[t,cg,lt] )

Which results in following error
In @constraint(m,aux_connect5[t in ts, cg in cgs, lt in lts],0.0 <= x_connect22[t, cg, lt] <= (Expr(:escape, :M)) * (Expr(:escape, :(y_connect2[t, cg, lt])))): Expected M * y_conne
ct2[t, cg, lt] to be a Float64.

Does anyone have an idea about how this error can be solved?

Thanks in advance!

Best regards

Try removing 0.0 <= from the constraint.

Thank you very much!