Optimization (also known as mathematical programming) can be simplified to a selection of the best element/s (minimum or maximum) for a given circumstance (objective function), which may include some conditions (subject to restrictions).
One of the classic problems in field optimization is the (diet problem) [http://www.neos-guide.org/content/diet-problem]. This problem came up during the Second World War when the Army wanted to minimize the cost of feeding their soldiers in the field (objective function) while maintaining a balanced diet.
For this occasion, we will take as an example a set of foods from a well-know fast food restaurant and try to minimize the cost of the menu while being as healthy as possible.
To solve this problem, there are plenty of commercial algebraic modeling languages —such as GAMS and AMPL—, which are used mainly in academia and professional environments. But as Python lovers, we can use several libraries for solving such optimization problems, —e.g. [CVXOpt] (http://cvxopt.org/) [CVXPy] (http: // www.cvxpy.org/en/latest/) [PULP] (https://pythonhosted.org/PuLP/) [OpenOpt] (http://openopt.org/Welcome), or [Pyomo] (http: //www.pyomo.org/).
In this talk we will use Pyomo because:
The talk will be divided in three parts:
Don't miss this talk if are one of those "undecided pythonistas" that want to learn how to solve optimization problems with determination ;)