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

Stochastic Transformation using Deterministic Equivalent

As we discussed above, there are two other methods besides simulation optimization that can solve Stochastic LPs - stochastic programming and robust optimization. For this model, we will choose a transformation to Stochastic Programming Deterministic Equivalent form by replacing simulationOptimization: True with transformStochastic: deterministicEquivalent.

The modelSettings section changes to:


"modelSettings": { 
  "transformStochastic": "deterministicEquivalent", 
  "numtrials": 1000 
},

The model setting "transformStochastic" does not support the Psi function PsiMean in the "objective" section. As a result, we must use an alternate method of maximizing the mean of "cash" by simply changing "formula" to "cash" and "chanceType" to "ExpVal".

  
    "objective":  {
    "total": {
    "type": "maximize"
    "formula": "cash",
    "chanceType": "ExpVal",
    "finalValue": []
    }
  

Note: The original "objective" section and the modified "objective" section (shown above) are equivalent.

If using the Desktop IDE, simply click the Solve icon at the top of the application.

If using the Web IDE,

  • Click POST rason.net/api/model to post the model.
  • Click POST rason.net/api/model/id/optimize or /solve to start the simulation optimization.
  • Click GET rason.net/api/model/id/status to obtain the status of the solve.
  • Click GET rason.net/api/model/id/result to obtain the final result.

The results are shown below.


{
  "status": {
    "code": 0,
    "id": "2590+UGProjectSelect0+2020-03-25-14-18-50-873215",
    "codeText": "Solver found a solution.  All constraints and optimality conditions are satisfied." 
  },
  "variables": {
    "x": {
      "finalValue": [1, 0, 1, 1, 1, 0, 1, 0]
    }
  },
  "objective": {
    "total": {
      "finalValue": 1.39564e+006 
    }
  }
}

In a fraction of a second, a solution appears with a slightly better objective value of $1.39564M and the same projects selected, with the message “Solver found a solution. All constraints and optimality conditions are satisfied.” This means that Analytic Solver Platform found a proven globally optimal solution - whereas with simulation optimization, we never know whether the solution we found is optimal. To use the robust counterpart method solve this model, simply replace "deterministicEquivalent" within modelSettings to "robustCounterpart".

modelSettings: { transformStochastic: "robustCounterpart", numtrials: 1000 }, 

Back to Solving with Simulation Optimization