A
A
Andrew2015-12-29 17:02:57
C++ / C#
Andrew, 2015-12-29 17:02:57

What algorithm is suitable for the distribution of tasks over time?

I can’t think of an algorithm for the distribution of tasks over time.
Given: N tasks that have an interval (for example, from 15:00 to 19:00) in which it (task) must be executed. You need to distribute them evenly over time.
For example: 1k tasks must be completed from 12:00 to 12:15 and also 100k from 11:00 to 19:00 and another 500 tasks from 18:45 to 18:55
There are about 200 million tasks.
The problem is that it is necessary to distribute tasks evenly (as far as possible), because if you just spread 100k from 11:00 to 19:00, then from 18:45 to 18:55 there will be a surge due to those 500 tasks.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
X
xmoonlight, 2015-12-29
@xmoonlight

No.
Just a change of condition.
You can either reduce the intervals (absorbing intersecting intervals) or increase (by the duration of intersecting -> add).

A
alexxandr, 2015-12-29
@alexxandr

scatter 100k from 11:00 to 18:45

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question