You can use linear programming to minimize or maximize functions. In this example, an oil refinery must procure crude oil from two sources. The objective is to minimize the purchase cost of different quality crude oils and meet minimum production levels of 2000 barrels of gasoline, 1500 barrels of jet fuel, and 500 barrels of machine lubricant. Meanwhile, the suppliers cannot exceed their maximum daily production of crude oil. The following table shows the cost and capabilities of the two different crude oils.