Single-machine scheduling with rejection
Lax434175.Rejection · concepts/Lax434175/Rejection.lean · lax-434175
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
The problem . An instance has jobs with processing times and rejection costs , and a budget . A solution rejects some jobs and assigns a start time to every accepted job. It is feasible if the rejection costs of the rejected jobs sum to at most and no two accepted jobs overlap on the machine. The cost is the total completion time of the accepted jobs.
Concept map
Lean source view on GitHub
| 1 | import Mathlib.Algebra.BigOperators.Group.Finset.Basic |
| 2 | import Mathlib.Data.Fintype.BigOperators |
| 3 | import Lax434175.Problems |
| 4 | |
| 5 | /-! |
| 6 | --- |
| 7 | title: Single-machine scheduling with rejection |
| 8 | type: definition |
| 9 | --- |
| 10 | The problem . An |
| 11 | instance has jobs with processing times and rejection costs , |
| 12 | and a budget . A solution rejects some jobs and assigns a start time to |
| 13 | every accepted job. It is feasible if the rejection costs of the rejected |
| 14 | jobs sum to at most and no two accepted jobs overlap on the machine. The |
| 15 | cost is the total completion time of the accepted jobs. |
| 16 | -/ |
| 17 | |
| 18 | namespace Lax434175.Rejection |
| 19 | open Lax434175.Problems |
| 20 | |
| 21 | structure Inst where |
| 22 | jobs : ℕ |
| 23 | p : Fin jobs → ℕ |
| 24 | /-- The rejection cost of a job. -/ |
| 25 | e : Fin jobs → ℕ |
| 26 | budget : ℕ |
| 27 | |
| 28 | structure Sched (x : Inst) where |
| 29 | /-- The accepted jobs. -/ |
| 30 | accepted : Finset (Fin x.jobs) |
| 31 | start : Fin x.jobs → ℕ |
| 32 | |
| 33 | def completion (x : Inst) (σ : Sched x) (j : Fin x.jobs) : ℕ := σ.start j + x.p j |
| 34 | |
| 35 | /-- The rejected jobs respect the budget and the accepted jobs do not |
| 36 | overlap. -/ |
| 37 | def feasible (x : Inst) (σ : Sched x) : Prop := |
| 38 | ∑ j ∈ Finset.univ \ σ.accepted, x.e j ≤ x.budget ∧ |
| 39 | ∀ i ∈ σ.accepted, ∀ j ∈ σ.accepted, i ≠ j → |
| 40 | completion x σ i ≤ σ.start j ∨ completion x σ j ≤ σ.start i |
| 41 | |
| 42 | /-- `1 | Σ_{j ∈ reject} e_j ≤ B | ΣC_j` -/ |
| 43 | def problem : Problem where |
| 44 | Inst := Inst |
| 45 | Sched := Sched |
| 46 | feasible := feasible |
| 47 | cost x σ := ((∑ j ∈ σ.accepted, completion x σ j : ℕ) : ℚ) |
| 48 | |
| 49 | end Lax434175.Rejection |
| 50 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments