Library probsa.rt.behavior.service
(* --------------------------------- ProBsa --------------------------------- *)
From probsa.rt.behavior Require Export job schedule.
(* --------------------------------- Main ----------------------------------- *)
From probsa.rt.behavior Require Export job schedule.
(* --------------------------------- Main ----------------------------------- *)
Section Service.
Context {Ω} {μ : measure Ω}.
Context {Job : JobType}
{job_cost : JobCostRV Job Ω μ}.
Context {PState : ProcessorState Job}.
Variable pr_sched : pr_schedule μ PState.
Definition pr_service (j : Job) (t : instant) : nrvar μ :=
mkRvar μ (fun ω:Ω ⇒ service (pr_sched ω) j t).
Context {Ω} {μ : measure Ω}.
Context {Job : JobType}
{job_cost : JobCostRV Job Ω μ}.
Context {PState : ProcessorState Job}.
Variable pr_sched : pr_schedule μ PState.
Definition pr_service (j : Job) (t : instant) : nrvar μ :=
mkRvar μ (fun ω:Ω ⇒ service (pr_sched ω) j t).
A job j is completed by time t in a scenario ω iff
job_cost j = None, or job_cost j ω ≤ pr_service j t ω.
Definition pr_completed_by (j : Job) (t : instant) : rvar μ [eqType of bool] :=
job_cost j ⟨<=⟩ pr_service j t.
job_cost j ⟨<=⟩ pr_service j t.