One can also use discrete distributions but only in calculations. Also note the GLOBAL solvers cannot deal with models that contain such functions. When these used in model equations the model needs to be of the type DNLP. Also pdfnorm( inventory, meandemand, stddevdemand) returns the probability of the point inventory from the normal distribution with a mean of meandemand and a standard deviation of stddevdemand. Note in this case a statement like icdfcauchy ( 0.5, median, halfwidth ) finds the x value from a Cauchy distribution with parameters median and halfwidth that has a cumulative probability of 50% of the observations below it. Xmedian= icdfcauchy (0.5,median,halfwidth) Shouldbepoint5= cdfbeta (xmedian,alpha,beta) Xvals(i,"val")= icdfnorm (xvals(i,"prob"),meandemand,stddevdemand) = cdflognorm (lognormalx(i,"xval"),lognorm_m,lognorm_s) *( pdfnorm ((inventory+del(k)),meandemand,stddevdemand))) Where the function is evaluated giving the cumulative probability of the normal distribution from minus infinity to the specified point normalx(i,"xval") in a normal distribution with a mean of 5 and a standard deviation of 2.Įxamples involving alternative distributions are given below where the first case shows use in a model equation and the rest in calculations ( extrinsicstoc.gms). Normalx(i,"cdf")= cdfnorm ( normalx(i,"xval"), 5, 2 ) Where for example the function CDFNORMAL that gives the probability up to a specific point in a normal distribution with a given mean and standard deviation is given the local name cdfnorm. For a use involving a mixture of pdfs, cdfs and icdf for the normal, beta, Cauchy and lognormal distributions this is as follows ( extrinsicstoc.gms). ![]() These are used first by activating the functions and giving them a local name. Weibull distribution with parameters ALPHA and BETA Uniform distribution with parameters telling it falls between LOW and HIGH ![]() Triangular distribution with parameters telling it falls between LOW and HIGH with MODE being the most probable number Student's t-distribution with parameter degrees of freedom DF Rayleigh distribution with parameter SIGMA Pareto distribution with parameters K which gives the min value of the input item and ALPHA the shape parameter Normal distribution with parameters MEAN and STD DEV Log Normal distribution with parameters MU and SIGMA Logistic distribution with parameters MU and BETA Laplace distribution with parameters MU and BETA Inverse Gaussian distribution with parameters MU and LAMBDA Gumbel distribution with parameters ALPHA and BETA Gamma distribution with parameters ALPHA and THETA When using ICDF one uses the probability as the first argument.Ī list of the continuous distributions included and their parameters including a link to a Wolfram Mathworld description of the distribution followsīeta distribution with parameters ALPHA and BETAĬauchy distribution with parameters MEDIAN and HALFWIDTHĬhi-squared distribution with the parameter degrees of freedom DFĮxponential distribution with rate of change parameter LAMBDAį-distribution with parameters for degrees of freedom DF1 and DF2 In addition when prefixing with PDF or CDF one uses a first argument which is the value of the point to be associated with the probability. ICDF if the value associated with a particular cumulative probability is needed PDF if the probability of a point from the probability density function is neededĬDF if the cumulative probability up to a point from the cumulative density function is needed ![]() When using these one prefixes the distribution name with This involves use of the extrinsic library stodclib. The continuous distributions across all of these are Beta, Cauchy, ChiSquare, Exponential, F, Gamma, Gumbel, Inverse Gaussian, Laplace, Logistic, Log Normal, Normal, Pareto, Rayleigh, Student's T, Triangular, Uniform and Weibull plus the discrete distributions Binomial, Geometric, Hypergeometric, Logarithmic, Negative Binomial, Poisson and Uniform Integer. GAMS has the ability to include probability density functions and cumulative density functions plus inverse probabilities in models (only the continuous ones) and calculations via use of some provided extrinsic libraries. ![]() Probability Distribution Function use in models Probability Distribution Function use in models
0 Comments
Leave a Reply. |