Tag Info

Accepted

How to write if else statement in Linear programming?

This can not be formulated as a linear programming problem. We need extra binary variables and end up with a MIP. First we do: $$a > b \Longleftrightarrow \delta = 1$$ This can be formulated as:...
• 3,892
Accepted

Binary integer variables in linear programming

Note that $$\begin{array}{rl} x_1 = 0 \lor x_1 \geq 10 &\equiv (x_1 \geq 0 \land x_1 \leq 0) \lor x_1 \geq 10\\\\ &\equiv x_1 \geq 0 \land (x_1 \leq 0 \lor x_1 \geq 10)\end{array}$$ We can ...
• 19.1k

Binary integer variables in linear programming

Using an extra binary variable $\delta$ we can write: \begin{align} & 10 \delta \le x_1 \le 300 \delta \\ &\delta \in \{0,1\} \end{align} $x_1$ is called a semi-continuous ...
• 3,892
Accepted

Convert fractional to quadratic integer programming

Yes, one way is to introduce two new variables $t_1$and $t_2$ and maximize $t_1+t_2$with the constraints $f_1(x,y) \geq t_1$ and $f_2(x,z) \geq t_2$. Now multiply with denominators and you will have ...
• 9,062
Accepted

Doing a Charnes-Cooper transformation with matrices and an zero-one constraint

The shape of the decision variables (matrix versus vector) does not matter. Yes, $\alpha=\beta=0$ in your case. The idea of the transformation is that you multiply both numerator and denominator by a ...
• 34.8k

Linearize optimization problem with absolute value

For each $y_i$, introduce nonnegative variable $z_i$ to replace $|y_i|$, and impose linear constraints $-z_i \le y_i \le z_i$.
• 34.8k
Accepted

What is the fastest mixed-integer convex programming software?

CVXGEN only addresses LPs and convex QPs. So I am guessing you are interested in convex Mixed Integer QPs (MIQPs), or perhaps MILPs. Those are addressed, by among others, GUROBI, CPLEX, and MOSEK, ...
• 4,201
Accepted

• 34.8k
Accepted

Problem with big-M logical constraints

You were on the right track with two additional binary variables and two big-M constraints. For the implication $y_1=1 \implies u_1>0$, you can enforce instead $y_1=1 \implies u_1\ge \epsilon$ for ...
• 34.8k
Accepted

Formulating Constraints into Mixed-Integer Linear Programming

Introduce a small constant tolerance $\epsilon > 0$, binary decision variables $y_i^1$ and $y_i^2$, and linear constraints \begin{align} y_i^1 + y_i^2 &\le 1 &&\text{for all $i$} \tag1\\...
• 34.8k

Linearize objective function for intlinprog

Every time you have an objective of the form $$\mathrm{minimize} \sum_i p_i|u_i|$$ where $u_i$ are some variables or linear expressions of other variables, and $p_i$ are nonnegative constants, you can ...
• 3,732