Eduardo Praça
- Total activity 5
- Last activity
- Member since
- Following 0 users
- Followed by 0 users
- Votes 0
- Subscriptions 2
Posts
Recent activity by Eduardo Praça-
Can I add conditional statements in Gurobi - Python?
AnsweredI have a constrain that changes whether i = 1 or i != 1 if t==1: m.addConstr(i_pit[p,i,t] == Ipi0[p][i] + other terms)else: m.addConstr(i_pit[p,i,t] == i_pit[p,i,t-1] + same other terms) Is t...
-
How can I use addVars for indexes that are dependant? (in Python)
AnsweredHello. I have a code with a binary variable that has 3 indexes: 'x[i,j,k]' I understand that for instance, if I = [1,2,3] J=[1,2] K=[1,2,3,4] x = m.addVars(I,J,K,vtype = GRB.BINARY,name = 'X') wou...