Skip to content

IBMDecisionOptimization/docplex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IBM® Decision Optimization Modeling for Python (DOcplex)

Welcome to the IBM® Decision Optimization Modeling for Python. Licensed under the Apache License v2.0.

With this library, you can quickly and easily add the power of optimization to your application. You need IBM ILOG CPLEX Optimization Studio to solve the models.

This library is composed of 2 modules:

  • IBM® Decision Optimization CPLEX Optimizer Modeling for Python - with namespace docplex.mp
  • IBM® Decision Optimization CP Optimizer Modeling for Python - with namespace docplex.cp

This library is numpy friendly.

Prerequisites

  • Python: 3.10 or (higher)

Installation

  • DOcplex (Decision Optimization CPLEX Modeling for Python):
pip install docplex
pip install cplex

The Community Edition is free and suitable for learning and small-to-medium problems. However, it has limitations on problem size (1000 variables, 1000 constraints).

Note: For larger problems or commercial use, you'll need the full version of CPLEX Optimization Studio or an academic license.

Full Version Installation

If you have IBM ILOG CPLEX Optimization Studio installed, you can install the Python API from the installation directory:

# Navigate to your CPLEX installation directory
cd <CPLEX_INSTALL_DIR>/python

# Install the package
python setup.py install

If CPLEX is installed separately, configure DOcplex:

docplex config --upgrade <COS_INSTALL_DIR>

This ensures DOcplex correctly detects your CPLEX installation.

DOcplex provides a higher-level API and works with both CPLEX and IBM Decision Optimization on Cloud. See the DOcplex examples repository for more information.

Get the documentation and examples

Get your IBM® ILOG CPLEX Optimization Studio edition

  • You can get a free Community Edition of CPLEX Optimization Studio, with limited solving capabilities in term of problem size.

  • Faculty members, research professionals at accredited institutions can get access to an unlimited version of CPLEX through the IBM® Academic Initiative.

Dependencies

These third-party dependencies are automatically installed with pip

License

This library is delivered under the Apache License Version 2.0, January 2004 (see LICENSE.txt).

Packages

 
 
 

Contributors

Languages