This is an answer to a modified version of the original problem (based on comments by the author). In the version I will address, a physician's efficient ($p$) starts at 1 and degrades by 0.1 for each shift change (captured by $\ell$) after the first, with two qualifications. The efficiency cannot go below 0, and three consecutive shifts without a change "resets" the efficiency to 1 and cancels the effect of any earlier shift changes (so that it takes two shift changes after the reset to degrade efficiency again). I assume that, from the objective perspective, higher efficiency is better.
I'm going to skip the physician subscript $i$ in what follows, and I'm going to introduce the following variables:
- $\pi_t\in \lbrace 0,\dots,11\rbrace$ is the number of shift changes used to compute the efficiency penalty at time $t;$
- $\rho_t$ is a binary variable taking value 1 if a reset occurs at time $t;$
- $\mu_t$ is a binary variable taking value 1 if $\pi_t = 11,$ i.e., if the physician's efficiency at time $t$ has degraded to 0; and
- $\sigma_t$ is a binary variable representing the product $\mu_{t-1} \times \ell_t$ (indicating that a shift change just occurred to a physician already at efficiency 0).
We add the following constraints:
- $p_t \le 1$ (a physician's maximum efficiency is 1);
- $p_t \le 1.1 - 0.1 \pi_t$ (the physician loses 0.1 efficiency per shift change that counts, with the first one harmless);
- $\rho_t \le \ell_{t-k}$ for $\forall k \in \lbrace 0, 1, 2 \rbrace$ (a reset can occur only after three periods without a shift change);
- $11 \mu_t \le \pi_t \le 10 + \mu_t,$ which enforces $\mu_t = 1 \iff \pi_t = 11$;
- $\sigma_t \le \ell_t;\ \sigma_t \le \mu_{t-1};\ \sigma_t \ge \ell_t + \mu_{t-1} -1$ (which collectively enforce $\sigma_t = \mu_{t-1} \times \ell_t$);
- $\pi_t \le 11(1 - \rho_t)$ (the shift change count is at most 11 and drops to 0 when a reset occurs);
- $\pi_t \ge \pi_{t-1} + \ell_t - \sigma_t - 11 \rho_t$ (explained below).
The way to parse the last constraint is as follows. Assume, for the moment, no reset ($\rho_t = 0$). If $\pi_{t-1} < 11$ (implying $\mu_{t-1}=0$ and thus $\sigma_t = 0$), then the cumulative shift count $\pi_t$ will be $\pi_{t-1}$ plus 1 if the shift changed again ($\ell_t = 1$). If $\pi_{t-1} = 11$ ($\mu_{t-1}=1$), then $\sigma_t = \ell_t$ and $\pi_t = \pi_{t-1} = 11$ (the physician stays at full burnout). Note that under no circumstance is $\pi_{t-1} + \ell_t - \sigma_t > 11.$ Finally, if a reset occurs ($\rho_t = 1$), the right side of the last constraint is $\le 0,$ allowing $\pi_t$ to be 0 (which will be optimal) and thus $p_t = 1$ (the reset).