Introduction to RASON
About RASON Models and the RASON Server
Rason Subscriptions
Rason Web IDE
Creating and Running a Decision Flow
Defining Your Optimization Model
Defining Your Simulation Model
Performing Sensitivity Analysis
Defining Your Stochastic Optimization Model
Defining Your Data Science Model
Defining Custom Types
Defining Custom Functions
Defining Your Decision Table
Defining Contexts
Using the REST API
REST API Quick Call Endpoints
REST API Endpoints
Decision Flow REST API Endpoints
OData Endpoints
OData Service for Decision Flows
Creating Your Own Application
Using Arrays, For, Loops and Tables
Organization Accounts

Parallel array formulas

constraint1 : { dimensions: [6], formula: "sqrt((x - dx)^2 + (y - dy)^2) - z", upper: 0 }

This type of array formula is interpreted (evaluated) only once. Every operation is executed in parallel for all components of its array operands. In the above example, x, y, z are scalars, while dx and dy are 1-D arrays containing 6 elements each. The operation (x - dx) is executed for all 6 elements of dx resulting in a 1-D array of 6 elements.

The multi-dimensional result of the formula evaluation is assigned to an array variable with the appropriate dimensions. In the above example, the result is held by the 1-D vertical array constraint1, which has 6 elements. If the formula definition is in the constraints section, one constraint will be generated for each component of the result.

The result of the evaluation is a 1-D horizontal/vertical array, or 2-D array. If a table slice is presented in the formula, it is always considered a vertical array in parallel operations. Currently, the RASON modeling language supports only 2-D arrays. The biggest disadvantage of this array formula type is the prevention of the reverse mode of evaluation which is much faster than the native forward evaluation.

Back to Array Formulas