| <html> |
| <head> |
| <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> |
| <title>Functions</title> |
| <link href="book.css" rel="stylesheet" type="text/css"> |
| <meta content="DocBook XSL Stylesheets V1.75.1" name="generator"> |
| <link rel="home" href="index.html" title="Agent Modeling Guide"> |
| <link rel="up" href="Modeler_Guide.html" title="Modeler Guide"> |
| <link rel="prev" href="Actions_2.html" title="Actions"> |
| <link rel="next" href="User_Guide.html" title="User Guide"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <h1 xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0">Functions</h1> |
| <div class="section" title="Functions"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h2 class="title" style="clear: both"> |
| <a name="Functions"></a>Functions</h2> |
| </div> |
| </div> |
| </div> |
| <div class="section" title="Overview"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h3 class="title"> |
| <a name="Overview_4"></a>Overview</h3> |
| </div> |
| </div> |
| </div> |
| <p>Functions are relatively simple in terms of model design, but we need to understand how particular functions work in order to develop models. Functions are divided in two ways. By type:</p> |
| <div class="orderedlist"> |
| <ol class="orderedlist" type="1"> |
| <li class="listitem"> |
| <p>Operators are simple calculations sharing the same type.</p> |
| </li> |
| <li class="listitem"> |
| <p>Functions that can represent any general function that takes some well-defined input(s) and returns some well-defined output(s).</p> |
| </li> |
| </ol> |
| </div> |
| <p>And by usage:</p> |
| <div class="orderedlist"> |
| <ol class="orderedlist" type="1"> |
| <li class="listitem"> |
| <p>Generics can return any value and are used in Evaluate actions.</p> |
| </li> |
| <li class="listitem"> |
| <p>Logicals return some boolean result and are used by Query actions to decide whether target Actions apply to a particular selection, and by Evaluate actions just as with any other functions. Input types should be defined as generally as possible.</p> |
| </li> |
| </ol> |
| </div> |
| <p>These overlap, so we have operators, logical operators, functions and logical functions. Functions are also divided into categories. We'll go through each of these in depth below.</p> |
| <p>The most important thing to point out about functions is that - as we've seen with other Acore concepts -- they provide richer sets of functionality than traditional approaches. Many functions are designed to collaborate with one another as we'll see when looking at Spatial and Graphical functions. Functions can also trigger the creation of related model artifacts as we'll see with the Distribution functions.</p> |
| <p>A technical note: conceptually, functions can return multi-values, but that is not currently implemented in the reference targets because of limitations of the target language Java.</p> |
| </div> |
| <div class="section" title="Details"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h3 class="title"> |
| <a name="Details_5"></a>Details</h3> |
| </div> |
| </div> |
| </div> |
| <div class="section" title="General Functions"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="General_Functions"></a>General Functions</h4> |
| </div> |
| </div> |
| </div> |
| <p>Naturally, the Modeling tools provide general functions for performing calculations, comparisons and more complex mathematical expressions. The function library can be easily extended, and we'll be adding additional capabilities over time. As always, we welcome feedback and we'd like to hear what functions you need that aren't covered here.</p> |
| </div> |
| <div class="section" title="Logical Operators"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="Logical_Operators"></a>Logical Operators</h4> |
| </div> |
| </div> |
| </div> |
| <p>Logical operators allow comparison between values. They are typically used in Query terms but may be used in Evaluate actions as well.</p> |
| <div class="section" title="Not"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Not"></a>Not</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression !X.</p> |
| </div> |
| <div class="section" title="Equal"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Equal"></a>Equal</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X==Y.</p> |
| </div> |
| <div class="section" title="Identical"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Identical"></a>Identical</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X==Y.</p> |
| </div> |
| <div class="section" title="Greater"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Greater"></a>Greater</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X>Y.</p> |
| </div> |
| <div class="section" title="Lesser"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Lesser"></a>Lesser</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X<Y.</p> |
| </div> |
| <div class="section" title="Greater or Equal"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Greater_or_Equal"></a>Greater or Equal</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X>=Y.</p> |
| </div> |
| <div class="section" title="Lesser or Equal"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Lesser_or_Equal"></a>Lesser or Equal</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X<=Y.</p> |
| </div> |
| <div class="section" title="True"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="True"></a>True</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression true.</p> |
| </div> |
| <div class="section" title="False"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="False"></a>False</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression false.</p> |
| </div> |
| <div class="section" title="Identity"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Identity"></a>Identity</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X.</p> |
| </div> |
| <div class="section" title="Different"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Different"></a>Different</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X!=Y.</p> |
| </div> |
| </div> |
| <div class="section" title="Numeric Operators"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="Numeric_Operators"></a>Numeric Operators</h4> |
| </div> |
| </div> |
| </div> |
| <p>Numeric operators support all of the basic operators used in evaluations.</p> |
| <div class="section" title="Negative Value"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Negative_Value"></a>Negative Value</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression -X.</p> |
| </div> |
| <div class="section" title="Add"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Add"></a>Add</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X+Y.</p> |
| </div> |
| <div class="section" title="Subtract"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Subtract"></a>Subtract</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X-Y.</p> |
| </div> |
| <div class="section" title="Multiply"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Multiply"></a>Multiply</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X*Y.</p> |
| </div> |
| <div class="section" title="Divide"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Divide"></a>Divide</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X/Y.</p> |
| </div> |
| <div class="section" title="Power"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Power"></a>Power</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X^Y.</p> |
| </div> |
| <div class="section" title="Modulo"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Modulo"></a>Modulo</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression X%Y.</p> |
| </div> |
| <div class="section" title="Increment"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Increment"></a>Increment</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression ++X.</p> |
| </div> |
| <div class="section" title="Decrement"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Decrement"></a>Decrement</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression --X.</p> |
| </div> |
| <div class="section" title="Unit Value"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Unit_Value"></a>Unit Value</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression 1.</p> |
| </div> |
| <div class="section" title="Zero Value"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Zero_Value"></a>Zero Value</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression 0.</p> |
| </div> |
| <div class="section" title="Original Value"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Original_Value"></a>Original Value</h5> |
| </div> |
| </div> |
| </div> |
| <p>The result of the expression o.</p> |
| </div> |
| </div> |
| <div class="section" title="Spatial"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="Spatial"></a>Spatial</h4> |
| </div> |
| </div> |
| </div> |
| <p>Spatial functions provide the core functionality for Agent Models. Spatial functions are polymorphic, which basically means that they don't care what space they are operating on as long as that space is suitable for them. Spatial functions are designed to collaborate with one another. For example, by intersecting the "Neighbor", "Available" and "Toward" functions, we can design a rule that causes the agent to move to the next neighboring cell that get's it closer to some target agent. See the function details for more information.</p> |
| <div class="section" title="Nearest"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Nearest"></a>Nearest</h5> |
| </div> |
| </div> |
| </div> |
| <p>Represents the nearest agents (including gird cells) or locations to this agent. If more than one agent or location is the same distance away they will all be considered. Note that while this function is defined for the selection of an agent, the result of this function is defined by the context within which it is used. If the selection specifies another agent within a space, this function will represent the nearest agent in that space. If the selection specifies a Cell within a grid space, this function will represent that cell.</p> |
| </div> |
| <div class="section" title="Toward"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Toward"></a>Toward</h5> |
| </div> |
| </div> |
| </div> |
| <p>Represents a location that is on the shortest path to a particular agent or location from the source agent (that is, the selection's selection's agent). This function collaborates with the within and neighbor functions to allow the agent to move in a particular direction towards some objective.</p> |
| </div> |
| <div class="section" title="Within"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Within_4"></a>Within</h5> |
| </div> |
| </div> |
| </div> |
| <p>Represents a limit to the distance of a spatial search. When used in combination with other spatial functions such as "nearest" requires that all agents or locations must be within the distance specified by the input value.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Numeral] <br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Neighbor"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Neighbor"></a>Neighbor</h5> |
| </div> |
| </div> |
| </div> |
| <p>Represents any agents that are nearest neighbors to the agent, that is nominally of distance 1. This function is only relevant in discrete spaces -- grids and networks -- where there are immediate neighboring cells as defined by the geometry of the selection's space.</p> |
| </div> |
| <div class="section" title="Include Self"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Include_Self"></a>Include Self</h5> |
| </div> |
| </div> |
| </div> |
| <p>Specifies whether the agent that we are searching from -- that is, the agent of the selection for this Query Action's selection -- is included in the results of the search.</p> |
| </div> |
| <div class="section" title="Within 2D Boundary"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Within_2D_Boundary"></a>Within 2D Boundary</h5> |
| </div> |
| </div> |
| </div> |
| <p>Represents agents or locations that exist within the boundary specified by the inputs.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Numeral] <br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Here"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Here"></a>Here</h5> |
| </div> |
| </div> |
| </div> |
| <p>Represents the location of the searching agent. For example, if a selection is defined for an agent cell, and that selection's selection's agent is an occupant of a cell, the cell that the agent is occupying will be used. </p> |
| </div> |
| <div class="section" title="Available"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Available"></a>Available</h5> |
| </div> |
| </div> |
| </div> |
| <p>Represents cells which are not currently occupied. This function is only relevant for grids which are not multi-occupant.</p> |
| </div> |
| <div class="section" title="Distance"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Distance"></a>Distance</h5> |
| </div> |
| </div> |
| </div> |
| <p>The distance between the source agent and an agent represented by this selection. If more than one agent is represented by the other functions in the selection, this function will the distance to an arbitrary (randomly selected) agent as defined by those other functions.</p> |
| <div class="literallayout"> |
| <p>Outputs:<br> |
| [Real] <br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Away"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Away"></a>Away</h5> |
| </div> |
| </div> |
| </div> |
| <p>Represents a location that is on the path that will take the source agent (that is, the selection's selection's agent) the farthest distance from the agent(s) represented by the search. This function collaborates with the within and neighbor functions to allow the agent to move in a particular direction away from some location or agent.</p> |
| </div> |
| <div class="section" title="Minimize"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Minimize"></a>Minimize</h5> |
| </div> |
| </div> |
| </div> |
| <p>Finds the agent with the lowest value for the specified input. For example, if we created a Select for HeatCell, created a Minimize Query Term with Heat as the input Query Term, created Neighbor and Available Query Terms and set an Intersect as the target for all of those Queries, the result would be the the neighboring available cell with the lowest heat level.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Real] The value we will minimize for.<br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Maximize"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Maximize"></a>Maximize</h5> |
| </div> |
| </div> |
| </div> |
| <p>Finds the agent with the highest value for the specified input. For example, if we created a Select for HeatCell, created a Maximize Query Term with Heat as the input Query Term, created Neighbor and Available Query Terms and set an Intersect as the target for all of those Queries, the result would be the the neighboring available cell with the highest heat level.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Real] The value we will maximize for.<br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Location 2D"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Location_2D"></a>Location 2D</h5> |
| </div> |
| </div> |
| </div> |
| <p>Represents the location of the current agent for use in subsequent selections.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Real] <br> |
| [Real] <br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Boundary 2D"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Boundary_2D"></a>Boundary 2D</h5> |
| </div> |
| </div> |
| </div> |
| <p>Represents a two-dimensional boundary within a space. (Not currently relevant for any general usages.)</p> |
| <div class="literallayout"> |
| <p>Outputs:<br> |
| [Real] <br> |
| [Real] <br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="All"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="All"></a>All</h5> |
| </div> |
| </div> |
| </div> |
| <p>Causes all agents that meet the other query terms to be included in a selection. Without this query term, a single random agent is picked out of all agents matching the query terms.</p> |
| </div> |
| </div> |
| <div class="section" title="Random"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="Random"></a>Random</h4> |
| </div> |
| </div> |
| </div> |
| <p>Random functions are especially significant for agent models. Of particular interest are the weighted membership and random state and boolean value functions. You should be familiar with these functions so that you don't have to create more complex Action flows to accomplish the same thing.</p> |
| <p>Note that we only have support for uniform distributions as of this release. We're working on a collaborative design for evaluations that allow easy mixing and matching of random functions and distributions.</p> |
| <div class="section" title="Random In Range"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Random_In_Range"></a>Random In Range</h5> |
| </div> |
| </div> |
| </div> |
| <p>A pseudo-random value within that numeric range specified as drawn from a uniform distribution. The minimum values are inclusive. The maximum values are inclusive for integer inputs and exclusive for Real inputs.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Numeral] The minimum value (inclusive).<br> |
| [Numeral] The maximum value (inclusive).<br> |
| Outputs:<br> |
| [Numeral] The random number.<br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Random To Limit"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Random_To_Limit"></a>Random To Limit</h5> |
| </div> |
| </div> |
| </div> |
| <p>A pseudo-random value between zero and the value specified by the (non-zero) input and drawn from a uniform range. That value is inclusive for Integers and exclusive for Reals. (Note that as with the random in range function in the context of real numbers the distinction between an exclusive and inclusive limit is essentially meaningless.)</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Numeral] The maximum value (inclusive).<br> |
| Outputs:<br> |
| [Numeral] The result.<br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Random Unit"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Random_Unit"></a>Random Unit</h5> |
| </div> |
| </div> |
| </div> |
| <p>A pseudo-random Real value between 0 and 1 drawn from a uniform distribution. (The distinction between inclusive and exclusive range is essentially meaningless in this context and we can assume that the result will never be greater or equal to 1.)</p> |
| <div class="literallayout"> |
| <p>Outputs:<br> |
| [Real] <br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Random Boolean"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Random_Boolean"></a>Random Boolean</h5> |
| </div> |
| </div> |
| </div> |
| <p>A value that is randomly true or false, i.e. a fair coin toss.</p> |
| </div> |
| <div class="section" title="Random Weighted"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Random_Weighted"></a>Random Weighted</h5> |
| </div> |
| </div> |
| </div> |
| <p>An indexed value weighted against a probability distribution. The total probability must sum to 1.0. For example, an input of {.1,.2,.7} under a uniform distribution would would have 10% probability of producing "0" , 20% for "1" and 70% for "2". This function can then be used with Item to return a biased result from another list.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Real] A list of values that will determine the resulting weighted index.<br> |
| Outputs:<br> |
| [Integer] A resulting indexed value bounded by 0 and the length of the input list - 1.<br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Random Member"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Random_Member"></a>Random Member</h5> |
| </div> |
| </div> |
| </div> |
| <p>Represents a random value drawn from the set of Real values specified.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Real] Returns a random member of the supplied list of numbers.<br> |
| Outputs:<br> |
| [Generic] The value of the item at a random index.<br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Random State"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Random_State"></a>Random State</h5> |
| </div> |
| </div> |
| </div> |
| <p>A random specified value (option) from the specified state.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Generic] The state to select items from. All items are included.<br> |
| Outputs:<br> |
| [Integer] The resulting option. <br> |
| |
| </p> |
| </div> |
| </div> |
| </div> |
| <div class="section" title="Graphic"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="Graphic"></a>Graphic</h4> |
| </div> |
| </div> |
| </div> |
| <p>Graphic functions are combined within Style Evaluate Actions to determine how to draw an agent within a visualization. One nice aspect of this approach is that the same style definition can be used in multiple places without changing any code. For example, the same style could be used to draw an agent on a two-dimensional grid within Escape, a three-dimensional shape within Escape, a Java Swing based visualization in Ascape, and an XML configured visualizaiton in Repast Simphony.</p> |
| <p>To define a graphic style for an agent, design a flow in which you create Evaluate Actions for color and shape, and then create an Evaluate Action with the graphic fill or outline function as a target of these.</p> |
| <div class="section" title="Shape Oval"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Shape_Oval"></a>Shape Oval</h5> |
| </div> |
| </div> |
| </div> |
| <p>Draw a generic oval.</p> |
| </div> |
| <div class="section" title="Shape Rectangle"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Shape_Rectangle"></a>Shape Rectangle</h5> |
| </div> |
| </div> |
| </div> |
| <p>Draws a rectangular shape.</p> |
| </div> |
| <div class="section" title="Shape Inset"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Shape_Inset"></a>Shape Inset</h5> |
| </div> |
| </div> |
| </div> |
| <p>Shrinks the current shape by the input amount. (The overall scale is currently unspecified, but in most implementations should be 20.)</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Integer] Number of nominal pixels to inset.<br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Shape Marker"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Shape_Marker"></a>Shape Marker</h5> |
| </div> |
| </div> |
| </div> |
| <p>Draw a marker, that is a graphical indicator that can be used to add an additional que about the object state. For example, in a two-dimensional graphics representation this might be a small shape drawn inset at the corner of the larger shape. </p> |
| </div> |
| <div class="section" title="Shape Marker 2"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Shape_Marker_2"></a>Shape Marker 2</h5> |
| </div> |
| </div> |
| </div> |
| <p>Represents a marker placed in a different location from the other shape markers.</p> |
| </div> |
| <div class="section" title="Shape Marker 3"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Shape_Marker_3"></a>Shape Marker 3</h5> |
| </div> |
| </div> |
| </div> |
| <p>Represents a marker placed in a different location from the other shape markers.</p> |
| </div> |
| <div class="section" title="Color RGB"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Color_RGB"></a>Color RGB</h5> |
| </div> |
| </div> |
| </div> |
| <p>A color specified by the three inputs for Red, Green and Blue color components. Those inputs are expected to be in the range 0..1.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Real] A value from 0.0 to 1.0.<br> |
| [Real] A value from 0.0 to 1.0.<br> |
| [Real] A value from 0.0 to 1.0.<br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Color Red"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Color_Red"></a>Color Red</h5> |
| </div> |
| </div> |
| </div> |
| <p>The color red.</p> |
| </div> |
| <div class="section" title="Color Yellow"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Color_Yellow"></a>Color Yellow</h5> |
| </div> |
| </div> |
| </div> |
| <p>The color yellow.</p> |
| </div> |
| <div class="section" title="Color Blue"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Color_Blue"></a>Color Blue</h5> |
| </div> |
| </div> |
| </div> |
| <p>The color blue.</p> |
| </div> |
| <div class="section" title="Color Orange"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Color_Orange"></a>Color Orange</h5> |
| </div> |
| </div> |
| </div> |
| <p>The color orange.</p> |
| </div> |
| <div class="section" title="Color Green"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Color_Green"></a>Color Green</h5> |
| </div> |
| </div> |
| </div> |
| <p>The color green.</p> |
| </div> |
| <div class="section" title="Color Purple"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Color_Purple"></a>Color Purple</h5> |
| </div> |
| </div> |
| </div> |
| <p>The color purple.</p> |
| </div> |
| <div class="section" title="Color Black"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Color_Black"></a>Color Black</h5> |
| </div> |
| </div> |
| </div> |
| <p>The color black.</p> |
| </div> |
| <div class="section" title="Color White"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Color_White"></a>Color White</h5> |
| </div> |
| </div> |
| </div> |
| <p>The color white.</p> |
| </div> |
| <div class="section" title="Color Gray"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Color_Gray"></a>Color Gray</h5> |
| </div> |
| </div> |
| </div> |
| <p>The color gray.</p> |
| </div> |
| <div class="section" title="Graphic Outline"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Graphic_Outline"></a>Graphic Outline</h5> |
| </div> |
| </div> |
| </div> |
| <p>Draws an outline of the last evaluated shape, using the last specified color or the default color (usually black) if none has been specified.</p> |
| </div> |
| <div class="section" title="Graphic Fill"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Graphic_Fill"></a>Graphic Fill</h5> |
| </div> |
| </div> |
| </div> |
| <p>Fills the last evaluated shape with the last specified color or the default color (usually black) if none has been specified.</p> |
| </div> |
| </div> |
| <div class="section" title="Time"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="Time"></a>Time</h4> |
| </div> |
| </div> |
| </div> |
| <p>Time functions return values related to model execution time. </p> |
| <div class="section" title="Now"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Now"></a>Now</h5> |
| </div> |
| </div> |
| </div> |
| <p>The current simulation period, that is the number of iterations that the model has gone through, or in the case of models with callibrarted time, the number of iterations added to the model's nominal start time.</p> |
| <div class="literallayout"> |
| <p>Outputs:<br> |
| [Integer] The current period.<br> |
| |
| </p> |
| </div> |
| </div> |
| </div> |
| <div class="section" title="Math"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="Math"></a>Math</h4> |
| </div> |
| </div> |
| </div> |
| <p>The math functions use the extremely well specified and tested routines form the Java Math library. (Because of copyright restrictions, we aren't able to include the exact definitions here. Click on the links to get more details on each function.)</p> |
| <div class="section" title="Sine"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Sine"></a>Sine</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#sin(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#sin(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Cosine"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Cosine"></a>Cosine</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#cos(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#cos(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Tangent"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Tangent"></a>Tangent</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#tan(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#tan(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Arc Sine"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Arc_Sine"></a>Arc Sine</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#asin(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#asin(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Arc Cosine"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Arc_Cosine"></a>Arc Cosine</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#acos(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#acos(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Arc Tangent"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Arc_Tangent"></a>Arc Tangent</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#atan(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#atan(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Convert Degree to Radians"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Convert_Degree_to_Radians"></a>Convert Degree to Radians</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#toRadians(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#toRadians(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Convert Radians to Degrees"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Convert_Radians_to_Degrees"></a>Convert Radians to Degrees</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#toDegrees(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#toDegrees(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Exp"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Exp"></a>Exp</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#exp(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#exp(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Log"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Log"></a>Log</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#log(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#log(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Log b10"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Log_b10"></a>Log b10</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#log10(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#log10(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Square Root"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Square_Root"></a>Square Root</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#squareRoot(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#squareRoot(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Cube Root"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Cube_Root"></a>Cube Root</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#cbrt(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#cbrt(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Remainder"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Remainder"></a>Remainder</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#iEEEremainder(double,%20double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#iEEEremainder(double,%20double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Ceiling"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Ceiling"></a>Ceiling</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#ceil(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#ceil(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Floor"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Floor"></a>Floor</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#floor(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#floor(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Rount"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Rount"></a>Rount</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#rint(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#rint(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Arc Tangent Rectangular"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Arc_Tangent_Rectangular"></a>Arc Tangent Rectangular</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#atan2(double,%20double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#atan2(double,%20double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Power"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Power_2"></a>Power</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#pow(double,%20double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#pow(double,%20double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Absolute Value"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Absolute_Value"></a>Absolute Value</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#abs(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#abs(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Maximum"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Maximum"></a>Maximum</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#max(double,%20double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#max(double,%20double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Minimum"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Minimum"></a>Minimum</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#min(double,%20double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#min(double,%20double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="ULP"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="ULP"></a>ULP</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#ulp(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#ulp(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Sign"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Sign"></a>Sign</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#signum(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#signum(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Hyperbolic Sine"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Hyperbolic_Sine"></a>Hyperbolic Sine</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#sinh(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#sinh(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Hyperbolic Cosine"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Hyperbolic_Cosine"></a>Hyperbolic Cosine</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#cosh(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#cosh(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Hyperbolic Tan"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Hyperbolic_Tan"></a>Hyperbolic Tan</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#tanh(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#tanh(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Hypotuneuse"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Hypotuneuse"></a>Hypotuneuse</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#hypotuneuse(double,%20double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#hypotuneuse(double,%20double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Expm1"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Expm1"></a>Expm1</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#expm1(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#expm1(double)</a> |
| |
| </p> |
| </div> |
| <div class="section" title="Log1p"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Log1p"></a>Log1p</h5> |
| </div> |
| </div> |
| </div> |
| <p>See JavaDoc: |
| <a class="ulink" href="http://java.sun.com/javase/6/docs/api/java/lang/Math.html#log1p(double)" target="_new">http://java.sun.com/javase/6/docs/api/java/lang/Math.html#log1p(double)</a> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="List"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="List"></a>List</h4> |
| </div> |
| </div> |
| </div> |
| <p>List functions are used for working with arrays and other functions that have lists as output.</p> |
| <div class="section" title="Item"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Item"></a>Item</h5> |
| </div> |
| </div> |
| </div> |
| <p>Returns the item at the specified index from the list of items provided. Those items will typically be input primitives such as Integer or Real values.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Generic] <br> |
| [Integer] <br> |
| Outputs:<br> |
| [Generic] <br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Length"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Length"></a>Length</h5> |
| </div> |
| </div> |
| </div> |
| <p>The number of items in the provided list of items.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Generic] <br> |
| Outputs:<br> |
| [Integer] <br> |
| |
| </p> |
| </div> |
| </div> |
| </div> |
| <div class="section" title="Distribution"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="Distribution"></a>Distribution</h4> |
| </div> |
| </div> |
| </div> |
| <p>One of the most common tasks in the Agent Modeling process is the creation of agents with particular states drawn from a distribution. For example, you might want to create a number of agents with wealth randomly distributed between some minimum and maximum values. The distribution functions greatly ease the process of setting up those initializations and their associated parameters.</p> |
| <div class="section" title="Uniform Cross Distribution"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Uniform_Cross_Distribution"></a>Uniform Cross Distribution</h5> |
| </div> |
| </div> |
| </div> |
| <p>A random number taken from a distribution of values as defined by a cross of all values. (See Cross Distribution.) This funciton then returns a value drawn from the minimum and maximum values as determined by the current agent state. In the cross distribution, each of the values is treated independently so that an input attribute is created for every potential combination of states.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Generic] The list of states to factor into the distribution. This is a multi-argument, which means that you can specify any number of attributes as arguments.<br> |
| [Real] The set of attributes that will determine the minimum value of the function result based on the current state of the agent. Note that this list is automatically created and maintained. These values don't need to be and should not be manually edited.<br> |
| [Real] The set of attributes that will determine the maximum value of the function result based on the current state of the agent. Note that this list is automatically created and maintained. These values don't need to be and should not be manually edited.<br> |
| Outputs:<br> |
| [Real] The resulting random number based on the current agent state and the input parameters.<br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Uniform Additive Distribution"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Uniform_Additive_Distribution"></a>Uniform Additive Distribution</h5> |
| </div> |
| </div> |
| </div> |
| <p>A random number taken from a distribution of values in which each of the minimum and maximum values are added to determine a total minimum and maximum value. (See Additive Distribution.) In the additive distribution, each of the values is treated as dependent on the others so that an input attribute is only created for each seperate state.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Generic] The list of states to factor into the distribution. This is a multi-argument, which means that you can specify any number of attributes as arguments.<br> |
| [Real] The set of attributes that will determine the minimum value of the function result based on the current state of the agent. Note that this list is automatically created and maintained. These values don't need to be and should not be manually edited.<br> |
| [Real] The set of attributes that will determine the maximum value of the function result based on the current state of the agent. Note that this list is automatically created and maintained. These values don't need to be and should not be manually edited.<br> |
| Outputs:<br> |
| [Real] The resulting random number based on the current agent state and the input parameters.<br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Cross Distribution"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Cross_Distribution"></a>Cross Distribution</h5> |
| </div> |
| </div> |
| </div> |
| <p>A value taken from a set of (auto-generated) attributes based on the value of each state included. For example, if the multi-values included a state X with values A and B and a state Y with values I and II, this distribution would create separate input attributes for AI, AII, BI and BII. Then for an agent with States A and II this function would return the value specified by the AII input attribute.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Generic] The list of states to factor into the distribution. This is a multi-argument, which means that you can specify any number of attributes as arguments.<br> |
| [Real] The set of attributes that when multiplied against each other will determine the value of the function result based on the current state of the agent. Note that this list is automatically created and maintained. These values don't need to be and should not be manually edited.<br> |
| Outputs:<br> |
| [Real] The resulting value based on the current agent state and the input parameters.<br> |
| |
| </p> |
| </div> |
| </div> |
| <div class="section" title="Additive Distribution"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Additive_Distribution"></a>Additive Distribution</h5> |
| </div> |
| </div> |
| </div> |
| <p>A value taken from a set of (auto-generated) attributes based on the combined values of the states provided. For example, if the multi-values included a state X with values A and B and a state Y with values I and II, this distribution would create input attributes for A, B, I and II. Those values would then be added together, so that for an Agent with state A and II this function would return A + II.</p> |
| <div class="literallayout"> |
| <p>Inputs:<br> |
| [Generic] The states to include in the distribution. This is a multi-argument, which means that you can specify any number of attributes as arguments.<br> |
| [Real] The set of attributes that when combined with each other determine the value of the function result based on the current state of the agent. Note that this list is automatically created and maintained. These values don't need to be and should not be manually edited.<br> |
| Outputs:<br> |
| [Real] The resulting value based on the current agent state and the input parameters.<br> |
| |
| </p> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="section" title="Examples"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h3 class="title"> |
| <a name="Examples"></a>Examples</h3> |
| </div> |
| </div> |
| </div> |
| <div class="section" title="Spatial"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="Spatial_2"></a>Spatial</h4> |
| </div> |
| </div> |
| </div> |
| <p>For examples of how spatial functions can be used within action flows to provide agents with complex movement behaviors, see the Modelers Guide actions examples. In the following example from that section, we define an action that causes a partner agent to move to an available neighboring space.</p> |
| <p> |
| |
| </p> |
| <div class="mediaobject"> |
| <img src="images/actions/ActionsExampleNew.png"></div> |
| <p> |
| |
| </p> |
| </div> |
| <div class="section" title="Graphic"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="Graphic_2"></a>Graphic</h4> |
| </div> |
| </div> |
| </div> |
| <p>In the following action flow for the epidemic style, we've create Query Actions to determine each agent's current state, picked a color based on that, and then used a shared target to select a shape for the agent style and fill it:</p> |
| <p> |
| |
| </p> |
| <div class="mediaobject"> |
| <img src="images/functions/GraphicsFunctionExampleDesign.png"></div> |
| <p> |
| |
| </p> |
| <p>After saving the model we can execute the two and three dimensional visualizations. Note something really nice -- even the charts have used the colors we've defined!</p> |
| <p> |
| |
| </p> |
| <div class="mediaobject"> |
| <img src="images/functions/GraphicsFunctionExampleRun.png"></div> |
| <p> |
| |
| </p> |
| </div> |
| <div class="section" title="Distribution"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="Distribution_2"></a>Distribution</h4> |
| </div> |
| </div> |
| </div> |
| <p>In the following example, we walk through the process of using a distribution functions, demonstrating how we can easily modify the Epidemic model so that instead of simply setting an initial exposed population, we can define factors that take together will determine an individuals initial exposure state. We simply:</p> |
| <div class="orderedlist"> |
| <ol class="orderedlist" type="1"> |
| <li class="listitem"> |
| <p>Create an Evaluate Action called "Initial Status". </p> |
| </li> |
| <li class="listitem"> |
| <p>Set the function to "Cross Distribution"</p> |
| </li> |
| <li class="listitem"> |
| <p>Opened the "Multiple Value" node in the editor, and clicked the "Multiple Values" item within it.</p> |
| </li> |
| <li class="listitem"> |
| <p>Selected the "Status" attribute.</p> |
| </li> |
| </ol> |
| </div> |
| <p> |
| |
| </p> |
| <div class="mediaobject"> |
| <img src="images/functions/DistributionDesignChoice.png"></div> |
| <p> |
| |
| </p> |
| <p>The appropriate attributes are automatically added to the model, as you can see below.</p> |
| <p> |
| |
| </p> |
| <div class="mediaobject"> |
| <img src="images/functions/DistributionDesign.png"></div> |
| <p> |
| |
| </p> |
| <p>In order to assign these values to the agent, we'd simply need to assign the results of this Evaluate Action to the agent.</p> |
| </div> |
| </div> |
| <div class="section" title="Reference"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h3 class="title"> |
| <a name="Reference_3"></a>Reference</h3> |
| </div> |
| </div> |
| </div> |
| <div class="section" title="Diagrams"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h4 class="title"> |
| <a name="Diagrams_3"></a>Diagrams</h4> |
| </div> |
| </div> |
| </div> |
| <p>The following diagram may be helpful to readers familiar with UML and Meta-modeling:</p> |
| <div class="section" title="Meta-Classes"> |
| <div class="titlepage"> |
| <div> |
| <div> |
| <h5 class="title"> |
| <a name="Meta-Classes_3"></a>Meta-Classes</h5> |
| </div> |
| </div> |
| </div> |
| <p> |
| |
| </p> |
| <div class="mediaobject"> |
| <img src="images/functions/FunctionsDiagram.png"></div> |
| <p> |
| |
| </p> |
| </div> |
| </div> |
| </div> |
| </div> |
| </body> |
| </html> |