In: Finance
I want to fill a backpack with items that will give me maximum benefit on a hiking trip. The weight in pounds and benefit for each item are given below. The backpack can hold at most 26 pounds. At least one drink (water or Gatorade) and at least one protein (cheese or beef jerky) must be packed. How can I obtain the maximum benefit from items in my backpack? | ||||||
Item Number | Item | Benefit | Weight (in pounds) | |||
1 | Flashlight | 8 | 2 | |||
2 | Cereal | 5 | 5 | |||
3 | Cake | 8 | 3 | |||
4 | Water | 4 | 4 | |||
5 | Gatorade | 5 | 6 | |||
6 | Bug Spray | 8 | 3 | |||
7 | Umbrella | 5 | 4 | |||
8 | Knife | 9 | 3 | |||
9 | Cheese | 3 | 4 | |||
10 | Beef Jerky | 4 | 5 | |||
using solver
need step by step solution
Steps to be followed as follows :
Decision variables : Selection as a new column next to weight which will become changing cells . As a particular item is selected or not gives binary values for selection .
Objective function : maximize benefit i.e. sum of all selected item's benefits should be maximized , =sumproduct(selection column, benefit column)
Constraints:
1. Total weight that bagpack can hold 26 pounds. =sumproduct(selection column, weight column) <= 26
2. Atleast one drink should be available =sum(water selection cell, Gatorade selection cell) >= 1
3. Atleast one protein should be available =sum(cheese selection cell, Beef jerky selection cell) >= 1
4. Selection column needs to be binary
All these values are used in solver as shown in figure
Hence we get following output: