Do it Yourself - ORMM Functions

Random Variable Functions

 The Random Variables add-in has a variety of functions that compute results regarding probability distributions and perform Monte Carlo simulations. The functions all have the prefix RV_. These functions are on several modules in the add-in and they are difficult to move because they are so large. The functions provide results for a number of named discrete and continuous named distributions. The best way to use them is to have the Random Variables add-in installed. The list of functions is shown in the dialog above. RV_rand, RV_sim and RV_simV each return a simulated observation of a random variable, while the others provide moments or probability values for the distributions. Complete descriptions are found on the pages describing the add-in. In addition to their use in the forms constructed by the add-in, the functions may be used independently for other applications. Examples appear below. Most of the functions have a range argument that holds the name and parameters of the distribution. The figure below shows three examples. The first involves a discrete triangular distribution. The range consists of several cells in a column with the first holding the distribution name. The remaining cells hold the parameters necessary to define the distribution. In the case of the triangular, the lower limit, mode and upper limit are necessary, requiring three additional cells. The middle example involves a Normal distribution. Its name and parameters are in the range F12:F14 that has been assigned the name RV3. The function calls to the right use the name rather than the explicit range definition. The bottom example shows that the data can be arranged in a row rather than a column.

Queue Functions

 The Queue add-in has a variety of functions that compute results concerning Markovian and Non-Markovian queues. It is difficult to withdraw the individual functions from the add-in, but the functions all reside in a single module. It can be copied in its entirety and pasted in a different workbook or add-in. The queuing functions are all prefaced by "Q_" or "QS_". Non-Markovian queues have the suffix "_NM". Functions with the "QS_" prefix are used in the queue simulation option. The user-defined functions from the Queue add-in are shown below.
 Most of the functions for queuing have an argument which refers to the range of the data defining the queue parameters. This range consists of three to five cells holding in order: the arrival rate, service rate, number of servers, maximum number in the system and population size. The last two are optional arguments that if not specified are assumed to be very large. The range can be arranged in either a row or column as illustrated below. If the range has a name, the name can be used for the argument. The add-in constructs a form and places the queue definition range and the functions on the form. The functions can be easily used independently to provide queue results in any worksheet application.

Decision Analysis Functions

 The Decision Analysis add-in provides four functions that are similar to Excel functions Max, Min, Match and SumProduct, but adds a condition that identifies the cells to be included in the operation. The functions are listed below with a definition of their parameters. Their names do not have an identifying prefix. MinIF(A, k, B): for the set of entries in the array A that are equal to k, find the minimum of the corresponding set of entries in the array B. MaxIF(A, k, B): for the set of entries in the array A that are equal to k, find the maximum of the corresponding set of entries in the array B. MatchIF(A, k, B, m): for the set of entries in the array A that are equal to k, find the index of the entry in array B whose value is the same as m. Return the corresponding index of B. SumProductIF(A, k, B, C): for the set of entries in the array A that are equal to k, find the corresponding sum of the products of the elements of B and C. Return the sum of the products. In each case A and B (and C for SumProductIF) are equal length arrays on the worksheet. k and m are numbers, letters or references to a cells. The functions are simular to the SUMIF Excel function. The figure below shows examples of the functions.

Forecast Functions

 The functions in Forecast can be easily extracted because they are each stand-alone. That is, most do not call other functions. Several of them have been included in the paj_components workbook. The list of functions is shown below, and each function has the prefix FF_. In most cases, range arguments are single rows or columns.

Operations Research Models and Methods
Internet
by Paul A. Jensen