Simon Bowly
-
Gurobi Staff
- Total activity 145
- Last activity
- Member since
- Following 0 users
- Followed by 1 user
- Votes 0
- Subscriptions 74
Comments
Recent activity by Simon Bowly-
Hi Lukas, You could write the solution values from the tupledict into a numpy array like so: arr = np.zeros((M, N))for i in range(M): for j in range(N): arr[i,j] = x[i,j].X But you may fi...
-
Hi Afsoon, You need to get the solution values from the MVar first. In this case, you can use np.amin(z.X) to find the minimum of all variable solution values in the array.
-
Yes it is, see the Callback Codes documentation. You can access the current elapsed run time using model.cbGet(GRB.RUNTIME) in any callback except the polling callback.
-
Hi Sebastian, If you have a callable that isn't a function, you can work around this particular limitation by using a lambda function as follows: import gurobipy as gpm = gp.Model()# where 'callbac...
-
Hi Putri, You will need to have your full Gurobi license set up (academic license or take-gurobi-with-you, as we discussed today, depending on whether this is for your commercial or academic work) ...
-
Hi Putri, I can't tell what the issue is here from looking solely at the model code. What error message and/or log output are you seeing? At what point in this code do you call mdl.optimize() to so...
-
Hi Putri, Python's error messages can be a bit cryptic here, and often point to the code after the issue, not the issue itself. In this case it looks like you just have a mismatched bracket at this...
-
Hi Eduardo, You can build sparse indexes like this, but you'll need to create a list of index tuples explicitly first and pass it to addVars. One way to do this is the following: I = [1, 2, 3]Ji = ...
-
Yes, the presolved model structure dictates the algorithm that is used. If the presolved model is an MILP, then in general branch and bound is needed to guarantee a result. Most likely, one of the ...
-
GRBsetintparam is a function, not a macro, so it requires a different syntax. Try the following: Gurobi.GRBsetintparam(env, "OutputFlag", 0)