FICO
FICO Xpress Optimization Examples Repository
FICO Optimization Community FICO Xpress Optimization Home
Back to examples browserPrevious exampleNext example

Solving a Mosel model using a REST webservice, from NodeJS

Description
In this example, the Xpress Executor should first be configured with the blend3c.mos model. Then, you run the blendxe.js program locally; this uses REST webservice requests to send the blend.csv file to the Xpress Executor and remotely solve the model using this, then downloads and displays the results. This example requires a local installation of Xpress for compiling the initial model, but not for starting the execution.

executor_rest_mosel_nodejs.zip[download all files]

Source Files
By clicking on a file name, a preview is opened at the bottom of this page.
blendxe.js[download]
blend3c.mos[download]

Data Files





package.json

{
  "name": "blendxe",
  "version": "1.0.0",
  "description": "Example of calling Xpress Executor from NodeJS",
  "main": "blendox",
  "author": "jamesfarmer@fico.com",
  "dependencies": {
    "csv-parse": "1.1.7",
    "delay": "1.3.1",
    "prequest": "1.0.0"
  }
}

Back to examples browserPrevious exampleNext example