GNOME Bugzilla – Bug 136053
Cost computation is wrong
Last modified: 2004-12-22 21:47:04 UTC
Insert a task AA of 3 days of effort and assign it to a resource that cost 1. The cost of the task AA will be 24, which is correct. Now edit the taks, check fixed duration and double the duration so set it to 6 days, the effort shall remain 3 days. I expcted the cost to remain constant, thus 24, instead it halved to 12! Either I didn't understand the concept or it is a bug I am using Planner 0.11 on SuSE 8.2
Here goes a patch that solves this bug.
Created attachment 26414 [details] [review] Use work and multiply it for resource cost
Is this really correct? Isn't it really the duration we want? You pay per time, not per amount of effort.
I think you should get paid for the effort, otherwise, the whole concept of effort here must be clarified. I could do three tasks at the same time, dividing my effort (8h/day) for those three tasks, but of course the time to accomplish them is multiplied by three. if you get paid for the time and not for the effort you can multiply by three times the cost, which is of course wrong. The cost of doing the three tasks one after the other or doing them all together must remain the same, thus you get paid for the effort.
What I mean is that the cost should be the time spent * assignment rate * cost, so if you are allocated at 50%, and spend 1 hour and the cost rate is 10/h, then the cost is 1h * 0.5 * 10/h = 5. We can't simply discard the assignment percentage, can we?
In my company, when we talk about effort, we mean the man-time it takes to complete the task. Then if I work only on that task full time, it means that the calendar time spent on the task equates (numerically) the effort. So time = effort/assignment_rate. When instead I get to work on two tasks at the same time, then my assignment_rate could become 0.5 for each of the two tasks and thus the elapsed time it takes to complete the two tasks doubles. But the cost of the tasks remains constant because cost = effort * hourly_cost.
That doesn't work if other people work on the task as well, then you don't do all the effort yourself. The duration on the other hand is calculated from all the assigned resources and the total effort. That's why I don't see the patch as correct, even if there is a bug to start with.
I see it that when someone is 50% allocate to a task they are only working 50% of the time i.e the rest of the time they are doing something else (coffee, lunch, other tasks etc). From a billing point of view 50% of 100 EUR cost per hour is 50 EUR cost per hour no matter if the task is fixed effort or fixed duration. Same with materials. If a material (e.g. a machine) is 50% allocated and e.g. it costs EUR 250 per hour to run (in running costs) then the task cost is 125 EUR per hour for that machine. If its unlikely that a machine would be re-usable for any other job then it should be set as 100% utilised.
If you got a mainframe that you use 25% of its resources, there's still 75% for other projects to use. I'm thinking about simulation for example but this could also be the same for some test benchs in industrial process. From the top management, the cost attached to that use is still 25% of the total cost. If other projects don't use it, that may go in other parts in the financial. But that can't be generalised.... Maybe we should setup a check box depending on the wanted cost computation.
It would be nice to fix this for 0.12.
Hmmm, I think as I said in an email to planner-dev that with: total += mrp_assignment_get_units (l->data) * priv->duration * cost /(3600.0 * 100); but I will rethink more about it to be sure and create several samples to think about them. Sorry for the first quick and wrong patch ;-)
Created attachment 27037 [details] Test cases for cost computation Attachment with the testcases sent by Xavier Ordoquy and implemented by Lincoln Phipps: http://lists.imendio.com/pipermail/planner-dev/2004-April/000421.html
The patch is commited, is this bug fixed then, or do we need more fixing?
Closing, please file new reports if there are specific bugs.