Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 530
  • Last Modified:

Change progress value

Hello,

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)
 Image

Explanation:

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.

Ben
0
AivsCoder
Asked:
AivsCoder
  • 4
  • 4
  • 2
4 Solutions
 
Geert GruwezOracle dbaCommented:
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 ?
0
 
epasquierCommented:
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 :

type
 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);
Var
 i,S:Integer;
begin
 S:=0;
 for i:=0 to High(TaskWeights) do S:=S+TaskWeights[i];
 SetLength(TaskGoalPercent,Length(TaskWeights));
 for i:=0 to High(TaskWeights) do TaskGoalPercent[i]:=TaskWeights[i]/S*100;
end;

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;
Var
 i:Integer;
begin
 Result:=0;
 for i:=0 to High(TaskWeights) do Result:=Result+TaskGoalPercent[i]*TaskCompleteness[i]/100; // adjust 2 %age multiplication by dividing/100
end;

Open in new window

0
 
Geert GruwezOracle dbaCommented:
i still say this is a design flaw
never use priority to indicate duration
priority has nothing to do with duration and vice versa
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
epasquierCommented:
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 : http://en.wikipedia.org/wiki/Weighted_mean )
0
 
Geert GruwezOracle dbaCommented:
i'll rephrase:

how long does it take you to paint 2 walls ?
please give me the result in percentage
0
 
epasquierCommented:
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
0
 
AivsCoderAuthor Commented:
Thanks once again.

Ben
0
 
AivsCoderAuthor Commented:
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.

Ben
0
 
Geert GruwezOracle dbaCommented:
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
0
 
epasquierCommented:
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)
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

  • 4
  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now