in reply to Re: Time Allotments
in thread Time Allotments

Marshall,

This is the approach I took when thinking through the problem as well (only I cheated and used excel to lay the events out nicely), by allotting the a,b,c triplet and filling in the 24 sec repeaters and so on. By strictly enforcing a repeating pattern, this does indeed guarantee that each event occurs within the constraints and gives some opportunities for the new event type to occur. The only problem I see with this approach is that it may not be 'optimal' in that the 100s time becomes 96s, the 150s to 144s, though for simplicity's sake this may be the best approach.

And after writing that, I've now done some math and with the tradeoffs of optimization, I'm calculating that in each 24 second 'frame' there would be ~2.21 slots available for a new event type. Without the tradeoffs with a theoretical maximum, I'm calculating ~2.24. I think you've just proven to me that even if it isn't technically optimum, 2.24 and 2.21 are pretty close and this way there are guarantees.

Replies are listed 'Best First'.
Re^3: Time Allotments
by Marshall (Canon) on Feb 20, 2012 at 08:43 UTC
    Reaching the absolute maximum efficiency requires more "brain power" and does introduce the possibility of "mistakes - or missed intervals". If you would have said, "hey this isn't close enough", then I would have challenged and asked questions about this "every task takes one second" stuff to try to get more leeway in the algorithm. More efficient algorithms are possible, but the complexity is at least an order of magnitude more and they wouldn't have this: "obviously will work and are guaranteed to work" attribute. If you are happy, then I am happy!
      <- happy.