Just-in-time flow shops of lax-496464 as zoo instances
Lax434175.JitFlowShop · concepts/Lax434175/JitFlowShop.lean · lax-434175
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Theorem
An instance of just-in-time scheduling in a two-stage flexible flow shop (lax-496464) has jobs and identical second-stage machines; job has a preprocessing time , a processing time , a due date and a weight . A set of jobs is feasible when its jobs can be scheduled, preprocessing on the single first-stage machine and processing on one of the machines, so that each completes exactly at its due date.
Read the same data as an instance of with machines, machine forming the first stage: job has two operations, of lengths and , the first on machine and the second on one of the machines , the due date and the weight . Here every job is scheduled, and the cost of a schedule is the total weight of the jobs that do not complete exactly at their due dates.
Theorem. If , the instance has a feasible set of weight at least if and only if the zoo instance has a schedule of cost at most . If all weights are , the same holds for the instance of with the threshold .
The jobs completing at their due dates in a schedule of the zoo instance form a feasible set: the start of the first operation is the preprocessing start, the machine of the second operation less one is the second-stage machine. Conversely, the jobs left out of a feasible set run after every due date, one after another, with the first operation on machine and the second on machine .
Three cases need no hypothesis. An operation of length is a point; in both models it clashes exactly with an operation running across it, and two points never clash. A job with is just in time in neither model, since its second operation would have to start before time . A threshold is met in neither model. The hypothesis is needed: for the empty set is feasible, but the second operation of a job of the zoo instance has no machine, so the zoo instance has no schedule as soon as it has a job. The construction of lax-496464 has second-stage machines.
Concept map
Evidence
Lean source view on GitHub
| 1 | import Lax434175.ZooShops |
| 2 | import Lax496464.Theorem1 |
| 3 | |
| 4 | /-! |
| 5 | --- |
| 6 | title: Just-in-time flow shops of lax-496464 as zoo instances |
| 7 | type: theorem |
| 8 | --- |
| 9 | An instance of just-in-time scheduling in a two-stage flexible flow shop (lax-496464) has |
| 10 | jobs and identical second-stage machines; job has a preprocessing time , a |
| 11 | processing time , a due date and a weight . A set of jobs is feasible when its |
| 12 | jobs can be scheduled, preprocessing on the single first-stage machine and processing on one of |
| 13 | the machines, so that each completes exactly at its due date. |
| 14 | |
| 15 | Read the same data as an instance of with machines, |
| 16 | machine forming the first stage: job has two operations, of lengths and , the |
| 17 | first on machine and the second on one of the machines , the due date |
| 18 | and the weight . Here every job is scheduled, and the cost of a schedule is the total |
| 19 | weight of the jobs that do not complete exactly at their due dates. |
| 20 | |
| 21 | **Theorem.** If , the instance has a feasible set of weight at least if and only |
| 22 | if the zoo instance has a schedule of cost at most . If all weights are , the |
| 23 | same holds for the instance of with the threshold . |
| 24 | |
| 25 | The jobs completing at their due dates in a schedule of the zoo instance form a feasible set: |
| 26 | the start of the first operation is the preprocessing start, the machine of the second |
| 27 | operation less one is the second-stage machine. Conversely, the jobs left out of a feasible |
| 28 | set run after every due date, one after another, with the first operation on machine and the |
| 29 | second on machine . |
| 30 | |
| 31 | Three cases need no hypothesis. An operation of length is a point; in both models it clashes |
| 32 | exactly with an operation running across it, and two points never clash. A job with |
| 33 | is just in time in neither model, since its second operation would have to start |
| 34 | before time . A threshold is met in neither model. The hypothesis |
| 35 | is needed: for the empty set is feasible, but the second operation of a job of |
| 36 | the zoo instance has no machine, so the zoo instance has no schedule as soon as it has a job. |
| 37 | The construction of lax-496464 has second-stage machines. |
| 38 | -/ |
| 39 | |
| 40 | namespace Lax434175.JitFlowShop |
| 41 | open Lax434175 Lax434175.Problems Lax434175.Assembly |
| 42 | open Lax496464.FlowShop |
| 43 | |
| 44 | /-- The operations instance of a flow shop instance: `m + 1` machines, the first for the |
| 45 | first stage; every job has two operations, of lengths `p j` and `q j` on every machine. -/ |
| 46 | def base (I : Instance) : Operations.Inst where |
| 47 | jobs := I.jobs |
| 48 | machines := I.machines + 1 |
| 49 | ops := fun _ => 2 |
| 50 | p := fun j k _ => if k.val = 0 then I.p j else I.q j |
| 51 | r := fun _ => 0 |
| 52 | |
| 53 | /-- The data of the fields, the same for `p315` and `p316`. -/ |
| 54 | def data (I : Instance) : (i : OperationsFamily.FieldName) → |
| 55 | (OperationsFamily.family.module i).Data (ZooShops.p316.module i) (base I) |
| 56 | | .interruption => () |
| 57 | | .jobStructure => () |
| 58 | | .environment => () |
| 59 | | .machineCount => () |
| 60 | | .jobCount => () |
| 61 | | .processingTimes => () |
| 62 | | .machineSets => () |
| 63 | | .releaseDates => () |
| 64 | | .deadlines => () |
| 65 | | .precedence => ((), ()) |
| 66 | | .communicationDelays => () |
| 67 | | .server => () |
| 68 | | .forbiddenTimes => () |
| 69 | | .encoding => () |
| 70 | | .noWait => () |
| 71 | | .transportation => (fun _ _ _ => 0, fun _ _ => 0) |
| 72 | | .noIdle => () |
| 73 | | .batchSetups => () |
| 74 | |
| 75 | /-- The zoo instance of `FF(1,m)||Σw_jZ_j`. -/ |
| 76 | def toZoo (I : Instance) : Inst OperationsFamily.family ZooShops.p316 where |
| 77 | base := base I |
| 78 | data := data I |
| 79 | admitted |
| 80 | | .interruption => trivial |
| 81 | | .jobStructure => fun _ => rfl |
| 82 | | .environment => fun _ _ _ => rfl |
| 83 | | .machineCount => ⟨trivial, fun _ h => nomatch h⟩ |
| 84 | | .jobCount => ⟨trivial, fun _ h => nomatch h⟩ |
| 85 | | .processingTimes => trivial |
| 86 | | .machineSets => Nat.succ_pos _ |
| 87 | | .releaseDates => fun _ => rfl |
| 88 | | .deadlines => trivial |
| 89 | | .precedence => ⟨fun _ _ h => h, trivial⟩ |
| 90 | | .communicationDelays => trivial |
| 91 | | .server => trivial |
| 92 | | .forbiddenTimes => trivial |
| 93 | | .encoding => trivial |
| 94 | | .noWait => trivial |
| 95 | | .transportation => ⟨fun _ _ _ => rfl, fun _ _ _ => rfl⟩ |
| 96 | | .noIdle => trivial |
| 97 | | .batchSetups => trivial |
| 98 | objectiveData := (I.w, I.d) |
| 99 | objectiveAdmitted := trivial |
| 100 | |
| 101 | /-- The zoo instance of `FF(1,m)||ΣZ_j`, the weights left out. -/ |
| 102 | def toZooUnit (I : Instance) : Inst OperationsFamily.family ZooShops.p315 where |
| 103 | base := base I |
| 104 | data := data I |
| 105 | admitted |
| 106 | | .interruption => trivial |
| 107 | | .jobStructure => fun _ => rfl |
| 108 | | .environment => fun _ _ _ => rfl |
| 109 | | .machineCount => ⟨trivial, fun _ h => nomatch h⟩ |
| 110 | | .jobCount => ⟨trivial, fun _ h => nomatch h⟩ |
| 111 | | .processingTimes => trivial |
| 112 | | .machineSets => Nat.succ_pos _ |
| 113 | | .releaseDates => fun _ => rfl |
| 114 | | .deadlines => trivial |
| 115 | | .precedence => ⟨fun _ _ h => h, trivial⟩ |
| 116 | | .communicationDelays => trivial |
| 117 | | .server => trivial |
| 118 | | .forbiddenTimes => trivial |
| 119 | | .encoding => trivial |
| 120 | | .noWait => trivial |
| 121 | | .transportation => ⟨fun _ _ _ => rfl, fun _ _ _ => rfl⟩ |
| 122 | | .noIdle => trivial |
| 123 | | .batchSetups => trivial |
| 124 | objectiveData := I.d |
| 125 | objectiveAdmitted := trivial |
| 126 | |
| 127 | /-- The total weight of the jobs. -/ |
| 128 | def totalWeight (I : Instance) : ℕ := ∑ j, I.w j |
| 129 | |
| 130 | axiom hasWeight_iff (I : Instance) (hm : 0 < I.machines) (W : ℕ) : |
| 131 | I.HasWeight W ↔ |
| 132 | (problem _ ZooShops.p316).Decides (toZoo I) (((totalWeight I : ℤ) - W : ℤ) : ℚ) |
| 133 | |
| 134 | axiom hasWeight_iff_unit (I : Instance) (hm : 0 < I.machines) (hw : ∀ j, I.w j = 1) (W : ℕ) : |
| 135 | I.HasWeight W ↔ |
| 136 | (problem _ ZooShops.p315).Decides (toZooUnit I) (((I.jobs : ℤ) - W : ℤ) : ℚ) |
| 137 | |
| 138 | end Lax434175.JitFlowShop |
| 139 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments