Here you’ll learn how to use the ruler method for linear optimization.
Rule
The objective function can be found by summing the “price per unit” multiplied by the “number of units” for all the items you have. Then it looks like this:
where is the price of an item that has sold units and is the price of an item that has sold units.
You can swap with a constant, . Solve the equation for so that you have a linear function you can move around:
The only thing that matters here is the slope of the function, . The constant term changes all the time, because you change the value of to move the line outwards in the coordinate system.
Example 1
A factory that produces brands will make a shirt and a skirt for Tom Ford. Both pieces have to be made of cashmere and silk. To make a shirt, you need two lengths of cashmere and one length of silk. To make a skirt, you need one length of cashmere and three lengths of silk. The factory has 200 lengths of cashmere and 300 lengths of silk available. A shirt is sold for , while a skirt is sold for . How many shirts and skirts does the factory have to produce to maximize its income, and what is this income?
First, you set up the constraints described in the text as inequalities. Let be the number of shirts produced and be the number of skirts produced. The cashmere and the silk has to be distributed between the shirts and skirts. That gives you these inequalities:
The number of shirts you produce can be no shirts, or more. This means that
The number of skirts you produce can be no skirts, or more. That gives you
Now you must construct an inequality for the available cashmere. You need two lengths for a shirt, and one length for a skirt. The roll has a total of lengths. That results in
Next, you make an inequality for the available silk. You need one length for a shirt and three lengths for a skirt. The roll has lengths of silk. That would be
You end up with this system of inequalities:
Now you need solve the inequalities with respect to . First, inequality (3):
Inequality (4):
You don’t have to do anything with the other two inequalities.
Graph the two inequalities in a coordinate system and mark the area where they overlap. You know that you only need the first quadrant because both and is greater than or equal to 0. That should give you this figure:
Find the optimal point using this figure. You know that it is one of the points within the marked area where the graphs intersect, or where the graphs intersect the axes.
When you use the ruler method, you have to find the expression for the objective function . You know that a shirt costs $ and that a skirt costs $. Insert these prices for and in the expression and solve for . Then you get
Because the term with the constant term in it isn’t important when you push the line outwards in the first quadrant, you can choose any value for it that you want. It’s smart to begin by picking a value on the -axis that lies within the marked area. In the figure below, the constant term has been chosen to be . It looks like this:
You read off the coordinates of the point and find that . That means the factory should produce shirts and skirts in order to maximize their income.
You find the income of the factory at the optimal point by inserting the -value and the -value you found in Item 7 into the objective function. That means and , and you get
The factory earns $ by producing shirts and skirts. This is the optimal production, because it was the outermost point in the marked area that the line of the objective function intersected.