Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We shall assign tasks in the order of: active, learner and standby. The assignment will be broken down into following steps:

LaTeX Formatting
\usepackage{algorithm,algorithmic}


Algorithm $incremental-rebalancing$
input Set of Tasks T,

	  Set of Instances C,
      Set of Workers W,
      Where each worker w contains:
		Set of active Tasks Ta,
		Set of standby Tasks Ts,
		owned by instance c

	  $\begin{algorithm}
	  Set of Instances C,

\end{algorithm}$


LaTeX Formatting
\documentclass[12pt]{report}
\usepackage[a4paper,tmargin=1.25in, bmargin=1.25in, lmargin=1.25in, rmargin=1.25in]{geometry}

\usepackage{algpseudocode}
\newcommand{\Break}{\State \textbf{break} }
\algblockdefx[Loop]{Loop}{EndLoop}[1][]{\textbf{Loop} #1}{\textbf{End Loop}}
\begin{document}

Here is an example:

\begin{algorithmic}[1]
\Require Integers $a >0$ and $b$
\Ensure $a\cdot b$
\State $i\leftarrow 0$
\State $c \leftarrow 0$
\Loop{1}
    \If{$i=a$}
        \Break Loop 1
    \EndIf
    \State $c \leftarrow c + b$
    \State $i \leftarrow i + 1$
\EndLoop
\State \textbf{return} $c$
\end{algorithmic}

\end{document}


 

Assign active stateful tasks:

...