why the code assigns multiple jobs on same position on machines

108 Views Asked by At

scheduling n jobs on m machines, each job has a different processing time on each machine. all schedule has n positions indexed by l as l =0,1,...,n as position 0 for dummy job

Used this mathematical model to present the problem

min Cmax
subject to: 

$$ Cmax \ge C_j $$ $$ C_j = \sum_{i=1}^n \sum_{l=1}^n x_{ijl} P_{ij} \forall j=1,2,\cdots m$$

$$ \sum_{j=1}^m \sum_ {l=1}^n X_{ijl} =1 \forall i =1,\cdots n$$

$$ \sum_{i=1}^n X_{ijl} \le 1 \forall j =1,\cdots m \forall l =1,\cdots n$$ $$X_{ijl} \in {0,1} $$

the problem is I have coded in Lingo but it schedules jobs in same position but on different machines, for example $ X_{1,2,3} =X_{3,1,3} =1 $ so I added this constraint: $$ \sum_{j=1}^m \sum_{i=1}^n X_{ijl} = 1 \forall l=1,\cdots n$$ but it schedules all jobs in only one machine. what is the problem

1

There are 1 best solutions below

3
On

After your changes, the formulation now looks correct. There is nothing to prevent all jobs from being assigned to one machine, and doing so will be optimal if that machine is sufficiently faster than all others. If you suspect that a better solution uses more than one machine, you can try fixing all $x_{i,j,l}$ variables to that solution and call the solver to see whether it accepts this solution as feasible and yields the objective value you expect.