Skip to main content

All Questions

0 votes
2 answers
90 views

linearizing a constraint involving an absolute function

I would like to know what is the best way to linearize a constraint involving an absolute function. More precisely, imagine I have three binary variables and their relationships is as follows: |x-y| = ...
Sam's user avatar
  • 97
1 vote
0 answers
65 views

transform minimize weighted sum of absolute value into a linear optimization

For example, we have an optimization problem $$ \min \sum_{i=1}^{n} |w_{i} - a_{i}| b_{i} \quad \text{s.t.} \quad \sum_{i=1}^{n} c_i w_i = 0 $$ and $a_i, b_i, c_i$ are given. How to convert it into a ...
Pique's user avatar
  • 11
2 votes
1 answer
203 views

Multiple absolute values with multiple variables in an LP

Assume that we have a LP with the constraint $$ \sum_{j} \left(c_j x_j + |c_j x_j - \alpha_j + \beta_j|\right) \leq y $$ and $$\alpha_j + \beta_j \leq \lambda_j $$ for all $j$, where the (positive) ...
endeavor's user avatar
  • 145
6 votes
1 answer
352 views

Absolute value in an equality constraint

What is the best way to model or represent an equality constraint which includes an absolute term in the expression: $$ x = |y| $$ $x \in \mathbb{R^+}$ and $y \in \mathbb{R}$
Ahmed's user avatar
  • 113
2 votes
1 answer
268 views

How to write constraint with sum of absolutes in Integer Programming?

I found a solution for just one term here How can we formulate constraints of the form $$ \sum_{i=1}^n |x_i -a_i| \ge K $$ in Mixed Integer Linear Programming ?
Vinay's user avatar
  • 203
3 votes
1 answer
1k views

How to minimize the sum of absolute values

How can I solve a problem such as the following: $$ \text{minimize}~~~ \sum_{i=1}^n |x_i| \\ \text{subject to}~~~ A x \geq b $$ ? Without the absolute values on the variables, it is a simple linear ...
Erel Segal-Halevi's user avatar
6 votes
1 answer
169 views

Linearizing objective function with absolute differences

I want to turn this objective function $$\max \sum_{i=1}^{N-1} \sum_{j=i+1}^N |TX_i^T - TX_j^T|$$ where $T$ is just a vector with increasing integers (e.g $[1 \ 2]$) and $X_i$ is a vector ...
T K.'s user avatar
  • 61
22 votes
3 answers
2k views

How to minimize an absolute value in the objective of an LP?

I want to solve the following optimization problem $$\begin{array}{ll} \text{minimize} & | c^\top x |\\ \text{subject to} & A x \leq b\end{array}$$ Without the absolute value, this a ...
Discrete lizard's user avatar