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?
For your job $7$, you would define all the columns with three consecutive $1$s for instance.
– Kuifje Dec 19 '18 at 09:07the total sum of each column is always 1, so there can never be multiple assignments at the same time. my main issue is how to show a constraint that I can explain in english "3 hour task must be finished in a single chunk", as a mathematical equation/inequality. It must be formulated like this because some other jobs have flexibility in this regard, they can be done in parts.
– Arjun Mohan Dec 19 '18 at 11:21I can show that as sigma (j=1, upto 24) xij = tij [apologies I dont know how to format mathematical symbols in my comment]
How can I show a constraint that says "row elements must add up to 3, but also as a single chunk of 3"
I have the means to show the results of my calculation, but I am not able to show that as a constraint in the canonical form of a linear program, so to say.
– Arjun Mohan Dec 19 '18 at 11:24