# Operations Research: Nonlinear Programming and Linearization

In many cases, we need to deal with nonlinear situations, e.g.: product pricing decision, inventory, portfolio optimization. Above all, the purpose is to find a balance between tradeoffs. Usually non-linear programs are more general than the linear programs. Formulating non-linear program is usually easy because you rarely use weird constraints; but its optimization would be hard.

## Economic Order Quantity (EOQ) Model

The EOQ model helps us make the order quantity decision, which is the most economic. It is actually looking for a balance between the ordering cost and holding cost. Typically we formulate an non-linear program whose solution is the optimal order quantity. There are a few assumptions of EOQ model:

1. The demand is deterministic and consumption rate is constant.
2. The ordering cost is fixed, regardless of the quantity ordered.
3. No shortage is allowed.
4. The ordering lead time is zero.
5. The inventory holding cost is constant.

The key to formulate the problem is to understand how inventory level is affected by our decision.

## Portfolio Optimization

There are plenty of ways to measure risk. Markowitz and Sharpe suggest the total revenue is random, the larger the variance of the total revenue, the higher the risk. So we want minimize the total variance while ensuring a certain expected revenue. We want to use the method with lowest risk to guarantee some expected revenue. Given different value of expected revenue, we get different optimal portfolios.

## Linearization

Many nonlinear functions can be linearized through the help of binary variables.

## Linearization of Max and Min

### Absolute value functions

Absolute value functions are nonlinear. It can be linearized as follows:

1. First use a variable to present the absolute value, say `w = | x |` .
2. Then we could move the absolute value function from objective function to constraints.
3. Next changing equality to inequality, say changing `w = | x |` to `w โฅ | x |` . This will change the feasible region, but won’t change the optimal solution. Because if there are values satisfy the strict inequality ( the > part of โฅ ), there are always room to get a smaller possible number, so the original solution can not be optimal. If there is an optimal solution, the optimal solution will make the inequality binding ( the = part of โฅ ).
4. Essentially, absolute value function can be expressed as the maximum of two terms: `| x | = max { x, -x }`, which makes `w โฅ | x |` equivalent to `w โฅ max { x, -x }`, which is further equivalent to `w โฅ x` and `w โฅ -x` . It means w would be lower bounded by the greater of x or -x .

### Min and max functions in constraints

The technique we applied previously can be generalized, because the linearization is based on logic AND:

The linearization above can not apply to these situations:

1. When max function is at the larger side of inequality
2. When min function is at the smaller side of inequality
3. When max or min function in an equality

In the situation 1 and 2 above, the logic is OR (instead of AND). The linearization of this can be accomplished using binary variable, but this will introduce integer programming which is complicated and inefficient.

### Min and max functions in objective functions

This technique can not be used with min min or max max.

### Absolute value function revisited

Based on discussions above, absolute value function is just a max function `| x | = max {x, -x}`, so it can be linearized when:

1. minimizing an absolute value function.
2. absolute value function is at the smaller side of an inequality.

## Linearization of Products

The product of 2 decision variables can be linearized if any of them is binary. The product can not be linearized if both of decision variables are continuous.

### Both decision variables are binary

If the products appear in objective function:

If the products appear in constraints:

### Only 1 of 2 decision variables is binary

If the products appear in objective function:

If the products appear in constraints:

## My Certificate

For more on Operations Research: Nonlinear Programming and Linearization, please refer to the wonderful course here https://www.coursera.org/learn/operations-research-modeling

I am Kesler Zhu, thank you for visiting my website. Check out more course reviews at https://KZHU.ai

All of your support will be used for maintenance of this site and more great content. I am humbled and grateful for your generosity. Thank you!

 Your generosity and kindness is overwhelming!Donate \$1.99 - Good job!Donate \$4.99 - Keep it up!Donate \$14.99 - Very helpful!Donate \$29.99 - Looking forward to more!