1,123 questions
0
votes
0
answers
31
views
Wrong structure of tours Location Routing Problem gurobipy
I need to program a code for the LRP in Gurobipy. Unfortunately it is not working right but I can't find the mistake. It assigns my customers correctly to the depots but it does not route the vehicles ...
1
vote
0
answers
70
views
How to reduce the number of cores Gurobi solver uses
I am using Pyomo with Gurobi solver.
gurobipy==11.0.2
Pyomo==6.7.3
The error is:
gurobipy.GurobiError: Requested number of cores (12) is greater than allowed (8) cores
I have tried:
echo "...
0
votes
0
answers
43
views
MIP Relaxation through pyomo
I have a step in my algorithm where I have to perform a standard Mixe Integer Program relaxation, it goes as follows:
Solve the MIP
Relax the binaries of MIP to NonNegativeReals
Fix the variables to ...
0
votes
1
answer
97
views
Second-order cone constraints in pyomo with mosek
Hope you have a good day.
Recently, I created a coupled power-transportation model using Pyomo and solved this integrated model using ADMM. Where the power system model (Distflow Model) is solved by ...
0
votes
1
answer
52
views
How it is possible to solve one LP (Simplex) per thread in parallel?
I need to solve one LP per thread at the same time.
I'm coding in Matlab and using gurobi as a solver. Since gurobi is an API that actually run calculations in C++, I'm unable to use several threads ...
0
votes
1
answer
59
views
Traffic flow optimization
As the title suggests, I am struggling with traffic flow optimization.
I have this graph that represents my street network.
Round nodes like A, B, ... are boundary nodes that serve as source/sink, and ...
0
votes
0
answers
23
views
When calling Gurobi by pyomo, if the primal is infeasible, how to find a random dual extreme points and extreme ray without coding the dual?
I am using pyomo to call gurobi to solve a linear programming model P. Let D be the dual problem of P. When P is infeasible, how can we get a random (not fixed) extreme point and extreme ray of D ...
0
votes
1
answer
38
views
gurobi: mixed integer linear programming problem, X takes values {-1,1}
like the title: in Gurobi in python, how do I set the constraints that X only takes values either 1 or -1?
0
votes
2
answers
63
views
I have an AMPl model, like an infeasible or unbounded problem. Set dualreductions=0 or iis=1 for definitive answer. 0 simplex iterations
# SETS set B; # Candidate central kitchens set S; # Schools set C; # Categories class set K; # Set of commodities set N; # Set of nutrients set Y; # Set of groups set G {Y} within K; # Set of ...
0
votes
0
answers
100
views
Gurobipy Invalid value for Model.addConstr error
I am using Gurobi to write constraints for a model:
electric = gp.Model('electric')
#Gurobi Variables
supply = electric.addVars(fuel, time_hour, name='supply')
delay = electric.addVars(work_type, ...
2
votes
1
answer
241
views
Use Gurobi to create networkx.Graph that has highest edge connectivity
I have the following graph G
G is created using the following code
import networkx as nx
import matplotlib.pyplot as plt
G = nx.hoffman_singleton_graph()
pos = nx.spring_layout(G)
nx.draw(G, pos=pos)...
-1
votes
1
answer
77
views
Tuning multiple Gurobi models at once
i want to tune the hyper parameters of Gurobi for several optimization problems at once. I have a folder with several .lp files.
At the moment i am using this code to tune one model in Python:
model = ...
1
vote
2
answers
133
views
How to get the result of the objective function while using a slack variable?
I have a simple Python code using Gurobi. I have added a slack variable to force model feasibility. I need to know how to get the real minimum value in my objective function.
import gurobipy as gp
...
0
votes
1
answer
59
views
How to track native memory used by Gurobi in Java?
I am using Gurobi in Java with Gurobi's Java API, and I would like to track the full memory footprint of a Gurobi-based solution to a problem with other solutions, such as SAT solvers.
My tests used ...
0
votes
0
answers
37
views
Object of type CustomScaler is not registered/supported with gurobi_ml
I have built a CustomScaler to scale my data in sklearn.pipeline.make_pipeline. It contained transform and inversetransform function. When I used gurobipy to optimise the regression model, I got the ...