Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Change progress value

Posted on 2011-09-12
10
Medium Priority
?
521 Views
Last Modified: 2012-05-12
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
Comment
Question by:AivsCoder
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
  • 2
10 Comments
 
LVL 38

Assisted Solution

by:Geert Gruwez
Geert Gruwez earned 100 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 ?
0
 
LVL 25

Accepted Solution

by:
epasquier earned 1900 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 :

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
 
LVL 38

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
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
LVL 25

Assisted Solution

by:epasquier
epasquier earned 1900 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 : http://en.wikipedia.org/wiki/Weighted_mean )
0
 
LVL 38

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
0
 
LVL 25

Assisted Solution

by:epasquier
epasquier earned 1900 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
0
 

Author Closing Comment

by:AivsCoder
ID: 36547707
Thanks once again.

Ben
0
 

Author Comment

by:AivsCoder
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.

Ben
0
 
LVL 38

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
0
 
LVL 25

Expert Comment

by:epasquier
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)
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…
Suggested Courses

722 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