Basic HTML Version View Full Version
Page 722 - ExtendSim User Guide
P. 722

``````696 Math and Statistical Distributions
Equation-based blocks
These blocks provide access to over 1,000 internal functions; you can also use operators to enter logical statements, write compound conditions, and specify loops. The equation can be as simple as performing a mathematical operation on the value from an input connector or it could be as complex as a full programming segment. You can use include files (See Include Files in the Developer Reference) within your equation to reuse your own functions among many equation blocks, and you can use the source code debugger (See “Debugging equations” on page 720) to check the equation if you have a problem. The equation is automatically com- piled when you click OK in the block’s dialog.
You can’t define custom functions or procedures directly in an equation block. In order to be used in equation blocks, user-defined functions and procedures must be defined in an include file. See “Include files for equations” on page 702 for more information.
The Equation(I), Queue Equation, and Query Equation(I) blocks can only be used in non-con- tinuous (discrete event and discrete rate) models. They typically perform calculations when items arrive or depart. Although it is a continuous block, you can use the Equation or Query Equation block in non-continuous models. This is common when you want the equation to cal- culate independent of item status.
Overview
An equation-based block takes input variables, uses those values in an equation, and outputs the results of the calculation. Equation-based blocks are similar to the formula bar of a spread- sheet. Most of the usual components (operators, values, functions, and so on) are the same. There are two differences - instead of a cell reference, these blocks have input and output vari- ables that are identified by name in the equation, and the results of the equation can be output to different destinations.
Equation components
The components of an equation are the input variables, the equation, and the output variables.
All of the equation-based blocks have a scrollable area for entering the equation. Most equa- tion-based blocks also have a separate Equation Editor for viewing and editing the equation; it is discussed on page 701.
You can define local (temporary) input and output variables in the equation area or the Equa- tion Editor as well as static (permanent) input and output variables using include files.
As described below, most equation-based blocks also have two tables, Input Variables and Out- put Variables, with predefined static variables you can use in equations.
Input variables
Input variables are the model values used in an equa- tion. With the exception of the Buttons and Opti- mizer blocks, the equation-based blocks have a table for creating the input variables. Each row in the Input Variables table (shown on right) has a popup menu for selecting a pre-defined type of input variable and a field for its name and value. Variables created here are static (permanent).
To modify the number of rows used in the variable tables:
Input Variables table
How To

`````` 720   721   722   723   724 