# Tag Info

## Hot answers tagged gurobi

Accepted

### What are the advantages of commercial solvers like Gurobi or Xpress over open source solvers like COIN-OR or CVXPY?

Disclaimer: I am currently working for a commercial solver company (Gurobi) and have worked before on another commercial solver (IBM CPLEX). Hence, my opinion may be biased, but still I am trying to ...

### What are the advantages of commercial solvers like Gurobi or Xpress over open source solvers like COIN-OR or CVXPY?

No, the situation isn´t the same for OR libraries. There are several reasons for this, among them being Performance: The difference is relevant, with an emphasis on Mixed Integer Programming (linear ...
• 1,577

### What is the purpose of libraries like Pyomo and Google OR tools?

Pyomo is an algebraic modeling language and allows users to easily represent optimization problems at a high-level (by defining variables, constraints, objective, etc.). Pyomo then provides interfaces ...

### What are the advantages of commercial solvers like Gurobi or Xpress over open source solvers like COIN-OR or CVXPY?

I think the short answer is: speed. Most optimization problems solved in the OR world are computationally intractable, they cannot be solved in reasonable time as the size of the data increases. A ...
• 10.2k
Accepted

### How does a warm start work in LP/MIP?

For the simplex algorithms, warmstarting a solver typically means installing a near-optimal basis and using that as a starting point instead of doing a crash or slack basis as a first step. This works ...
• 2,719

### What is the purpose of libraries like Pyomo and Google OR tools?

OR-Tools is a set of solver: A very popular Routing Library built on top of a traditional constraint programming solver An award winning ...
• 1,724

### What do solvers like Gurobi and CPLEX do when they run into hard instances of MIP?

The term "local optimum" is a little misleading here. Assuming your MIP is linear (or at least convex), every local minimum is also a global minimum, so there is no such thing as "getting stuck in a ...
• 12.6k

### Presolve is cutting down a lot of binary variables. Should I rethink my formulation?

First of all, the log output of a solver should not change your mind about the formulation you use. Most of the times, one can not imagine how such geometric spaces look like and it is hard to guess ...
• 3,776
Accepted

### What does "Concurrent spin time" mean in the Gurobi log and what does choosing Method=3 do?

Performing parallel operations deterministically often leads to some overhead and threads waiting or idling - this is the spin time. A non-deterministic or opportunistic parallel mode does not have ...
• 1,493
Accepted

• 22.2k

### Presolve is cutting down a lot of binary variables. Should I rethink my formulation?

Complementing the other good answers, please note that presolve is concerned with problem input data and tries to eliminate variables using logical reductions. While a huge reduction in the number of ...
• 2,410

### When should I use dual Simplex over primal Simplex?

Dual simplex is the method of choice for resolving an LP if you have an optimal solution and you change the problem by modifying the feasible region. Ranging the RHS, adding cuts or branching in MIP, ...
• 321
Accepted

### When does Gurobi add cuts from callback

Assuming you are using more than a single thread, then Gurobi performs all work you code in the callbacks with a single thread. All remaining threads process the branch and bound nodes (without doing ...
• 1,839

### What do solvers like Gurobi and CPLEX do when they run into hard instances of MIP?

Gurobi and CPLEX use (very sophisticated) variants of the branch-and-bound algorithm. In Mixed Integer Programs, there can be both continuous and integer variables. It turns out that the integer ...
• 5,873

### Settings for a faster solution of a MILP (GUROBI, python)

You could try changing the parameter mipfocus to 2 or 3 (https://www.gurobi.com/documentation/9.0/refman/mipfocus.html) in order to let Gurobi focus more on improving the bound or proving optimality. ...
• 3,477

### How can I identify the reason that makes a MILP model hard for solvers such as CPLEX?

MILPs are NP-hard. People make a big deal about NP-hardness for a reason - in the worst case they are very, very hard to solve. There is a short, easy to understand exposition of this by @Johan ...
• 10.8k

### Problem is infeasible with Gurobi, feasible with cbc (but can't access objective value)

If I read the lp file and try solving with CPLEX: So I think your assumption is correct: the bug comes from CBC, as CPLEX and GUROBI both return infeasible. The CPLEX log also tells you which row is ...
• 10.2k
Accepted

### Dealing with Symmetry. Commercial solver defaults vs manual implementations

There might be automatic settings and tunings inside the solver that are not perfect and might choose not to use orbital branching for an instance although it might be beneficial. In that case the ...
• 2,719

### Model conversion as fast as gurobipy and solved by open source solvers

If you do a lot of looping in Python to build your model, then model building is going to be slow. We have illustrated this for Pyomo (and the same undoubtedly holds for Pulp) in a notebook that ...
• 2,451

### Why is there not a feasible solution for a MIP?

There exist various reasons why a solver could not find the optimal solution. You must always check why a solver terminated. Typical reasons are: optimal solution was found termination criteria was ...
• 3,056