I'm studying an MIP model with a scheduling problem and I'm wondering if the space constraint is correct.
If there is space in the factory at that time, the block can be processed, where
$i$ is the block number
$S_i$, $C_i$ and $P_i$ are the strat time, completion time and processing time of block $i$ respectively
$y_{i,j,f}=\begin{cases}1\quad\text{if}\,i\,\text{process before}\,j\,\text{at factory}\,f\\0\quad\text{otherwise}\end{cases}$
$y_{i,f}=\begin{cases}1\quad\text{if}\,i\,\text{process at factory}\,f\\0\quad\text{otherwise}\end{cases}$
$M$ is a big number
$sp_i$ is the required space of block $i$
$c_{f,t}$ is the available space of factory $f$ at time $t$
\begin{align}S_i -M(1-y_{i,j,f}) &\le S_j\quad\forall i,j,f\\S_i + P_i &= C_i\quad \forall i\end{align}
The space constraint is $$sp_i \cdot y_{i,f} \le c_{f,t}\quad\forall i,j\quad\text{and}\quad t=S_i,\cdots,C_i.$$