how to count a specific number in the Var list
AnsweredHi there, I wonder how to count a specific number in the Var list. For example, my variable is X, and it is defined as (m.addVars(M, N, vtype=GRB.CONTINUOUS),lb=0, ub=1
, and I want to limit total times X[m][n] is a float(or X[m][n]!=0 and X[m][n]!=1)
in X. How can I add this constraint to my model? Is there any function like count(X)
in gurobi? Thanks a lot !!
1
-
This is a duplicate of Is there any function like count(X) in gurobi? – Gurobi Help Center
0
Post is closed for comments.
Comments
1 comment