0
$\begingroup$

I am currently setting up a nurse rostering model. In it, I have several regulatory constraints, such as limits on working days and so on. Apparently these are considered hard constraints. However, I am struggling to determine if my other constraints are considered hard or soft.

This is the model so far: $$\text{minimize} \sum_t \sum_s slack_{ts} $$ $$\sum_{i}^{}motivation_{its}+slack_{ts}=demand_{ts}\forall t,s\quad \quad\quad \quad\quad \quad (1)$$ $$\sum_s x_{its}\le 1\quad \forall i, t\quad \quad\quad \quad\quad \quad (2)$$ $$ \sum_{j=t}^{t+4}\sum_{s}^{}x_{ijs}\le 4\quad\forall i,t\in \{1,\ldots,D - 4\}\quad \quad\quad \quad\quad \quad (3)$$ $$mood_{it} + M\cdot (1-x_{its}) \geq motivation_{its} \geq mood_{it} - M\cdot (1-x_{its})\quad \forall i,t,s\quad \quad\quad \quad\quad \quad (4)$$ $$motivation_{its} \leq x_{its}\quad \forall i,t,s\quad \quad\quad \quad\quad \quad (5)$$ $$mood_{it}=1-\alpha_{it}\cdot \sum_s x_{its}\quad \forall i,t\\ \alpha_{it}\sim U(0,1)\quad \forall i,t\quad \quad\quad \quad\quad \quad (6)$$ $$x_{its}\in \{0,1\}\quad \quad\quad \quad\quad \quad (7)$$ $$mood_{it}, motivation_{its}\in[0,1]\quad \quad\quad \quad\quad \quad (8)$$

Currently, i would refer to constraint (2) and (3) as hard constraints, but what are the other, i.e. (4), (5) and (6)?

$\endgroup$

1 Answer 1

2
$\begingroup$

A soft constraint can be violated, but violating the constraint incurs a penalty in the objective function, see this question. If you look at your objective function, you see that it only includes the slack variable. The slack variable appears only in constraint (1). Therefore, (1) can be considered a soft constraint, while the other constraints can be considered hard.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.