# Questions tagged [gurobi]

Questions related to the commercial solver Gurobi Optimizer.

86 questions
Filter by
Sorted by
Tagged with
43 views

### Integral of PWL-Constraint in Gurobi (Java)

In my optimization model, I use piecewise-linear constraints with the output of $y[m]$. The question or problem I have now is whether there is a way in Gurobi (Java) to form the integral for this PWL ...
43 views

### Non-Convex QCP model - Used Method in Gurobi

I have the following question: I have a non-convex QCP model. In the parameter description for method it says that "Only barrier is available for continuous QCP models". However, the dual ...
80 views

### Method (Algorithm) and Objective used in Gurobi Model

How can I find out which method or algorithm was used to solve my model? When I use GRB.IntParam.Method- to output the method, I get ...
52 views

### Quadratic optimization in Gurobi with constraint

I have a question of understanding in Gurobi: I have an objective function in which my optimization variable x is squared. I have solved this bsiher by a quadratic objective function with $x$, $x$. ...
149 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 ...
37 views

### Gurobi c++: Getting constraint matrix

I'm trying to get the constraint matrix from a Gurobi model in C++. In Python, one can get this by simply calling a method that will populate a scipy object (see this post). However, in a C++ fashion, ...
87 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 ...
157 views

81 views

### Formulating “more complicated” objectives in Python Gurobi

I am currently learning how to use Gurobi for Python using their official tutorial found here. In this example, they appear to formulate the objective by simply specifying a cost dictionary to the <...
78 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/...
49 views

### Find multiple solutions in Pyomo with Gurobi

I am fairly new to Pyomo and Gurobi. I'd like to find 20 sets of different solutions that meet the following constraints. ...
53 views

### CPU time on Linux with Gurobi

I am solving a MILP model in C++ using Gurobi 10.1. I retrieve the CPU time of my C++ program under Linux via the following commands: ...
69 views

### Problem with setting up gurobi with OR-tools

I am trying to setup Gurobi with Google OR-Tools with the function pywraplp.Solver.CreateSolver("GUROBI"). The function returns None, which could occur if ...
128 views

159 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 ...
263 views

### Calculated CPU time of C++ is different from actual time to solve MILP model via Gurobi

I am solving a MILP model in C++ using Gurobi 7.5.2. More specifically, I am determining the CPU time of my C++ program via the following commands: clock_t start_time; double elapsed_time; start_time=...
165 views

### How to get an extreme ray of an LP from Gurobi

I am working on a problem of form \begin{array}{l @{\quad} l} \mathrm{max}_{x, u} & p^{\top} u \\ \text{st.} & A u + a x \leq 0 \\ & x \in \{0, 1\...
185 views

### No, Gurobi, I really do want this variable to be binary

When I mark a variable in a Gurobi MIP model as binary, sometimes Gurobi gives me a solution where that variable has a fractional value other than 0 or 1. How do I constraint a variable to be honest-...
2k views

### What are the advantages of commercial solvers like Gurobi or Xpress over open source solvers like COIN-OR or CVXPY?

I come from an ML background, and occasionally have to dive into the OR world. I am trying to figure out whether I need to purchase a commercial solver license for a certain problem set. In the ML ...
136 views

### Derive “true” shadow price for degenerated LPs using commercial solvers (e.g. Gurobi)

In linear programming for an optimal primal degenerate solution the values of the dual variables are in general not identical with the corresponding shadow prices. Several proposals on how to find the ...
170 views

### Issue in solving a large scale MIQP problem

I am solving a large scale MIQP optimisation problem at each step of a model predictive control problem. The problem description is as below. \begin{align} \min_{u} \quad (x_{k}&-x_\text{ref})^{T}...
68 views

### Issues modeling portfolio optimization with rebalancing in gurobipy

I want to solve the following portfolio optimization problem by means of the Python API of Gurobi: I have implemented the problem in the following code: ...
159 views

### Why is the Lagrange Multiplier not equal the Shadow Price (Excel solver, Matlab linprog, Gurobi)?

I have a LP with equality and inequality constraints. When solving the LP with the excel-solver (GRG Nonlinear) the sensitivity report returns the lagrange multiplier for all constraints. When solving ...
332 views

### How can I identify the reason that makes a MILP model hard for solvers such as CPLEX?

I'm solving a MILP model whose native lower bound (via linear relaxation) is very poor. We could provide a lower bound by providing a given value (derived based on the problem itself). I know that ...
82 views

### Expansion heuristic using gurobi reduced cost / shadow price (LP)

Gurobi 9.0.0 // C++ // LP Let us assume the following problem with three nodes: (1)-----(2)-----(3) node (1) is producing ...
159 views

### Decision variable transformation in Gurobi

I'm trying to find a way of setting the values of a binary MVar object (which is my decision variable) of size n to {-1,1}. Right now I have a vector that can either take values 0 or 1 (due to binary ...
95 views

### Problem with implementing squared terms in the objective function

I'm trying to implement either one of these objective functions, but I'm having a hard time with the squared terms. I'm attaching both so you can take a look at the structure and see if you can give ...
276 views

### Optimization software for ARM Architecture

Given that tomorrow Apple will likely announce the first ARM Macs (per bloomberg), I was wondering what the current status of ARM support in optimization software. For instance, does anyone know if ...
139 views

### Using R for coding Matheuristic for Research Publication

Given that R possesses superior data pre-processing and post-processing packages, I am thinking of coding a matheuristic using R for publishing in an academic research journal. However, I am unable ...