Silke Horn
Gurobi Staff Total activity 389
 Last activity
 Member since
 Following 0 users
 Followed by 1 user
 Votes 7
 Subscriptions 188
Comments
Recent activity by Silke Horn
Hi, You are right that GRBQuadExpr.addTerm only accepts variables, not complex expressions. There are two ways around this: You expand the quadratic expression yourself, i.e., \((K+x+y)^2 = K^2 + ...

Yes, I assume the terms with the 0 coefficient at the beginning are there to preserve the variable order. But then Gurobi should repeat all with the nonzero coefficient, not just some. Is this the...

First of all, if a coefficient in the LP file is 0 when it should be 1, then there is something wrong. How did you set the objective? Secondly, there are a lot of variables with coefficient 0 in th...

Yes, you can do that (as long as the model is for nonproduction use of course). With the sizelimited license you can solve models up to 2000 variables, 2000 linear constraints, and 200 variables ...

Yes, the code looks correct. The LinExpr constructor should be the fastest way to build these expressions. However, you will only see a noticeable difference for very large expressions (hundreds of...

I am not sure I understand your question. You could use getConstrByName to access the constraint by its name. However, we usually discourage using this function since it is not very efficient. Stor...

If you have a constraint object, you need to use the getRow method on the model to get the lefthandside expression. This will then be a LinExpr object. One question: Did you need the names to acc...

Your code already does everything except for the constraint naming. The addConstrs method takes a name argument to define the name pattern. If you add name="my_constr", your constraint names will b...

Hi, The issue is the lower bound of diff1. By default, variables have a lower bound of 0. Your solution x=1 and y=0 is infeasible since it would require diff1=1. If allow negative values for for ...

Hi Mohd, We cannot provide this kind of 1on1 support here on the community forum, but as a commercial user, you can always create a support request at https://support.gurobi.com, where you will g...