Need help with real world problem involving the calculation of relative weights.
Hi guys, I have come in search of a solution to aprogramming task that has had me vexed for a two days now.
Firstly, let me apologise if I have posted this in the wrong place, I am new here and really a bit out of my depth - so be gentle.
The problem i goes like this:
I have a container which (in this case) has three objects in it. The container has a volume of 7.65m³
The objects are split by volume:
Object 1 has 30% of the volume (2.29 m³)
Object 2 has 30% of the volume (2.29 m³)
Object 3 has 40% of the volume (3.06 m³)
The objects are of different density’s and this is represented by a conversion factor (based on the weight / tonne).
Object 1 has a conversion factor of 0.12
Object 2 has a conversion factor of 0.34
Object 3 has a conversion factor of 0.48
Object 1’s weight can be calculated in the following way:
(Total Volume / 100) * percentage of volume = volume in container
Volume in container * conversion factor = weight of object 1
(7.65 / 100) * 30 = 2.29 m³
2.29 m³ * 0.12 = 0.27 tonnes
If you do this for all three you get:
Object 1 = 0.27 tonnes
Object 2 = 0.78 tonnes
Object 3 = 1.46 tonnes
Total tonnage = 2.51 tonnes
The weights generated are 'guestimates' based on the volume and conversion factor.
Later the container that holds the three objects (or more) is weighed and it's ACTUAL weight recorded as a whole.
I need to work out what each object is now likely to weigh based on the new weight.
I apprecite that this will not result in a 100% accurate result but it may be more accurate than a figure based on volumes and conversion factors and that any result will only be as accurate as the conversion factor.
I have been programming for 20 years but this problem has got me stumped! (Headbang)
Any help would be much appreciated.
Re: Need help with real world problem involving the calculation of relative weights.
If I understand correctly then:
Object 1 = 0.27/2.51 = 10.76% by weight
Object 2 = 0.78/2.51 = 31.08% by weight
Object 3 = 1.46/2.51 = 58.17% by weight
So I would measure the weight of the box to be ACTUAL and estimate the weight of the objects to be:
Object 1 = 10.76% of ACTUAL (tonnes)
Object 2 = 31.08% of ACTUAL (tonnes)
Object 3 = 58.17% of ACTUAL (tonnes)