Sunday, 25 May 2014

Teaching Monte Carlo Simulation


I also ran a one day course on Monte Carlo simulation based on David Vose’s book Risk Analysis: A Quantitative Guide .

Teaching Agent Based Modeling


Around the same time that I became interested in System Dynamics, I also started reading and studying Agent Based Modeling.

I ran a course on Agent Based Modelling based on a package of readings suggested in Robert Axelrod’s The Complexity of Cooperation: Agent-Based Models of Competition and Collaboration .

Teaching System Dynamics


I began teaching short courses on System Dynamics. 

The first System Dynamics course I taught was based on the MIT Road Maps that were developed by Jay Forrester and his team.  This was a four day course run over four weeks.

The second System Dynamics course I taught was based on John Sterman’s Business Dynamics: Systems Thinking and Modeling for a Complex World .  This was a reading course in which chapters were assigned to students to be presented to the rest of the class.  This was a much longer course as we covered each chapter of his extensive book.

The third System Dynamics course I taught was based on Craig Kirkwood's System Dynamics Modeling: A Quick Introduction online textbook.  This course was for three days.

All three of these courses, used the Vensim Personal Learning Edition software package.

System Dynamics


In 1996, I took a course on a simulation technique called System Dynamics from Jonathon Coyle of HVR Consulting of the UK (HVR Consulting was bought by QinetiQ in 2004).  Jonathon Coyle is the son of Geoff Coyle who wrote the book System Dynamics Modelling: A Practical Approach

HVR was subsequently hired by the Center for Operational Research's Joint Staff Team to conduct a study of the Joint Force Headquarters that was being set up in Kingston, Ontario.

HVR was hired again in 1999 by the Department of National Defence Program Manager for the Y2K Project to analyze the potential impact of the Y2K problem on Canadian Forces operational systems.

System Dynamics resonated with my ideas about computer simulation. 

I participated in a workshop by Jim Hines which turned into the National Capital System Dynamics Interest Group.  I also joined the System Dynamics Society.

In 2001, I started my management consulting company Policy Dynamics Inc. to support government policy making in Ottawa, Canada.

Friday, 23 May 2014

Units Consistency



After studying the results of my discrete event simulation of an airlift, I realized the results could be approximated using the average flying hours of the cargo aircraft.  I built a deterministic model of the time to complete an airlift using the concepts from physics called dimensional analysis. 

So the time to complete an airlift is equal to the total number of flying hours needed to transport the cargo to the destination divided by the average number of hours a cargo aircraft can fly per day divided by the number of aircraft in the fleet. 

That is,

days to complete the airlift = (total flying hours) / (flying hours/day/aircraft * aircraft)

The total flying hours needed to transport the cargo to the destination can be calculated as the total distance in nautical miles that needs to be traveled by the aircraft in the airlift divided the average speed of the cargo aircraft.

That is,

total flying hours required by the airlift =

(missions * nautical miles per mission round trip) / (nautical miles per hour)

This model demonstrated the importance of dimensional analysis as a tool for simulation.  I would later use a form of dimensional analysis called units consistency in my work in System Dynamics.

Discrete Event Simulation



I left the Directorate of Air Operational Research in 1988 and moved to Canadian Forces Base Trenton where I worked at the Air Transport Group Headquarters of the Canadian Air Force.  My first project there was to improve on the Operational Research team’s strategic airlift simulation.  I wrote a discrete event simulation using the Fortran version of Averill Law’s Simlib system from his book Simulation Modeling and Analysis .  This simulation calculated the time to complete an airlift for various departure intervals.  The departure interval is the time between departures of each transport aircraft.  It is important to space the departures reasonably far apart to allow the ground crews to load the aircraft at the origin and off-load the cargo at the destination.  I was asked to use this simulation model to estimate the time to complete the airlift of fighter aircraft support materials during the first Gulf War when the CF-18 was deployed to Qatar.  I presented this simulation at the 1990 Canadian Operational Research Society Conference in Vancouver.  My main finding using this simulation was that the time to complete the airlift was constrained by two bottlenecks when the departure interval is changed.  When the departure interval is too large, there are many aircraft waiting to fly which creates a longer duration.  When the departure interval is too small, there is a limit to how many aircraft are available to fly.  This means the duration of the airlift will be no shorter with a smaller departure interval.  There is a "sweet spot" when the departure interval is just right.  Then aircraft are both available and not waiting.  When these bottlenecks come into effect the results of the simulation can be approximated by straight lines and the "sweet spot" is where these two lines intersect.  This was a very interesting result that I found occurred many times in my future studies.  Namely, that system performance is dominated by bottlenecks and we wish to find an optimal place on the performance dimension where the bottlenecks are applied equally.

Systems of Differential Equations



The next simulation model that I studied was of the Air Land Battle using Lanchester differential equations.  The system of differential equations I developed was more complicated than the simple force-on-force model of the Land Battle.  My model involved three types of forces for each side: multi-role fighter aircraft, air defences and ground forces.  I began by solving the continuous large-scale model using differential equations with the Runge-Kutta method.  Then I developed a discrete small-scale model that I solved probabilistically using a Markov model.  In this work, I realized the parallels between the macro view of continuous models and the micro view of discrete models.  This became useful later when I was comparing System Dynamics models with Agent Based models.

Differential Games



In the Directorate of Air Operational Research, I also studied air-to-air operations by the CF-18.  I examined a dog fight between two or more fighter aircraft.  I used a differential equation model based on the book by Rufus Isaacs Differential Games: A Mathematical Theory with Applications to Warfare and Pursuit, Control and Optimization .  I solved the differential game using the Runge-Kutta method.  In this study, I built a simulation of many-on-one air combat.  I examined the relative merits of speed, evasive ability, fire power and number of aircraft on the potential outcome of the dog fight.  I found that the Runge-Kutta method to approximately solve a system of differential equations was very effective.

Monte Carlo Simulation



After finishing my Master’s degree, I moved to the Directorate of Air Operational Research where I studied CF-18 operations.  One of my first projects was to examine the need for Radar Warning Receivers when the CF-18 was conducting air-to-ground operations.  In this work, I developed an analytical model using differential calculus to examine how vulnerable the CF-18 was when flying over an air defence system.  To assist me in solving the differential calculus model, I used a Monte Carlo simulation.  In Monte Carlo simulation, one uses a large number of random numbers to approximate the solution to an analytical problem.  By using my Monte Carlo model, I was able to visualize and validate the results of my analytic calculations.  Over the years, I have found that using Monte Carlo simulation can be very useful for solving complex analytic problems approximately when it is difficult to solve the analytic problem exactly.

Operational Analysis



My second project using simulation I did when I worked in the Directorate of Logistics Analysis in the Centre for Operational Research and Analysis.  In this project, I looked at the editorial process for scientific reports using a technique developed by Peter Denning and Jeffrey Buzen called Operational Analysis of Queueing Network Models.  This was a data driven methodology that did not require the assumptions of exponential arrival and service times.  The primary tool it used was Little’s Law.  In the model that I developed, reports would enter the editorial process then pass through a network of queues before they exit the system as a finished product.  I collected data on the arrivals over a period of time, the service times at each editorial process and the routing of the reports through the system including return visits to the same process.  The model worked with overall averages of the data that I collected.  So it was like a fluid flow approximation.

Adaptive Routing Using Expected Time in Tandem Queues



My Masters thesis in Information and System Science was entitled “Adaptive Routing Using Expected Time in Tandem Queues”.  I used the C-Language Simlib software published by Averill Law in his book Simulation Modeling and Analysis .  The thesis was focused on delays in computer communications networks.  I modelled the computer networks using tandem queues as alternate routes through a network.  I examined if estimating the delays along the routes could be used to choose the fastest path from origin to destination through the network. Two methods of estimating the delays were examined: a discrete method using Markov Chain modelling and a continuous method using Fluid Flow approximations to queuing networks.  I found that the fluid flow approximation performed better than the Markov Chain method and required much less computation.  This started me on a long journey of computer simulation for the rest of my career.