Problem to find the objective function in this problem

60 Views Asked by At

I have the next real problem. I have a set of workers $W = \{w_1,\dots,w_{12}\}$ and I have to find the optimal distribution minimizing the jumps of the workers from one jobsite to another jobsite in 8 jobsites $S = \{S_1,\dots,S_8\}$, having the next matrix (cost matrix) that represent the telework for each worker:

\begin{bmatrix}MON & TUE & WEN & THU & FRI \\1&0&0&1&1& w_1\\1&1&0&0&1& w_2\\0&0&0&0&0& w_3\\0&1&1&1&0& w_4\\0&1&1&1&0& w_5\\1&1&1&0&0& w_6\\1&1&1&0&1& w_7\\1&1&1&0&1& w_8\\0&0&1&1&1& w_9\\1&0&1&1&1& w_{10}\\1&0&1&0&1& w_{11}\\1&0&0&1&1& w_{12}\\\end{bmatrix}

Where 1 represets a day in the office and 0 a day working at home. $w_3$ has all days with weigth 0 cause he cannot move from his jobsite, so I thought that it not make any cost, cause he cant jump, but he has to telework MON and FRI.

Pls help me with that, i would be very greatful. Thaks!!

1

There are 1 best solutions below

3
On

For each worker $i$ and each pair of consecutive office workdays $(j,k)$ for that worker, introduce a binary decision variable $x_{i,j,k}$ to indicate whether a change occurs. The objective is to minimize $\sum_{i,j,k} x_{i,j,k}$, and you can enforce the desired behavior with linear constraints $$w_{i,j,s}-w_{i,k,t}\le x_{i,j,k},$$ where $s$ and $t$ are different job sites. The idea is that if worker $i$ on day $j$ works at site $s$ and then on day $k$ works at site $t\not= s$, the left hand side is $1-0=1$, which forces $x_{i,j,k}=1$.