Xinyi Xie
- Total activity 9
- Last activity
- Member since
- Following 0 users
- Followed by 0 users
- Votes 2
- Subscriptions 2
Activity overview
Latest activity by Xinyi Xie-
Xinyi Xie commented,
I seem to have solved this problem for example: I_1 = [1,2,3,4,5]I = [2,3,4,5]N = model.addVars(I, vtype=GRB.BINARY, name="N")F = model.addVars(I_1, vtype=GRB.BINARY, name="F")model.addConstrs(N[i...
-
Xinyi Xie commented,
another question, because I previously attempted to write this way by: model.addConstrs((N[k]>=F[k]-F[k-1] for i in range(k-1,k) for k in I),name="Constr2") and error is name 'k' is not defined A...
-
Xinyi Xie created a post,
Adding conditions to quicksum
AnsweredHello, I'm trying to build this equation using "quicksum", but it never works. How should I fix it? I=[1,2,3,4,5] model.addConstrs((gp.quicksum(N[i] for i in range(1,i0+1))<=10 for i0 in I),name="C...
-
Xinyi Xie commented,
thank you
-
Xinyi Xie created a post,
how to formulate a "if- then" with Non-binary variable as condition
Answeredsince addGenConstrIndicator works if its condition is a binary variable. how can we formulate "if x1+2*x2-x3>=2 then z=1" in this case?