# Questions tagged [gurobi]

Questions related to the commercial solver Gurobi Optimizer.

265 questions
Filter by
Sorted by
Tagged with
81 views

### Are there ways to assist Gurobi in finding good solutions?

I have a variant of a vehicle routing problem encoded as a MILP. I am getting OK, but not great solutions with Gurobi. My main issue is there's a lot of natural ways to improve the solutions found ...
• 123
65 views

### Gurobi in python not able to solve nonlinear question

I want to use gurobi as solver to a quadratic problem: ...
134 views

### Deviation from the optimal solution for Solomon instances of CVRPTW

I tried to make a CVRPTW implementation in Gurobi, especially to solve the Solomon instances, and wanted to compare the found optimal solutions with the best known solutions of the Solomon CVRPTW ...
24 views

### ILP for Subset sum problem in C# using Gurobi

I'm trying to solve a variation of the subset sum problem via Gurobi optimizer in C#. It seems to be working, but I was wondering if there's any room for improvement in my current implementation? <...
• 101
54 views

### Problem in my optimization model (JuMP/Julia/Gurobi) where one variable refuses to go above 0

I am currently writing an Optimization Model which is meant to give advice to companies about the integration of a decentral energy system (it's for my bachelor's thesis, so nothing very complex). A ...
64 views

### Gurobi does not find the nonzero optimum, despite there clearly is one?

I have this convex program that I am trying to solve - it works fine, but I cannot see why q[499] = -1900 (and rest are 0) is not a solution that maximizes the objective function? For q[499] = -1900, ...
• 31
55 views

### How to access optimal solution pool?

I have the following code for a staff scheduling model: ...
52 views

### Limit the time in the root node

I have a hard problem where I fix some variables to solve it. However, the time elapsed in the root node is high. Is there a way to limit this time anf force the Gurobi start the ramification? I have ...
1 vote
54 views

### Approximate Solutions and Solver Settings in CPLEX and Gurobi

CPLEX offers functionalities to approximate solutions for nonconvex optimization problems rather than guaranteeing global optimality. It includes an option to find solutions satisfying first-order ...
1 vote
65 views

### Integrality gap vs Gurobi Gap

I was wondering what the difference is between the integrality gap (i.e. best known solution in relation to the LP relaxation) and the gap from the MIP solver from Gurobi, for example. As I understand ...
• 21
187 views

### How to increase the lower bound while solving a MILP model?

I have developed an IP model for a combinatorial problem. The model is faster than the other models in the literature. However, for some instances, the model reaches the optimum solution (which I know ...
• 593
1 vote
77 views

### Solve scheduling model using a greedy heurisitc

I have the following scheduling problem. Relatively simple and not very complex (only serves as an example). The indexes are $I$ worker, $T$ days and $J$ shift. The decision variable is $x_{ijt}$, ...
• 71
58 views

### Gurobi - Is finding a feasible solution when optimizing a lot harder than finding a feasible solution?

The code is working fine but I feel as my intuition could be wrong. I first set up my problem as: $$\min_{f(x)\leq F} g(x)$$ and gurobi was unable to find a feasible solution. I then relaxed ...
• 51
253 views

### Unable to find good solution for CVRP with Time Window

I am trying to solve Capacitated VRP with Time Window for 50 demand points. I was trying to optimize this in Gurobi Solver but it doesn't give good answer like optimality gap is 30% or more. Any idea ...
1 vote
91 views

### How to achieve recording the change of objective or primal gap in solving MILP by SCIP?

I am a solver beginner, would like to ask you how to call the solver to achieve second-level recording, as documented in many articles, as shown below.
• 11
1 vote
57 views

### Does getting the second optimal solution in a general MILP require solving a MILP again?

This general question popped into my mind if finding all optimal solutions takes not much more time than finding just one optimal solution in a MILP why not gettting all of them in Gurobi?
• 153
86 views

### How to use gurobi to describe the process of finding the rank of matrix without objective function？

I have a general square matrix [[1,1,0],[1,1,0],[0,0,0]] (the element is on a binary field--Galois Fields) I want to find the rank of this matrix (like the function:...
74 views

### Improving the lower bound

Good afternoon. I have a very difficult to a MIP model. I have tried several different strategies to reduce the gap. I am using Gurobi and in this case, I already have an incumbent solution. I've set &...
100 views

### Gurobi - Problem with adding a non-linear constraint to a column object

I have implemented the following Column Generation model in Gurobi. Unfortunately, I currently have the problem that the constraint in the master problem is not linear and therefore I cannot add the ...
202 views

### How to describe nonlinear programming in gurobipy?

The optimization task The optimization task concerned here is: A square matrix $A\in \mathbb{R^{5\times 5}}$ satisfies the condition: the elements of the first row all are 1, the elements of the ...
• 222
106 views

### How can I add columns from the subproblem to the master problem in my column generation model?

I have one last question about my column generation model. I am currently trying to implement it in code, and I am successfully solving the subproblem. So I can solve the dual values of the master ...
155 views

### Why would a solver stay on node 0 and still improve the gap?

I understand how exploring the Branch-and-cut tree would help improve the best bound known and the incumbent of a MILP, however, on some instances that I deal with, my solver (Gurobi) seems to keep ...
• 819
141 views

### What does a solver do with a MIP warmstart solution?

From what I understand, most solvers use a user provided solution by first detecting if it feasible. If it is feasible, its objective value is used as a first bound for the branch and cut tree, this ...
• 819
1 vote
145 views

### How to turn off tree search in fico xpress ? Couldn't see relevant documentation

trying to solve a very large problem , using heuremphasis as 3 , cutfreq=0 , scaling =4, run time reduced significantly however , solver spends 400 seconds in tree search , but couldn't see any ...
• 489
1 vote
37 views

### Modeling start point constraint for TSP in the Dantzig-Fulkerson-Johnson formulation

I'm trying to use the DFJ formulation to solve TSPLib problems using JuMP and Gurobi. I want to add a constraint to the starting point by fixing either the start or the end to the first node (because ...
• 21
52 views

### Parameter Tuning Tool in Gurobi using Julia

I need to solve a hard MIP model using Gurobi. There is a tool to set the best parameters combination to solve this problem called "Parameter Tunning". How can I find parameter tuning using ...
130 views

123 views

### Small negative decision variable returned in Gurobipy model

I have a multi-period model in gurobipy with 7 types continuous decision variables and 1 type of binary (Thousands indexed total). The model solves properly and the solution has passed many validation ...
• 105