Flight Boarding

DESCRIPTION

We have all boarded flights and have almost always boarded by zones. Ever wondered how much time can be saved by boarding by zones as opposed to boarding arbitrary? What if planes boarded from window to aisle as opposed to from back to front?

We compare three policies:

(1) Boarding in sorted order

(2) Boarding in random order

(3) Boarding in reverse sorted order

Do you think you can extend the simulation to analyze boarding time of a window-to-aisle boarding policy? How do you think that would perform relative to these three?

** Help **

sample(outcomes, probabilities)

Sample an outcome from the outcomes array based on the corresponding probabilities in the probabilities array.

average(values)

Returns the average of the values in the array. It can be handy to store the values of metrics from each simulation run and average it across all runs to obtain an estimate of the metric.

error_average(values)

Returns the estimated error (1.96 x standard error) of the average of the values at 95% confidence. In simple terms, you can assume that the estimate average(values) has error bounds +/- error_average(values). It can be handy to store the values of metrics from each simulation run and estimate both the average and the error of the average across all runs.

stdev(values)

Returns the standard deviation of the values in the passed in array.

radiobutton(name, options)

Creates a radio button parameter with name and have each option in the options array selectable. Returns the selected option.

textbox(name, default_value)

Create a textbox parameter with name and a required default value. Returns the value of the textbox.

scatter_graph(data, xlabel, ylabel)

Create a graph based on a data array and plot (data.xlabel, data.ylabel) on it. Can also pass xmin=null, xmax=null, ymin=null, ymax=null as added arguments.

stop_simulation()

Calling this function, stops the simulation.