
Question
Transcribed Text
Solution Preview
These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.
clear; clc; close all;n=4; s=2;
f=@(x) 1-(1./((1+x).^6));%Machine lifetimes, x>=0
fi=@(u) power(1./(1-u),1/6)-1;%Inverse of f
g=@(x) 1-exp(-2*sqrt(x));%Machine repair time, x>=0
gi=@(u) (-(1/2)*log(1-u)).^2;%Inverse of g
m=5000;%iid number for E(C), time to a crash
%x=0:0.1:10; ff=f(x); gg=g(x);
%plot(x,ff,x,gg);
T=[];
for i=1:m
t=0; %Starting time is zero
r=0; %Number of machines in repair initially is zero
tstar=Inf;%Repair time for currently being repaired machine, Inf as no machine is under repair initially
un=rand(1,n); tn=fi(un);
tE=sort(tn);%event list
while(1)
if tE(1)<tstar
t=tE(1); %r=r+1;...
By purchasing this solution you'll be able to access the following files:
Solution.zip.