With IBM® Decision Optimization CPLEX® modeling for Python you can now model your optimization problems using the Python programming language.
At IBM, we love Python because it is one of the most useful tools to turn an idea into working code to deal with a data-wrangling problem, and then visualize results. Python becomes the best tool if you need to deliver commercial software using data science or to bring a model to production. Out of the box, here are some of its many advantages:
- Interpreted, dynamically-typed language with a precise, efficient syntax.
- Growing range of scientific packages: numerical and data analysis, plotting functionality, machine learning, scientific computing …
- Jupyter/Zeppelin notebooks to try out code snippets and create business reports.
- Large community to get help and open source packages
- Common programming language used all across different teams in the organization.
How can I solve my problems in Python?
You can solve your optimization Python model fully on the cloud with the DOcplexcloud service, in hybrid mode with your own Python environment and a DOcplexcloud API key, or locally on your computer with IBM ILOG® CPLEX Optimization Studio.
Cloud: Solving Python models using just DOcplexcloud
DOcplexcloud uses a docker container for its Python environment. The docker runs Anaconda V4.0 with Python 2.7. To submit your Python model, you can use any of the existing APIs – REST, Java, or Python – or the DropSolve interface.
Hybrid: Solving Python models using your local Python environment and DOcplexcloud
To use the DOcplexcloud service you need to subscribe to a DOcplexcloud account (or register the 30 days free trial) and get an API key and the base URL. You also need a Python 2.7 environment. Python processing is performed locally and optimization is performed by DOcplexcloud.
In the DOcplex Modeling for Python documentation, the section Using the IBM Decision Optimization on Cloud service contains the set up information you need to get started.
Local: Solving Python models using CPLEX Optimization Studio
To use with CPLEX Optimization Studio you need to install the software. You can use the free Community Edition of CPLEX Optimization Studio which includes the CPLEX and CP Optimizer solution engines with some restrictions.
Access the DOcplex Modeling for Python documentation.