Initializing help system before first use

Using Python to Model the Example Business Problem

The Insight Python module implements functionality for developing Python based web applications for Xpress Insight, to make the extensive scientific and numeric capabilities of Python available from Insight.

This section describes how to use the Insight Python module to develop an optimization web application with Python, and how to deploy it to and run it in Xpress Insight. We will use the integrated development environment FICO Xpress Workbench to deploy the application to the web application server Xpress Insight.

The optimization model at the heart of the application can be authored with any Python package. In particular, you can use the Xpress Optimizer Python API to solve the model with the Xpress solver.

This section will:
  • Explain the relationship between Xpress Insight, Xpress Workbench, and the Python Module, when installed on the developer machine.
  • Provide a basic Insight Python example application.

Key Concepts

See the Xpress Insight Administrator Guide for more on the roles and architectural components of an Insight system.

The Insight Python module directly connects Insight with Python to enable you to develop Insight interfaces for a Python application. You can import additional Python packages to enable:
  • The Optimizer Python API to talk to Xpress Optimizer.
  • Use of Numpy and pandas Python packages.
  • Connection to third party solvers.

There are no limitations to Python functionality. The Insight Python package enables the creation of standalone Python apps, developed in Xpress Workbench, and deployed to Xpress Insight.

How Insight Interacts with the Python application

Developers can use this module to define a Python application class that can be deployed to Insight. The data model and execution mode functions are then defined in this application class. The module uses the data model to automatically exchange the data between the Insight server and the application. The data will be stored in the attributes of the application instance using any of the supported Python types; pandas DataFrames, Series, Index, and scalar.

Operation

The Python interpreter will be executed by the Xpress Insight server. The server will automatically load the application and trigger a certain execution mode function. Depending on the type of the execution mode, the data is automatically injected into and extracted from the application instance.

Python layer

The main Insight Python objects are:
  • variable
  • constraint
  • expression
  • objective function

© 2001-2020 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.