Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - How to use excel to model linear programming?
How to use excel to model linear programming?
Load the planning solution module in Excel. The steps of Excel20 10 are: file->; Options-> Add-in-> Go to-> Check the Solver Add-in.

After understanding the problem, do mathematical modeling, and then input the model and data into the cells of Excel. The title of this example is: a factory should arrange to produce two kinds of products, I and II. It is known that the number of equipment hours required to produce a unit product and the consumption of two kinds of raw materials, A and B, are shown in Table 2- 1. Every product I produced by this factory can benefit from 2 yuan, and every product II can benefit from 3 yuan. How to arrange the plan to maximize the profit of this factory? It takes 65,438+0 units to produce product I and 2 units to produce product II, and the total unit time does not exceed 8 units. Product I consumes 4 units of raw material A and product II consumes 4 units of raw material B, in which raw material A 16kg and raw material B 12kg ... The modeling situation is shown in the attached figure in Excel:

The process of solving linear programming with Excel is as follows: 1. Use related functions and operators to express constraints and objective functions; 2. Using the programming solution module in the data, the established model is solved by mathematical operation. A, selecting objective function area b and variable parameter area c, and selecting and defining constraint condition d to select a solution method. In this case, simple linear programming is adopted. Then determine the solution.

Finally, the cells in Excel will be automatically filled with the optimized scheme. The optimal solution in this example is: produce product I? 4 pieces, and the highest profit when producing 2 pieces of product II is 14 yuan.