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

Setting Up the Optimization Model

When setting up an optimization model in the RASON Modeling language, your model will typically contain these essential segments:

  1. modelName: RASON supports both named and unnamed models. A named model includes the modelName: "name" property in the text. A model name must be a string that can be URL-encoded and must be unique among models within a user's account. It is strongly recommended that a model be named to allow for easy recognition and retrieval when multiple models, instances and versions exist in a user's account. See the chapter Using the REST API for more information on named and unnamed models.
  2. modelType: A new optional top-level property "modelType"={"optimization", "simulation", "datamining", "calculation"} has been introduced in RASON Decision Services V2020 for use with decision flows and standalone models. This property defines the model type as optimization, simulation, datamining or calculation within the RASON script and is used in three ways.
  3. data: Where arrays to be used in the calculation of constraints and the objective function will be defined. In this example we define 6 arrays to hold data for our objective function (the profit array) and our constraints (the remaining arrays: chassis, lcdScreen, speaker, powerSupply and electronics).
  4. variables: Where the decision variables will be defined. In this example, we will define three variables in the X array, each with a lower bound of 0.
  5. objective: Where the objective function to be maximized or minimized will be defined. In this example, we will maximize profit by multiplying the decision variables by the profit margin for each product.
  6. constraints: Where the constraints will be defined. In this example, we define five constraints to ensure that the number of parts used are less than the number of parts in inventory.

Within this overall framework, you have a great deal of flexibility in choosing how to define and calculate your objective function and constraints. For example, the objective function will ultimately depend on the decision variable cells, but you don't have to calculate the entire function all at once. You can use any number of calculations in the data section to compute intermediate results and use these to calculate the objective function or the constraints.

The RASON modeling language supports all but a few of Excel's functions which means that you can write a linear expression easily with Excel's SUMPRODUCT function, or you can use + and * operators. You can define arrays and use Excel functions that return vector and matrix results and access your data from within Excel or a database.

Back to Defining An Optimization Model