-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME
85 lines (57 loc) · 1.72 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
scikit-dsdp
==============
scikit-dsdp provides Python interface to DSDP semidefinite programming library. The DSDP package implements a dual-scaling algorithm to find solutions (X, y) to linear and semidefinite optimization problems of the form
inf tr(CX)
subject to AX = b
X >= 0
with (AX)_i = tr(A_iX) where X >= 0 means X is positive semidefinite, C and all A_i are symmetric matrices of the same size and b is a vector of length m.
The dual of the problem is
sup b'y
subject to A'y + S = C
S >= 0
where A'y = \sum_{i=1}^m y_i A_i.
Matrices C and A_i are assumed to be block diagonal structured, and must be specified that way (see Details).
Example
============
from pydsdp.dsdp5 import dsdp
from numpy import matrix
A = matrix([
[10, 4, 4, 0],
[0, 0, 0, -8],
[0, -8, -8, -2]])
b = matrix ([
[48] ,
[-8],
[20]])
c = matrix ([
[-11] ,
[0] ,
[0] ,
[23]])
K = {} # K is a dictionary for sizes of different cones
K['s'] = [2]
result = dsdp(A, b, c, K)
Dependencies
============
scikit-dsdp depends on NumPy and SciPy.
Install
=======
This package uses distutils, which is the default way of installing python
modules. In the directory scikit-dsdp (the same as the file you are reading
now) do::
python setup.py install
or for a local installation::
python setup.py install --root=<DIRECTORY>
Development
===========
Code
----
You can check the latest sources with the command::
git clone https://github.com/zhisu/scikit-dsdp.git
or if you have write privileges::
git clone git@github.com:zhisu/scikit-dsdp.git
Testing
-------
After installation, you can launch the test suite from outside the
source directory (you will need to have the ``nose`` package installed)::
nosetests -v dsdp