Example 8: Obstacles

The use of obstacles for reducing the critical area is demonstrated in this example. The nominal critical area for the 3 m category is 140 \(\mathrm{m}^2\), and we want to see how much the critical area is reduced for an obstacle density of 800 houses per \(\mathrm{km}^2\).

The critical area of 140 \(\mathrm{m}^2\) is associated with the second column in the iGRC, which is for the 3 m wing span. Therefore, we set the width of the CA to 3.

CA_width = 3

Consequently, the length of the CA must be 140 divided by the width.

CA_length = 140/CA_width

We set the density to 800 houses per \(\mathrm{km}^2\), and convert to a density measure in obstacles per square meter.

houses_per_square_km = 800
obstacle_density = houses_per_square_km / 1e6

The size of the houses follows a 2D normal distribution for width and length. We set the mean values and standard deviations for width

obstacle_width_mu = 23
obstacle_width_sigma = 6

and for length

obstacle_length_mu = 9
obstacle_length_sigma = 2

We instantiate the Obstacles class. The third input argument is only used for simulation, which we don’t do here. So it is just set to zero.

We want to compute the probability for varying length of the critical area, so we generate an array from 0 to the length of the nominal CA. Since the resulting curve is quite smooth, it is not necessary to use all that many points. We have chosen 10 here, which is usually sufficient.

x_resolution = 10
x = np.linspace(0, CA_length, x_resolution)

The computations of the cumulatative density function there are three integrals that have to be evaluated. We must specify at what resolution this happens. A value of 25 is typically sufficient. Increasing it will not produce notiable different results.

pdf_resolution = 25

We now compute the CDF curve.

p_x, EX, beta_analytical, sanity_check = OS.cdf(x, obstacle_density, obstacle_width_mu, obstacle_width_sigma,
                                            obstacle_length_mu, obstacle_length_sigma, pdf_resolution)

The resulting curve is plotted.

../_images/example_8.png

The blue curve shows the probability of the CA being reduced to a given value or less. The curve noticable does not go to 100%, which may seem odd, since obviously the probability of the CA being less then 140 is 100%. This is because the graph in reality should go vertically up from the current ending point around 76% to 100%, but this jump is not implemented in the code. This is caused by the fact that a certain percentage of the crashes do not impact an obstacles, and thus stays at nominal CA size. This percentage in this case would be around 24%.