Questions tagged [gurobipy]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
2 answers
81 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
69 views

Help with implementing my mathematical model in gurobipy

I am using Gurobipy to solve this problem formulation and I have been stuck here for weeks trying to diagnose why I get infeasible solutions. What did I miss ? This is a prize collection VRP model ...
applethal'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
1 vote
0 answers
105 views

What is the suitable optimization method for this case?

What is the best optimization method to solve a large-scale problem (about 300 thousand variables)? The problem is nonlinear, nonconvex, involves only binary variables, and is unconstrained. The ...
Hussein Sharadga's user avatar
0 votes
0 answers
27 views

Need exercises to learn the Gurobi python package syntax

as I am trying to learn the Gurobi package, I did successfully try to implement some mathematical models. I want more and wish to have some exercises containing the Obj fun solution and the variables ...
applethal'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
0 votes
0 answers
28 views

Error while using subgradient method to update lagrange multipliers

I am trying to implemet the subgradient method in Lagragian relaxation to update the multiplier lamda which has three dimension, I have ecountered an Except error, it looks the is bugs in the code. it ...
ABDE's user avatar
  • 1
3 votes
1 answer
174 views

What are some of the key features that are currently absent in open-source AMLs like Pyomo, JuMP, Gurobipy

What are the some of prominent technical features (which may or may not be part of commercial Algebraic Modeling Languages (AMLs) such as GAMS or AMPL) which are currently lacking in open-source AMLs ...
chupa_kabra's user avatar
  • 1,485
0 votes
1 answer
106 views

Interpret the formulation of a pricing model in crowdshipping

I am trying to run the pricing model from the paper "Designing pricing and compensation schemes by integrating matching and routing models for crowd-shipping systems" on python with Gurobi, ...
Last_Mile's user avatar
-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
120 views

Sigmoidal programming

I plan to use sigmoidal programming from the git repo https://github.com/madeleineudell/SigmoidalProgramming.jl There are some issues with the implementation of this repo. It requires me to pass $A, b,...
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
1 vote
0 answers
59 views

Migrates between solvers

I would like to know if there is a way to migrate the model from A to another solver. For example, lets say i have done built my model in gurobipy and would like to migrates into pyomo. Is there a way?...
overboxed's user avatar
  • 593
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
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
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
-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
3 votes
2 answers
311 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
0 answers
97 views

min matrix norm with gurobi v10+

I was trying to use Gurobi for a minimization problem like so: $$ \min\|M-TX\|_1 $$ where all three terms are matrices. $X$ is the nonnegative decision variable(s) of compatible size. $M$ and $T$ are ...
Brannon's user avatar
  • 892
2 votes
1 answer
214 views

Should I replace sin(theta) by piecewise linear and solve the linear problem using gurobipy or use ipopt to solve the nonlinear probelm?

I have a large nonlinear and nonconvex problem. It also has sin (theta) and cos(theta). While gurobipy accepts sin or cos using the general constraint. gurobipy uses piecewise linear approximation, ...
Hussein Sharadga's user avatar