I created a resource-constraint multi-project scheduling problem formulation by using ILOG CP Optimizer. In this problem, each resource can work on several tasks at certain period depending on their skill, capability and capacity.
I used cumulFunction ResourceUsage[K in 1..nbResources]=sum(P in 1..nbProjects, I in 1..nbTasks, S in 1..nbSkills) pulse(itvs[P][I],BRatio[P][I][K][S]*Capability[P][I][K][S])
in order to track utilization of resources during project period. However, cumulfunction is independent of the time scale and I would like to minimize total salary cost spent for resource usage and minimize excessive amount of resource usage as problem objectives.
I formulated model as below by using additional variable R[K] however it should show R[K] usage during time T. Like R[K][T] in CPLEX formulations.
dvar interval itvs[P in 1..nbProjects][I in 1..nbTasks] in EST[P][I]..EFT[P][I] size PT[P][I];
dvar int+ R[K in 1..nbResources];
dvar int+ SSURP[K in 1..nbResources];
minimize sum(K in 1..nbResources) FixedCost[K]*R[K]+sum(K in 1..nbResources) OverCapCost[K]*SSURP[K];
subject to{...
forall(K in 1..nbResources)
R[K]>=ResourceUsage[K];
forall(K in 1..nbResources)
R[K]-SSURP[K]<=RMAX[K];}
You could use heightAtStart to get a specific value from a culul: