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 1 of 21
The ideaTheory

Walking downhill in fog

You are on a hillside in thick fog and want the lowest point. You can feel the slope under your feet, so you step downhill, again and again, until the ground is flat.

You have found a bottom. Whether it is the bottom of the whole valley, or a puddle halfway down, you cannot tell without lifting the fog.

That is the whole difficulty of non-linear optimisation, and the reason it needs different engines from linear programming. Check against your class slides.