Most Popular
1500 questions
5
votes
1 answer
How many variables and constraints can modern mixed integer programming solvers handle?
I originally asked a question here and they suggested that I crosspost it to the OR stack exchange, so that is what I am doing (hopefully correctly?). Here is the question I asked there:
"I know it depends on the specific problem instance, but…
graphtheory123
- 225
- 1
- 4
5
votes
1 answer
Summation of Binary Variables Pushing a Binary Variable
I'm modeling a problem where I have a set of binary decision variables $x_{ij}$ that has a value of 1 if the person $i$ is allocated to day $j$ or 0 otherwise.
I have another set of binary decision variables $n_{jk}$ that has a value of 1 if the…
dhfg
- 53
- 2
5
votes
4 answers
What are the key pros and cons to mention when asked why one prefer Julia over Python in OR-research-industry interviews and vice-versa?
I want to apply for a position after my PhD in an industrial laboratory that does research in OR.
They stipulate that they want either Python or Julia programming languages. Since my Bachelor's internship supervisor taught me Julia 5~6 years ago and…
JKHA
- 679
- 4
- 10
5
votes
2 answers
Adding linear penalties for multiple assignments
I have a multiple assignment problem, with an added cost for "repeat assignments".
For example, consider the cost matrix:
sing guitar bass drums
ringo 8 10 10 2
paul 3 4 2 5
john 2 4 …
Him
- 153
- 4
5
votes
3 answers
Genetic Algorithm
Is there any Python library as published on PyPi, with genetic algorithm (GA) or GA inspired solver that helps with constrained optimization?
I am aware of Matlab's GA solver and also aware that costs of constraint violations can form part of my…
Sutanu Majumdar
- 3,461
- 1
- 2
- 11
5
votes
3 answers
MIP constraint with sum of decision variables having certain value : $\sum_{i=1}^nx_i = 2 \implies \delta = 1$
I want to formulate a MIP constraint such that :
$$\sum_{i=1}^nx_i = 2 \implies \delta = 1$$
$x_i, \delta \in \{0, 1\}$.
My problem is that delta should be one when this sum is exactly 2 and not greater or less than.
tonythestark
- 235
- 1
- 6
5
votes
1 answer
Dantzig-Wolfe decomposition for mixed-integer problem
Recently, I have been working on Dantzig-Wolfe(DW) decomposition technique. I found enough online resources that show worked-out examples of how to solve linear problems using the DW method. But I did not find any resource which explains solving…
Fouad Hasan
- 71
- 3
5
votes
1 answer
How to formulate the inequality constraint $\sqrt{x^2+y^2} \leq z$ using gurobipy?
How to formulate the following constraint using gurobipy
$$ \sqrt{x^2 + y^2} \le z$$
where $x, y, z$ are continuous optimization variables?
I saw how to formulate it using CVXPY:
cp.norm(cp.hstack([x, y])) <= z
I am now wondering how to formulate…
Hussein Sharadga
- 409
- 1
- 10
5
votes
2 answers
Binary variable constraint
The task is to ensure that if $x_i = 1$ for at least $k$ of the possible indices $i$ in $\{1,...,n\}$ then $y = 1$, where $k$ and $n$ are parameters, $x$ is a binary variable vector with $n$ elements, $y$ is a binary variable.
I already tried to…
Bohdana Nevierova
- 139
- 5
5
votes
3 answers
Constraint for two binary vectors to be different
If I have a matrix $A$ of binary variables $a_{i,j}$, $1 \le i \le n$, $1 \le j \le m$, how can I enforce in an Integer Linear Program with binary variables, the condition that every two columns must be different?
I know from here how to do it for a…
Fabius Wiesner
- 393
- 1
- 7
5
votes
2 answers
Is upper incomplete gamma function convex?
Considering the definition of upper incomplete gamma function: $\Gamma(a, x) =$ $\int_{x}^{\infty}t^{a-1}e^{-t} dt$
Given that $a$ is fixed and $0 < x < a$, can we prove the function is convex over $x$?
Javidit
- 63
- 4
5
votes
3 answers
Maximize the minimal distance between true variables in a list
I'm using the OR-Tools CP-SAT solver on a list of $n$ boolean variables $x_i$. I'm trying to maximize the minimal distance between two true variables in this list, as illustrated by the following…
Blackhole
- 235
- 1
- 6
5
votes
2 answers
Is there an efficient/polynomial way to detect/determine whether a polyhedon contains at least an integer point?
How to determine whether a convex polyhedron described by a set of linear inequalities contains at least a or no integer point in polynomial time, which is to say detecting the IP feasibility ?
Specially in binary case, it's sufficient to see if the…
Brown
- 173
- 5
5
votes
1 answer
Dantzig-Wolfe vs Benders Decomposition on the dual problem - Computational differences
My question is a follow-up to this one: Relationship between Benders’ decomposition and Dantzig-Wolfe decomposition. Here what is being discussed is the relationship between the two methods, and it is commented that while theoretically equivalent,…
J. Dionisio
- 534
- 2
- 14
5
votes
1 answer
Understanding L-shaped algorithm in a two-stage stochastic problem
I am facing a problem understanding the L-shaped algorithm in a two-stage stochastic problem.
$$\operatorname{Min} z=100 x_1+150 x_2+E_{\xi}\left(q_1 y_1+q_2 y_2\right)$$
subject to
$$
\begin{aligned}
&x_1+x_2 \leq 120 \\
&6 y_1+10 y_2 \leq 60 x_1…
falamiw
- 157
- 8