Expand description
Network models and scheduling: project planning, flows on networks, and the sequencing rules that provably optimise a stated objective.
Two threads run through this module. The first is that several graph problems are linear programs in disguise, and their constraint matrices are totally unimodular, so the linear relaxation is automatically integral. Shortest path and maximum flow both have this property, which is why they can be solved by combinatorial algorithms and by a general linear programming solver with the same answer. Having both is worth the duplication: the graph module’s algorithms are far faster, and the linear programs are an independent check on them.
The second is that scheduling is a subject of exact greedy rules rather than heuristics. Sorting by processing time minimises mean flow time; sorting by due date minimises maximum lateness; Moore and Hodgson’s rule minimises the number of late jobs; Johnson’s rule minimises makespan on two machines. Each is provably optimal for its own objective and provably not for the others – shortest-processing-time can make a job catastrophically late while minimising the average – so the objective must be chosen before the rule. The tests check each rule against exhaustive enumeration of every permutation, on the objective it claims and on nothing else.
Structs§
- Task
Times - The four schedule times of one task: earliest start, earliest finish, latest start, latest finish.
Functions§
- critical_
path_ method - The critical path method: the shortest possible project duration, which tasks cannot slip, and every task’s four schedule times.
- gantt_
data - Turns a single-machine job order into
(job, start, finish)bars. - interval_
scheduling_ max - The largest set of pairwise disjoint intervals, by earliest finish time.
- job_
shop_ shifting_ bottleneck_ lite - A lower bound on a job shop makespan by the shifting bottleneck idea, simplified.
- johnson_
two_ machine - Johnson’s rule: the order minimising makespan through two machines in series.
- lpt_
makespan - Longest processing time first onto identical parallel machines.
- max_
flow_ lp_ check - The value of a maximum flow, computed as a linear program.
- moore_
hodgson - The Moore-Hodgson rule: the order minimising the number of late jobs on one machine.
- network_
simplex_ lite - A minimum-cost flow by the network simplex, expressed through the general simplex method.
- pert
- PERT: the mean and variance of the project duration under three-point estimates.
- scheduling_
edd - Earliest due date first: the order minimising maximum lateness on one machine.
- scheduling_
spt - Shortest processing time first: the order minimising mean flow time on one machine.
- shortest_
path_ lp_ check - The length of a shortest path, computed as a linear program.
- transshipment
- The transshipment problem: ship from sources to sinks through intermediate nodes at least cost.
- two_
machine_ makespan - The makespan of a two-machine flow shop under a given order.
- vehicle_
routing_ savings - Clarke-Wright savings for the capacitated vehicle routing problem.
- weighted_
interval_ scheduling - The most valuable set of pairwise disjoint intervals.