Operation Research I have the following problem: 
Consider the following scheduling problem for a factory that operates 24 hours per day, 7 days per week. In a given day, there are requirements for the total number of employees that must be at the plant. These are given in the following table:
Hours              Employees needed
12 a.m. to 4 a.m.   8
4 a.m. to 8 a.m.    10
8 a.m. to 12 p.m.   16
12 p.m. to 4 p.m.   21
4 p.m. to 8 p.m.    18
8 p.m. to 12 a.m.   12
Employees can work either 8-hour or 12-hour shifts, starting at the times stated above; the 12-hour shifts can only start at 12 a.m/p.m. or 8 a.m./p.m. Those working the 8-hour shifts cost the company $40 per hour, and those working 12-hour shifts cost the company $60 per hour. How should the company staff the plant so as to minimize labor costs?
I have come up with the following:

xi = number of employees working an 8 hour shift starting at time i
xj = number of employees working a 12 hour shift starting at time j
t1 = 8am-12am shift
t2 = 12am-4am shift
t3 = 4am-8am shift
t4 = 8am-12pm shift
t5 = 12pm-4pm shift
t6 = 4pm=8pm shift
t7 = 8pm-12am shift

then I have the following for 8 hour shifts

t1+t2 <= 8+10
t2+t3 <= 10+16
t3+t4 <= 16+21
t4+t5 <= 21+18
t5+t6 <= 18+12
t6+t1 <= 12+8

for the 12 hour shifts I have:

t1+t2+t3 <= 8+10+16
t3+t4+t5 <= 16+21+18
t4+t5+t6 <= 21+18+12
t6+t1+t2 <= 12+8+10

I also have the following constraint:

t1,t2,t3,t4,t5,t6>= 0 and integers

Then I have come up with the following minimizing function:

40(t1+t2) + 40(t2+t3) + 40(t3+t4) + 40(t4+t5) + 40(t5+t6) + 40(t6+t1) + >60(t1+t2+t3) + 60(t3+t4+t5) + 60(t4+t5+t6) + 60(t6+t1+t2)

Can anyone verify if I have modeled this correctly? 
Thank you!!
 A: Looks like a good approach, Mapleleaf. 
I found a good video: https://www.youtube.com/watch?v=3I8B21M-ob8&vl=en that has a very similar problem.
I would suggest changing how you defined the variables, I would assign a variable for the number of people on each shift type (12hr or 8hr):
Let X1 be the number of people on an 8hr shift starting at 12AM
Let X2 be the number of people on an 8hr shift starting at 4AM
Let X3 be the number of people on an 8hr shift starting at 8AM
Let X4 be the number of people on an 8hr shift starting at 12PM
Let X5 be the number of people on an 8hr shift starting at 4PM
Let X6 be the number of people on an 8hr shift starting at 8PM
Let Y1 be the number of people on an 12hr shift starting at 12AM
Let Y2 be the number of people on an 12hr shift starting at 8AM
Let Y3 be the number of people on an 12hr shift starting at 12PM
Let Y4 be the number of people on an 12hr shift starting at 8PM
Then I would define the Objective function to be:
Min 40(X1+X2+X3+X4+X5+X6) + 60(Y1+Y2+Y3+Y4)
[The wage multiplied by number of people on the shift]
From there, I would create the Constraints based on the table:
X1+Y1 >= 8 (Active During the 12 AM Start window)
X1 + X2 + Y1 >= 10 (Active During the 4 AM Start window)
X2 + X3 + Y1 + Y2 >= 16 (Active During the 8 AM Start window)
X3 + X4 + Y2 + Y3 >= 21 (Active During the 12Pm start window)
X4 + X5 + Y2 + Y3  >= 18 (Active During the 4pm Start window)
X5 + X6 + Y3 + Y4 >= 12 (Active During the 8Pm Start window)
Where X1,X2,X3,X4,X5,X6,Y1,Y2,Y3,Y4>=0 (Assume Non-Negative numbers of employees on shift)
I hope this helps :)
