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

REST Endpoint: POST: https://rason.net/api/diagnose

A REST API endpoint that accepts an optimization, stochastic optimization or simulation optimization RASON model, runs a model diagnosis and returns a result in JSON format. This call should only be used with models where the model diagnosis completes very quickly, i.e. within a few seconds. There is a time limit of 30 seconds on all synchronous calls.

  • URL: https://rason.net/api/diagnose
  • Method: POST
  • URL Params

    Required: None

    Optional: None

  • Headers:

    Required: Authorization - Example: Authorization: bearer {your RASON token}

    Optional: None

  • Data Params: An optimization, stochastic optimization or simulation optimization RASON Model.
          
            {
              modelName: "ProductMix",
              modelType: "optimization",
              modelDescription: "Version of ProductMix using a 2-dimensional matrix",
            
              variables: {
                x: {
                  dimensions: [3],
                  value: 0, 
                  lower: 0,
                  finalValue: []
                }
              },
              data: {
                profits: {
                  dimensions: [3],
                  value: [75, 50, 35],
                  binding: "get",
                  finalValue: []
               },
                parts: {
                  dimensions: [5, 3],
                  value: [
                    [1, 1, 0],
                    [1, 0, 0],
                    [2, 2, 1],
                    [1, 1, 0],
                    [2, 1, 1]
                  ]
                },
                inventory: {
                  value: [450, 250, 800, 450, 600]
                }
              },
              constraints: {
                num_used: {
                  dimensions: [5],
                  formula: "MMULT(parts, x)",
                  upper: 'inventory'
                }
              },
              objective: {
                total: {
                  formula: "sumproduct(x, profits)",
                  type: "maximize",
                  finalValue: []
                }
              }
            }
          
          
  • Success Response

    Code: 200 (OK)

    Example Response

          
            {
              "status": {
                "code": 100,
                "id": "2590+2020-01-03-17-36-54-557510",
                "codeText": "Model Diagnosis Complete."
              },
              "ModelType": "LP Convex",
              "AllVars": 3,
              "SmoothVars": 3,
              "LinearVars": 3,
              "RecourseVars": 0,
              "UncertainVars": 0,
              "AllFcns": 6,
              "SmoothFcns": 6,
              "LinearFcns": 6,
              "RecourseFcns": 0,
              "UncertainFcns": 0,
              "AllDpns": 14,
              "SmoothDpns": 14,
              "LinearDpns": 14,
              "RecourseDpns": 0,
              "UncertainDpns": 0,
              "Bounds": 3,
              "Integers": 0,
              "ChanceConst": 0,
              "Sparsity": 77.777777777777786,
              "DummyObjective": false,
              "LinearEngine": true,
              "RangeInfo": false,
              "NumExceptions": 0,
              "NumUExceptions": 0,
              "Exceptions": [],
              "UExceptions": [],
              "modeltype": "linear",
              "variables": "3",
              "functions": "6",
              "bounds": 3,
              "integers": "0"
            }
          
        
Back to POST rason.net/api/decision