While this submission is a draft, it cannot be used by other submissions.

Transportation delays and a transport robot

Lax434175.Transportation · concepts/Lax434175/Transportation.lean · lax-434175

proven

Loading review…

Sign in with ORCID

Community review

Flags

Each flag is tied to a public ORCID identity and explains why this concept may be incorrect.

No flags have been submitted.

    Community review

    Flag this concept

    State precisely what appears incorrect. This explanation will be public under your ORCID name.

    No source line selected.

    Natural Language Statement

    Theorem

    In a shop with transportation delays an instance carries, for every job jj and every ordered pair of its operations k,lk, l, a delay tjklt_{jkl}. Of any two operations of a job, the later one may not start before the completion of the earlier one plus the delay from the earlier to the later.

    The shape field restricts the delays:

    • none: all delays are 00;
    • uniform: all delays equal one number TT;
    • two values: there are two numbers, and the delays of each job all equal one of them;
    • job: the delay depends on the job only, tjt_j;
    • source: the delay depends on the earlier operation only, tkt_k;
    • job and source: the delay does not depend on the later operation, tjkt_{jk};
    • pair: the delay depends on the two positions only, tklt_{kl}, possibly required to be symmetric, tkl=tlkt_{kl} = t_{lk};
    • job and pair: arbitrary delays tjklt_{jkl}, possibly required to be symmetric, tjkl=tjlkt_{jkl} = t_{jlk}.

    A shape is a special case of another if its delays are among the other's.

    With a transport robot, in addition every transport of a job from an operation to the next one in its sequence is carried out by a single robot: the transport starts no earlier than the completion of the operation, lasts for the delay, and ends no later than the start of the next operation. The robot may need time to travel empty, as in Brucker and Knust, Complex Scheduling, §4.6: an instance then carries, for every two machines i,i′i, i', an empty moving time tii′′t'_{ii'}. Of any two transports, the later one departs no earlier than the arrival of the earlier one plus the time the robot needs to travel empty from the machines where it delivers the earlier one to the machines where it picks up the later one, the largest empty moving time between them. Unless the robot has empty moves, all empty moving times are 00, and two transports merely do not overlap.

    A problem with a robot and one without are incomparable. A robot without empty moves is a special case of one with them.

    Theorem. The field of transportation delays is sound.

    Concept map
    4 concepts
    100%
    Proven claimDefinitionThis conceptRelated conceptA → B: B builds on ADescendants are omitted for concepts with more than 10 descendants.
    Evidence

    Each proof establishes this claim relative to its assumptions.

    Lean source view on GitHub

    1import Lax434175.Shops
    2
    3/-!
    4---
    5title: Transportation delays and a transport robot
    6type: theorem
    7---
    8In a shop with transportation delays an instance carries, for every job jj
    9and every ordered pair of its operations k,lk, l, a delay tjklt_{jkl}. Of any
    10two operations of a job, the later one may not start before the completion
    11of the earlier one plus the delay from the earlier to the later.
    12
    13The shape field restricts the delays:
    14
    15- none: all delays are 00;
    16- uniform: all delays equal one number TT;
    17- two values: there are two numbers, and the delays of each job all equal
    18 one of them;
    19- job: the delay depends on the job only, tjt_j;
    20- source: the delay depends on the earlier operation only, tkt_k;
    21- job and source: the delay does not depend on the later operation,
    22 tjkt_{jk};
    23- pair: the delay depends on the two positions only, tklt_{kl}, possibly
    24 required to be symmetric, tkl=tlkt_{kl} = t_{lk};
    25- job and pair: arbitrary delays tjklt_{jkl}, possibly required to be
    26 symmetric, tjkl=tjlkt_{jkl} = t_{jlk}.
    27
    28A shape is a special case of another if its delays are among the other's.
    29
    30With a transport robot, in addition every transport of a job from an
    31operation to the next one in its sequence is carried out by a single robot:
    32the transport starts no earlier than the completion of the operation, lasts
    33for the delay, and ends no later than the start of the next operation. The
    34robot may need time to travel empty, as in Brucker and Knust, *Complex
    35Scheduling*, §4.6: an instance then carries, for every two machines i,i′i, i',
    36an empty moving time tii′′t'_{ii'}. Of any two transports, the later one departs
    37no earlier than the arrival of the earlier one plus the time the robot needs
    38to travel empty from the machines where it delivers the earlier one to the
    39machines where it picks up the later one, the largest empty moving time
    40between them. Unless the robot has empty moves, all empty moving times are
    4100, and two transports merely do not overlap.
    42
    43A problem with a robot and one without are incomparable. A robot without
    44empty moves is a special case of one with them.
    45
    46**Theorem.** The field of transportation delays is sound.
    47-/
    48
    49namespace Lax434175.Transportation
    50open Lax434175.Kernels Lax434175.Modules Lax434175.Shops
    51
    52/-- The delays of an instance. -/
    53abbrev Delays (x : Inst) := (j : Fin x.jobs) → Fin (x.ops j) → Fin (x.ops j) → ℕ
    54
    55inductive Shape
    56 | none
    57 | uniform
    58 | twoValues
    59 | job
    60 | source
    61 | jobSource
    62 | pairSymmetric
    63 | pair
    64 | jobPairSymmetric
    65 | jobPair
    66 deriving DecidableEq
    67
    68/-- The delays of a shape. -/
    69def Shape.holds {x : Inst} : Shape → Delays x → Prop
    70 | .none, t => ∀ j k l, t j k l = 0
    71 | .uniform, t => ∃ T, ∀ j k l, t j k l = T
    72 | .twoValues, t => ∃ T₁ T₂, ∀ j, (∀ k l, t j k l = T₁) ∨ (∀ k l, t j k l = T₂)
    73 | .job, t => ∀ j k l k' l', t j k l = t j k' l'
    74 | .source, t => ∃ g : ℕ → ℕ, ∀ j k l, t j k l = g k.val
    75 | .jobSource, t => ∀ j k l l', t j k l = t j k l'
    76 | .pairSymmetric, t => ∃ g : ℕ → ℕ → ℕ, (∀ a b, g a b = g b a) ∧ ∀ j k l, t j k l = g k.val l.val
    77 | .pair, t => ∃ g : ℕ → ℕ → ℕ, ∀ j k l, t j k l = g k.val l.val
    78 | .jobPairSymmetric, t => ∀ j k l, t j k l = t j l k
    79 | .jobPair, _ => True
    80
    81def Shape.le : Shape → Shape → Bool
    82 | _, .jobPair => true
    83 | .none, _ => true
    84 | .uniform, .none => false
    85 | .uniform, _ => true
    86 | .twoValues, .twoValues | .twoValues, .job | .twoValues, .jobSource
    87 | .twoValues, .jobPairSymmetric => true
    88 | .job, .job | .job, .jobSource | .job, .jobPairSymmetric => true
    89 | .source, .source | .source, .jobSource | .source, .pair => true
    90 | .jobSource, .jobSource => true
    91 | .pairSymmetric, .pairSymmetric | .pairSymmetric, .pair
    92 | .pairSymmetric, .jobPairSymmetric => true
    93 | .pair, .pair => true
    94 | .jobPairSymmetric, .jobPairSymmetric => true
    95 | _, _ => false
    96
    97/-- Of two operations of a job, the later one waits for the delay. -/
    98def Delayed (x : Inst) (t : Delays x) (σ : Sched x) : Prop :=
    99 ∀ j (k l : Fin (x.ops j)), k ≠ l →
    100 finish x σ ⟨j, k⟩ + t j k l ≤ σ.start j l ∨ finish x σ ⟨j, l⟩ + t j l k ≤ σ.start j k
    101
    102/-- The empty moving times of the robot, from a machine to a machine. -/
    103abbrev EmptyMoves (x : Inst) := Fin x.machines → Fin x.machines → ℕ
    104
    105/-- The time the robot needs to travel empty from a set of machines to
    106another: the largest empty moving time from a machine of the first to a
    107machine of the second. -/
    108def emptyTime {m : ℕ} (e : Fin m → Fin m → ℕ) (S S' : Finset (Fin m)) : ℕ :=
    109 S.sup fun i => S'.sup (e i)
    110
    111/-- A single robot carries every job from each operation to the next, and
    112between two transports it travels empty from the machines where it delivers
    113the one to the machines where it picks up the other. -/
    114def Carried (x : Inst) (t : Delays x) (e : EmptyMoves x) (σ : Sched x) : Prop :=
    115 ∃ depart : (j : Fin x.jobs) → Fin (x.ops j) → ℕ,
    116 (∀ j (k l : Fin (x.ops j)), l.val = k.val + 1 →
    117 finish x σ ⟨j, k⟩ ≤ depart j k ∧ depart j k + t j k l ≤ σ.start j l) ∧
    118 ∀ j (k l : Fin (x.ops j)) j' (k' l' : Fin (x.ops j')), l.val = k.val + 1 →
    119 l'.val = k'.val + 1 → (⟨j, k⟩ : Op x) ≠ ⟨j', k'⟩ →
    120 depart j k + t j k l + emptyTime e (σ.machines j l) (σ.machines j' k') ≤ depart j' k' ∨
    121 depart j' k' + t j' k' l' + emptyTime e (σ.machines j' l') (σ.machines j k) ≤ depart j k
    122
    123/-- A value of the field: a shape of delays, whether a robot carries the
    124jobs, and whether the robot needs time to travel empty. -/
    125structure Value where
    126 shape : Shape
    127 robot : Bool := false
    128 emptyMoves : Bool := false
    129
    130/-- No transportation delays and no robot. -/
    131def Value.none : Value := ⟨.none, false, false⟩
    132
    133/-- The data of the field: the delays and the empty moving times. -/
    134abbrev Data (x : Inst) := Delays x × EmptyMoves x
    135
    136/-- The delays have the shape, and unless the value has a robot with empty
    137moves, the empty moving times are `0`. -/
    138def Value.admits {x : Inst} (v : Value) (d : Data x) : Prop :=
    139 v.shape.holds d.1 ∧ ((v.robot && v.emptyMoves) = false → ∀ i i', d.2 i i' = 0)
    140
    141/-- The shape is a special case, both values have a robot or neither has,
    142and empty moves only if the other value has them. -/
    143def Value.le (v w : Value) : Bool :=
    144 Shape.le v.shape w.shape && decide (v.robot = w.robot) && (!v.emptyMoves || w.emptyMoves)
    145
    146/-- The field of transportation delays. -/
    147def module : Module kernel where
    148 Value := Value
    149 Data _ x := Data x
    150 admits v _ d := v.admits d
    151 constraint v x d σ := Delayed x d.1 σ ∧ (v.robot = true → Carried x d.1 d.2 σ)
    152 le := Value.le
    153 embed _ _ d := d
    154
    155axiom sound : module.Sound
    156
    157end Lax434175.Transportation
    158
    Show Proof
    Builds on
    Used by
    From Mathlib

    none

    Discussion

    Ask a question or add context. Endorsements and structured flags are kept in the review panel above.

    Loading discussion…