1
votes

I have stumbled into a problem that looks similar to the classic interval scheduling problem However, in my case I do allow overlap between intervals- just want to minimize it as much as possible.

Is there a canonic algorithm that solves this? I did not find a 'relaxed' alternative online.

1
You've specified two objectives, one explicitly (minimize overlap), one implicitly from the interval scheduling problem (maximize intervals chosen), but haven't stated how to prioritize them.David Eisenstat
@DavidEisenstat, I have a bunch of jobs that need to run at a certain time window. No matter what. Assume I know the execution times in advance. But I want to space them out in a way that minimizes execution overlap (to reduce concurrent resource consumption).Vitaliy
Does the execution time vary from job to job?David Eisenstat
@DavidEisenstat yes.Vitaliy
Does it increase when there is significant overlap between intervals?David Eisenstat

1 Answers

1
votes

I don't think this problem maps cleanly to any of the classical scheduling literature. I'd try to solve it as an integer program using (e.g.) OR-Tools.

What makes this problem hard is that the order of the jobs is unknown. Otherwise, we could probably write a dynamic program. Handling continuous time efficiently would be tricky but doable.

Similarly, the natural first attempt for a mixed integer programming formulation would be to have a variable for the starting time of each job, but the overlap function is horribly non-convex, and I don't see a good way to encode using integer variables.

The formulation that I would try first would be to quantize time, then create a 0-1 variable x[j,s] for each valid (job, start time) pair. Then we write constraints to force each job to be scheduled exactly once:

for all j, sum over s of x[j,s] = 1.

As for the objective, we have a couple of different choices. I'll show one, but there's a lot of flexibility as long as one unit of time with i + j jobs running is worse than one unit with i jobs and a different unit with j jobs.

For each time t, we make a non-negative integer variable y[t] that will represent the number of excess jobs running at t. We write constraints:

for all t, -y[t] + sum over (j,s) overlapping t of x[j,s] ≤ 1.

Technically this constraint only forces y[t] to be greater than or equal to the number of excess jobs. But the optimal solution will take it to be equal, because of the objective:

minimize sum over t of y[t].