Represent a schedule by a permutation , with . Choose and reverse the block . This is a 2-opt move on the dummy tour. Its exact setup-cost change is the asymmetric 2-opt reversal cost
The internal sum matters because the specified changeovers need not be symmetric. When the block begins at the first job, the boundary terms correctly update the initial setup; the dummy return costs are zero. Processing times cancel.
At temperature , simulated annealing accepts a move with probability
With uniformly sampled reversal pairs the proposal is symmetric, so this is the appropriate Metropolis–Hastings acceptance probability. Improvements and ties are always accepted; occasional uphill moves escape local minima. Repeatedly sample moves, gradually lower , and retain the best schedule seen even if the current schedule worsens. Reversing a block of length two swaps adjacent jobs, so these moves connect the whole permutation space. A cooling schedule, iteration budget and restarts control practical performance. This is a heuristic at a finite budget; it does not certify global optimality unless paired with an exact bound or an appropriate limiting convergence argument.
The total processing time is constant for a single machine, so only the initial setup and changeover sum depends on the order. Use the dummy-job reduction for sequence-dependent setup times. Add vertex , and set
Let the binary variable indicate that follows in the augmented tour. A Hamiltonian cycle through specifies exactly one schedule, read starting after . An exact integer programming formulation is
The degree equations alone describe a cycle cover of a directed graph, possibly several separate graph cycles. The subtour elimination constraints exclude every proper directed graph cycle; the cover is therefore a single tour through all jobs. Conversely every schedule supplies a feasible tour with exactly its completion time as objective. Exponentially many written inequalities are permitted in this exact formulation; an implementation may add them only when violated.
For three parallel machines, the relevant objective is the parallel-machine makespan with sequence-dependent setups, not simply total setup cost. Partition jobs into three ordered lists . For a nonempty list define
an empty machine has . Minimize subject to for each machine and each job assigned once. This can be written as a mixed-integer extension with assignment variables, one dummy tour per machine and conditional subtour cuts.
A practical strategy starts with a balanced assignment, sequences each machine using the single-machine methods, and improves by relocating or swapping jobs between machines together with within-machine 2-opt moves. Score each move by its change in . Branch and bound can combine machine-assignment decisions with within-machine assignment bounds. For nonnegative times, the total processing time divided by three and the largest individual processing time are valid lower bounds, supplemented by setup-dependent route bounds. Balancing processing and changeovers jointly is essential; independently minimizing the three tour costs does not by itself minimize completion time.