/ Define steady state Warning Levels (ssWL) for p0 (rho) values close to 1 - returns stringĬonst String wl = "Steady State: Warning Level#" / Steady State of Queue true or false - ss0 - based on r - rho (must be Public Func rho1 = ( lambda, mu ) => ( lambda / mu ) //-traffic intensity: lambda/mu if server is one Public Func rho = ( lambda, mu, servers ) => lambda / ( mu * servers ) //-traffic intensity: lambda/(mu * servers ) / Steady state formula: (rho) rho = lambda / ( mu * servers ) - returns double / These are the two fundametal fourmulas of Queing systems (the same when s=1) / Number to return it's factorial or n! - TEMP - DEF OF FACTORIAL -LATER USE BIG INT Public static List quProbList = new List() Ĭonst double errorCode1 = -991 // error - arriveĬonst double errorCode3 = -993 // error in prob calcs - passed queue typeĬonst double errorCode4 = -994 // error in prob calcs - passed queue type - LWQ method Public static String quTypeOut = new String / quProbList - list of doubles of probabilities for each n / quTypeOut - string array of 4 chars of queue type ![]() 5 - L, LQ, Lw are calc in a certain order for each queue type and used several predefined funcs 3-the last parm is the func return type 1-double vs double, double vs Double, bool vs Boolean (use 1st) C# REFS: EFFECTIVE C# - WAGNER, C# IN DEPH - SKEET - LAMBDA CHAPTER - P 230 LAMBDA NOTATION: => EX: Func P0 = (mu,lambda) => mu/lambda 4-ALWAYS OVERRIDE TOSTRING() FOR CLASS ETC 5-LAMBDAS CAPTURE LAST VALUE IF EXTERNAL VAR 3- USE FOREACH OVER AN ITERATOR (ARRAY WITH INT VALUES) ETC FOR BEST PERFORMANCE C# PRINCIPLES: 1- USE SHORT FUNCTIONS FOR PERFORMANCE 2-USE PROPERTIES FOR GLOBAL VARS BASE THE MODEL FORMULAS ON RECURSIVE LAMBDA FORMULAS FOR 1-SIMPLICITY AND 2-FLEXIBILITY -if K=0 them MMS OR MM1 (MMX0) if K>0 then MMXK (MM1K OR MMSK) -the logic is if server = 1 then MM1X, if server>1 then MMSX, -there will be no check in these functions if the queue type is consistent with then -policy (logic) important - the functions will receive the direct numeric parms server, K etc -policy - to avoid issues of numeric data types
0 Comments
Leave a Reply. |