Commit 89f3eccf authored by homsm's avatar homsm Committed by overleaf
Browse files

Update on Overleaf.

parent 5f30841b
......@@ -113,7 +113,7 @@ A new task is accepted if the schedule remains feasible. \newline
\ownsubsection{EDF* (6-27)}
Determines a feasible schedule for tasks with precedence constraints if one exists. \newline
\textbf{Algorithm: }Modify release times and deadlines. Then use EDF. \newline
\textbf{Algorithm: }Modify release times and deadlines (in that way we get a problem without precedence constraints and can use the normal EDF algorithm. Precedence constraints are still satisfied). Then use EDF. \newline
\textbf{Modification of release times:}\newline
Task must start not earlier than its release time and not earlier than the minimum finishing time of its predecessor.
\begin{compactenum}
......@@ -182,9 +182,10 @@ Fixed / static priorities, independent, preemptive, deadlines can be smaller tha
\textbf{Schedulability analysis}: (sufficient but not necessary)
$$\sum_{i=1}^{n} \frac{C_i}{D_i} \leq n(2^{1/n}-1) \implies \text{schedulability}$$
\textbf{Schedulatbility Condition: (sufficient and necessary)}: The worst-case is critical instance. Assume that tasks are ordered according to relative deadlines $D_i$, then the \textcolor{red}{worst case interference} for task $i$ is
\textbf{Schedulatbility Condition: (sufficient and necessary)}: The worst-case is the critical instance (critical instance of a task occurs whenever the task is released simultaneously with all higher priority tasks). Assume that tasks are ordered according to relative deadlines $D_i$, then the \textcolor{red}{worst case interference} for task $i$ is
$$I_i = \sum_{j=1}^{i-1} \Big\lceil\frac{t}{T_j}\Big\rceil C_j$$
The \textcolor{red}{longest response time} $R_i$ of a periodic task $i$ is at critical instance, $R_i=C_i+I_i$. Hence, compute in ascending order the smallest $R_i, ~i=1,...,n$ that satisfy $$R_i=C_i+\sum_{j=1}^{i-1}\Big\lceil\frac{R_i}{T_j}\Big\rceil C_j$$ and check whether $$\forall i=1,...,n: R_i\leq D_i$$
$$I_1=0$$
The \textcolor{red}{longest response time} $R_i$ of a periodic task $i$ is at critical instance, $R_i=C_i+I_i$. Hence, compute in ascending order (=highest priority first) the smallest $R_i, ~i=1,...,n$ that satisfy $$R_i=C_i+\sum_{j=1}^{i-1}\Big\lceil\frac{R_i}{T_j}\Big\rceil C_j$$ and check whether $$\forall i=1,...,n: R_i\leq D_i$$
This condition is both necessary and sufficient.
\begin{python}
Algorithm: DM_guarantee($\Gamma$){
......
......@@ -148,4 +148,24 @@ The following holds for the optimal energy consumption $u(t)$:
Since the perfect use function $u(t)$ was chosen with knowledge of all harvested energy for all times, the battery level will drop to 0\% only at times, when the harvesting functions starts delivering more energy than we currently use. \\
The energy consumption will then be chosen, such that the battery is full, when the harvesting function is decreasing, thus after the battery is fully charged, the use function should decrease. \\
\ownsubsection{Finite Horizon Control}
We do not know the future energy harvesting correctly. To deal with that, we use a estimation of the future harvested energy $\tilde{p}(\tau)$ \\
Instead of calculating the optimal use function only once and stick to it, we now calculate the best use function repedeatly using the actual battery level. \\
\begin{lstlisting}[style=py]
t = 0 # Starttime
T = 24 # Period. e.g. Day (24h)
b[0:24] = 100 # Battery Level
while(True):
bat = b[t] # get Current battery level
# Best use function for current window
u = getBestUseFunction(p,t,T+t,bat)
setUseFunction(u)
sleep(1)
t = (t+1) % T
\end{lstlisting}
......@@ -221,6 +221,27 @@
\lstdefinestyle{py}{
backgroundcolor=\color{backgroundColour},
commentstyle=\color{mGreen},
keywordstyle=\color{magenta},
numberstyle=\tiny\color{mGray},
stringstyle=\color{mPurple},
basicstyle=\footnotesize,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=left,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=2,
language=Python
}
\lstdefinestyle{CStyle}{
backgroundcolor=\color{backgroundColour},
commentstyle=\color{mGreen},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment