Skip to main content

The IBM Decision Optimization CPLEX Modeling for Python

Project description

Welcome to the IBM® Decision Optimization CPLEX 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 can model your problems by using the Python API and solve them on the cloud with the IBM® Decision Optimization on Cloud service or on your computer with IBM® ILOG CPLEX Optimization Studio.

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

Solving with CPLEX locally requires that IBM® ILOG CPLEX Optimization Studio V12.6.3 or V12.7.0 is installed on your machine.

Solving with the IBM® Decision Optimization on Cloud service requires that you register for an account and get the API key.

This library is numpy friendly.

Documentation

Examples

Installation

  • pip install docplex

Changelog

New in 2.0.15:

  • Piecewise linear (PWL) functions are now supported. An API is now available on docplex.mp.model to create PWL functions and to create constraints using these PWL functions. PWL functions may be defined with breakpoints (default API) or by using slopes. Some simple arithmetic is also available to build new PWL functions by adding, subtracting, or scaling existing PWL functions.

  • DOcplex has undergone a significant overhaul effort that has resulted in an average of 30-50% improvement of modeling run-time performance. All parts of the API benefit from the performance improvements: creation of variables and constraints, removal of constraints, computation of sums of variables, and so on.

  • Constraints are now fully editable: the expressions of a constraint can be modified. Similarly, the objective expression can also be modified. This allows for complex workflows in which the model is modified after a solve and then solved again.

  • docplex is now available on Anaconda cloud and can be installed via the conda installation packager. See the IBM Anaconda home CPLEX Community Edition for Python is also provided on Anaconda Cloud to get free local solving capabilities with limitations.

  • Support of ~/.docplexrc configuration files for docplex.mp.context.Context is now dropped. This feature has been deprecated since 1.0.0.

  • Known incompatibility: class docplex.mp.model.AbstractModel moved to docplex.mp.absmodel.AbstractModel. Samples using this class have been updated.

New in 1.0.630:

  • Added support for CPLEX 12.7 and Python 3.5.

  • Upgraded the DOcplexcloud client to version 1.0.202.

  • Module docplex.mp.advmodel is now officially supported. This module

    provides support for efficient, specialized aggregator methods for large models.

  • When solving on DOcplexcloud, proxies can now be specified with the

    context.solver.docloud.proxies property.

  • When two constraints are defined with the same name, issue a warning instead of

    a fatal exception. The last constraint defined will take over the first one in the name directory.

  • Fix ValueError when passing a pandas DataFrame as variable keys (using

    DataFrame indexes).

  • Solution.get_values() returns a collection of variable values in one call.

  • docplex.mp.model no longer imports docloud.status. Any status

    previously initialized as JobSolveStatus.UNKNOWN is now initialized as None.

  • Minor improvements to notebooks and examples.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docplex-2.0.15.tar.gz (353.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page