Menu

#72 Resource Assignment Normaliser rounding problem

closed-fixed
Jon Iles
None
5
2009-01-29
2009-01-27
No

There's a little problem with the MPP resource assignment normaliser. I have a project where I've updated an assignment (5 hours instead of 7 hours); and when I'm trying to import it, I have a strange behavior. In the splitDays() methods (line 101) the assignment duration is not equals to 300 minutes, but to 299,96 minutes. As this assignment work do not equal to the total work, the remaining difference (0.04 mn) is set on the next day, overwriting what was initially planned.

What I had to do to deal with this replacing is accepting a small difference (0.1 min), by replacing

-------------------------

...
Duration totalWork = assignment.getTotalWork();
Duration assignmentWork = getAssignmentWork(calendar, assignment);

if (totalWork.getDuration() != assignmentWork.getDuration())
{
assignment.setTotalWork(assignmentWork);
...

---------------------------

by

-------------------------

...
Duration totalWork = assignment.getTotalWork();
Duration assignmentWork = getAssignmentWork(calendar, assignment);
double prec = 0.1;

if ((totalWork.getDuration() - assignmentWork.getDuration()) > prec)
{
assignment.setTotalWork(assignmentWork);
...

---------------------------

Discussion

  • Jon Iles

    Jon Iles - 2009-01-29

    This has now been fixed in CVS.

     
  • Jon Iles

    Jon Iles - 2009-01-29
    • assigned_to: nobody --> joniles
    • status: open --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB