From 52b5fdeb98b17f97c7f8deae59e8d8d9d90af8bf Mon Sep 17 00:00:00 2001 From: grizzly Date: Thu, 18 Jul 2024 22:11:07 -0400 Subject: [PATCH] add first example of polyfit --- scheduling/images/polyfit.svg | 1297 +++++++++++++++++++++++++++++++++ scheduling/scheduling.typ | 25 +- 2 files changed, 1310 insertions(+), 12 deletions(-) create mode 100644 scheduling/images/polyfit.svg diff --git a/scheduling/images/polyfit.svg b/scheduling/images/polyfit.svg new file mode 100644 index 0000000..8035999 --- /dev/null +++ b/scheduling/images/polyfit.svg @@ -0,0 +1,1297 @@ + + + + + + + + 2024-07-18T22:09:53.751451 + image/svg+xml + + + Matplotlib v3.9.1, https://matplotlib.org/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/scheduling/scheduling.typ b/scheduling/scheduling.typ index 76a9ce7..52c8282 100644 --- a/scheduling/scheduling.typ +++ b/scheduling/scheduling.typ @@ -8,29 +8,30 @@ The principle of #acr("EBS") is to use a function to determine which task is allowed to communicate at anypoint in time. -This principle provide a mathematically proovable way for each task to determine when to communicate. +This principle provide a mathematically proovable way for each task to determine when to communicate without collision. *Problem Statement:* #grid( columns: (1fr,15fr,1fr), [],[ Given $n$ tasks $t_i, i in [0,n-1]$, - and an array of $m$ time periods $A = [x_0, dots.h.c, x_(m-1)]$ + and a schedule array of $m$ time periods $A = [x_0, dots.h.c, x_(m-1)]$ where each element $x_i in [t_0,dots.h.c, t_(n-1)]$ is the task allowed to communicate at time $tau_i$, - provide a set of $n$ scheduling functions $S=(s_0,dots.h.c,s_(n-1))$ such that, - for each time period $tau_i$, only $s_i(tau_i)$ associated with the task $t_i$ defined at by $A[i]$ - validates a pre-defined _enable_ condition. + provide a scheduling functions $s$ such that, + for each time period $tau_i$, $s(tau_i) = A[tau_i]$. ], [] ) -The _enable_ condition is any condition defined on the value of a scheduling function evaluated at a regular time. -For example, a simple _enable_ condition can be the positivity of the value. -In this case, the definition of the scheduling functions set is += Polynomials +Contrary to popular beliefs, polynomials are not boring. +Let us consider a problem with four tasks $(t_0,t_1,t_2,t_3)$ and a schedule array of 20 time period $ -S = cases( - &s_i(tau_i) > 0 "if" A[tau_i] = t_i, - &s_(j eq.not i) < 0 "else", +A = [0,1,2,3,0,0,1,2,0,1,2,3,0,3,0,2,3,2,0,1] +$ + +#figure( + image("images/polyfit.svg", width:100%), + caption: "Scheduling function defined as a polynomial fit of the scheduling array." ) -$