Questions tagged [binary-variable]
For questions that involve variables than can only take on one of two values, usually 0 or 1.
181 questions
4
votes
0
answers
103
views
lp_solve gives a very infeasible solution
I am trying to solve the following integer linear program using lp_solve: (there is no objective, so this is just asking about feasibility)
...
1
vote
1
answer
77
views
How to model energy conservation constraint based on sign of decision variable
I model a battery with several energy flows flowing in and out, for example PV to battery $P^\mathrm{pb}_t\in\mathbb{R}_+$ (unidirectional), Battery to heat pump $P^\mathrm{bh}_t\in\mathbb{R}_+$ (...
2
votes
1
answer
95
views
Docplex CP Model Solution Found but Can't Retrieve Decision Variable Values
I'm using Docplex's Constraint Programming model with two 4-dimensional binary decision variables:
...
2
votes
1
answer
163
views
Hierarchy of linear programs derived from polynomial calculus which converge against a tight relaxation of a MILP
I had a conversation with a professor from a proof complexity background recently who brought up a way to solve (binary?) MILPs I have not heard of before.
The professor mentioned that by introducing ...
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$ ...
2
votes
1
answer
122
views
Count active nodes in MILP
In MILP, is it possible to use constraint to count active binary nodes?
Let $x_{ij}$ be binary decision variables. For $N = \{1,2,3,4\}$, a node $s$: if $x_{s1} =x_{s3}=x_{2s}=x_{3s} =1$ then the sum ...
2
votes
1
answer
252
views
Relaxing a binary constraint
I am attempting to optimize the operation of an electrical system that produces some amount of thermal power $P_t$ and keeps a temperature $x_t$ within a certain range. Given a cost vector $\mathbf{c} ...
2
votes
1
answer
185
views
Linearizing fractional objective with double summations
I've been trying to linearize this objective function for quite some time and I'm not sure if this is even in the right direction of not. $z$ is an auxiliary var to linearize the product of two binary ...
1
vote
1
answer
184
views
Decision tree-like constraints in MILP
I want to build a simple model for hydropower scheduling using MIP. The topology is fairly straight-forward; there is one power station connected to one upstream reservoir. Downstream there is a river ...
0
votes
1
answer
105
views
How can I enforce equal bandwidth allocation among all connected users in a mixed-integer optimization model?
I am a network engineer who is currently working in a network optimization porblem. Here I got a binary decision matrix that contain some binary decision variable $A = \left[ {\begin{array}{*{20}{c}}
{...
2
votes
1
answer
154
views
Clarification on constraint formulation
I have the following constraint and would like to know if it can be modelled like this.
$$\sum_{t\in T}\sum_{j=k}^{k+5}q_{itj}\geq 3\cdot\left( 1-\sum_{j=k}^{k+5}r_{ij} \right) \forall i\in I, k\geq ...
3
votes
1
answer
303
views
How to force a set partitioning constraint to "become redundant" or "not require"?
I am an network engineer and currently I have to deal with an optimization problem that have set partition constraint with a very specific requirement:
$\begin{array}{*{20}{c}}
{\mathop {Min}\limits_x ...
0
votes
1
answer
191
views
Find a parsimonious logical combination of bit vectors
I have a set of bit vectors $x_i$ of the exact same length, each with a distinct bit pattern.
I have a target bit vector $t$ of the same length as the others, but with a distinct bit pattern.
I want ...
3
votes
2
answers
246
views
Conditional Constraint Formulation LP
I have a continuous variable $z, {-1 < z < 1},$ and a binary variable $w$.
How do I write a conditional constraint which guarantees for $z < 0$, $w = 1$,
and for $z \ge 0$, $w = 0$?
1
vote
2
answers
126
views
Modification of a switch binary variable
I have the following question. I have just read this question and was wondering if it is possible to extend this problem. I am interested in whether it is also possible to identify which machine is ...