Change progress value

Posted on 2011-09-12
Last Modified: 2012-05-12

I have a progress value on my Goals and as tasks are completed, my Goal Completion value increases.

Goal Completion value should be affected by how long the duration of the task is and not by how many tasks there are within a goal.

eg. task that is 40 minutes would increase the progress more than a task that is only 10 minutes
and if there is lets say 10 tasks required to fulfil the goal then each task should not be
10% each as that wouldn't take into the duration of each task.

The duration per task task is in the format of 00:00:00  (hours, minutes, seconds)

I believe some kind of algorithm might be suitable, I did come up with a design that looks like this:

(see attached image)


Priority (supposed to mean order from highest to lowest)
so tasks that has the highest duration which will receive the highest number from the middle column.
The column on the left (supposed to mean number of tasks to fulfil goal).

Maybe I have confused you as it not well thought out.
At this stage, I don't have a magic formula.
So far my only solution is to keep writing down every possibility (middle column)
for x amount of tasks with x amount different sort order.

Thanks, any comments.

Question by:AivsCoder
  • 4
  • 4
  • 2
LVL 37

Assisted Solution

by:Geert Gruwez
Geert Gruwez earned 25 total points
ID: 36527599
priority and duration are 2 separate ideas
that's why your are getting wrong results

every task should have a priority and a duration
typically a duration exists of 3 types of time for the work:
  > setup time
  > process time
  > cleanup time

sample of creating a table with 4 legs:
  > setup time for 4 legs : (get wood, get paint, get paintbrush ...)
  > process time for single leg: mill leg into shape, paint, add accessories
  > cleanup time: store paint, clean brush

  > setup time for table top: get extra varnish, get extra brush
  > process time: cut table top in correct  size
  > cleanup: clean brush, store paint

afterwards you still have the assembly time

you can add priority to this: all setup, tabletop first, 2 legs first, partial assembly, 2 legs next, partial assembly, cleanup

see the differences between duration and priority ?
LVL 25

Accepted Solution

epasquier earned 475 total points
ID: 36528596
What is your input data ? As far as I understand, you need to set the 3rd column, that is a weight (mathematical) list for each task duration
from that, you can of course determine the Count (col1) and Col 2 is the same values expressed as %age of total time.

Col2 values from Col3 =>
first, calc total Weight : S := Sum ( Col3(i) )
Then Col2 (i ) = Col3 (i) / S *100

let's say you have Col3 values as an array of integer, and you want Col2 values as an array of float :

 TIntegerArray=Array of Integer; // integer Weigth of each task
 TDoubleArray=Array of Double;   // float %age of each task / total goal duration
procedure CalcTasksToGoalPercentage(TaskWeights:TIntegerArray;Var TaskGoalPercent:TDoubleArray);
 for i:=0 to High(TaskWeights) do S:=S+TaskWeights[i];
 for i:=0 to High(TaskWeights) do TaskGoalPercent[i]:=TaskWeights[i]/S*100;

Open in new window

Then you can calc the total goal duration, given each task completeness (%age, so also TDoubleArray)
function GetTotalGoalCompletion(TaskGoalPercent,TaskCompleteness:TDoubleArray):Double;
 for i:=0 to High(TaskWeights) do Result:=Result+TaskGoalPercent[i]*TaskCompleteness[i]/100; // adjust 2 %age multiplication by dividing/100

Open in new window

LVL 37

Expert Comment

by:Geert Gruwez
ID: 36535271
i still say this is a design flaw
never use priority to indicate duration
priority has nothing to do with duration and vice versa
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

LVL 25

Assisted Solution

epasquier earned 475 total points
ID: 36535730
the term 'priority' is badly chosen, granted, but I think I understand the concept that is hidden behind what he says. 'Relative Importance' (workload-wise) would be better.
Look at the 3rd column compared to 2nd, for ex.
Line 2 : 1, 1 => Sum = 2 => 50% 50%  : Both task have same importance, so when you complete one, you acheive 50 % of total
all lines having a number of tasks of equal importance follow that same rule.
Line 10 : 1, 2, 1, 2 => Sum=6 => 1/6 , 2/6 , 1/6, 2/6
Line 6 : 1,2, 3, 4 => Sum=10 => 10, 20 , 30 , 40
=> That is exactly what the algo I proposed is doing.

Other lines are not giving same values as my algo, but close
Ex : Line 3 : 1, 2 => 33 , 66 instead of 40, 60
Line 5 : 1, 2, 2, 3 => Sum=8 => 12.5 , 25 , 25 , 37.5

AivsCoder said
At this stage, I don't have a magic formula.

He is not very sure of what he wants, which is why he is a bit confused and confusing, but is data suggests he needs some weighted mean distribution (see mathematical definition : )
LVL 37

Expert Comment

by:Geert Gruwez
ID: 36543349
i'll rephrase:

how long does it take you to paint 2 walls ?
please give me the result in percentage
LVL 25

Assisted Solution

epasquier earned 475 total points
ID: 36543996
if you know the length of the walls, and assume they have same height (or want to bother with it to calc surface), then you can evaluate the percentage of time it will take

Author Closing Comment

ID: 36547707
Thanks once again.


Author Comment

ID: 36547710
Hey there,

Sorry yeah my design was terrible.
Spoke to my gf last night about it and was provided an excel solution which I used to recreate the design in Delphi. After looking at the answers, the answer epasquier provided was spot on.

Yes your right, the term priority was badly chosen. In fact, the design was terrible and I realised it later through the simplicity of it done in excel. :-)

One thing I had realised later that the stored TotalGoalCompletionValue had to be in seconds and not in percentage because if I later added a new task relating to that subgoal, it would have affected what each TasksToGoalPercentage value. So instead, only stored the seconds and recreated TotalGoalCompletionValue when needed.

Thanks heaps guys,
Sorry for the confusion.

LVL 37

Expert Comment

by:Geert Gruwez
ID: 36548164
epasquier ... that's just it ...
i didn't mention the size of the surfaces

there was something missing in the equation ... it looks like Aivscoder found too something was missing
LVL 25

Expert Comment

ID: 36548211
Look better at the data, Geert. It would seem you do not read very carefully my explanations either.

YES, GRANTED, Aivs definitions/questions where faulty. But with his data column 3 and 2, I found a relation between those that could be calculated (or close). So I decided that it was what he wanted, whatever the way he wanted to call it : get the %age of each task completion (toward total goal completion) with only a rough evaluation of each task importance compared to the other.
This importance is you walls Length or Area - You didn't have to mention it in the question, it was in the data.
You don't need to know anything else beyond that to get the relative %ages of each tasks.
Of course you will need another value to get the DURATIONs (either the first task real completion time once done, or before that the total time estimated that can be amended with the progress of the project)

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question