Skip to main content

Questions tagged [gurobi]

Questions related to the commercial solver Gurobi Optimizer.

Filter by
Sorted by
Tagged with
1 vote
1 answer
167 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. ...
1 vote
0 answers
47 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 ...
1 vote
0 answers
71 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}$, ...
2 votes
1 answer
156 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 ...
2 votes
5 answers
179 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 ...
0 votes
2 answers
259 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: ...
5 votes
0 answers
57 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 ...
1 vote
1 answer
77 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.
1 vote
0 answers
56 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?
2 votes
1 answer
315 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 ...
3 votes
2 answers
442 views

Trouble with optional nodes in a VRP model using Gurobi for python

I am currently working on a VRP problem where the vehicles are electric. This means that I have range restrictions, and charging stations as nodes which are optional to visit. In my model I have the ...
-1 votes
1 answer
79 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:...
0 votes
1 answer
75 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 ...
0 votes
1 answer
88 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 ...
0 votes
0 answers
71 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 &...
-1 votes
2 answers
171 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 ...
2 votes
1 answer
151 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 ...
3 votes
1 answer
129 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 ...
1 vote
1 answer
124 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 ...
1 vote
0 answers
33 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 ...
2 votes
0 answers
51 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 ...
0 votes
1 answer
125 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 $...
1 vote
1 answer
425 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 ...
3 votes
1 answer
266 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}$...
2 votes
3 answers
801 views

How to say to Gurobi solver with Python API to start from a given solution?

I have a binary linear program, where all my variables are binary. So, I have implemented the problem on python with Gurobi solver. I have implemented also a heuristic to find a near-optimal solution. ...
2 votes
3 answers
449 views

"Re-optimize" feature in Commercial Optimization

How does the "re-optimize" feature work in commercial optimization solvers such as IBM CPLEX and Gurobi? I recently experienced a considerable performance boost by re-solving a model with ...
2 votes
1 answer
554 views

Re-optimizing pyomo model based on previous computation

I am currently new to pyomo and modelling techniques but I came across information mentioning that the CPLEX and Gurobi APIs offer a functionality where you can re-use already computed values and feed ...
22 votes
2 answers
7k views

How does a warm start work in LP/MIP?

Can someone explain how warm starts/ MIP starts work? How do solvers like CPLEX/GUROBI use warm start with the Simplex algorithm? I am interested in understanding how the entire warm start pipeline ...
0 votes
2 answers
197 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 ...
2 votes
1 answer
283 views

Ways to improve lower bounds while solving MIPs

What are the ways to improve lower bounds while solving a minimization problem (MILP)?
0 votes
2 answers
99 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 ...
3 votes
1 answer
4k views

How to find out which constraint causes problems in Pyomo

I have a Pyomo model with many constraints and variables. When solving it with Gurobi, I get the message "Model is infeasible or unbounded". Now I would like to find out which constraints ...
1 vote
1 answer
81 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 ...
5 votes
1 answer
112 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-...
0 votes
0 answers
132 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 ...
0 votes
0 answers
119 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 ...
9 votes
3 answers
313 views

Objective Integrality Cuts

Consider a mixed integer linear program with an objective function that includes only integer variables. Objective integrality cuts are known as a class of valid inequalities that can be added to ...
2 votes
1 answer
512 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 ...
0 votes
1 answer
86 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 ...
0 votes
0 answers
56 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 ...
0 votes
0 answers
90 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 ...
6 votes
3 answers
947 views

How to validate a Gurobi academic license remotely via ssh SOCKS proxy?

How do I validate my Gurobi academic license remotely, that is, from a computer that is not on my university network? Official instructions for Gurobi 9.1 are here: https://www.gurobi.com/...
3 votes
1 answer
244 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 ...
0 votes
0 answers
73 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 ...
0 votes
1 answer
129 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?
-1 votes
1 answer
89 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: ...
4 votes
1 answer
285 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 ...
1 vote
2 answers
417 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 \...
2 votes
2 answers
114 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 ...
-1 votes
2 answers
136 views

How to implement tiered pricing based on weight or cube volume or order amount total into objective function with Guro i py

I am working on an optimization project here and my objective is to come out with the optimal amount of each item to buy at certain vendors that can minimize the cost while meeting the demand(already ...

1
2 3 4 5 6