Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 3 Modify the TTF simulation assuming that there are three components, one active and two spares, but still only one can be repaired at

Problem 3

Modify the TTF simulation assuming that there are three components, one active and two spares, but still only one can be repaired at a time. Repair time is 3.5 days. Run your simulation for 1000 replications and report a 95% confidence interval for the expected time to failure of the system.

image text in transcribed

import numpy as np import matplotlib.pyplot as plt # start with 2 functioning components at time 0 clock 0 # fix random number seed #np.random.seed(1) # initialize the time of events NextRepair float('inf') NextFailure np.ceil(6 *np.random.random) # lists to keep the event times and the states EventTimes [0] States [2] while S 0: # advance the time clock min(NextRepair, NextFailure) if NextRepairNextFailure # next event is completion of a repair NextRepair float('inf) else : # next event is a failure if S-1: NextRepair clock + 2.5 NextFailure clock + np.ceil (6 np.random.random)) # save the time and state EventTimes.append(clock) States.append(S) # plot the sample path print (TTF was:', clock) plt.plot(EventTimes, States, drawstyle 'steps-post') plt.show) import numpy as np import matplotlib.pyplot as plt # start with 2 functioning components at time 0 clock 0 # fix random number seed #np.random.seed(1) # initialize the time of events NextRepair float('inf') NextFailure np.ceil(6 *np.random.random) # lists to keep the event times and the states EventTimes [0] States [2] while S 0: # advance the time clock min(NextRepair, NextFailure) if NextRepairNextFailure # next event is completion of a repair NextRepair float('inf) else : # next event is a failure if S-1: NextRepair clock + 2.5 NextFailure clock + np.ceil (6 np.random.random)) # save the time and state EventTimes.append(clock) States.append(S) # plot the sample path print (TTF was:', clock) plt.plot(EventTimes, States, drawstyle 'steps-post') plt.show)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mastering Big Data Interview 751 Comprehensive Questions And Expert Answers

Authors: Mr Bhanu Pratap Mahato

1st Edition

B0CLNT3NVD, 979-8865047216

More Books

Students also viewed these Databases questions

Question

LOQ 13-10: What role does the internet play in group polarization?

Answered: 1 week ago