Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

IEN310: MATLAB Assignment #1 IEN 310: MATLAB Assignment #2 Due: Friday, April 30th Simulation Modeling with Continuous Random Variables Simulation Simulation is a method that is often used when...

1 answer below »
IEN310: MATLAB Assignment #1
IEN 310: MATLAB Assignment #2
Due: Friday, April 30th
Simulation Modeling with Continuous Random Variables
Simulation
Simulation is a method that is often used when scientific experiments are too costly, too difficult, or impossible to perform. It is also used when closed form mathematical solutions are too difficult or infeasible to obtain.
When the probability distribution of the data that would be generated by the experiment is approximately known, computer-generated random numbers from the appropriate distribution can be used in place of actual experimental data. Such computer-generated numbers are called simulated or synthetic data. A common use of simulation is to estimate the probability of events that are too difficult or impossible to calculate directly, and to estimate the mean and variance of probability distributions of such events.
Background to the Problem
This assignment will use simulation to determine if there is sufficient time for workers to perform a maintenance operation.
Surface railway transport is very common. Each day millions of vehicles cross over railroad tracks that are responsible for the transport of huge volumes of freight and passengers over long distances. To alert the drivers of these vehicles as well as pedestrians when trains are approaching, many railroad crossings are equipped with warning devices.
A typical crossing is equipped with three such devices: sets of red flasher lights, bells, and gates. Maintenance of this equipment and emergency response is closely monitored and regulated by the Federal Railway Administration (FRA) to ensure safety to people and non-disruption to the economy.
The FRA is required to have round-the-clock coverage of signal maintainers who are available to respond in case of emergencies. These emergencies are categorized into three types:
1. Activation Failures: These failures occur when the warning devices do not activate in response to a train approaching the proximities of a crossing.
2. False Activations: These take place when the warning devices activate without the actual presence of a train in the circuit.
3. Partial Activation: This happens when only part of the equipment provides the required warning in response to a train.
This assignment concerns the maintenance activity associated with an Activation Failure. Specifically, you will be asked to determine the likelihood of there being sufficient time to perform a maintenance operation at a railroad crossing.
Because some sections of the railroads are busier than others—in fact, some te
itories may have over 100 trains per day—it becomes a challenge to squeeze in an inspection or maintenance operation (e.g., checks, repairs) between train a
ivals. It is usually the responsibility of the train dispatcher, who is in a centralized dispatching center many miles away, to make requests for repairs at a track. To do this, the dispatcher must contact and dispatch workers to that site.
In this assignment, we will assume that such a request for repair is made for a particular site just after a train has left that site. Therefore, the time-window for repair, which is the term commonly used in this industry, is the time until the next train a
ives to that site.
Assignment Objectives
· To build a simulation program that will allow an analyst to make an informed prediction about the likelihood that there will be enough time for a worker to make a needed repair at a railroad crossing before the next train a
ives.
· To generate values of random variables from different families of continuous probability models.
· To define a random variable that is the sum of different random variables; to derive basic statistical measures and generate a histogram plot for this variable; and to generate a cumulative probability distribution plot for this variable.
Problem Details
In this assignment, we will make certain assumptions in order to examine the probability that there will be enough time for a maintenance worker to perform repairs on a signal crossing before the next train a
ives on that track.
· Assume that for a particular signal crossing, the time between a
ivals of the next train is a Gaussian (normal) random variable X with µ = 48 minutes and σ = 8 minutes.
Next, we will assume that the total time associated with the repair operation consists of the following time interval components:
· The time for a repair person to receive, notice, and possibly discuss the emergency problem. This information can come from a dispatcher or from a computer. This time will be modeled by a random variable T1 that is defined as T1 = g(X) = 8X, where X has a triangular distribution as in Example 3 of the Chapter 6 Lecture Notes (fX(x) = 2x, 0 ≤ x ≤ 1; 0 otherwise).
· The time for the repair person to a
ive to the location. This time will be modeled by a random variable T2 that is Gaussian, with parameters µ = 18 minutes, σ = 5 minutes.
· The time to perform the troubleshooting (i.e., problem diagnosis) operation for the activation failure. This will be modeled by an exponential random variable, T3, with parameter λ = .06 minutes.
· The time to perform the repair (replace parts, etc.). This time will be modeled by a random variable T4 that is uniform with parameters a = 4 minutes and b = 7 minutes.
Procedure
You should only need one MATLAB script program for this assignment, which should be called Assignment2_lastname.m. Remember to document your MATLAB code.
1. Generate 1000 random values of X. Use the randn function, which generates random values from the Z distribution (i.e., the standardized Gaussian), and adjust each outcome so that it has a Gaussian distribution with µ = 48 (minutes) and σ = 8 (minutes). In using a Gaussian model, the possibility exists of generating some small negative values (because a true Gaussian distribution extends from negative to positive infinity). Therefore, in your code, “truncate” the values generated by ensuring that any negative values are set to zero.
2. Generate 1000 values of T2, using the same approach as used to generate X, and applying the same truncation rule.
3. Generate 1000 values of T3, using the approach from page 68 of the Lecture Notes (see Example 6, Chapter 6) where λ = .06 (minutes).
4. Generate 1000 values of T4 by using the rand function to derive a uniform distribution with endpoints of 4 and 7.
5. Generate 1000 values of T1. First, you will need to perform some hand calculations to derive a mathematical expression that you can then code into your MATLAB program. The steps are as follows:
a) Derive the PDF for T1, using the Theorem 6.2 Addendum formula on page 66 of the Lecture Notes.
) Derive the CDF of T1.
c) Following the procedure related to Example 6 in Chapter 6 of the Lecture Notes, you need to equate u, which is equal to rand(1), to this CDF.
d) Solve for T1 in your MATLAB code.
6. Define the random variable Y = T1 + T2 + T3 + T4.
7. Determine the probability that the total time associated with the repair operation, Y, is greater than the time between train a
ivals, X, i.e., P[Y > X], based on the 1000 simulated values for these two random variables.
8. Compute the minimum, maximum, mean, and standard deviation of Y using the min, max, mean, and std MATLAB functions. Make sure these values can be read off the screen (i.e., don’t suppress their display in the code).
9. Define an a
ay that will be incremented in units of one minute. Define an a
ay that computes the cumulative frequency of total repair times (Y) which are less than or equal to the time in minutes specified by the minutes a
ay. Define an a
ay that computes the cumulative probability of getting a repair time that is less than or equal to the time specified in the minutes a
ay.
10. Plot the cumulative probability distribution (CDF) of Y and plot this (simulated) CDF. From this plot, one should be able to estimate P[Y ≤ y], the probability that the total service time duration is less than or equal to some time period y (in minutes). Refe
ing to the step above, to obtain this CDF you will need to determine the number of repair times that fall into each 1-minute interval, and let the percentage of these repair times represent the estimated probability of Y being in that interval. A key to being able to generate the data for this plot is to determine how many 1-minute intervals you will need. Make sure you insert axes labels and a title.
11. Plot a histogram for Y using a 3-minute interval as the x-axis interval. On the histogram plot, create a text box within which you should specify the minimum, maximum, mean, and standard deviation of Y, as well as P[Y > X]. Also, insert axes labels and a title.
PAGE
4

IEN310: MATLAB Assignment #1
IEN 310: MATLAB Assignment #2
Due: Friday, April 30th
Simulation Modeling with Continuous Random Variables
Simulation
Simulation is a method that is often used when scientific experiments are too costly, too difficult, or impossible to perform. It is also used when closed form mathematical solutions are too difficult or infeasible to obtain.
When the probability distribution of the data that would be generated by the experiment is approximately known, computer-generated random numbers from the appropriate distribution can be used in place of actual experimental data. Such computer-generated numbers are called simulated or synthetic data. A common use of simulation is to estimate the probability of events that are too difficult or impossible to calculate directly, and to estimate the mean and variance of probability distributions of such events.
Background to the Problem
This assignment will use simulation to determine if there is sufficient time for workers to perform a maintenance operation.
Surface railway transport is very common. Each day millions of vehicles cross over railroad tracks that are responsible for the transport of huge volumes of freight and passengers over long distances. To alert the drivers of these vehicles as well as pedestrians when trains are approaching, many railroad crossings are equipped with warning devices.
A typical crossing is equipped with three such devices: sets of red flasher lights, bells, and gates. Maintenance of this equipment and emergency response is closely monitored and regulated by the Federal Railway Administration (FRA) to ensure safety to people and non-disruption to the economy.
The FRA is required to have round-the-clock coverage of signal maintainers who are available to respond in case of emergencies. These emergencies are categorized into three types:
1. Activation Failures: These failures occur when the warning devices do not activate in response to a train approaching the proximities of a crossing.
2. False Activations: These take place
Answered 1 days After May 06, 2021

Solution

Abr Writing answered on May 08 2021
153 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here