Questions tagged [gurobi]

Questions related to the commercial solver Gurobi Optimizer.

Filter by
Sorted by
Tagged with
0 votes
1 answer
16 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
0 votes
2 answers
80 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
  • 133
0 votes
1 answer
38 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
143 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
  • 679
3 votes
1 answer
112 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
  • 679
1 vote
1 answer
106 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
30 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
44 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
111 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
  • 125
0 votes
0 answers
35 views

Capacited vehicle routing problem with heterogeneous fleet

This question is related to this post where I was trying to understand how to formulate the CVRP based on flow formulation to eliminate sub-tours. Capacited Vehicle Routing Problem with flow ...
MAYA's user avatar
  • 125
3 votes
1 answer
157 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
156 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
  • 125
0 votes
2 answers
90 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
1 vote
1 answer
238 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
69 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
83 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
83 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
247 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
0 votes
0 answers
103 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
205 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
62 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
0 votes
0 answers
55 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
85 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
  • 892
3 votes
1 answer
227 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
55 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
99 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?
Abbas Khademi's user avatar
0 votes
1 answer
214 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
  • 1
-1 votes
1 answer
83 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
150 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
248 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
274 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
100 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
179 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 vote
4 answers
183 views

Multi-period Inventory Balance in Gurobipy

I would like to get the inventory balance in the oponed facility $\text{C}$ such that, the Inventory at time $t$ is equal to the previous one, plus the inflow minus the outflow. I have tried to create ...
Abde's user avatar
  • 81
-1 votes
2 answers
111 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 ...
DJ-coding's user avatar
  • 101
3 votes
2 answers
264 views

Reformulate bilinear binary constraint

I'm a solving a model that has the following constraint: $$ c_{p,n} = \sum_{s\in S}\sum_{i \in \{1,2,3\} } x_{p,s,i-1} x_{n,s,i}, \forall (p,n) \in C $$ where both the $c$ and $x$ variables are binary,...
cholo14's user avatar
  • 233
0 votes
1 answer
116 views

How to add conditions in objective functions?

I want to implement some conditions in my objective function. I know adding conditions to constraints is possible through addGenConstrIndicator() but I don't know how I can add conditions in the ...
Saeid Ghafouri's user avatar
0 votes
0 answers
66 views

Gurobi-Python, unmet demand of customers

I would like to capture the unmet demand by modeling the following constraint with two decision variables. where $QU_{wc}$ is the unmet demand and $QW_{wc}$ the shipped amount of products. I model the ...
Abde's user avatar
  • 81
0 votes
1 answer
65 views

How to check conditional constraints added to the model?

I want to know how I can check constraints like https://www.gurobi.com/documentation/current/refman/py_model_agc_indicator.html in my model using something like ...
Saeid Ghafouri's user avatar
0 votes
2 answers
169 views

Modelling with Gurobi-Python a Supply Chain Problem

I would like to write the following simple model in GurobiPy, which is part of many terms that's belongs to the objective function, I assumed that I have three suppliers are selected and three ...
Abde's user avatar
  • 81
2 votes
2 answers
472 views

Using indicator constraint with two variables

I want to use the sum of two binary decision variables (when their sum equals to one) as the condition of Model.AddGenConstrIndicator https://www.gurobi.com/documentation/current/refman/...
Saeid Ghafouri's user avatar
0 votes
1 answer
160 views

How to use Gurobi variables as a dictionary index in Gurobipy

I want to model a problem that one of my variables needs to be used as an index of a dictionary in my constraints. Here is a minimal code that shows an example situation: ...
Saeid Ghafouri's user avatar
0 votes
0 answers
110 views

Multi-Scenario Gurobi Python Output

I have an lp and am trying to solve multiple scenarios at once. One of my scenarios is infeasible though this is not the issue. For some reason, when I print m.status, both solutions have a status of ...
TroyE219's user avatar
  • 105
2 votes
3 answers
406 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 ...
Pia MiA's user avatar
  • 392
-1 votes
1 answer
122 views

GurobiPy Tutorials and hands on from beginner to advanced

What is the best way to start modelling with GurobiPy, in order to utilize it, for research purpose (i.e. more complicated problems)?
Abde's user avatar
  • 81
2 votes
0 answers
81 views

Branching the product of binary and continuous variable in Gurobi

I have a binary variable (X) multiplying a continuous variable (Y). I know I can linearize by adding an auxiliary variable (I have that model working), but I now want to do my own branching in the ...
orpanter's user avatar
  • 517
2 votes
3 answers
502 views

Robust Optimization in Gurobi

I have a research problem where my Mixed Integer Linear Program has data that follow probability distributions. I am approaching this by creating some m instances through realizations of these random ...
arvind rathore's user avatar
3 votes
2 answers
310 views

Does solver take advantage of the problem structure?

Does Guroib take advantage of the problem structure? I am working on a large optimization problem with more than 40,000 binary variables and huge number of constraints. below is only one of the ...
Hussein Sharadga's user avatar
1 vote
2 answers
255 views

Capacitated Maximum Coverage Location Problem, Python and Gurobi

I am trying to solve a capacitated MCLP problem with two additional constraints. Non-overlapping circles Minimum and Maximum value for the capacity for a circle. for 2nd constraint, I am able to add ...
Nandy's user avatar
  • 13
1 vote
1 answer
186 views

How to write this logical expression with Gurobi + Java, or express it as a big-m formulation

I am trying to write the following expression in Gurobi+Java or Gurobi+python, if it is more practical It could be expressed as a big-M formulation. \begin{equation} \label{const4} \text{D}_{uv} = ...
Hernan19's user avatar

1
2 3 4 5