Yu yue
- Total activity 16
- Last activity
- Member since
- Following 0 users
- Followed by 0 users
- Votes 0
- Subscriptions 4
Posts
Recent activity by Yu yue-
How to add such an indicator constraints? if a=b then c<d else c>d
AnsweredI would like to add this instruction constraint: if a=b then c<d else c>d when a=b → k =1 a !=b → k =0 I know how to handle such situations if a<b then c<d else c>d But I'm confused about how...
-
How to take the remainder of the variables in gurobi?
AnsweredHi,I want to take the remainder of the variable. for k in orders: m.addConstr(t[k.no] % 7 + 1 == k.rk % 7) t is the decision variable. But it returns the following error TypeError: unsup...
-
Comparing variables with constants when adding an objective function
AnsweredI want to set the following objective function: and it contains the condition that where is the decision variable. My code is as follows dep_1 = gp.quicksum((k.hk * h[k.no, t] for k in orders...
-
TypeError: must be real number, not TempConstr
AnsweredHiWhen I add the following constraint and execute it, an error occurs: for k in orders: for t in range(1, 60): if t <= k.rk: m.addConstr((t <= tao[k.no]) * (h[k.no...