0% found this document useful (0 votes)
41 views2 pages

Solver Knapsack

The document presents nutritional information for different food objects and calculates the optimal combination to maximize calories within constraints. It determines the decision variables as the number of each object, and shows the optimal solution is 5 candy bars and 25 sandwiches, providing 3700 calories and 1025 grams of protein within the 10kg weight and 0.125m3 volume limits.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
41 views2 pages

Solver Knapsack

The document presents nutritional information for different food objects and calculates the optimal combination to maximize calories within constraints. It determines the decision variables as the number of each object, and shows the optimal solution is 5 candy bars and 25 sandwiches, providing 3700 calories and 1025 grams of protein within the 10kg weight and 0.125m3 volume limits.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Object Candy bar Sandwich Juice Can Apple

Calories
per 90 130 100 40
Object

Protein
(grams) 5 40 15 3
per
Object

Weight
(kgs) 0.25 0.35 0.35 0.3
per
Object

Volumes
(m3) 0.0005 0.002 0.00075 0.0009
per
Object

Step 1 - Determine the objective


Maximize the calories in the load
Maximum weight 10 kgs
Food contains at least 200 grams protein
Maximum volume 0.125 m3

Step 2 - Determine the Decision Variables


Number of objects that satisfy the objective
Object Candy bar Sandwich Juice Can Apple

Number
of 5 25 0 0
Objects

Step 3 - Build the Excel Equations that combine the Objective Function with all Decision Variables

Object Candy bar Sandwich Juice Can Apple Total

Number
of 5 25 0 0 30
Objects
Calories 450 3250 0 0 3700
Protein 25 1000 0 0 1025
Weight 1.25 8.75 0 0 10
Volume 0.0025 0.05 0 0 0.0525
Note Relation Required

Decision
N/A Integer
Variables

Objective Maximize Maximine


Constrainst >= 200
Constrainst <= 10
Constrainst <= 0.125

You might also like