Questions tagged [gurobi]

Gurobi is a commercial optimization solver for linear programming (LP), quadratic programming (QP), quadratically constrained programming (QCP), mixed-integer linear programming (MILP), mixed-integer quadratic programming (MIQP), and mixed-integer quadratically constrained non-convex programming (MIQCP).

As described on Wikipedia:

The Gurobi Optimizer is a commercial optimization solver for linear programming (LP), quadratic programming (QP), quadratically constrained programming (QCP), mixed integer linear programming (MILP), mixed-integer quadratic programming (MIQP), and mixed-integer quadratically constrained programming (MIQCP).

Problems can be defined and solved via Gurobi's interactive shell or one of its many programming languages interfaces: C, C++, Java, Microsoft, .NET, Python, MATLAB, R.

1089 questions
3
votes
1 answer

Gurobi Multiple Objective Function Hierarchical Degradation

I'm trying to implement a Gurobi model with multiple objective functions (specifically 2) that solves lexicographically (in a hierarchy) but I'm running into an issue where when optimizing the second objective function it degrades the solution to…
3
votes
0 answers

How to solve "Gurobipy.GurobiError: Network error" for running pyomo with gurobi-cloud in docker container

I am running a python application in a docker container that uses pyomo to formulate a mathematical optimization problem and uses the Gurobi-cloud solver (gurobi_direct) to solve the optimization problem. However, the first few times after building…
Pieter86
  • 31
  • 2
3
votes
1 answer

Get branch and bound node count in JuMP/Gurobi

I am trying to get the branch and bound node count using the JuMP interface and the Gurobi solver in Julia. I tried getnodecount(m) as suggested on the JuMP website, but this came back as undefined. After doing more research, I read to…
3
votes
2 answers

PuLP and OR-Tools Alternatives

I currently have a MIP model formulated in Gurobi's python API, but recently I've been looking into tools such as PuLP and OR-Tools that allow me to build a model and feed it to multiple different optimizers. One feature of Gurobi used extensively…
jacob
  • 255
  • 3
  • 11
3
votes
2 answers

How to set Gurobi parameter in Pulp

I am using Pulp with Python to specify an LP problem. I want to solve this using Gurobi. The following does work: prob.solve(pulp.GUROBI_CMD()) However, now I want to specify a MIP Gap. This should be a parameter of the Gurobi solver according to…
Jordi
  • 361
  • 1
  • 4
  • 14
3
votes
3 answers

inverted indicator constraint in gurobipy

I am a beginner in gurobipy. I would like to add an inverted indicator constraint. Indicator constraint is nothing but depending on a binary variable a constraint does or does not hold. In gurobipy this is written as model.addConstr((x == 1) >> (y…
Saravana Murthy
  • 543
  • 2
  • 6
  • 16
3
votes
1 answer

Why number of explored nodes in Gurobi is showing zero?

I have implemented a mathematical model in Gurobi and I was wondering why the number of explored nodes is 0. The trace file looks like this : Optimize a model with 276 rows, 492 columns and 1434 nonzeros Model has 324 general constraints Variable…
user2567806
  • 460
  • 3
  • 7
  • 17
3
votes
1 answer

gurobi.GRBException: No Gurobi license found

I'm recently using gurobi(java) in eclipse, I'm sure I have successfully got a license and everything was fine when I used gurobi to solve LP problems like that: public LP(int n, int[]s, int[][]b) throws GRBException { ... env = new…
Owen
  • 57
  • 3
  • 11
3
votes
1 answer

Gurobi or CPLEX? Quadratic indefinite objective - quadratic positive-semidefinite constraints

I want to minimize a quadratic objective function subject to a set of linear and quadratic constraints. The quadratic objective function is indefinite (non-convex). The quadratic constraints are positive-semidefinite (convex). The variables are…
user436994
  • 601
  • 5
  • 15
3
votes
1 answer

AttributeError: 'gurobipy.LinExpr' object has no attribute '__colno__'

I am trying to model a MILP problem using Python with Gurobi Solver. I have the latest Gurobi solver version. My problem started after I added a constraint with new function of gurobi m.addGenConstrAbs which add the abs value of the function as a…
3
votes
3 answers

Gurobi, C#: Can't convert from 'int' to System.Collections.Generic.List

I'm trying to solve a scheduling problem on with Gurobi solver. I want to write my Gurobi solution into the console. I get an error saying "Argument 1: cannot convert from 'int' to System.Collections.Generic.List' This exact code worked for two…
F Al
  • 51
  • 4
3
votes
1 answer

Pulp.pulpTestAll() test failed, too many values to unpack

My OS is window 7, Pulp version is 1.6.1, gurobi version is 7.0.1. gurobipy can be successfully imported. pulp.solvers.GUROBI did pass the test, so I could use gurobi. However pulp.solvers.CPLEX_CMD failed. Here is the error…
Lin Sen
  • 93
  • 9
3
votes
1 answer

How to multiply decision variable with a matrix in Gurobi Python

I'm very new to Gurobi and I'm trying to implement an assignment problem as follows: # Create decision variables for the allocation x = {} for s in arr1: for t in arr2: x[s,t] =…
Ann
  • 403
  • 2
  • 5
  • 17
3
votes
1 answer

Fast Exact Solvers for Chromatic Number

Finding the chromatic number of a graph is an NP-Hard problem, so there isn't a fast solver 'in theory'. Is there any publicly available software that can compute the exact chromatic number of a graph quickly? I'm writing a Python script that…
3
votes
1 answer

Drawbacks of avoiding crossover after barrier solve in linear program

I am running a large LP (approximately 5M non-zeros) and I want to speed up the solving process. I tried a concurrent solve to test which algorithm solves my problem the quickest and I found that the barrier method is the clear winner (solver =…
takje
  • 2,630
  • 28
  • 47