Optimization involves modelling a system as a function of some variables, then deriving some cost, or measurement of performance from it. The variables are then adjusted to get the best measure of performance out. These methods give the best results, but they can be tricky to set up, and they can be very slow.