Skip to content
BI & Data ScienceNon-linear programming and the evolutionary solver

Formulas for this chapter

Revenue as a non-linear function of price

R = p x q with q = a - b p => R = a p - b p^2 Peak at p = a / (2b)

Any pricing question where quantity falls with price. The p^2 term makes it non-linear, and the negative coefficient makes it concave, so the peak is a global maximum.

p
Price, the decision variable
a
Demand at a price of zero
b
Units of demand lost per rupee of price

Convex cost with a ratio term

TC(Q) = (D / Q) x S + (Q / 2) x H Minimum at Q* = sqrt( 2 D S / H ) At Q*, ordering cost = holding cost

The standard example of a non-linear but convex model. Useful as a check: if the two cost components are not equal, you are not at the optimum.

D
Annual demand in units
S
Cost of placing one order
H
Cost of holding one unit for one year
Q
Order quantity, the decision variable

Engine choice rule

linear everywhere -> Simplex LP (global, exact) smooth non-linear -> GRG Nonlinear (local; global if convex/concave) kinked or discontinuous -> Evolutionary (no guarantee)

Before every Solver run. Take the strongest engine the model allows, and reformulate a kink away if you can.

smooth
Has a gradient everywhere: products, powers, ratios, exponentials
kinked
Contains IF, ABS, MAX, MIN or VLOOKUP
Step 2 of 21
The real wordsTheory

What makes a model non-linear

Four culprits, and one of them is enough.

1. Products of variables p x q x1 x2 2. Powers of variables x^2 sqrt(x) 3. Ratios of variables x / y D / Q 4. Non-smooth functions IF() ABS() MAX() MIN() VLOOKUP()

Notice the fourth. An IF is perfectly ordinary arithmetic, but it puts a kink in the surface, and a method that follows the slope cannot get past a kink.