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

Applying a Common for() Statement to Multiple Formulas

Another useful application of the for() definition is applying a common for() to multiple formulas. The following two examples are identical.

Ex1.

"for(t in 2..time)" : {
   "coordX[t]" : {dimensions: ['time'], formula: "coordX[t-1] + Vx[t]" }
}
"for(t in 2..time)" : {
   "coordY[t]": {dimensions: ['time'], formula: "coordY[t-1} + Vy[t]" }
}

Ex2.

"for(t in 2..time)" : {
   "coordX[t]": {dimensions: ['time'], formula: "coordX[t-1] + Vx[t]" }       
   "coordY[t]": {dimensions: ['time'], formula: "coordY[t-1} + Vy[t]" }
}

Note: It is also possible to bind data to external sources using indexed array formulas. See the earlier topic, Using the Binding Property, for more information.

Back to SUM Aggregate Function