I have the following data:

A set $ V$ of tasks, the starting time $ s_j$ of each task and the duration $ p_j$ of each task.

A set $ K$ of resource, each resource has an availability function $ R_{k}$ that is piecewise constant.That is, for each $ t = 0, .., T1$ , we precise $ R_{k}(t)$ the number of units available at $ t$ . $ R_k$ is an array of length $ T$ .

Each task $ j$ needs $ r_{j,k}$ resources to be processed (it could be zero). This quantity needs to be available during all the processing time starting from $ s_j$ .
Here is my attempt to verify that the resource utilization at each $ t$ is no larger than the availability function.
Algorithm