eedy algorithm WeShip2You Inc., a transportation company that ships oversized goods between Kuala Lumpur and Singapore has approached you to develop an optimised scheduling solution for their shipping needs. The daily volume of oversized goods that needs to be shipped is high but there are only 5 trucks available for shipment. In addition, each truck has a fixed limit W- the maximum amount of weight they are allowed to carry. For simplicity, you may assume that the maximum load each truck can carry is the same. Oversized goods arrive at the Kuala Lumpur warehouse one by one, and each oversized parcel i has a weight wt. The space in the loading station is small. So, at most one truck can be at the loading station at any one time. Company policy requires that oversized goods are shipped in the order that they arrive to the warehouse as the oversized goods contain perishable items. However, occasionally, the company receives oversized goods with high or low priority for shipment. Oversized goods with high priority will be prioritized for shipment while oversized goods with low priority may be queued for shipment at the end of the day. Build a greedy algorithm solution that will help the logistics personnel optimise the number of oversized goods that may be shipped in any given day.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

write a c/c++ program

In your program:
a. Implement the problem above using C/C++ programming language. Do apply the techniques
for good programming practices. Ensure that appropriate validations are done on your input
data.


b. Sample Input: The user should be allowed to input the following information:
i. Maximum weight a truck is allowed to carry
ii. Number of oversized items to ship for the day
iii. Weight of each oversized item
iv. Priority status for oversized item (if applicable)


Sample Output:
i. Oversized items that were loaded into each truck
ii. Amount of unused space (weight) for each truck
iii. Number of trucks that were not utilized/loaded (if any)
iv. List of oversized items that could not be shipped (including priority status, if applicable)

Greedy algorithm - Scheduling
WeShip2You Inc., a transportation company that ships oversized goods between Kuala Lumpur
and Singapore has approached you to develop an optimised scheduling solution for their shipping
needs. The daily volume of oversized goods that needs to be shipped is high but there are only 5
trucks available for shipment. In addition, each truck has a fixed limit W - the maximum amount
of weight they are allowed to carry. For simplicity, you may assume that the maximum load each
truck can carry is the same. Oversized goods arrive at the Kuala Lumpur warehouse one by one,
and each oversized parcel i has a weight wt. The space in the loading station is small. So, at most
one truck can be at the loading station at any one time. Company policy requires that oversized
goods are shipped in the order that they arrive to the warehouse as the oversized goods contain
perishable items. However, occasionally, the company receives oversized goods with high or low
priority for shipment. Oversized goods with high priority will be prioritized for shipment while
oversized goods with low priority may be queued for shipment at the end of the day. Build a greedy
algorithm solution that will help the logistics personnel optimise the number of oversized goods
that may be shipped in any given day.
Transcribed Image Text:Greedy algorithm - Scheduling WeShip2You Inc., a transportation company that ships oversized goods between Kuala Lumpur and Singapore has approached you to develop an optimised scheduling solution for their shipping needs. The daily volume of oversized goods that needs to be shipped is high but there are only 5 trucks available for shipment. In addition, each truck has a fixed limit W - the maximum amount of weight they are allowed to carry. For simplicity, you may assume that the maximum load each truck can carry is the same. Oversized goods arrive at the Kuala Lumpur warehouse one by one, and each oversized parcel i has a weight wt. The space in the loading station is small. So, at most one truck can be at the loading station at any one time. Company policy requires that oversized goods are shipped in the order that they arrive to the warehouse as the oversized goods contain perishable items. However, occasionally, the company receives oversized goods with high or low priority for shipment. Oversized goods with high priority will be prioritized for shipment while oversized goods with low priority may be queued for shipment at the end of the day. Build a greedy algorithm solution that will help the logistics personnel optimise the number of oversized goods that may be shipped in any given day.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Algebraic Expressions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education