We are doing a scheduler for heterogeneous computing.

The tasks can be identified by their deadline and their data-rate and can be regarded as a two dimensional graph. See image:

![enter image description here](https://i.stack.imgur.com/EorKG.png)

The rectangle identifies tasks to be scheduled on the GPU, and outside tasks to be scheduled on the CPU.

The problem is we want to efficiently identify the parameters for creating the best rectangle. I.e. the rectangle containing most tasks. A function determining whether or not a dot can be added to the current rectangle can be assumed present.

There can be up to 20.000 (dots) tasks, and the axis can be arbitrary long

Are there any known algorithms / data structures solving this problem?