Commits (34)
......@@ -74,4 +74,19 @@ v 1.0.1, 27.08.14:
* Improved implementation of the retrieval of optimal primal variables with CPLEX.
With the previous versions there was an important overhead at the end of the
solving process to get the optimal values, this is now working much faster.
* Nicer documentation.
\ No newline at end of file
* Nicer documentation.
v 1.0.2, 30.01.15:
Major release with following new functionalities:
* Support (read and write) for ``.cbf`` problem files (`conic benchmark format <http://cblib.zib.de/>`_ ), which should be the standard for (mixed integer) conic optimization problems, cf. :func:`write_to_file <picos.Problem.write_to_file>` and :func:`import_cbf <picos.tools.import_cbf>` .
* Improved support for complex SDP (more efficient implementation of :func:`to_real() <picos.Problem.to_real>` , corrected bug in the implementation of the scalar product for Hermitian matrices and the conjugate of a complex expression, support for equality constraints involving complex coefficients)
* Support for inequalities involving the sum of k largest elements of an affine expression, or the k largest eigenvalues of a symmetric matrix expression, cf. the functions :func:`sum_k_largest() <picos.tools.sum_k_largest>` , :func:`sum_k_smallest() <picos.tools.sum_k_smallest>` , :func:`sum_k_largest_lambda() <picos.tools.sum_k_largest_lambda>`, :func:`sum_k_smallest_lambda() <picos.tools.sum_k_smallest_lambda>`, :func:`lambda_max() <picos.tools.lambda_max>` and :func:`lambda_min() <picos.tools.lambda_min>` .
* Support for inequalities involving the :math:`L_{p,q}-` norm of an affine expresison, cf. :func:`norm() <picos.tools.norm>` .
* New ``vtype`` for antisymmetric matrix variables ( :attr:`vtype <picos.Variable.vtype>` ``= antisym``).
* Constraints can be specified as membership in a :class:`Set <picos.Set>` . Sets can be created by the functions :func:`ball() <picos.tools.ball>` , :func:`simplex() <picos.tools.simplex>`, and :func:`truncated_simplex() <picos.tools.truncated_simplex>` .
* New functions :func:`maximize <picos.Problem.maximize>` and :func:`maximize <picos.Problem.minimize>` to specify the objective function of a problem and solve it.
And many thanks to `Petter Wittek <http://peterwittek.com/>`_ for the following improvements, who were motivated by the use of PICOS in the package `ncpol2sdpa <http://peterwittek.github.io/ncpol2sdpa/>`_ for optimization over noncommutative polynomials:
* More efficient implementation of the writer to the sparse - SDPA file format (:func:`write_to_file <picos.Problem.write_to_file>`)
* Hadamard (elementwise) product of affine expression is implemented, as an overload of the ``^`` operator, cf. an example :ref:`here <overloads>` .
* Partial transposition of an Affine Expression, cf. :func:`partial_transpose() <picos.tools.partial_transpose>` or the :attr:`Tx <picos.AffinExp.Tx>` attribute.
\ No newline at end of file
# file GENERATED by distutils, do NOT edit
CHANGES.txt
LICENSE.txt
README.txt
monomials.txt
setup.py
doc/api.rst
doc/changes.rst
doc/complex.rst
doc/constraint.rst
doc/download.rst
doc/examples.rst
doc/expression.rst
doc/graphs.rst
doc/index.rst
doc/intro.rst
doc/optdes.rst
doc/problem.rst
doc/summary.rst
doc/tools.rst
doc/tuto.rst
doc/tuto_summary.rst
doc/_static/picos_big_trans.gif
doc/_static/css/theme.css
doc/_templates/download.html
doc/_templates/localtoc2.html
picos/__init__.py
picos/constraint.py
picos/cplex_callbacks.py
......
include *.txt
recursive-include doc *.rst
recursive-include doc/_templates *.html
recursive-include doc/_static *
......@@ -3,11 +3,13 @@ lancer python ../../add_warning_notlast.py from directory /doc/full_html/x.x.x (
lancer script add_google_script directly from /doc
Changer CHANGE file
Creer dist file (python setup.py sdist) -> check that the doc is in the dist file ???
make html (to copy dist)
rsync to /www:
rsync -luzvr full_html/* opts1.zib.de:/www/Abt-Optimization/picos
[OBSOLETE: move to /www, and change root-index with 3 <meta tags> and $sed -i 's/href="/href="v013\//g' index.html]
rsync to /www
Register on pypi (python setup.py register, username guillaume.sagnol)
sed -i 's/Picos 0\.1\.0/Picos 0\.1\.1/g' picos/*.py
et change version num dans conf.py and setup.py and __init__.py
make new directory in the full_html directory and update the symolic link "last"
\ No newline at end of file
make new directory in the full_html directory and update the symolic link "last" with the ".." trick
\ No newline at end of file
This diff is collapsed.
newlines =['<body>',
'<div class="admonition warning">',
'<p class="first admonition-title">Warning</p>',
'<p class="last">You are consulting the doc of a former version of PICOS.',
'The latest version is <a href="../index.html">HERE</a>. </p>',
'</div>'
]
#newlines =['<body>',
#'<div class="admonition warning">',
#'<p class="first admonition-title">Warning</p>',
#'<p class="last">You are consulting the doc of a former version of PICOS.',
#'The latest version is <a href="../index.html">HERE</a>. </p>',
#'</div>'
#]
newlines = [
'<div role="main" class="document">',
'<div class="admonition warning" id="api">',
'<p class="first admonition-title">Warning</p>',
'<p class="last">You are consulting the doc of a former version of PICOS. The',
' latest version is <a href="../index.html">HERE</a>. </p>',
'</div>']
import os
files = os.popen('ls *.html').readlines()
files = [f[:-1] for f in files if f[:6] not in ('search','py-mod','genind')]
for f in files:
print f
fi=open(f,'r')
fitmp=open(f+'tmp','w')
line = fi.readline()
while '<body>' not in line:
#while '<body>' not in line:
while '<div role="main" class="document">' not in line:
fitmp.write(line)
line = fi.readline()
......
......@@ -8,9 +8,28 @@
Change History
==============
* 30 Jan. 15: **Picos** :ref:`1.0.2 <download>` **Released** |br|
Major release with following new functionalities:
* Support (read and write) for ``.cbf`` problem files (`conic benchmark format <http://cblib.zib.de/>`_ ), which should be the standard for (mixed integer) conic optimization problems, cf. :func:`write_to_file <picos.Problem.write_to_file>` and :func:`import_cbf <picos.tools.import_cbf>` .
* Improved support for complex SDP (more efficient implementation of :func:`to_real() <picos.Problem.to_real>` , corrected bug in the implementation of the scalar product for Hermitian matrices and the conjugate of a complex expression, support for equality constraints involving complex coefficients)
* Support for inequalities involving the sum of k largest elements of an affine expression, or the k largest eigenvalues of a symmetric matrix expression, cf. the functions :func:`sum_k_largest() <picos.tools.sum_k_largest>` , :func:`sum_k_smallest() <picos.tools.sum_k_smallest>` , :func:`sum_k_largest_lambda() <picos.tools.sum_k_largest_lambda>`, :func:`sum_k_smallest_lambda() <picos.tools.sum_k_smallest_lambda>`, :func:`lambda_max() <picos.tools.lambda_max>` and :func:`lambda_min() <picos.tools.lambda_min>` .
* Support for inequalities involving the :math:`L_{p,q}-` norm of an affine expresison, cf. :func:`norm() <picos.tools.norm>` .
* New ``vtype`` for antisymmetric matrix variables ( :attr:`vtype <picos.Variable.vtype>` ``= antisym``).
* Constraints can be specified as membership in a :class:`Set <picos.Set>` . Sets can be created by the functions :func:`ball() <picos.tools.ball>` , :func:`simplex() <picos.tools.simplex>`, and :func:`truncated_simplex() <picos.tools.truncated_simplex>` .
* New functions :func:`maximize <picos.Problem.maximize>` and :func:`maximize <picos.Problem.minimize>` to specify the objective function of a problem and solve it.
And many thanks to `Petter Wittek <http://peterwittek.com/>`_ for the following improvements, who were motivated by the use of PICOS in the package `ncpol2sdpa <http://peterwittek.github.io/ncpol2sdpa/>`_ for optimization over noncommutative polynomials:
* More efficient implementation of the writer to the sparse - SDPA file format (:func:`write_to_file <picos.Problem.write_to_file>`)
* Hadamard (elementwise) product of affine expression is implemented, as an overload of the ``^`` operator, cf. an example :ref:`here <overloads>` .
* Partial transposition of an Affine Expression, cf. :func:`partial_transpose() <picos.tools.partial_transpose>` or the :attr:`Tx <picos.AffinExp.Tx>` attribute.
* 27 Aug. 14: **Picos** :ref:`1.0.1 <download>` **Released** |br|
Release fixing the missing functionnalities of the previous *.dev* version:
Release fixing the missing functionalities of the previous *.dev* version:
* Improved support for complex SDP (access to dual information and correction of a few bugs, in particular sum of complex affine expression now work correctly)
* Flow constraints in graphs, including multicommodity flows, cf. :ref:`this section <flowcons>`.
* Additional ``coef`` argument in the function :func:`picos.tracepow() <picos.tools.tracepow>`, in order to represent constraints of the form :math:`\operatorname{trace}(M X^p) \geq t`.
......
:tocdepth: 2
.. _complex:
********************************
Complex Semidefinite Programming
********************************
************************************
**Complex Semidefinite Programming**
************************************
Since the version 1.0.1, it is possible to
do complex semidefinite programming with Picos.
......@@ -47,8 +49,8 @@ anf ``H`` (Hermitian transposition, i.e. ``exp.H`` returns ``exp.conj.T`` ).
Fidelity in Quantum Information Theory
======================================
*Fidelity in Quantum Information Theory*
========================================
The material of this section is inspired from a lecture of John Watrous :ref:`[4] <complex_refs>`.
......@@ -78,7 +80,6 @@ This quantity can be expressed as the optimal value of the following complex-val
\end{eqnarray*}
\end{center}
This Problem can be solved as follows in PICOS
.. testcode::
......@@ -154,8 +155,8 @@ This Problem can be solved as follows in PICOS
fidelity computed by trace-norm: F(P,Q) = 37.4742
Phase Recovery in Signal Processing
===================================
*Phase Recovery in Signal Processing*
=====================================
The material from this section is inspired from :ref:`[3] <complex_refs>`.
......@@ -252,8 +253,8 @@ This problem can be implemented as follows using Picos:
.. _complex_refs:
References
==========
*References*
============
1. "Approximation algorithms for MAX-3-CUT and other problems via complex semidefinite programming",
M.X. Goemans and D. Williamson. In Proceedings of the thirty-third annual
......
......@@ -72,7 +72,7 @@ copyright = u'2012, Guillaume Sagnol'
# The short X.Y version.
version = '1.0'
# The full version, including alpha/beta/rc tags.
release = '1.0.1'
release = '1.0.2'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
......
:tocdepth: 1
.. _constraint:
==========
Constraint
==========
==============
**Constraint**
==============
.. autoclass:: picos.Constraint
:members:
......@@ -14,6 +16,10 @@ Constraint
.. autoclass:: picos.NormP_Constraint
:members:
:inherited-members: slack
.. autoclass:: picos.NormPQ_Constraint
:members:
:inherited-members: slack
.. autoclass:: picos.TracePow_Constraint
:members:
......@@ -25,3 +31,7 @@ Constraint
.. autoclass:: picos.DetRootN_Constraint
:members:
:inherited-members: slack
.. autoclass:: picos.Sumklargest_Constraint
:members:
:inherited-members: slack
\ No newline at end of file
......@@ -6,7 +6,7 @@ Download
The latest version of PICOS can be downloaded here:
`picos-1.0.1 <dist/PICOS-1.0.1.tar.gz>`_
`picos-1.0.2 <dist/PICOS-1.0.2.tar.gz>`_
Installation instructions are explained
:ref:`here <requirements>`.
......@@ -15,6 +15,8 @@ Installation instructions are explained
**Older versions**
`picos-1.0.1 <dist/PICOS-1.0.1.tar.gz>`_
`picos-1.0.1.dev <dist/PICOS-1.0.1.dev.tar.gz>`_
`picos-1.0.0 <dist/PICOS-1.0.0.tar.gz>`_
......
:tocdepth: 2
.. _examples:
********
......@@ -7,7 +9,7 @@ Examples
.. toctree::
:maxdepth: 3
optdes.rst
graphs.rst
complex.rst
optdes.rst
:tocdepth: 2
.. _expression:
==========
Expression
==========
==============
**Expression**
==============
.. autoclass:: picos.Expression
AffinExp
========
*AffinExp*
==========
.. autoclass:: picos.AffinExp
:members:
Variable
""""""""
*Variable*
==========
.. _variable:
.. autoclass:: picos.Variable
:members:
Norm
====
*Norm*
======
.. autoclass:: picos.Norm
:members:
QuadExp
=======
*QuadExp*
=========
.. autoclass:: picos.QuadExp
:members:
LogSumExp
=========
*LogSumExp*
===========
.. autoclass:: picos.LogSumExp
:members:
GeoMeanExp
==========
*GeoMeanExp*
============
.. autoclass:: picos.GeoMeanExp
:members:
NormP_Exp
=========
*NormP_Exp*
===========
.. autoclass:: picos.NormP_Exp
:members:
TracePow_Exp
============
*TracePow_Exp*
==============
.. autoclass:: picos.TracePow_Exp
:members:
DetRootN_Exp
============
*DetRootN_Exp*
==============
.. autoclass:: picos.DetRootN_Exp
:members:
\ No newline at end of file
:members:
*Set*
=====
.. autoclass:: picos.Set
:members:
*Ball*
======
.. autoclass:: picos.Ball
:members:
*Truncated_Simplex*
===================
.. autoclass:: picos.Truncated_Simplex
:members:
......@@ -13,10 +13,10 @@ Change History
Release fixing the missing functionnalities of the previous *.dev* version:
* Improved support for complex SDP (access to dual information and correction of a few bugs, in particular sum of complex affine expression now work correctly)
* Flow constraints in graphs, including multicommodity flows, cf. :ref:`this section <flowcons>`.
* Improved implementation of :func:`_retrieve_matrix() <picos.tools._retrieve_matrix>`, which
was taking a very long time to process large parameters.
* Additional ``coef`` argument in the function :func:`picos.tracepow() <picos.tools.tracepow>`, in order to represent constraints of the form :math:`\operatorname{trace}(M X^p) \geq t`.
* Improved implementation of :func:`_retrieve_matrix() <picos.tools._retrieve_matrix>`, which was taking a very long time to process large parameters.
* Improved implementation of the retrieval of optimal primal variables with CPLEX. With the previous versions there was an important overhead at the end of the solving process to get the optimal values, this is now working much faster.
* Improved readibility of the documentation.
* Nicer documentation.
* 18 May 14: **Picos** :ref:`1.0.1.dev <download>` **Released** |br|
......
......@@ -143,7 +143,7 @@ we solve below for ``s=16`` and ``t=10``:
---------------------
optimization problem (LP):
61 variables, 139 affine constraints
61 variables, 140 affine constraints
f : dict of 60 variables, (1, 1), continuous
F : (1, 1), continuous
......
......@@ -31,8 +31,9 @@ on every function of PICOS.
Major Release with following changes:
* Support for Semidefinite Programming over the complex domain, see :ref:`here <complex>`.
* Flow constraints in graphs, cf. :ref:`this section <flowcons>`.
* Additional ``coef`` argument in the function :func:`picos.tracepow() <picos.tools.tracepow>`, in order to represent constraints of the form :math:`\operatorname{trace}(M X^p) \geq t`.
* Improved implementation of several functionalities, in particular the slicing of affine expressions (``__getitem__``), the processing of large matrix parameters, and the access to primal optimal variables with CPLEX.
* Improved readibility of the documentation.
* Nicer documentation.
* 18 May 14: **Picos** :ref:`1.0.1.dev <download>` **Released** |br|
Preliminary release of the 1.0.1 (still a few bugs for complex SDPs).
......
......@@ -344,6 +344,8 @@ Author and contributors
their comments, ideas, questions, ... (in no particular order):
* `Dan Stahlke <http://www.stahlke.org/>`_
* `Marco Dalai <http://www.ing.unibs.it/~marco.dalai/>`_
* `Matteo Seminaroti <http://www.cwi.nl/people/2683/>`_
......
......@@ -1263,4 +1263,6 @@ References
4. "`On the semidefinite representations of real functions applied to symmetric
matrices <http://opus4.kobv.de/opus4-zib/frontdoor/index/index/docId/1751>`_", G. Sagnol,
Submitted, ZIB Report 12-50, 2012.
\ No newline at end of file
*Linear Algebra and its Applications*,
439(10), p. *2829-2843*, 2013.
\ No newline at end of file
......@@ -808,11 +808,20 @@ creates the constraint
is used, the base :math:`x` is forced to be nonnegative (resp. the base :math:`X` is
forced to be positive semidefinite) by picos.
When the exponent is :math:`0<p<1`,
it is also possible to represent constraints of the form
:math:`\operatorname{trace}(M X^p) \geq t`
with SDPs, where :math:`M\succeq 0`, see :ref:`[2] <tuto_refs>`.
>>> pic.tracepow(X, 0.6666, coef = A[0].T*A[0]) >= t
# trace of pth power ineq : trace[ A[0].T*A[0] *(X)**2/3]>t#
As for geometric means, inequalities involving real powers are
stored in a temporary object of the class :class:`TracePow_Constraint <picos.TracePow_Constraint>`,
which contains a field ``Ptmp`` , a Problem instance with all the SOC or SDP constraints
used to represent the original inequality.
Inequalities involving generalized p-norm
-----------------------------------------
......@@ -1218,4 +1227,8 @@ References
M.S. Lobo, L. Vandenberghe, S. Boyd and H. Lebret,
*Linear Algebra and its Applications*,
284, p. *193-228*, 1998.
2. "`On the semidefinite representations of real functions applied to symmetric
matrices <http://opus4.kobv.de/opus4-zib/frontdoor/index/index/docId/1751>`_", G. Sagnol,
*Linear Algebra and its Applications*,
439(10), p. *2829-2843*, 2013.
......@@ -35,6 +35,22 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33037163-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body class="wy-body-for-nav" role="document">
......@@ -129,8 +145,7 @@
</ul>
<hr/>
</div>
<div role="main" class="document">
<div role="main" class="document"><div class="admonition warning" id="api"><p class="first admonition-title">Warning</p><p class="last">You are consulting the doc of a former version of PICOS. The latest version is <a href="../index.html">HERE</a>. </p></div>
<div class="section" id="the-picos-reference">
<span id="api"></span><h1>The PICOS Reference<a class="headerlink" href="#the-picos-reference" title="Permalink to this headline"></a></h1>
<div class="toctree-wrapper compound">
......