• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Overlapping time calculation

I am not sure what is going on with this discussion or whether further input is required? For what it is worth the attached recognises a period of triple tasking (task 16 was changed to give rise to this) and calculates the start and end of the critical period.

Thanks @Peter Bartholomew further inputs are required as we have yet not concluded the solution.
The file is working as expected on single tech for single date :awesome:

I have changed data for Task 24 highlighted in pink to check 3x overlapping and also added formula to calculate the Overlapping time 2x & 3x in column N & O.

I tried copy pasting the another dates data the formula was not working - throwing #value error and i
s their possibility that will work on multiple techs and dates as asked before.

Thanks alot for your help on this.

Regards,

Anshul
 

Attachments

  • Multiplicity - time calculation Larger Data.xlsx
    46.2 KB · Views: 5
Hi @anshul.malhotra

The limitation to one tech, one day was deliberate. I think I can modify the formula so that it will read over records associated with other techs and deal with multiple days, appended as in the large data sample.

Ultimately though, I believe better solutions can be achieved by importing the data and filtering and partitioning it to facilitate more efficient calculation. That is as much part of any potential solution as is the formula itself.

For example, if we assume a single calculation can be complete within 2ms, by the time one is considering 40 tech over 30 days this will rise to 24s for the 1200 independent calculations. If, instead solving independent calculations, you append datasets and merge the contents you might expect a further factor of 1200 to result from the fact that each calculation on each row [the COUNTIFS and SMALL functions] is now running through 60000 rows rather than 50.

That gives you a target calculation time of 8hrs rather than 24s.

This could be drastically reduced by building a sorted table of finish times, in which case the O(n²) calculations could be replaced by approximate LOOKUP or MATCH, O(n.ln₂n). This would, however, require separate manual operations of duplicate and sort to be kept synchronised with the source data. Something you would prefer to avoid?
 
Hi @Peter Bartholomew, hope you are doing fine.

60000 seems very large number of records, though as or now the max what we can think of is 15000 rows not more than that and If it will take time we are ready to do the task on weekly basis or might be two times a week which will help us with reducing the waiting time of calculation.

Yes you are right that I will prefer to avoid the manual intervention because it might invite trouble some time if steps are not followed properly.

Let me know if you have any queries as we approaching the conclusion of solution.

Thanks for your tremendous help and support.

Regards,

Anshul
 
Thank you very much Peter, the updated file fulfills the requirement. I just tested with random data and it worked fine. I will test and it and come back if any help needed.

Thanks again
Anshul
 
Glad we are getting there! The new attached file looks up the next task start for the particular tech rather than assuming the next record. This means that (finally) we have a solution that will work on your original data set with interleaved data from the various techs. The chart uses distinct series for 'Tech 1' and 'Tech 2' and is more informative but not generic. Let me know how the testing goes.
Peter
 

Attachments

  • Multiplicity - time calculation Larger Data v4.xlsx
    92.9 KB · Views: 6
Hi @Peter Bartholomew ,

Hope you are doing fine,

we have tested the file/calculation couple of things needs to be amended and I require your help again. Below is the screenshot for your reference,

Ref.png

Next start highlighted in pink should be blank as it is picking up the value for next day which is highlighted in amber for your reference. I think there should be a date based condition, I tried to do so but was not able to :(.

Also regarding your question Should 3x also be included as 2x? - Yes it should be.

Regards,

Anshul
 

Attachments

  • Multiplicity - time calculation Larger Data v4.xlsx
    92.5 KB · Views: 2
@Anshul
The challenge is that the calculation is not actually incorrect in that, at the end of a workday, the next task is the following morning! One way of addressing the problem is to insert the criterion testing the date
= (Data[Dated]=Data[@Dated])
into the named formula 'FutureStart' so that it now reads
= IF(
(Data[Dated]=Data[@Dated]) *
(Data[Start Time]<Data[@[Start Time]]) *
(Data[Tech Name]=Data[@[Tech Name]]),
Data[Start Time] )

This returns a minimum value of 0:00 for the start following the final task of the day. Numerically, that may not be exactly what you require but at least it forms the basis for a test.
 

Attachments

  • Multiplicity - time calculation Larger Data v5.xlsx
    97.1 KB · Views: 3
@Peter Bartholomew ,

This returns a minimum value of 0:00 for the start following the final task of the day - This helps and takes care of the requirement.

Another thing I came across is enclosed for your reference - Whenever multiplicity is 3 the 2x overlapping time not getting calculated for the previous task.

The reason I could identify as 1x is not getting populated with formula for the above cases.

Thanks,

Anshul
 

Attachments

  • Multiplicity - time calculation Larger Data v5.xlsx
    101.6 KB · Views: 2
Earlier on I didn't know how you wanted to report for multi-tasking so I didn't bother too much about the formulas that evaluated the time between events (that may or may not happen during the interval from acceptance of one task to the next). This should be a step forward.
 

Attachments

  • Multiplicity - time calculation Larger Data v5 (1).xlsx
    106.4 KB · Views: 6
Earlier on I didn't know how you wanted to report for multi-tasking so I didn't bother too much about the formulas that evaluated the time between events (that may or may not happen during the interval from acceptance of one task to the next). This should be a step forward.

Thanks Peter for looking into it again, This calculation has evolved a lot with your inputs and help.

Can you please update the formula to get the info in Overlapping Time Data sheet tab in cell K 20 and the updated Duration 2x. Then I there will not be further any change required but to be honest it depends upon the data we will be testing.


Thanks again for your great help.
 
I have been away so have lost track of this somewhat. I have implemented the formulae from the second sheet and adjusted the formula to be valid for the last task of the day. Bear in mind that the durations quoted are measured from one task start to the next start so it is quite possible for a long task to end several rows below its start row.
 

Attachments

  • Multiplicity - time calculation Larger Data v6.xlsx
    99.6 KB · Views: 17
Back
Top