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

Arrays and tables in indexed array formulas

Currently the RASON modeling language supports arrays with up to 2 dimensions. If you require a structure with more than 2 dimensions, you must use a table instead. Tables provide several advantages over arrays:

  • Tables may have more than 2 dimensions
  • A table result may be used in an indexed array formula
  • A table may be sparse, whereas arrays are always dense
  • Evaluating a table is generally less computationally expensive than evaluating an array with more than two dimensions

The example below shows how an indexed array formula is assigned to a table.

...
  "constraints": {
    "comment": "Demand satisfaction, capacity limits, and flow balance",
    "for(c in customers, p in products)": {
      "comment": "Ensure all customer demand is met",
      "d_con": {
        "formula": "sum(w_c_num[c,p,]) + sum(f_c_num[c,p,]) - demand[c,p]",
        "lower": 0,
        "finalValue": []
      }
    },
  },
...

Code snippet taken from the example, Using Sum Aggregate. Click RASON Examples -- Example Models using Arrays Loops and Tables to open.

Back to Using the SUM Aggregate Function