# Optimization in industry and academia

It is not difficult to think of everyday instances where we would like to minimize or maximize some quantity.

More common examples that arise in academia and industry centre around experiments and experimental data. If many measurements and readings are taken during the course of an experiment then a common requirement is to fit a function predicted by theory to that data in such a way that the error is, in some measure, minimized. It is easiest to minimize the sum of the squares of the errors from the data and in practice this is often the technique employed.

Within the library linear algebra routines and statistical routines address special cases of the fitted functions, but in other cases the optimization chapter provides the general solution. Typically the least-squares routines are the most appropriate since these directly minimize the sum of the squares of the errors.

To fix ideas suppose that theory predicts that as an input variable x is changed the dependant variable y should change as exp(ax). An experiment may be constructed to vary x and measure the corresponding values of y, from which we estimate the constant a by minimizing the sum [yi-exp(axi)]**2.

In industry minimizing costs is a natural goal. Such costs might be wastage of materials by cutting shapes optimally, by minimizing transport costs by locating warehouses and products optimally, by arranging productions lines machinery optimally and by arranging shift patterns to minimize expense. Accountants also like to minimize inventory costs, so production planning has also to take this into account.

In microelectronics performance is maximised by optimising the circuit board layout. The well-known air-crew scheduling problem is a fine example of an integer programming problem, since only whole pilots and cabin staff are valid solutions. Here the problem is to have the right crew ready and available to fly an aeroplane between the designated destinations whilst making sure that the crew is gainfully employed as much as possible, subject to legal working requirements.