# Jonasz Staszek

Community Moderator
• Total activity 296
• Last activity
• Member since
• Following 0 users
• Followed by 0 users
• Votes 14
• Subscriptions 121

## Comments

Recent activity by Jonasz Staszek
• You need to change the lower bound of your continuous variable. Have a look at my first answer - I modified it accordingly. Best regardsJonasz

• Hi Charitha, it seems to me that you need to redefine your continuous variable to allow it to assume negative values. The default lower bound for continuous variables in Gurobi is 0. Try the follow...

• Hi Nan, Does this mean that building the model becomes faster if you use quicksum() or does also solving the model becomes faster when you use quicksum()? In principle, one can hope that building...

• Hi Sakir, I'm not sure I got your question right, but let me give it a shot. I would suggest the following approach: # I assume A and b are constants and x is defines as Gurobi variablez = model.ad...

• Hi Patrick, without knowledge about the model itself, I cannot give you specific guidance. Nonetheless some things I would try come below: 1) Update Gurobi to v10 - you seem to be using v. 9.5.1. 2...

• Hi Jasper, I'm no Pyomo expert, but following this answer, I would take it that it is not possible to explicitly manage Gurobi environments with Pyomo. There is even an open issue in Pyomo GitHub r...

• Hi Saeid, if you are sure that either $$x = 1 \land y = 1$$ or $$x=0 \land y=0$$, you can try "Big-M" kind of constraint: a = model.addVar(vtype="B")model.addLConstr(x+y, GRB.LESS_EQUAL, 2*a) If yo...

• Hi Daphnée, you can indeed access all feasible solutions found in the course of the optimization process - this can be achieved by callbacks (here's an example). If I understood you correctly, you ...

• Hi Sakir, first of all, the max_() method in Guroby Python has a slightly different syntax - take a look at the documentation. On top of this, the max_() method takes variables as arguments and not...

• Hi Sujana, I would recommend you undertake the following steps: 1) Before optimizing your model, try to write it to your drive, for example as an .lp file: m.write("model.lp") and then compare the ...