# Tag Info

There are many ways to do this. Here is a popular one: define a binary variable $x_i$ per interval $[b_i,b_{i+1}]$ and use the following constraints: \begin{align*} 1&=x_0+x_1+\cdots+x_n \tag{1}\\ 0x_0 + (b_0+\epsilon)x_1 + \cdots+ (b_{n-1}+\epsilon)x_n \le Y_t &\le b_0x_0 + b_1x_1 + \cdots+ b_nx_n \tag{2}\\ r_t &\ge f_i - M_i(1-x_i) \tag{3}\\ ...
@Mostafa, j is the number of jobs while r is the number of machines, this means $NumofJobs = Tasktime.shape[1]$ and $NumofMachines = Tasktime.shape[0]$, and also, s must be $s = m.addVars(NumofMachines,NumofJobs)$, otherwise the optimality cannot be achieved. Do this modification and run the example by using the data in Table 1 found in your reference paper(...