Construction of a scoring function to prioritize workers for a job depending on two properties

38 Views Asked by At

I have been trying to define a score function in order to prioritize a worker or another for a job depending on two properties of that worker.

If the worker has a negative result in the function, they won't be called. Then, if it is positive, they will be called in descending order.

Our variables and constants are:

  • $n$ variable is the number of trainings the worker has attended
  • $k$ constant is the minimum number of trainings a worker has to attend in order to be start being ellegible for a job.
  • $N$ constant is the total number of trainings.
  • $b$ variable is the percentage of jobs the workers have taken before in our company. We want our function to give a higher score to workers with less jobs taken before, in order to always tend to equitably distribute jobs between them.

Mathematically, I have written my problem as the following:

Given $k, N \in \Bbb N$ with $k\leq N$, we want to define a score function $$ \begin{align*} s: [0, N] \times [0,1] & \longrightarrow [-1,1]\\ (n,b) & \longmapsto s(n,b) \end{align*} $$ We want $s$ to have the following properties:

  • $b$ always has to penalize the function. Therefore, given $n \in [0, N]$ and $b_1, b_2 \in [0,1]$ $\;\;\;b_1 > b_2 \implies s(n, b_1) < s(n, b_2) $
  • Given any $b \in [0,1]$:
    • $n=0 \implies (\frac{n}{N} = 0 \; \land \; s(n, b) = -1)$
    • $n \in ]0, k[ \implies (\frac{n}{N} \in ]0, \frac{k}{N}[ \; \land \; s(n, b) \in ]-1, 0[)$
    • $n \in [k, N] \implies (\frac{n}{N} \in [\frac{k}{N}, 1] \; \land \; s(n, b) \in [0, 1])$

Thanks in advance!

1

There are 1 best solutions below

5
On

You can use a solver like Gurobi and use MIP.
Your function can be the objective $s(n,b) = s-b-z_1$
subject to below constraints
$b+z_1 \le 1 $
$ 1 \le z_1 + n$
$ N(z_2 - 1) \le k-n \le Nz_2$
$ -z_2 \le s \le 1-z_2$
$ 0 \le b \le 1$
$-Nn \le s \le Nn$
$0 \le n \le N $
where $z_1,z_2 $ are binary variables
$s,b,n $ are also variables with $s \in R, b,n \in Z$