I am trying to formulate a linear program for a time scheduling problem.
My variable is simple, $x_{ij}$, which is equal to 1 when job $i$ is done at hour $j$.
Now as a part of this schedule (10 job = 10 rows and 24 hours = 24 columns), I need to define a constraint for job 5, or row 5. I've been using constraints like summation of row 3 should be equal to 5, meaning job 3 requires 5 hours to be devoted to it through the day.
Now, lets say I have job 7, that MUST be done sequentially (it can be done from 3-6 pm, 6-9 pm, anything, it must be sequential is all). But how do I show a constraint in a linear program like that?
Although I do not think this is the best approach, if you really want to stick with your $x_{ij}$ variables, you could do something like this : Introduce binary variables $s_{ij}$ that take value $1$ if job $i$ starts at hour $j$, and add the following constraints :