Questions tagged [logical-constraints]
For questions about constraints that can be expressed in (usually propositional) logic.
185 questions
5
votes
1
answer
188
views
How to solve this riddle with a MIP?
On a square grid, a loop passes through each cell exactly once. For certain rows and columns, the maximum number of consecutive cells traversed by the path in that row or column is bounded by the tag ...
0
votes
0
answers
44
views
Is this counter-example valid for a Single-item Lot-sizing problem with Linear Costs?
I am analyzing a specific instance of the Single-item Economic Lot-Sizing (ELS) problem where production costs are piecewise linear and backlogging is allowed.
I have a "target" solution ...
4
votes
3
answers
167
views
Mixed-Integer Programming Formulation for Unrelated Parallel Machine Scheduling with Sequence Length Constraints
I'm an engineer who is working on an unrelated parallel machine scheduling problem to minimize total completion time, but with an additional practical constraint: each machine has a maximum sequence ...
0
votes
2
answers
155
views
Modeling a condition in a worker shift assignment problem MIP
In a worker shift assignment problem, let's suppose there are some unassigned shifts for a day (e.g., morning 8 to 11 is an unassigned shift that any qualified worker can take) and some additional ...
1
vote
1
answer
95
views
Activating a fixed cost using a binary variable when the max of 3 affine function is 0 (MILP)
I'm trying to model the scheduling of operations over a set of production assets considering uncertainty, individual costs and time dependent fixed operation costs ($c_f(t)$). Without exposing all the ...
2
votes
0
answers
63
views
Graph crossing minimization problem
I would like to formulate the graph crossing minimization problem as a MI(N)LP (it's ok if it is non linear) : given a graph $G(V,E)$, what is the minimum number of edge crossings in any drawing of $G$...
0
votes
0
answers
64
views
Subtour elimination in the case of multiple visits
I have two type of nodes: $S$ for multiple visits and $C$ for a single visit. I'm trying to avoid the case of subtour. With the formula $(A)$, I could handle some cases but still can not avoid the ...
0
votes
1
answer
95
views
Enforce binary variable to 0 in other cases
I’m trying to formulate the following statement:
If $x_{ij}=1$ and $x_{ji}=0$ then $y=1$ else 0 in other three cases, where $x_{ij}$ is binary variable. So,
$$y \leq x_{ij} + M(1-x_{ij})$$
$$x_{ij} - ...
0
votes
2
answers
105
views
Binary variable to check isolated nodes in MILP
I try to formulate constraints to check isolated nodes. For a node $i$ where $x_{ij}$ is a binary variable is equal to $1$ if it exists an arc $(i,j)$ for $i$ to $j$:
if $\sum_{j \in N} x_{ij} = 0$ ...
0
votes
1
answer
85
views
Count of loop when there exists at least outgoing arc without incoming
For a node $s$, I want to count how many nodes with loop when there exists at least one outgoing arc without incoming arc. So, if $x_{is}=1$ and $x_{si}=0$ then $z_s=1$. So basically, if $z_s=0$ means ...
0
votes
1
answer
72
views
Check the existence of outgoing arc (without loop)
For a node $s$, I can have loop or outgoing arc. How to check that there is at least an outgoing arc from $s$ without incoming:
If $x_{is}=1$ and $x_{si}=0$ then $z=1$
2
votes
0
answers
109
views
Avoiding epsilon when linearizing $y \leq b \implies x = 1$
I understand that the standard answer to this is to model $x = 0 \implies y - \varepsilon \geq b$. To avoid numerical issues (I'm using this for computing reduced costs), I would like to have a ...
0
votes
1
answer
85
views
Enforce binary variable based on sum of binary variables
I can't find a constraint that formulate both cases, $x$ and $y$ are binary variables:
if $\sum x_{ij} = 0$ then $y_j=0$
if $\sum x_{ij} \geq 1$ then $y_j=1$
I try this constraint: $\sum x_{ij} \leq M*...
2
votes
0
answers
96
views
Modeling Probabilistic CPU Allocation Efficiency in Reducing Computation Time Problems?
Background
I am a network engineer working on optimization problems focused on minimizing completion time for computational tasks. My initial model, as described in a previous question, targeted Monte ...
0
votes
1
answer
164
views
Sum of binary variable with condition
Is it possible in MILP to sum only binary variable that not equal to $1$ based on condition if else:
If $x_1=1$ and other variables equals to one (already visited) than sum only variables that not ...