Assume the following parameters 1=0.8day , 2=0.3days, 3=2 days, 4=0.5days %PROJE
ID: 3748652 • Letter: A
Question
Assume the following parameters 1=0.8day , 2=0.3days, 3=2 days, 4=0.5days %PROJECT 1 %Develop a Monte Carlo simulation of an attack %Then see perform random success trials %First - Poisson random attack close all clear all Parameters T= 1000 ;%Total test time Lambda [. 1 , . 2 , . 3, . 1 , .05, . 15 ] ; %attack arrival probability Ll-Lambda; Lambda2-[. 1 , . 1 , . 1 , . 1 , . 1 , . 1 ] %probability of success in time t T2-10; Weakness-Lambda2.*exp (-Lambda2+T2); %Exp prob of success W-Weakness Now run a Monte Carlo run of T unit for t-l:T for n-l:length(L1) A(t,n)-0 x-rand (1); %uniform pdf if xExplanation / Answer
double[] VarWins = new double[]{player1,player2}]; double[] minWins = new double[]{11,12}; double[] meanWins = new double[]{12.5,13}; double[] maxWins = new double[]{17,15}; double[] results = MonteCarlo.simulate(2, new double[] { 11, 12 }, new double[] { 12.5, 13 }, new double[] { 17, 15 }); public double triangular(double Min,double Mode,double Max) { // Declarations double R=0.0; // Initialise Random r = new Random(); R = r.NextDouble(); //between 0.0 and 1.0 gaussian // Triangular if ( R == (( Mode - Min) / ( Max - Min))) { return Mode; } else if ( R < (( Mode - Min) / ( Max - Min))) { return Min + Math.Sqrt( R * ( Max - Min) * ( Mode - Min)); else { return Max - Math.Sqrt((1 - R) * ( Max - Min) * ( Max - Mode)); } }Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.