Scheduling kernels
Lax434175.Kernels · concepts/Lax434175/Kernels.lean · lax-434175
No public endorsements yet.
Loading review…
Sign in with ORCIDNatural Language Statement
Definition
A scheduling kernel fixes what a schedule is. It consists of a type of instances, each with a number of jobs, a type of schedules for every instance, and the feasibility predicate that belongs to the machine model itself (for instance, that a machine processes one job at a time). Every job has a release date; problems without release dates are those in which all release dates are .
Every kernel reports, for each schedule and each job, a start time and a completion time. Times are nonnegative rational numbers, since a preempted job may be interrupted at any moment. Constraints and objectives are written against these two accessors only, so that one definition of, say, release dates applies to every kernel.
Concept map
Lean source view on GitHub
| 1 | import Mathlib.Data.NNRat.Defs |
| 2 | |
| 3 | /-! |
| 4 | --- |
| 5 | title: Scheduling kernels |
| 6 | type: definition |
| 7 | --- |
| 8 | A scheduling kernel fixes what a schedule is. It consists of a type of |
| 9 | instances, each with a number of jobs, a type of schedules for every |
| 10 | instance, and the feasibility predicate that belongs to the machine model |
| 11 | itself (for instance, that a machine processes one job at a time). Every job |
| 12 | has a release date; problems without release dates are those in which all |
| 13 | release dates are . |
| 14 | |
| 15 | Every kernel reports, for each schedule and each job, a start time and a |
| 16 | completion time. Times are nonnegative rational numbers, since a preempted |
| 17 | job may be interrupted at any moment. Constraints and objectives are written against these two |
| 18 | accessors only, so that one definition of, say, release dates applies to |
| 19 | every kernel. |
| 20 | -/ |
| 21 | |
| 22 | namespace Lax434175.Kernels |
| 23 | |
| 24 | /-- A machine model: instances, schedules, and the accessors through which |
| 25 | constraints and objectives read a schedule. -/ |
| 26 | structure Kernel where |
| 27 | /-- The instances of the machine model. -/ |
| 28 | Inst : Type |
| 29 | /-- The number of jobs of an instance. -/ |
| 30 | jobs : Inst → ℕ |
| 31 | /-- The release date of a job. -/ |
| 32 | release : (x : Inst) → Fin (jobs x) → ℕ |
| 33 | /-- The schedules of an instance. -/ |
| 34 | Sched : Inst → Type |
| 35 | /-- The feasibility conditions of the machine model itself. -/ |
| 36 | feasible : (x : Inst) → Sched x → Prop |
| 37 | /-- The time at which a job starts. -/ |
| 38 | start : (x : Inst) → Sched x → Fin (jobs x) → NNRat |
| 39 | /-- The time at which a job completes. -/ |
| 40 | completion : (x : Inst) → Sched x → Fin (jobs x) → NNRat |
| 41 | |
| 42 | /-- In every schedule that is feasible for the kernel, every job starts no |
| 43 | later than it completes. -/ |
| 44 | def Kernel.StartsBeforeCompletion (K : Kernel) : Prop := |
| 45 | ∀ x (σ : K.Sched x), K.feasible x σ → ∀ j, K.start x σ j ≤ K.completion x σ j |
| 46 | |
| 47 | end Lax434175.Kernels |
| 48 |
Discussion
Ask a question or add context. Endorsements and structured flags are kept in the review panel above.
0 comments