Truck Loading Estimation

Joined
Sep 2, 2012
Messages
14
Programming Experience
Beginner
Hi,

I have a Requirement

I have one trucks with dimensions as width : 3 mts, length : 12.5 mts height : 4.5 mts and the total weight it can carry upto 30 tonnes
like this there are some other trucks with other dimensions

In the above truck i have to load the items with different dimensions like
1) Item1 : width : 2 mts, length : 2 mts height : 1 mts
2) Item2 : width : 4 mts, length : 4 mts height : 2 mts

Like this i have hundreds of items

So Now i have to do a program that how many trucks i require if i have hundreds of items and while loading the truck i have to put the restriction that it should not exceed the total weight of truck (in above case it is 30 tonnes)


Please help me in above task how to do this
 
if your restriction is only the weight then add weight to the item description then just do the math when selecting items and adding it on the list of products to be loaded on the truck.. if you're problem is whether does items will fit on the truck that's another problem..hehe
 
Maybe you should start by figuring out the algorithm and then post YOUR code, and we can help you correct it. This sounds suspiciously like a homework assignment...
 
Back
Top