# How to linearize the waiting time

My question is this:

I want to express the time it takes for multiple servers to complete tasks for multiple users. I divide the time into $$t$$ time slots, and each task may occupy multiple time slots. Assuming that a user's task is uploaded in $$t$$ time slot, how can I express the time slot service after $$t$$ time slot to allocate corresponding resources for it? How can I express the total time it takes for all users to complete their tasks?

• Welcome to OR.SE. To me, it sounds like resource-constrained project scheduling. This link may be useful. BTW, if you could provide more information on what types of problems you have faced it would help a lot. May 28 at 8:48

I am not sure how you are allocating decision variables but standard MIP will have a binary set of variables $$x_{j,t,s} = 1$$ where $$j,t,s$$ represent Task $$j$$ in process/start/occupying time slot $$t$$ by a server $$s$$,
$$x_{jts}=0$$ if no tasks is assigned/in-process at time slot on the server\

You may add a user $$u$$ depending upon the model.
Also each of the tasks, $$j$$ will have predefined service/processing time $$T_j$$ which can be defined in terms of time slots
$$x_{j,t,s} \le \sum_{k=t+1}^{T_j-1}x_{j,k,s} + Tx_{j,t-1,s}$$: where $$T$$ is arbitrary big number like total timespan.
$$\sum_t T_tx_{j,t,s} \le T_j$$: where $$T_t$$ is span of time slot $$t$$.
$$\sum_j\sum_s\sum_t T_tx_{j,t,s}$$
$$\sum_u \sum_j \sum_s \sum_t T_tx_{j,t,s,u}$$