

\documentclass{beamer}

% This file is a solution template for:

% - Talk at a conference/colloquium.
% - Talk length is about 20min.
% - Style is ornate.



% Copyright 2004 by Till Tantau <tantau@users.sourceforge.net>.
%
% In principle, this file can be redistributed and/or modified under
% the terms of the GNU Public License, version 2.
%
% However, this file is supposed to be a template to be modified
% for your own needs. For this reason, if you use this file as a
% template and not specifically distribute it as part of a another
% package/program, I grant the extra permission to freely copy and
% modify this file as you see fit and even to delete this copyright
% notice. 


\mode<presentation>
{
  %\usetheme{Madrid}
  \usetheme{Warsaw}
  % or ...
  %\usetheme{Berkeley}   % left bar
  %\usetheme{Antibes} % tree header
  %\usetheme{Boadilla}  % very plain
  %\usetheme{Warsaw}
  %\usetheme{Rochester} % I like
  %\usetheme{Goettingen}  % right bar
  %\usetheme{Ilmenau}

\usecolortheme{lily}

  %\usepackage{beamerouterthemeshadow}
  %\usepackage{beamerouterthemesmoothtree}
  \usepackage{beamercolorthemeorchid}
  %\usepackage{beamerinnerthemerounded}
  %\usepackage{beamerthemeshadow}
  \setbeamercovered{transparent}
  % comment out to completely hide covered material



  %\setbeamercovered{transparent}
  % or whatever (possibly just delete it)
}

\usepackage{wmff}

\usepackage[english]{babel}
% or whatever

\usepackage[latin1]{inputenc}
% or whatever

\usepackage{times}
\usepackage[T1]{fontenc}
% Or whatever. Note that the encoding and the font should match. If T1
% does not look nice, try deleting the line with the fontenc.


\title % (optional, use only with long paper titles)
{Object Oriented Modeling and Simulation with OOSimL}

\subtitle
{Random Numbers}

\author%[Author, Another] % (optional, use only with lots of authors)
{Dr. Jos\'e M. Garrido C.}
% \inst{1} 
% \and S.~Another\inst{2}}
% - Give the names in the same order as the appear in the paper.
% - Use the \inst{?} command only if the authors have different
%   affiliation.

\institute[Kennesaw State University] % (optional, but mostly needed)
{
  %\inst{1}%
  Department of Computer Science\\College of Computing and Software Engineering\\
  Kennesaw State University
%  \and
%  \inst{2}%
%  Department of Theoretical Philosophy\\
%  University of Elsewhere
}
% - Use the \inst command only if there are several affiliations.
% - Keep it simple, no one is interested in your street address.

\date % (optional, should be abbreviation of conference name)
{Spring 2017}
% - Either use conference name or its abbreviation.
% - Not really informative to the audience, more for people (including
%   yourself) who are reading the slides online

\subject{Applied Computer Science, Simulation}
% This is only inserted into the PDF information catalog. Can be left
% out. 



% If you have a file called "university-logo-filename.xxx", where xxx
% is a graphic format that can be processed by latex or pdflatex,
% resp., then you can add a logo as follows:

\pgfdeclareimage[height=0.17in]{university-logo}{ksu-1.png}
\logo{\pgfuseimage{university-logo}}



% Delete this, if you do not want the table of contents to pop up at
% the beginning of each subsection:
%\AtBeginSubsection[]
%{
%  \begin{frame}<beamer>{Outline}
%    \tableofcontents[currentsection,currentsubsection]
%  \end{frame}
%}


% If you wish to uncover everything in a step-wise fashion, uncomment
% the following command: 

%\beamerdefaultoverlayspecification{<+->}


\begin{document}

\begin{frame}
  \titlepage
\end{frame}

%\begin{frame}{Outline}
%  \tableofcontents
  % You might wish to add the option [pausesections]
%\end{frame}


% Structuring a talk is a difficult task and the following structure
% may not be suitable. Here are some rules that apply for this
% solution: 

% - Exactly two or three sections (other than the summary).
% - At *most* three subsections per section.
% - Talk about 30s to 2min per frame. So there should be between about
%   15 and 30 frames, all told.

% - A conference audience is likely to know very little of what you
%   are going to talk about. So *simplify*!
% - In a 20min talk, getting the main ideas across is hard
%   enough. Leave out details, even if it means being less precise than
%   you think necessary.
% - If you omit details that are vital to the proof/implementation,
%   just say so once. Everybody will be happy with that.

\section{Random Numbers}

\begin{frame}{Stochastic Models}
 \begin{block}{}
 \begin{itemize}
 \item
 Random numbers are used to model uncertainty in simulation stochastic models.
 \item
These models use probability distributions for the generation of random numbers.
\end{itemize}
 \end{block}
 
 \begin{block}{}
 OOSimL provides several types of random number generators that use different probability distributions.

  \end{block}
\end{frame}

\begin{frame}{Common Probability Distributions in OOSimL}
\begin{columns}
 \column{.45\textwidth}
 \begin{itemize}
\item {\em Randint}
\item {\em NegExp}
\item {\em Poisson}
\item {\em Normal}
\item {\em Uniform}
\item {\em Binomial} 
\end{itemize}
  \column{.45\textwidth}
 \begin{itemize}
\item {\em Bernoulli} 
\item {\em Erlang} 
\item {\em Gamma}
\item {\em Geometric}
\item {\em HyperGeometric} 
\item {\em Triangular} 
\item {\em Weibull}
\end{itemize}
\end{columns}
\end{frame}


%\section{}

%\subsection{Distributed Denial of Service }

\begin{frame}[fragile]{Random Numbers with Randint}
\begin{block}{}
\begin{itemize}
\item
The {\em Randint\/} random number generator provides the most basic type of random number generation, a uniform distribution with numbers between 0.0 and 1.0. 
\item
The {\bf create} statement is used to create and initialize a random number generator object. 
\end{itemize}
\end{block}
\begin{block}{}
The following lines declare and create a random number generator object, referenced by {\em ran\_gen1\/}, with title ``random val'' and 7 as the value of the seed.

{\small \tt
\begin{verbatim}
define ran_gen1 of class Randint // random generator
...
create ran_gen1 of class Randint using 
            ``random val'', 7 
\end{verbatim}
}
\end{block}
\end{frame}  


%
\begin{frame}[fragile]{Generating Random Numbers}
The {\bf generate random} statement generates a random number from the specified random number generator object. The general form of this statement is:

\vspace{0.1in}
%\begin{quote}
{\tt %\footnotesize
\begin{algorithm}
{\bf generate random value} $\langle$ variable $\rangle$
\ \ \ \ {\bf from} $\langle$ ref\_var $\rangle$  
\end{algorithm}
}
%\end{quote}
\vspace{0.1in}

The following lines generate a random number using the generator object {\em ran\_gen1\/} and stores this number in variable {\em ran\_value}.

{\tt \small
\begin{verbatim}
define ran_value of type double
...
generate random value ran_value from ran_gen1 
\end{verbatim}
}

\end{frame}

\begin{frame}{Random Numbers with Negative Exponential}
\begin{block}{}
\begin{itemize}
\item
The {\em NegExp} random number generator provides random numbers using a negative exponential distribution.
\item
The {\bf create} statement is used to create and initialize a random number generator object. 
\item The arguments supplied are the name (of type {\bf string})  assigned to the random number generator, the mean value of the samples (of type {\bf double}), and the seed (of type {\bf long}, optional argument). 
\end{itemize}
\end{block}
\end{frame}

\begin{frame}[fragile]{Example Negative Exponential}
\begin{block}{}
The following lines declare and create a random number generator object, referenced by {\em ran\_gen2\/}, with title ``random time'' and {\em mtime\/} as the mean value.

{\small \tt
\begin{verbatim}
define ran_gen2 of class NegExp // random generator
...
create ran_gen2 of class NegExp using 
           ``random time'', mtime 
\end{verbatim}
}
\end{block}
\end{frame}  

\begin{frame}[fragile]{Generating Negative Exponential}
\begin{block}{}
the following lines generate a random number from the generator object {\em ran\_gen2\/} defined above, and stores the random number in variable {\em ran\_value}.

{\tt \small
\begin{verbatim}
define ran_value of type double
...
generate random value ran_value from ran_gen2 
\end{verbatim}
}
\end{block}
\end{frame}

\begin{frame}{Random Numbers with Normal Distribution}
The {\em Normal\/} random number generator provides random numbers  using a normal distribution. 

\begin{block}{Creating Normal Objects}
The {\bf create} statement is used to create and initialize a random number generator object. 
The arguments to be supplied are:
\begin{itemize}
\item the name (of type {\bf string}) to be assigned to the random number generator
\item the mean value of the samples (of type {\bf double})
\item the value of the standard deviation (of type {\bf double})
\item  the seed (of type {\bf long}, optional argument). 
\end{itemize}
\end{block}
\end{frame}

\begin{frame}[fragile]{Example with Normal Distribution}
the following lines  declare and create a random number generator object {\em norm\_gen\/} with title ``Service time'', mean of value 12.5 and standard deviation of value 2.3.

{\small \tt
\begin{verbatim}
 define norm_gen of class Normal
 ...
 create norm_gen of class Normal using 
       ``Service time'', 12.5, 2.3
\end{verbatim}
}
\end{frame}

\begin{frame}[fragile]{Generating Normal Random Numbers}

The following lines generate a random number from the generator object {\em norm\_gen\/} and stores the random number in variable {\em ran\_value}.

{\tt \small
\begin{verbatim}
define ran_value of type double
...
generate random value ran_value from norm_gen
\end{verbatim}
}
\end{frame}




\begin{frame}{Random Numbers with Triangular Distribution}
The {\em Triangular\/} random number generator provides random numbers  using a Triangular  distribution, which can be a good approximation to worok carried out by persons or machines. 

\begin{block}{Creating Triangular Objects}
The {\bf create} statement is used to create and initialize a random number generator object of class Triangular. 
The arguments to be supplied are:
\begin{itemize}
\item the name (of type {\bf string}) to be assigned to the random number generator
\item the minimum value of the samples (of type {\bf double})
\item the most likely value (of type {\bf double})
\item the maximum value of the samples (of type {\bf double})
\item  the seed (of type {\bf long}, optional argument). 
\end{itemize}
\end{block}
\end{frame}

\begin{frame}[fragile]{Example with Triangular Distribution}
The following lines  declare and create a random number generator object {\em triang\_gen\/} with title ``Service time'', minimum value 1.25, the most likely value of 1.75, and maximum value of 2.35.

{\small \tt
\begin{verbatim}
 define triang_gen of class Triangular
 ...
 create traing_gen of class Triangular using 
       ``Service time'', 1.25, 1,75, 2.35
\end{verbatim}
}
\end{frame}

\begin{frame}[fragile]{Generating Triangular Random Numbers}

The following lines generate a random number from the generator object {\em triang\_gen\/} and stores the random number in variable {\em ran\_value}.

{\tt \small
\begin{verbatim}
define ran_value of type double
...
generate random value ran_value from triang_gen
\end{verbatim}
}
\end{frame}


\begin{frame}{Random Numbers with Uniform Distribution}
The {\em Uniform\/} random number generator provides random numbers  using a Uniform  distribution.

\begin{block}{Creating Uniform Objects}
The {\bf create} statement is used to create and initialize a random number generator object of class Uniform. 
The arguments to be supplied are:
\begin{itemize}
\item the name (of type {\bf string}) to be assigned to the random number generator
\item the minimum value of the samples (of type {\bf double})
\item the maximum value of the samples (of type {\bf double})
\item  the seed (of type {\bf long}, optional argument). 
\end{itemize}
\end{block}
\end{frame}

\begin{frame}[fragile]{Example with Uniform Distribution}
The following lines  declare and create a random number generator object {\em unif\_gen\/} with title ``clean interval'', minimum value 1.25, and maximum value of 2.35.

{\small \tt
\begin{verbatim}
 define unif_gen of class Uniform
 ...
 create unif_gen of class Uniform using 
       ``clean interval'', 1.25, 2.35
\end{verbatim}
}
\end{frame}

\begin{frame}[fragile]{Generating Uniform Random Numbers}

The following lines generate a random number from the generator object {\em unif\_gen\/} and stores the random number in variable {\em cl\_value}.

{\tt \small
\begin{verbatim}
define cl_value of type double
...
generate random value cl_value from unif_gen
\end{verbatim}
}
\end{frame}

\end{document}

\section{General Structure of Single-Server Models}

\begin{frame}{Illustration of a Single Server System}
\begin{figure}
\centereps{3.5in}{1.22in}{tsserver.png}
\caption{Model of a single-server system}
\label{fig:tsserver}
%\vskip\baselineskip
\end{figure}
\end{frame}

\begin{frame}{Single Server System}
\begin{block}{}
In a model of a single-server\index{single-server} system, there is only one server process that provides service to the customer processes.
 \end{block}
\begin{block}{Components}

\begin{itemize}
  \item The arrival of customers, indicated with an arrow pointing to the tail of the queue
  \item The customers that arrive requesting service
  \item The customer queue, which is the waiting line for customers
  \item The server, which removes the next customer from the queue and services it
\end{itemize}
 \end{block}
\end{frame}

\begin{frame}{The Queue}

\begin{itemize}
  \item 
A queue\index{queue} is a data structure that represents a waiting line and has two ends, the {\em head\/} and the {\em tail}. 
\item
A queue is defined as a passive entity\index{passive entity}. 
\item
An arriving customer process  enters the queue at its tail. 
\item 
A customer can only leave the queue if it is at the head. 
\item The server removes the customer at the head of the queue then provides service to this customer.
\item
The order of arrival of customers is retained in a simple queue, which follows first-in-first-out (FIFO) ordering. 
\end{itemize}
\end{frame}

\begin{frame}{Illustration of a Queue}
\begin{figure}
\centereps{3.55in}{1.22in}{queue.png}
\caption{Model of a queue}
\label{fig:tqueue}
%\vskip\baselineskip
\end{figure}
\end{frame}









%\section{Our Results/Contribution}

%\subsection{Main Results}


%\subsection{Basic Ideas for Proofs/Implementation}



\section{Activity Diagrams}

\begin{frame}{Diagrams}

\begin{block}{}
These diagrams help describe the operations of the processes involved and the synchronization\index{synchronization} that is present when processes interact with each other.
\end{block}
\pause
\begin{block}{}
Car processes enter a queue and transition to the idle state. The machine process removes a car process from the queue to service it. All queues are passive objects and are different from the processes.

\end{block}
\end{frame}


\begin{frame}{Activity Symbols}
\begin{block}{}
The flow of control in the diagram is composed of a sequence of symbols that denote different type of activities and synchronization actions, all joined by lines and arrows. 
\end{block}
\begin{block}{}
A general activity is represented by a rectangular box; the label in the box is the name of the activity. This activity symbol is usually called a {\em delay} because a finite interval elapses  while the activity is carried out and before the process can proceed to the next activity.  The arrows show the direction of the flow activity sequence.
\end{block}
\end{frame}

\begin{frame}{Illustration of Activity Symbols}
\begin{figure}
\vspace{.1in}
\centereps{3.0in}{2.4in}{symbactd1.png}
\caption{Activity symbols}
\label{fig:sact1}
%\vskip\baselineskip
\end{figure}
\end{frame}


\begin{frame}{Activity Symbols}

\begin{block}{}
\begin{itemize}
  \item The lower semicircle with a bar below a
process name, indicates the start of a process life cycle. 
  \item The lower semicircle symbol also indicates reactivation of  the activity sequence; this symbol can also have an arrow in a non-vertical inclination that shows synchronization with another process.
  \item
The inverted form of this symbol indicates the termination of the process. 
  \item The upper semicircle indicates that the object enters its idle state
  \item a possible arrow in a non vertical inclination denotes the synchronization with another process.
\end{itemize}
\end{block}
\end{frame}


\begin{frame}{Interaction Symbols}
\begin{block}{}
\begin{itemize}
\item 
Process interaction symbols indicate signals and direct synchronization among processes. 
\item The {\em synchronization send} denotes when a signal is sent to a condition queue. 
\item This symbol can also denote an interrupt\index{interrupt} to another process.
\item This symbol can also be used to send an item to a queue. 
\item The {\em synchronization receive} indicates an item being received from a queue.
\end{itemize}
\end{block}
\end{frame}

\begin{frame}{Interaction Symbols (2)}
\begin{block}{}
\begin{itemize}
\item
The symbols for {\em cooperate} describe the effect of the cooperation among processes. 
\item The symbol for {\em schedule}\index{schedule} describe a process that schedules itself or another process after some time interval
\item This symbol can also denote the reactivation of another process.
\end{itemize}
\end{block}
\end{frame}


\begin{frame}{Illustrations of Interaction Symbols}
\begin{figure}
\centereps{3.0in}{2.93in}{symbactd2.png}
\caption{Process interaction symbols}
\label{fig:sact2}
%\vskip\baselineskip
\end{figure}
\end{frame}


\begin{frame}{Activity Diagram of the Carwash Model}
\begin{figure}
\centereps{2.0in}{2.8in}{cwactd.png}
\caption{Activity diagram of the Carwash model}
\label{fig:cwactd}
%\vskip\baselineskip
\end{figure}
\end{frame}


