Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Now let's get the estimated value and weight for one warehouse.You need to write a function get_max_value which could do the following 4 things: Calculate
Now let's get the estimated value and weight for one warehouse.You need to write a function "get_max_value" which could do the following 4 things: Calculate the Value_Weight Ratio for each product. Sort the calculated Value_Weight Ratios in descending order. Select the products from the top of the descending order to the bottom while looking at the accumulated weight of products to make sure the accumulated weight does not exceed the warehouse weight capacity. Calculate the corresponding estimated value for this warehouse after finishing product selection. Remember, take every product into consideration; otherwise, you may have the risk of missing products. You want to put as many product with highest Value_Weight Ratio as possible before reaching the weight capacity for this warehouse
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started