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

How to get the relative MIP optimality gap after timelimit is met?

I'm working on a large scale MIP. So I have to set the time limit to a reasonable value. But the problem is that after the timelimit is met, I don't know how to evaluate the solution, in another words, the gap between lower and upper bounds. Yes,…
R. Song
  • 43
  • 1
  • 4
3
votes
1 answer

Approximate Optimization using gurobi attributes in python

I'm trying to use python for an ILP optimization using gurobi. I wonder if primal-dual approximation has been implemented on gurobi and how should we use an approximation algorithm. I'm using m.optimize function and don't know which attributes to…
Diman ZT
  • 31
  • 1
3
votes
2 answers

Gurobi Optimizer: determining feasibility without optimizing the model

In Gurobi, is it possible to see if a group of constraints and variables are feasible without actually optimizing the problem? It seems if the objective is a constant, Gurobi still does a lot of heavy computation to find an optimal solution, which I…
mnmp
  • 380
  • 2
  • 15
3
votes
1 answer

Gurobi reports unbounded model despite mathematical impossibility

I'm using Julia's wonderful JuMP package to solve a linear program with Gurobi 6.0.4 as a solver. The objective function is a sum of decision variables, clearly defined as nonnegative, and the problem requires it to be minimized. For some reason,…
3
votes
1 answer

Crashes with piecewise linear objective for gurobi 6.0.2 / setPWLObj

We have a complex optimization problem which includes several quadratic terms with integer and continous variables (using Anaconda Python / Pycharm with Gurobi 6.0.2). We applied the setPWLObj function to apprixmate the quadratic objective…
3
votes
1 answer

Problems solving a mixed integer quadratic program (MIQP) in Gurobi

I need your help. For my thesis i need to solve a mixed integer quadratic problem (MIQP) with quadratic constraints using Gurobi. When I write the problem into a file the implementation is fine, the solving part is the problem because the best bound…
erda
  • 55
  • 9
3
votes
1 answer

keep cutting without branching in MIP solver (Gurobi)

I have a MIP which I know the solution almost for certain. I want to use gurobi to prove that the true solution (even if it is not the one I provide) shall not lie more than 0.5% deviated from the solution I gave. I believe that simply keeping the…
3
votes
1 answer

Microsoft Solver Foundation for semi-integer

Is it possible to use the MSF api to specify a variable as semi-integer (V = 0, or a <= V <= b)? The following is an example in LP_Solve that uses the "sec" and "int" keywords to indicate the variables are semi-continuous and integer. max: 0.5 Q1 +…
freddy smith
  • 3,347
  • 5
  • 24
  • 28
2
votes
1 answer

Logging Information from Gurobi Java Interface

Is there a way get detailed logging information about an optimization problem solved using Gurobi's Java interface. Maybe something like a method that prints logging information. GRBEnv can be initialized with a log file, but the information there…
myahya
  • 3,079
  • 7
  • 38
  • 51
2
votes
1 answer

Setting Environment Variable from Eclipse vs. System

I am using the Gurobi Optimizer, for which I need to set two environment variables: LD_LIBRARY_PATH and GRB_LICENSE_FILE. If I set the variables using Eclipse (Run As --> Run Configuration --> Environment), everything works correctly. If I set the…
myahya
  • 3,079
  • 7
  • 38
  • 51
2
votes
1 answer

TypeError: unsupported operand type(s) for ** or pow(): 'MLinExpr' and 'int'

I am trying to solve a complex bin packing problem using Gurobi. I have a model for solving the problem but I'm facing an typeError. My code is: from gurobipy import GRB, Model import numpy as np """ Create data """ items = np.arange(50) radii =…
2
votes
1 answer

How to set Gurobi to stop after the objective value reaches a certain threshold in Julia?

I am trying to run a minimization problem for an MIP using Gurobi in Julia. I would like it to stop after it has found a solution that is below a certain threshold that I have set. I have found ways online to do this in other programming languages,…
2
votes
0 answers

Save Julia Gurobi model and load and run with different datainputs

I have a Gurobi model in the attached format. My question is probably fairly simple. I am trying to expand the model and with stochastic data inputs. So I want to run the model with different data inputs (the data inputs being eg. missed_bags). My…
2
votes
2 answers

How to determine Gurobi or solver version in JuMP

In Python, you can do: print(gurobipy.gurobi.version()) What is the equivalent for Julia and JuMP? I tried using Gurobi Gurobi.version() Without success. I am not trying to get Gurobi.jl package version which can be obtained with ] status Gurobi.
JKHA
  • 1,800
  • 11
  • 28
2
votes
1 answer

How to use callback functions of Gurobi in Drake

I am solving hybrid control problems using Drake with Gurobi solver. I want to get the final root relaxed solution (after presolve and auto cut generation). I tried writing log files, but the log file doesn't print out every iteration and I couldn't…
Jisun Lee
  • 21
  • 1