Skip to main content

Questions tagged [python]

For questions about solving Operations Research problems using the Python programming language.

Filter by
Sorted by
Tagged with
3 votes
1 answer
143 views

I'm trying to do some custom cuts. I'm using Gurobi as the LP solver. I have code below for GMICs. (I'm planning some other cut experiments and Gurobi doesn't give me full control over their built-in ...
Brannon's user avatar
  • 850
1 vote
0 answers
83 views

I'm working on a problem, that deals with product distribution between a set of machines in a factory. Here's what I'm given (as input variables): The amount of products produced daily, e.g. 9600 The ...
DevilXD's user avatar
  • 11
0 votes
1 answer
73 views

In the online course "Effortless Modeling in Python with GAMSPy" by Bluebird Optimization, Lesson 17 introduces the anatomy of conditional statements, including the point that the operator <...
Tim Varelmann's user avatar
2 votes
1 answer
343 views

Some good solver-agnostic modeling packages in Python are Pyomo and PuLP, with Pyomo being a little more versatile than PuLP. What are the equivalent non-commercial and well-supported solver-agnostic ...
Lin Sen's user avatar
  • 53
2 votes
1 answer
100 views

I'm using Docplex's Constraint Programming model with two 4-dimensional binary decision variables: ...
Bree's user avatar
  • 139
0 votes
0 answers
65 views

Anyone with experience using docplex can give me some insight or tips regarding my situation? I'm trying to build a convex function using matrix-vector notation. But the elements of the matrix and ...
0kx's user avatar
  • 1
2 votes
1 answer
173 views

I’ve been searching for a Python package that implements Tabu Search but haven’t found any that seem popular or actively maintained. Most libraries I’ve come across seem like individual efforts, with ...
kernel123's user avatar
1 vote
1 answer
200 views

How to get the Relaxed solution of an MILP using Python + docplex stack has been answered in Docplex : How can I get the objective value of the relaxation of an MILP?. I have a model which have 470K ...
vikasgarg's user avatar
1 vote
0 answers
162 views

Gurobi result violates the constraint $S=\max⁡\{v_1,v_2\}$ by always choosing $v_1$ to minimize the objective $R$. I suspect this happens because $R$ is minimized when $S$ always equals $v_1$(Conflict ...
Soudy's user avatar
  • 11
1 vote
1 answer
103 views

For context, I'm currently working on a bi-level network interdiction problem involving the sub-problem being the lazy-constraint TSP problem, with the master problem being the maximization of the ...
JJMae's user avatar
  • 165
0 votes
2 answers
172 views

I'm designing an optimization model where an event occurs at some time $t_p$ for each $i$. I have a binary variable $z[i, t_p]$ such that when $z[i, t_p] = 1$, the event has occurred for index $i$ at ...
Bree's user avatar
  • 139
0 votes
1 answer
115 views

I've been trying to build a model using Pyomo GDP constructs, however for some reason, it seems that logical operators cannot be mixed with relational expressions yet. I am trying to implement these ...
lurscher's user avatar
  • 113
0 votes
1 answer
193 views

I have a networkx.Graph-object called G. ...
HJA24's user avatar
  • 13
7 votes
3 answers
11k views

Yesterday I came across a post on here, where one answer claims that C++ can be up to 10,000 times faster than Python under specific circumstances. In the light of this runtime superiority, why are ...
manofthousandnames's user avatar
1 vote
1 answer
253 views

I’ve got an optimisation problem which is unconstrained least squares optimisation. The residual function (ie the function that gives me the vector of residuals in least squares) is very expensive to ...
Maria's user avatar
  • 11

15 30 50 per page
1
2 3 4 5
28