Skip to main content

Questions tagged [gurobi]

Questions related to the commercial solver Gurobi Optimizer.

Filter by
Sorted by
Tagged with
2 votes
2 answers
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 ...
Wayne Smith's user avatar
0 votes
1 answer
65 views

Gurobi in python not able to solve nonlinear question

I want to use gurobi as solver to a quadratic problem: ...
Jialu Yang's user avatar
2 votes
2 answers
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 ...
Jonas Brenker's user avatar
0 votes
1 answer
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? <...
SpiritBob's user avatar
  • 101
0 votes
0 answers
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 ...
Manuel Hausbrandt's user avatar
0 votes
0 answers
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, ...
Lyft's user avatar
  • 31
2 votes
1 answer
55 views

How to access optimal solution pool?

I have the following code for a staff scheduling model: ...
themaneater22's user avatar
0 votes
0 answers
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 ...
Angelo Aliano Filho's user avatar
1 vote
0 answers
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 ...
Optimization Online's user avatar
1 vote
0 answers
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 ...
ornewbie's user avatar
2 votes
1 answer
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 ...
OR Junior's user avatar
  • 593
1 vote
0 answers
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}$, ...
Uni ewr's user avatar
  • 71
5 votes
0 answers
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 ...
John's user avatar
  • 51
2 votes
5 answers
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 ...
Maths_hawk's user avatar
1 vote
1 answer
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.
Paul's user avatar
  • 11
1 vote
0 answers
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?
Red shoes's user avatar
  • 153
-1 votes
1 answer
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:...
wenny's user avatar
  • 1
0 votes
0 answers
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 &...
Angelo Aliano Filho's user avatar
0 votes
1 answer
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 ...
nflgreaternba's user avatar
-1 votes
2 answers
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 ...
138 Aspen's user avatar
  • 222
0 votes
1 answer
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 ...
nflgreaternba's user avatar
2 votes
1 answer
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 ...
JKHA's user avatar
  • 819
3 votes
1 answer
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 ...
JKHA's user avatar
  • 819
1 vote
1 answer
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 ...
21vs's user avatar
  • 489
1 vote
0 answers
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 ...
skittish's user avatar
2 votes
0 answers
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 ...
Angelo Aliano Filho's user avatar
0 votes
1 answer
130 views

Vehicle Routing Problem with Two fleets

Based on the suggestion in the comment below. I edited my model by removing $w$. Here is the context: I'm dealing with the CVRP with two heterogeneous fleets with the following capacities $q_1$ and $...
MAYA's user avatar
  • 129
3 votes
1 answer
369 views

Warm starting a LP problem with PuLP and Gurobi

I have a set of many similar linear programs (LP). All these LPs have the same objective function, and almost all constraints are the same. The only difference is for one linear constraint $f(x)=a_{i}$...
Quentin PLOUSSARD's user avatar
0 votes
2 answers
243 views

Gurobi spend more time in presolve in small model without removing anything

I have a small model to optimize in Gurobi. The problem is that it takes a lot of time in presolve without removing any rows or variables. I tried to disable PreSolve parameter and reduce the number ...
MAYA's user avatar
  • 129
0 votes
2 answers
102 views

How to design a constraint to control flow in a non-network optimization model

I'm working on a production scheduling problem with a MIP model somebody left to me. This is a discrete-time model in which the constraints used to control the production and consumption of product p ...
CangWangu's user avatar
  • 113
1 vote
1 answer
591 views

What is NoRel heuristic in GUROBI?

There is NoRel (or No Relaxation) heuristic in the Gurobi solver which helps to find very good feasible solutions for Mixed Integer Programs. I couldn't find explanation of its idea. Perhaps anybody ...
Elam Harnish's user avatar
1 vote
1 answer
84 views

Partially modify LHS of a constraint set?

I have implemented a column generation algorithm in Gurobi in Python. The most computationally expensive aspect of this algorithm is the reconstruction of the master problem when a column is added (or ...
mdslt's user avatar
  • 615
5 votes
1 answer
149 views

How to identify constraints that are good candidates for being lazy constraints?

I am working on reducing the solving time of the optimization problem I am working on. One of the ideas I am exploring is the usage of Lazy constraints. As solver, I am using Gurobi, so both pre-...
cholo14's user avatar
  • 233
0 votes
0 answers
152 views

Pyomo + Gurobi Scheduling Tasks within Working Hours

I initially posted this on stackoverflow and got redirected here. You can view the old post with formatted tables here: StackOverflow Post I have a python schedule optimization script using pyomo and ...
Phil Franjo's user avatar
2 votes
1 answer
333 views

Gurobipy MILP model comes infeasible yet can't compute IIS because "the model is feasible"

I build a MILP model by Pyomo and use Gurobi 9.0.3 as solver. When the model comes infeasible, I try to use pyomo.contrib.iis.iis.write_iis to compute infeasible ...
CangWangu's user avatar
  • 113
0 votes
0 answers
137 views

Troubleshooting Gurobi Import Errors in Jupyter Notebook on Compute Canada HPC server

I am trying to use Gurobi optimization software in a Jupyter notebook on a Compute Canada HPC server, but I am running into issues importing the gurobipy module in Python. I have loaded the Gurobi ...
Andrew's user avatar
  • 163
2 votes
1 answer
862 views

Non-proprietary (Python friendly) alternatives to Cplex and Gurobi

I have implemented a pure binary integer combinatorial optimization routine within a Python module (importing gurobipy), and experimented with relaxing a few ...
Cbhihe's user avatar
  • 123
0 votes
1 answer
95 views

Question about IIS output in Pyomo, Gurobipy

These days I try to build a Gurobipy optimization model by Pyomo and I met a problem about outputing IIS file. I use ...
CangWangu's user avatar
  • 113
0 votes
0 answers
57 views

Optimization for a capacity problem

I have a csv file with a table with 5 columns: dueDateTime, cover, phone, simcard, tablet. This file has the amount of items for cover, phone, simcard, tablet. I have the size of the items: we have ...
Andreas K's user avatar
0 votes
0 answers
91 views

why the -1 in basis column for simplex tableau?

When I look at the tableau generated by Gurobi for a simple 3D problem with five constraints, I get this: I expected to not have a -1 in basis columns 4, 5, 6 (referring to slack variables 1, 2, 3 if ...
Brannon's user avatar
  • 950
3 votes
1 answer
258 views

Formulation of binary constraint with the least binary variables for linear programming

I am currently working on a formulation for a linear program of a complex problem. At the moment I am facing to formulate the following logical condition: There are two binary variables. Let's name ...
Nicolas Kaiser's user avatar
0 votes
0 answers
80 views

Lagrange relaxation / subgaradient algorithm Sensivity to input data

I am implementing a Lagarange relaxation with subgradient method to find a lower bound for a minization problem, I tried to find the complicating constraints. I found an upper bound with relatively ...
ABDE's user avatar
  • 1
0 votes
1 answer
161 views

Linear Programming faster solver: CPLEX or Gurobi?

Which one is the best solver for solving large-sized problems in Linear Programming, CPLEX or Gurobi? Which one is faster?
Optimization Online's user avatar
0 votes
2 answers
292 views

Gurobi founds optimal solution but it is not feasible

I'm currently solving a MIP model with pyomo using gurobi and I am facing strange results. I have one constraint that looks like this: ...
Franco's user avatar
  • 25
-1 votes
1 answer
91 views

How do I translate the following constraint for gurobi py?

I successfully worked on the problem with following model in Excel, but I have a problem translating it into Python. This is the proposed way to code the problem form the book: ...
Wangcincay's user avatar
1 vote
1 answer
177 views

Conditional Statements in an LP model

I am currently working on a large workforce/manpower planning model for an aviation company. This model should decide whether to hire a new pilot or to let pilots fly overtime. It has two skillsets. ...
Adri's user avatar
  • 11
4 votes
1 answer
321 views

MIP Model with relaxed integer constraints takes longer to solve than normal model, why?

I am currently working on my undergrad thesis which is a mathematical optimization problem of the territory design family of problems. I am using the mathematical formulation of the problem to solve ...
EduardoSalazarT's user avatar
1 vote
2 answers
503 views

Is there a way to obtain coefficient matrix A and RHS b of constraints equation from cplex or guribi in python?

I have a non-linear program, minimizing sum of concave functions subject to linear constraints. Hence I'm using a different solver(in Julia). However, that solver assumes we have constraints in $Ax \...
Meet Saiya's user avatar
2 votes
2 answers
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 ...
TroyE219's user avatar
  • 105
2 votes
1 answer
234 views

Smallest graph coloring in Gurobi

I am trying to design an algorithm to label a graph’s nodes with as few colors as possible such that all pairs of nodes joined by an edge do not have the same color. This is the code I have written so ...
Andrew's user avatar
  • 163

1
2 3 4 5 6