# Tag Info

Accepted

• 33.1k
Accepted

### Linearize a product of binary variables

Introduce bounded variable $y_{jk}$ to represent $\sum_{i\in I} x_{ijk} N_{ij} a_{ijk}$, and minimize $\sum_{j\in J}\sum_{k\in K} y_{jk}$. Now enforce $x_{ijk}=1 \implies y_{jk} = N_{ij} a_{ijk}$, by ...
• 33.1k
Accepted

### Linearize sum of continuous and boolean variable

If $M$ is a (small) upper bound on $x$, introduce a binary variable $z$ and big-M constraint $x \le M z$. The idea is that $x>0$ implies $z=1$. Now use $B z$ in the objective.
• 33.1k
Accepted

### Reformulating to locate the second largest decision variable of a set of decision variables

To get the second largest variable when all are nonnegative and at most two can be nonzero, just take the sum of all of them and subtract the largest.
• 33.1k
Accepted

### Maximizing a Ratio/Percent

CVXPY makes this easy to do, using its disciplined quasiconvex programming (DQCP) capability. An example is provided at https://www.cvxpy.org/examples/dqcp/concave_fractional_function.html . ...
• 13.5k
Accepted

### Switching of decision variables to be equal to a certain decision variable according to a binary (indicator) variable

$$x \le z + M(1-\beta) \\ x \ge z - M(1-\beta) \\ x' \le z + M\beta \\ x' \ge z - M\beta \\$$ If $\beta=1$, we have $$x \le z \\ x \ge z \\ x' \le z + M \\ x' \ge z - M \\$$ which leads to $x=z$ ...
• 13.6k

### How to deal with an optimization problem that have a sum of nonlinear functions of Z as a constraint when Z is the quantity to be minimized?

If well understood, w1, w2, w3, and Z are some continuous variables in your mathematical model, while k is a constant. If the functions f1, f2, f3 involved in constraint #2 are continuous and ...
• 2,986
Accepted

### Linearize piecewise function without big-M constraints

I don't see or remember a way around the big-M constraints. Thankfully they are not that hard to write. Or you may use indicator constraints which are even simpler. We add new binary variables, and ...
• 1,877
Accepted

• 39.8k
1 vote
Accepted

### Change the objective function formula change the complexity of a linear program?

It is not uncommon that with different objective functions, there are different complexity that comes with the specific problem. For example, in the scheduling theory, it is often of interest to ...
• 9,068
1 vote

### Loglog transformation of optimization problem, how can the solution be equal to the nontransformed counterpart?

If you consider only one $t$, you can ignore the positive constant multiplier because optimizing $y_t$ is equivalent to optimizing $k_t y_t$ (or its log) for positive constant $k_t$. But it sounds ...
• 33.1k
1 vote

### How to deal with an optimization problem that have a sum of nonlinear functions of Z as a constraint when Z is the quantity to be minimized?

If you are willing to take an approximate solution (no guarantee of optimality), it should be fairly easy to apply any of a number of metaheuristics to your problem. It would be helpful if, for fixed \$...
• 39.8k

Only top scored, non community-wiki answers of a minimum length are eligible