Skip to content

Commit

Permalink
Merge pull request #3 from IBMDecisionOptimization/vberaudi-2.24
Browse files Browse the repository at this point in the history
release 2.24.232
  • Loading branch information
vberaudi authored Nov 29, 2022
2 parents 348dffd + e3892ae commit ba36746
Show file tree
Hide file tree
Showing 313 changed files with 164,026 additions and 21 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
Changelog
---------

Changed in 2.24.231:
Changed in 2.24.232:
````````````````````
* Optional CPLEX import for qiskit
* Fix in cut getter

Changed in 2.24.231 (2022.11):
``````````````````````````````

* Support for CPLEX Optimization Studio 22.1.1 runtimes.
* Cleanup of the code related to Watson Machine Learning.
* In ``docplex.mp``:
Expand Down
6 changes: 5 additions & 1 deletion docplex/mp/cplex_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
import numbers
import sys

from cplex._internal._subinterfaces import CutType
try:
from cplex._internal._subinterfaces import CutType
except:
CutType = list

from docplex.mp.engine import IEngine
from docplex.mp.utils import DOcplexException, is_string
from docplex.mp.constants import ConflictStatus
Expand Down
16 changes: 11 additions & 5 deletions docplex/mp/solution.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
import sys
import copy

from cplex._internal._subinterfaces import CutType
try:
from cplex._internal._subinterfaces import CutType
except:
CutType = list

try: # pragma: no cover
from itertools import zip_longest as izip_longest
Expand Down Expand Up @@ -849,18 +852,21 @@ def get_num_cuts(self, cut_type):
""" Returns the number of cuts for a specific type.
:param cut_type: a cut type.
:return: the number of cuts associated to this type of cut.
:return: the number of cuts associated to this type of cut. 0 if CPLEX is not present
"""
cut_type_instance = CutType()
if cut_type in cut_type_instance:
return self.get_cuts()[cut_type]
handle_error(logger=self.model, error="raise", msg="Cut type does not exist")
cuts = self.get_cuts()
name = cut_type_instance[cut_type]
return cuts[name]
return 0



def get_cuts(self):
""" Returns the number of cuts under the form of a dict(type -> number).
:return: the number of cuts under the form of a dict(type -> number).
:return: the number of cuts under the form of a dict(type -> number). Empty dict if CPLEX is not present.
"""
m = self.model
self.ensure_cuts(m, m.get_engine())
Expand Down
4 changes: 2 additions & 2 deletions docplex/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# See script tools/gen_version.py
docplex_version_major = 2
docplex_version_minor = 24
docplex_version_micro = 231
docplex_version_string = '2.24.231'
docplex_version_micro = 232
docplex_version_string = '2.24.232'

latest_cplex_major = 22
latest_cplex_minor = 1
898 changes: 898 additions & 0 deletions docs/2.24.232/CHANGELOG.html

Large diffs are not rendered by default.

191 changes: 191 additions & 0 deletions docs/2.24.232/README.md.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@


<!doctype html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>README.md &#8212; IBM&reg; Decision Optimization CPLEX&reg; Modeling for Python (DOcplex) V2.24 documentation</title>
<link rel="stylesheet" href="_static/bizstyle.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />

<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="_static/language_data.js"></script>
<script type="text/javascript" src="_static/bizstyle.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<!--[if lt IE 9]>
<script type="text/javascript" src="_static/css3-mediaqueries.js"></script>
<![endif]-->
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="nav-item nav-item-0"><a href="index.html">IBM&reg; Decision Optimization CPLEX&reg; Modeling for Python (DOcplex) V2.24 documentation</a> &#187;</li>
</ul>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
</div>
</div>

<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">

<div class="section" id="readme-md">
<h1>README.md<a class="headerlink" href="#readme-md" title="Permalink to this headline">&para;</a></h1>
<div class="highlight-text notranslate"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal"> 1</span>
<span class="normal"> 2</span>
<span class="normal"> 3</span>
<span class="normal"> 4</span>
<span class="normal"> 5</span>
<span class="normal"> 6</span>
<span class="normal"> 7</span>
<span class="normal"> 8</span>
<span class="normal"> 9</span>
<span class="normal">10</span>
<span class="normal">11</span>
<span class="normal">12</span>
<span class="normal">13</span>
<span class="normal">14</span>
<span class="normal">15</span>
<span class="normal">16</span>
<span class="normal">17</span>
<span class="normal">18</span>
<span class="normal">19</span>
<span class="normal">20</span>
<span class="normal">21</span>
<span class="normal">22</span>
<span class="normal">23</span>
<span class="normal">24</span>
<span class="normal">25</span>
<span class="normal">26</span>
<span class="normal">27</span>
<span class="normal">28</span>
<span class="normal">29</span>
<span class="normal">30</span>
<span class="normal">31</span>
<span class="normal">32</span>
<span class="normal">33</span>
<span class="normal">34</span>
<span class="normal">35</span>
<span class="normal">36</span>
<span class="normal">37</span>
<span class="normal">38</span>
<span class="normal">39</span>
<span class="normal">40</span>
<span class="normal">41</span>
<span class="normal">42</span>
<span class="normal">43</span>
<span class="normal">44</span>
<span class="normal">45</span>
<span class="normal">46</span>
<span class="normal">47</span>
<span class="normal">48</span>
<span class="normal">49</span>
<span class="normal">50</span>
<span class="normal">51</span>
<span class="normal">52</span>
<span class="normal">53</span>
<span class="normal">54</span>
<span class="normal">55</span>
<span class="normal">56</span>
<span class="normal">57</span>
<span class="normal">58</span>
<span class="normal">59</span>
<span class="normal">60</span>
<span class="normal">61</span></pre></div></td><td class="code"><div class="highlight"><pre><span></span># IBM&amp;reg; Decision Optimization Modeling for Python (DOcplex)

Welcome to the IBM&amp;reg; 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&amp;reg; Decision Optimization CPLEX Optimizer Modeling for Python - with namespace docplex.mp
* IBM&amp;reg; Decision Optimization CP Optimizer Modeling for Python - with namespace docplex.cp

Solving with CPLEX requires that IBM&amp;reg; ILOG CPLEX Optimization Studio V12.10 or later
is installed on your machine.

This library is numpy friendly.

## Install the library

```
pip install docplex
```

## Get the documentation and examples

* [Latest documentation](http://ibmdecisionoptimization.github.io/docplex-doc/)
* Documentation archives:
* [2.23.222](http://ibmdecisionoptimization.github.io/docplex-doc/2.23.222)
* [2.22.213](http://ibmdecisionoptimization.github.io/docplex-doc/2.22.213)
* [2.21.207](http://ibmdecisionoptimization.github.io/docplex-doc/2.21.207)
* [2.20.204](http://ibmdecisionoptimization.github.io/docplex-doc/2.20.204)
* [2.19.202](http://ibmdecisionoptimization.github.io/docplex-doc/2.19.202)
* [2.18.200](http://ibmdecisionoptimization.github.io/docplex-doc/2.18.200)
* [2.16.195](http://ibmdecisionoptimization.github.io/docplex-doc/2.16.195)
* [Examples](https://github.com/IBMDecisionOptimization/docplex-examples)

## Get your IBM&amp;reg; ILOG CPLEX Optimization Studio edition

- You can get a free [Community Edition](https://www.ibm.com/account/reg/us-en/signup?formid=urx-20028)
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&amp;reg; Academic Initiative](http://ibm.biz/cplex-free-for-students).

## Dependencies

These third-party dependencies are automatically installed with ``pip``

- [futures](https://pypi.python.org/pypi/futures)
- [requests](https://pypi.python.org/pypi/requests)
- [six](https://pypi.python.org/pypi/six)
- [certifi](https://pypi.python.org/pypi/certifi)
- [chardet](https://pypi.python.org/pypi/chardet)
- [idna](https://pypi.python.org/pypi/idna)
- [urllib3](https://pypi.python.org/pypi/urllib3)


## License

This library is delivered under the Apache License Version 2.0, January 2004 (see LICENSE.txt).
</pre></div>
</td></tr></table></div>
</div>


</div>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="nav-item nav-item-0"><a href="index.html">IBM&reg; Decision Optimization CPLEX&reg; Modeling for Python (DOcplex) V2.24 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&#169; Copyright 2016-2022, IBM&reg;.
</div>
</body>
</html>
Binary file added docs/2.24.232/_images/equ_mathProgr12_default.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/2.24.232/_images/equ_mathProgr23_default.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/2.24.232/_images/ln_docloud-engine.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/2.24.232/_static/ajax-loader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/2.24.232/_static/background_b01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit ba36746

Please sign in to comment.