Other Functions

<< Click to Display Table of Contents >>

Navigation:  Model Definition > Ventity Language > Functions >

Other Functions

Previous pageReturn to chapter overviewNext page

 

 

Allocation

 

Allocation is performed by Allocate and Market actions. A variable that is going to receive the results of an allocation must be set equal to the special function, Allocation:

 

Allocation()

Indicates to Ventity that the value of the variable will be set by an allocation. Returns zero if no allocation to this variable is active. Allocation() is used with no arguments.

 

 

Delay

 

DelayInformation(variable,

timedelay[,early value]) 

Returns value of the input variable with a delay based on the variable timedelay. DelayInformation can only be used to look backward, with only positive whole numbers being accepted in the variable timedelay. The optional early value specifies a value to be used prior to the availability of computed values; if omitted, the initial value of the input variable will be used.

 

 

Custom Macros
 

Custom Macros can be designed and called as functions within an equation.This can be useful to construct structures that will need to be replicated multiple times within a model.

 

Initialization

 

ActiveInitial(main expression, initial expression) 

Uses the initial expression for computations during an entity's initialization phase (i.e. upon creation of the entity), and the main expression thereafter.

 

Initial(expression)

Freezes the initial value of an expression.

 

 

 

 

Reference functions

 

These functions may be used to construct attribute string values.

 

EntityExists(collection,entitykey)

Tests whether an entity with the given key exists in a collection. Useful for determining whether a relationship entity linking two other entities already exists, for example.

 

IsActive(entity reference)

Tests whether a reference points to an entity that is "alive" (not deleted).

 

IsNull(entity reference)

Tests whether an entity reference is defined (points to a valid entity).