# Questions tagged [binary-variable]

For questions that involve variables than can only take on one of two values, usually 0 or 1.

152 questions
Filter by
Sorted by
Tagged with
103 views

89 views

### How to linearize the product of a binary and a negative continuous variable?

Suppose we have a binary variable $x$ and a negative continuous variable $y$. How can we linearize the product $u=xy$?
144 views

105 views

### Modelling a binary variable in LPs

I need your help. I'm setting up an LP and I'm trying to find constraints to introduce the binary varibale $b_{ij}$. So it should take the value 0 if the sum of all $a_{ij}$ values to the period t are ...
184 views

### LP - How to model binary variable that indicates a switch

I have the following question / concern. I have a modeling problem with the decision variable $d_{ptm}$ which indicates whether product $p$ was serviced by machine $m$ in period $t$. It takes the ...
93 views

### creating individual Variables in pyomo with different length

I am new to pyomo and I do have some smaller (or bigger) problems and hope someone can help me. How can you create this variable in pyomo? I wanted to create it with pyo.Varlist() in which I pass ...
163 views

### Multi objective optimization is giving wrong results

I am trying to solve a multi objective optimization problem. I have a set of nodes belonging to different counties and each node is associated with some cost and some priority. I want to select the ...
45 views

486 views

### Profit Maximization LP and Incentives Scenarios

I wrote a profit maximization LP with inventory, component usage, production, and machine hours constraints. When I optimize the model, it solves as expected. When applied towards a business case, ...
My previous question was about this ILP with all binary variables: $$\min \sum_{1\leq i<j\leq n-1-h} t_{i,j}$$ $$\sum_{i=1}^{n-1-h} a_{k,i} = \lfloor (n-1)/2\rfloor \qquad \text{for }k\in[h];$$ $$... 3 votes 2 answers 100 views ### How to model if-then? i is a set 1 to n. j is a set 1 to m. j and k are from the same set such that j\neq k. c_{ij} is a parameter. x_{ij} is a binary variable. How to model: If$$c_{ij}\cdot x_{ij} \... 