(* Content-type: application/mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 6.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       145,          7]
NotebookDataLength[     20364,        577]
NotebookOptionsPosition[     18176,        513]
NotebookOutlinePosition[     18595,        531]
CellTagsIndexPosition[     18552,        528]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[TextData[StyleBox["2301520 Fundamental of AMCS\nSimulation",
 FontWeight->"Bold",
 FontColor->RGBColor[0, 0, 1]]], "Title",
 CellChangeTimes->{{3.51415193884375*^9, 3.514151941796875*^9}, {
   3.546811806796875*^9, 3.5468118124375*^9}, {3.576900100234375*^9, 
   3.576900105296875*^9}, {3.6131251928536477`*^9, 3.6131251998852663`*^9}, 
   3.6131262729460135`*^9, {3.644665273697053*^9, 3.6446652763353796`*^9}, {
   3.676002861312434*^9, 3.676002873795472*^9}, 3.7409988232661543`*^9},
 TextAlignment->Center],

Cell[CellGroupData[{

Cell["Simulation", "Section",
 CellChangeTimes->{{3.6767265393723297`*^9, 3.6767265675160203`*^9}, {
  3.740998801618332*^9, 3.7409988046317225`*^9}}],

Cell["\<\
Simulation is a tool to help us making a decision. It has been used for \
simulating a complex system by mimicking an uncertain system with random \
variables of our defined distribution.\
\>", "DisplayText",
 CellChangeTimes->{{3.6770760391711044`*^9, 3.6770761946144943`*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"pdist", "=", " ", 
   RowBox[{"PoissonDistribution", "[", "20", "]"}]}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{"plot1", "=", 
  RowBox[{"ListPlot", "[", 
   RowBox[{
    RowBox[{"Table", "[", 
     RowBox[{
      RowBox[{"PDF", "[", 
       RowBox[{"pdist", ",", "x"}], "]"}], ",", " ", 
      RowBox[{"{", 
       RowBox[{"x", ",", "0", ",", "50"}], "}"}]}], "]"}], ",", " ", 
    RowBox[{"Joined", "\[Rule]", " ", "True"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.5769000405625*^9, 3.576900063609375*^9}}],

Cell[BoxData[
 RowBox[{"data1", "=", 
  RowBox[{"RandomInteger", "[", 
   RowBox[{"pdist", ",", "1000"}], "]"}]}]], "Input",
 CellChangeTimes->{{3.514151686171875*^9, 3.514151687609375*^9}}],

Cell[BoxData[
 RowBox[{"(*", 
  RowBox[{
   RowBox[{"<<", "\"\<Histograms`\>\""}], ";"}], " ", "*)"}]], "Input",
 CellChangeTimes->{{3.5141564101875*^9, 3.514156413703125*^9}, {
  3.576899661296875*^9, 3.576899664390625*^9}}],

Cell[BoxData[
 RowBox[{"plot2", " ", "=", " ", 
  RowBox[{"Histogram", "[", 
   RowBox[{"data1", ",", " ", 
    StyleBox[
     RowBox[{
      StyleBox["HistogramScale", "MR"], " ", "->", " ", "1"}],
     GridBoxOptions->{
     GridBoxDividers->{
      "Columns" -> {{False}}, "ColumnsIndexed" -> {}, 
       "Rows" -> {False, True, {False}, False}, "RowsIndexed" -> {}},
     GridBoxSpacings->{"Columns" -> {
         Offset[0.27999999999999997`], {
          Offset[0.5599999999999999]}, 
         Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> {
         Offset[0.2], {
          Offset[0.16]}, 
         Offset[0.2]}, "RowsIndexed" -> {}}}]}], "]"}], " ", 
  RowBox[{"(*", " ", 
   RowBox[{"Pre", "-", 
    RowBox[{"Version", " ", "8"}]}], "*)"}]}]], "Input",
 CellChangeTimes->{{3.576899668*^9, 3.576899676890625*^9}, 
   3.576899901171875*^9, 3.576900124359375*^9}],

Cell[BoxData[
 RowBox[{"plot2", " ", "=", " ", 
  RowBox[{"Histogram", "[", 
   RowBox[{"data1", ",", " ", 
    RowBox[{"{", "1", "}"}], ",", " ", "\"\<PDF\>\""}], "]"}], " ", 
  RowBox[{"(*", " ", 
   RowBox[{"Version", " ", "8"}], " ", "*)"}]}]], "Input",
 CellChangeTimes->{
  3.57689968921875*^9, {3.576899860125*^9, 3.576899861*^9}, {3.5768998955*^9, 
   3.57689989603125*^9}, {3.57690002121875*^9, 3.576900029875*^9}}],

Cell[BoxData[
 RowBox[{"Show", "[", 
  RowBox[{"plot2", ",", " ", "plot1"}], "]"}]], "Input"],

Cell["\<\
Example 1
Assume that the number of customers coming to a shop for each one-minute \
interval folows a Poisson distribution with a mean of 15. Simulate the number \
of customers coming from the first minute until the 30th minute. \
\>", "DisplayText",
 CellChangeTimes->{{3.576901578390625*^9, 3.57690157934375*^9}, {
  3.57690187365625*^9, 3.576901891703125*^9}, {3.576902222921875*^9, 
  3.576902231625*^9}, {3.677076202970314*^9, 3.67707641236287*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"pdist2", "=", " ", 
   RowBox[{"PoissonDistribution", "[", "15", "]"}]}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{"simdat2", "=", 
  RowBox[{"RandomInteger", "[", 
   RowBox[{"pdist2", ",", "30"}], "]"}]}]], "Input",
 CellChangeTimes->{{3.51415173753125*^9, 3.51415176234375*^9}}],

Cell["\<\
Example 2
At a bank, let x_i be an interarrival time between customer i and custumer \
i+1. x_i follows an exponential distribution with an average at three \
minutes. Simulate the interarrival time of the first customer until the 30th \
custumer.\
\>", "DisplayText",
 CellChangeTimes->{{3.576901578390625*^9, 3.57690157934375*^9}, {
   3.57690187365625*^9, 3.576901891703125*^9}, 3.5769022078125*^9, {
   3.57690227309375*^9, 3.576902454625*^9}, {3.576902553*^9, 
   3.576902685140625*^9}, {3.57690427625*^9, 3.57690428159375*^9}, {
   3.6770764173812723`*^9, 3.6770764408403034`*^9}, {3.677076501630068*^9, 
   3.677076652598542*^9}, {3.6770766866658306`*^9, 3.677076750056828*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"edist2", "=", " ", 
   RowBox[{"ExponentialDistribution", "[", 
    RowBox[{"1", "/", "3"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.576902465203125*^9, 3.5769024975*^9}}],

Cell[BoxData[
 RowBox[{"interarrivaltimes", "=", 
  RowBox[{"RandomReal", "[", 
   RowBox[{"edist2", ",", "30"}], "]"}]}]], "Input",
 CellChangeTimes->{{3.576902511421875*^9, 3.57690251478125*^9}, {
   3.576903413765625*^9, 3.576903419109375*^9}, 3.576903783265625*^9, {
   3.57690406778125*^9, 3.5769040679375*^9}, {3.57690417634375*^9, 
   3.57690417653125*^9}, 3.576904221015625*^9}],

Cell["\<\
Assume that this bank had only one counter service and the service time for \
each customer took X minutes. If X has an exponential distribution with an \
average 2 minutes, simulate the service times of the first customer until the \
30th custumer. \
\>", "DisplayText",
 CellChangeTimes->{{3.576901578390625*^9, 3.576901594796875*^9}, {
  3.57690163940625*^9, 3.5769019801875*^9}, {3.576902900375*^9, 
  3.5769029165625*^9}, {3.576904285765625*^9, 3.57690428934375*^9}, {
  3.6770767652994733`*^9, 3.677077004694584*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"edist3", "=", " ", 
   RowBox[{"ExponentialDistribution", "[", 
    RowBox[{"1", "/", "2"}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.576901997375*^9, 3.57690200840625*^9}, {
  3.57690205196875*^9, 3.576902071890625*^9}, {3.576902466703125*^9, 
  3.576902487953125*^9}}],

Cell[BoxData[
 RowBox[{"servicetimes", "=", 
  RowBox[{"RandomReal", "[", 
   RowBox[{"edist3", ",", "30"}], "]"}]}]], "Input",
 CellChangeTimes->{{3.576902093890625*^9, 3.576902105296875*^9}, 
   3.576902491015625*^9, {3.576903403828125*^9, 3.576903422359375*^9}, 
   3.576903792546875*^9, {3.57690407190625*^9, 3.5769040720625*^9}, {
   3.576904181828125*^9, 3.576904182015625*^9}, 3.57690422734375*^9}],

Cell["\<\
Assume that the first customer came at minute 0 and there was no any customer \
at the counter service. When a customer came and found that there was another \
customer at the counter service, he/she need to be queued. Simulate the \
waiting time of each customer in a queue before getting a service and \
simulate the departure time of each customer. \
\>", "DisplayText",
 CellChangeTimes->{{3.576901578390625*^9, 3.576901594796875*^9}, {
  3.57690163940625*^9, 3.5769019801875*^9}, {3.57690304415625*^9, 
  3.57690310975*^9}, {3.5769031448125*^9, 3.5769031575*^9}, {
  3.57690459809375*^9, 3.576904637359375*^9}, {3.677077009645014*^9, 
  3.6770770716043386`*^9}, {3.6770771025847607`*^9, 3.6770773313895836`*^9}}],

Cell["\<\
Method 1: Simulate the problem with a recursive function (take a long time to \
compute if simulating such a high number of custumers)\
\>", "DisplayText",
 CellChangeTimes->{{3.576901578390625*^9, 3.576901594796875*^9}, {
  3.57690163940625*^9, 3.5769019801875*^9}, {3.57690304415625*^9, 
  3.57690310975*^9}, {3.5769031448125*^9, 3.5769031575*^9}, {
  3.57690459809375*^9, 3.576904637359375*^9}, {3.5769048389375*^9, 
  3.576904855484375*^9}, {3.576905167328125*^9, 3.576905169609375*^9}, {
  3.5769053573125*^9, 3.576905419375*^9}, {3.5769061079375*^9, 
  3.576906133234375*^9}, {3.6770773529750614`*^9, 3.677077496197265*^9}, {
  3.6770775277802677`*^9, 3.6770775294631667`*^9}, {3.6770775615611444`*^9, 
  3.6770775643619432`*^9}, {3.677077610093403*^9, 3.677077612914405*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"ArrivalTime", "[", "1", "]"}], "=", "0"}], ";", 
  RowBox[{
   RowBox[{"WaitingTime", "[", "1", "]"}], "=", "0"}], ";"}]], "Input",
 CellChangeTimes->{{3.57690316503125*^9, 3.576903183640625*^9}, {
  3.576903248515625*^9, 3.576903297953125*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"DepartureTime", "[", "i_", "]"}], ":=", 
   RowBox[{
    RowBox[{"ArrivalTime", "[", "i", "]"}], "+", 
    RowBox[{"WaitingTime", "[", "i", "]"}], "+", 
    RowBox[{"servicetimes", "[", 
     RowBox[{"[", "i", "]"}], "]"}]}]}], ";"}]], "Input",
 CellChangeTimes->{{3.576903334453125*^9, 3.576903395484375*^9}, {
  3.576903437875*^9, 3.576903444375*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"ArrivalTime", "[", "i_", "]"}], ":=", 
   RowBox[{
    RowBox[{"ArrivalTime", "[", 
     RowBox[{"i", "-", "1"}], "]"}], "+", 
    RowBox[{"interarrivaltimes", "[", 
     RowBox[{"[", 
      RowBox[{"i", "-", "1"}], "]"}], "]"}]}]}], ";"}]], "Input",
 CellChangeTimes->{{3.57690345821875*^9, 3.576903639984375*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"WaitingTime", "[", "i_", "]"}], ":=", " ", 
   RowBox[{"If", "[", 
    RowBox[{
     RowBox[{
      RowBox[{"DepartureTime", "[", 
       RowBox[{"i", "-", "1"}], "]"}], "<", 
      RowBox[{"ArrivalTime", "[", "i", "]"}]}], ",", "0", ",", " ", 
     RowBox[{
      RowBox[{"DepartureTime", "[", 
       RowBox[{"i", "-", "1"}], "]"}], "-", 
      RowBox[{"ArrivalTime", "[", "i", "]"}]}]}], "]"}]}], ";"}]], "Input"],

Cell[BoxData[
 RowBox[{"DepartureTime", "[", "2", "]"}]], "Input",
 CellChangeTimes->{{3.57690627015625*^9, 3.576906271625*^9}}],

Cell[BoxData[
 RowBox[{"departuretimes", "=", 
  RowBox[{"Table", "[", 
   RowBox[{
    RowBox[{"DepartureTime", "[", "i", "]"}], ",", 
    RowBox[{"{", 
     RowBox[{"i", ",", "30"}], "}"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.57690401303125*^9, 3.576904025078125*^9}, {
   3.576904078328125*^9, 3.576904078515625*^9}, {3.5769041876875*^9, 
   3.576904187890625*^9}, 3.576904234921875*^9}],

Cell[BoxData[
 RowBox[{"WaitingTime", "[", "2", "]"}]], "Input",
 CellChangeTimes->{3.576906291171875*^9}],

Cell[BoxData[
 RowBox[{"waitingtimes", "=", 
  RowBox[{"Table", "[", 
   RowBox[{
    RowBox[{"WaitingTime", "[", "i", "]"}], ",", 
    RowBox[{"{", 
     RowBox[{"i", ",", "30"}], "}"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.576903672125*^9, 3.5769036969375*^9}, 
   3.576903804078125*^9, {3.576903862671875*^9, 3.57690386790625*^9}, 
   3.57690412809375*^9, 3.576904249578125*^9}],

Cell[BoxData[
 RowBox[{"Mean", "[", "%", "]"}]], "Input",
 CellChangeTimes->{{3.576903954046875*^9, 3.576903957109375*^9}}],

Cell[TextData[{
 "Method 2: Simulate the proble with for-loop and array\n\n",
 Cell[BoxData[
  RowBox[{
   ButtonBox["For",
    BaseStyle->"Link",
    ButtonData->"paclet:ref/For"], "[", 
   RowBox[{
    StyleBox["start", "TI"], ",", 
    StyleBox["test", "TI"], ",", 
    StyleBox["incr", "TI"], ",", 
    StyleBox["body", "TI"]}], "]"}]], "InlineFormula"],
 "  executes ",
 Cell[BoxData[
  StyleBox["start", "TI"]], "InlineFormula"],
 ", then repeatedly evaluates ",
 Cell[BoxData[
  StyleBox["body", "TI"]], "InlineFormula"],
 " and ",
 Cell[BoxData[
  StyleBox["incr", "TI"]], "InlineFormula"],
 " until ",
 Cell[BoxData[
  StyleBox["test", "TI"]], "InlineFormula"],
 " fails to give ",
 Cell[BoxData[
  ButtonBox["True",
   BaseStyle->"Link",
   ButtonData->"paclet:ref/True"]], "InlineFormula"]
}], "DisplayText",
 CellChangeTimes->{{3.576901578390625*^9, 3.576901594796875*^9}, {
  3.57690163940625*^9, 3.5769019801875*^9}, {3.57690304415625*^9, 
  3.57690310975*^9}, {3.5769031448125*^9, 3.5769031575*^9}, {
  3.57690459809375*^9, 3.576904637359375*^9}, {3.5769048389375*^9, 
  3.576904855484375*^9}, {3.576905167328125*^9, 3.576905169609375*^9}, {
  3.576905388109375*^9, 3.576905391046875*^9}, {3.576905807171875*^9, 
  3.576905855515625*^9}, {3.6770775692495484`*^9, 3.677077607574809*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"arrivaltimes", "=", 
   RowBox[{"Table", "[", 
    RowBox[{"0", ",", 
     RowBox[{"{", 
      RowBox[{"i", ",", "30"}], "}"}]}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.5769047113125*^9, 3.576904745296875*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"For", "[", 
   RowBox[{
    RowBox[{"i", "=", "2"}], ",", 
    RowBox[{"i", "\[LessEqual]", " ", "30"}], ",", 
    RowBox[{"i", "++"}], ",", 
    RowBox[{
     RowBox[{"arrivaltimes", "[", 
      RowBox[{"[", "i", "]"}], "]"}], "=", 
     RowBox[{
      RowBox[{"arrivaltimes", "[", 
       RowBox[{"[", 
        RowBox[{"i", "-", "1"}], "]"}], "]"}], "+", 
      RowBox[{"interarrivaltimes", "[", 
       RowBox[{"[", 
        RowBox[{"i", "-", "1"}], "]"}], "]"}]}]}]}], "]"}], ";"}]], "Input",
 CellChangeTimes->{{3.576905893203125*^9, 3.576905961421875*^9}}],

Cell[BoxData["arrivaltimes"], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"departuretimes", "=", 
   RowBox[{"Table", "[", 
    RowBox[{"0", ",", 
     RowBox[{"{", 
      RowBox[{"i", ",", "30"}], "}"}]}], "]"}]}], ";", " ", 
  RowBox[{"waitingtimes", "=", 
   RowBox[{"Table", "[", 
    RowBox[{"0", ",", 
     RowBox[{"{", 
      RowBox[{"i", ",", "30"}], "}"}]}], "]"}]}], ";"}]], "Input",
 CellChangeTimes->{{3.57690492003125*^9, 3.576904941125*^9}, {3.576905046*^9, 
  3.57690505325*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"For", "[", 
   RowBox[{
    RowBox[{"i", "=", "2"}], ",", 
    RowBox[{"i", "\[LessEqual]", " ", "30"}], ",", 
    RowBox[{"i", "++"}], ",", 
    RowBox[{"(", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{
       RowBox[{"departuretimes", "[", 
        RowBox[{"[", 
         RowBox[{"i", "-", "1"}], "]"}], "]"}], "=", 
       RowBox[{
        RowBox[{"arrivaltimes", "[", 
         RowBox[{"[", 
          RowBox[{"i", "-", "1"}], "]"}], "]"}], "+", 
        RowBox[{"waitingtimes", "[", 
         RowBox[{"[", 
          RowBox[{"i", "-", "1"}], "]"}], "]"}], "+", 
        RowBox[{"servicetimes", "[", 
         RowBox[{"[", 
          RowBox[{"i", "-", "1"}], "]"}], "]"}]}]}], ";", 
      "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{"waitingtimes", "[", 
        RowBox[{"[", "i", "]"}], "]"}], "=", 
       RowBox[{"If", "[", 
        RowBox[{
         RowBox[{
          RowBox[{"departuretimes", "[", 
           RowBox[{"[", 
            RowBox[{"i", "-", "1"}], "]"}], "]"}], "<", 
          RowBox[{"arrivaltimes", "[", 
           RowBox[{"[", "i", "]"}], "]"}]}], ",", " ", "0", ",", " ", 
         RowBox[{
          RowBox[{"departuretimes", "[", 
           RowBox[{"[", 
            RowBox[{"i", "-", "1"}], "]"}], "]"}], "-", " ", 
          RowBox[{"arrivaltimes", "[", 
           RowBox[{"[", "i", "]"}], "]"}]}]}], "]"}]}], ";"}], 
     "\[IndentingNewLine]", ")"}]}], "]"}], ";"}]], "Input",
 CellChangeTimes->{{3.5769049451875*^9, 3.5769050306875*^9}, {
   3.576905064640625*^9, 3.576905187296875*^9}, {3.57690522396875*^9, 
   3.5769052675*^9}, 3.57690531396875*^9, {3.576906012296875*^9, 
   3.576906022109375*^9}}],

Cell[BoxData["waitingtimes"], "Input"],

Cell[BoxData[
 RowBox[{"Mean", "[", "%", "]"}]], "Input"],

Cell[BoxData["departuretimes"], "Input"],

Cell["\<\
Example 2
Simulate the event of  drawing one ball out of a box 10 times with \
replacement if there were 10 balls in the box (5 blue balls and 5 white \
balls) and each ball in each color has a letter on it from A to E.\
\>", "DisplayText",
 CellChangeTimes->{{3.576901581390625*^9, 3.576901581921875*^9}, {
  3.6770776321727777`*^9, 3.677077737742561*^9}, {3.6770778834702897`*^9, 
  3.6770778847023797`*^9}, {3.6770780232678113`*^9, 3.677078131911701*^9}}],

Cell[BoxData[
 RowBox[{"colors", "=", 
  RowBox[{"{", 
   RowBox[{"\"\<Blue\>\"", ",", " ", "\"\<White\>\""}], "}"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"labels", "=", 
  RowBox[{"Characters", "[", "\"\<ABCDE\>\"", "]"}]}]], "Input"],

Cell[BoxData[
 RowBox[{"simdat", "=", 
  RowBox[{"Table", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
      RowBox[{"colors", "[", 
       RowBox[{"[", 
        RowBox[{"RandomInteger", "[", 
         RowBox[{"{", 
          RowBox[{"1", ",", "2"}], "}"}], "]"}], "]"}], "]"}], ",", 
      RowBox[{"labels", "[", 
       RowBox[{"[", 
        RowBox[{"RandomInteger", "[", 
         RowBox[{"{", 
          RowBox[{"1", ",", "5"}], "}"}], "]"}], "]"}], "]"}]}], "}"}], ",", 
    RowBox[{"{", "100", "}"}]}], "]"}]}]], "Input",
 CellChangeTimes->{{3.576900194890625*^9, 3.576900243375*^9}}],

Cell[BoxData[
 RowBox[{
  RowBox[{"Count", "[", 
   RowBox[{"simdat", ",", 
    RowBox[{"{", 
     RowBox[{"_", ",", "\"\<B\>\""}], "}"}]}], "]"}], " "}]], "Input"],

Cell[BoxData[
 RowBox[{"Count", "[", 
  RowBox[{"simdat", ",", " ", 
   RowBox[{"{", 
    RowBox[{"\"\<White\>\"", ",", "\"\<A\>\""}], "}"}]}], "]"}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{"Select", "[", 
   RowBox[{"simdat", ",", 
    RowBox[{
     RowBox[{"MatchQ", "[", 
      RowBox[{"#", ",", 
       RowBox[{"{", 
        RowBox[{"\"\<Blue\>\"", ",", "_"}], "}"}]}], "]"}], "&"}]}], "]"}], 
  " "}]], "Input"],

Cell[BoxData[
 RowBox[{
  RowBox[{
   RowBox[{"If", "[", 
    RowBox[{
     RowBox[{"MatchQ", "[", 
      RowBox[{"#", ",", 
       RowBox[{"{", 
        RowBox[{"\"\<White\>\"", ",", "\"\<A\>\""}], "}"}]}], "]"}], ",", "1",
      ",", "0"}], "]"}], "&"}], "/@", "simdat"}]], "Input"]
}, Open  ]]
},
ScreenStyleEnvironment->"Working",
WindowSize->{1350, 729},
WindowMargins->{{-37, Automatic}, {Automatic, 1}},
ShowSelection->True,
Magnification->1.25,
FrontEndVersion->"9.0 for Microsoft Windows (64-bit) (January 25, 2013)",
StyleDefinitions->"Demo.nb"
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{}
*)
(*CellTagsIndex
CellTagsIndex->{}
*)
(*NotebookFileOutline
Notebook[{
Cell[545, 20, 515, 8, 122, "Title"],
Cell[CellGroupData[{
Cell[1085, 32, 150, 2, 92, "Section"],
Cell[1238, 36, 288, 5, 79, "DisplayText"],
Cell[1529, 43, 124, 3, 37, "Input"],
Cell[1656, 48, 422, 11, 37, "Input"],
Cell[2081, 61, 190, 4, 37, "Input"],
Cell[2274, 67, 225, 5, 37, "Input"],
Cell[2502, 74, 888, 22, 37, "Input"],
Cell[3393, 98, 424, 9, 37, "Input"],
Cell[3820, 109, 93, 2, 37, "Input"],
Cell[3916, 113, 465, 8, 100, "DisplayText"],
Cell[4384, 123, 125, 3, 37, "Input"],
Cell[4512, 128, 189, 4, 37, "Input"],
Cell[4704, 134, 695, 12, 100, "DisplayText"],
Cell[5402, 148, 214, 5, 37, "Input"],
Cell[5619, 155, 386, 7, 37, "Input"],
Cell[6008, 164, 533, 9, 79, "DisplayText"],
Cell[6544, 175, 312, 7, 37, "Input"],
Cell[6859, 184, 405, 7, 37, "Input"],
Cell[7267, 193, 727, 11, 94, "DisplayText"],
Cell[7997, 206, 792, 12, 64, "DisplayText"],
Cell[8792, 220, 292, 7, 37, "Input"],
Cell[9087, 229, 400, 10, 37, "Input"],
Cell[9490, 241, 362, 10, 37, "Input"],
Cell[9855, 253, 463, 13, 37, "Input"],
Cell[10321, 268, 128, 2, 37, "Input"],
Cell[10452, 272, 397, 9, 37, "Input"],
Cell[10852, 283, 106, 2, 37, "Input"],
Cell[10961, 287, 387, 9, 37, "Input"],
Cell[11351, 298, 123, 2, 37, "Input"],
Cell[11477, 302, 1301, 36, 108, "DisplayText"],
Cell[12781, 340, 254, 7, 37, "Input"],
Cell[13038, 349, 597, 17, 37, "Input"],
Cell[13638, 368, 38, 0, 37, "Input"],
Cell[13679, 370, 454, 13, 37, "Input"],
Cell[14136, 385, 1693, 45, 104, "Input"],
Cell[15832, 432, 38, 0, 37, "Input"],
Cell[15873, 434, 57, 1, 37, "Input"],
Cell[15933, 437, 40, 0, 37, "Input"],
Cell[15976, 439, 468, 8, 100, "DisplayText"],
Cell[16447, 449, 129, 3, 37, "Input"],
Cell[16579, 454, 103, 2, 37, "Input"],
Cell[16685, 458, 595, 17, 37, "Input"],
Cell[17283, 477, 164, 5, 37, "Input"],
Cell[17450, 484, 160, 4, 37, "Input"],
Cell[17613, 490, 260, 9, 37, "Input"],
Cell[17876, 501, 284, 9, 37, "Input"]
}, Open  ]]
}
]
*)