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
Supported FEEL Functions
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

Non-parallel array formulas

  "constraints" : { 
        "num_used": {
          "dimensions": [5], 
          "formula": "formula: "MMULT(parts, x)",
          "upper": :"inventory"
        }
      },
  

Code snippet taken from the example, nonParallelArray.json. Click RASON Examples -- Example Models using Arrays Loops and Tables -- Using an Excel Function for a formula or constraint to open.

This type of array formula is interpreted (evaluated) once. The elements of the array are not computed through parallel, element-by-element operations. Instead, the array is produced tby the internal algorithm of the function used in the formula. In this example, MMULT performs a matrix-vector multiplication and returns an array with 5 elements.

The result of this evaluation is assigned to the array variable num_used, which is defined as a 1-D vertical array of size 5. If this formula appears in the constraints section, the RASON automatically generates one constraint for each element of the resulting array.

In general, a non-parallel array formula may return a one-dimensional (horizontal or vertical) array or a two-dimensional array, even when table rows or columns are referenced in the formula. The biggest disadvantage of this array formula type is that it prevents reverse-mode evaluation, which is significantly faster than the standard forward evaluation.

Back to Parallel Array Formulas