scs 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +17 -3
- data/ext/scs/extconf.rb +29 -0
- data/lib/scs/version.rb +1 -1
- metadata +5 -5
- data/ext/scs/Rakefile +0 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6336ca9d1433f92e77c259062923fa2ce96888d215a6070b5e780730b621571a
|
4
|
+
data.tar.gz: 264f3030f2ddf34565c33dba5d1af5dc6ac8bc11f7ef1f4cf9130646825b48b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a8ffbd1707be25370186a84542eec3b37f13e452a7f202b04c1386c11fb0df05ccadf86d4268a926cae2266e6b21daf3f19925731bf71eb934360e5772f7b9a
|
7
|
+
data.tar.gz: 850a9e91d62bade7ac1e644745f7eb3b9194d09f894ed6e54f29ab3923d746a8f6ee641c99789f9a0768563e280654b585293ff9bbd9ada09a9f613d4155434a
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -4,6 +4,8 @@
|
|
4
4
|
|
5
5
|
:fire: Supports many different [problem types](https://www.cvxpy.org/tutorial/advanced/index.html#choosing-a-solver)
|
6
6
|
|
7
|
+
[![Build Status](https://travis-ci.org/ankane/scs.svg?branch=master)](https://travis-ci.org/ankane/scs) [![Build status](https://ci.appveyor.com/api/projects/status/wyn0cbgs0k5vg5tq/branch/master?svg=true)](https://ci.appveyor.com/project/ankane/scs/branch/master)
|
8
|
+
|
7
9
|
## Installation
|
8
10
|
|
9
11
|
Add this line to your application’s Gemfile:
|
@@ -12,6 +14,8 @@ Add this line to your application’s Gemfile:
|
|
12
14
|
gem 'scs'
|
13
15
|
```
|
14
16
|
|
17
|
+
If installation fails, you may need to install [dependencies](#dependencies).
|
18
|
+
|
15
19
|
## Getting Started
|
16
20
|
|
17
21
|
Prep the problem
|
@@ -25,7 +29,7 @@ And solve it
|
|
25
29
|
|
26
30
|
```ruby
|
27
31
|
solver = SCS::Solver.new
|
28
|
-
|
32
|
+
solver.solve(data, cone)
|
29
33
|
```
|
30
34
|
|
31
35
|
## Settings
|
@@ -56,6 +60,16 @@ SCS comes with two solvers: a direct solver which uses a cached LDL factorizatio
|
|
56
60
|
SCS::Solver.new(indirect: true)
|
57
61
|
```
|
58
62
|
|
63
|
+
## Dependencies
|
64
|
+
|
65
|
+
BLAS and LAPACK are required for SCS.
|
66
|
+
|
67
|
+
```sh
|
68
|
+
sudo apt-get install libblas-dev liblapack-dev
|
69
|
+
```
|
70
|
+
|
71
|
+
On Heroku, use the [heroku-apt-buildpack](https://github.com/heroku/heroku-buildpack-apt).
|
72
|
+
|
59
73
|
## Resources
|
60
74
|
|
61
75
|
- [Conic Optimization via Operator Splitting and Homogeneous Self-Dual Embedding](https://web.stanford.edu/~boyd/papers/scs.html)
|
@@ -73,10 +87,10 @@ Everyone is encouraged to help improve this project. Here are a few ways you can
|
|
73
87
|
- Write, clarify, or fix documentation
|
74
88
|
- Suggest or add new features
|
75
89
|
|
76
|
-
To get started with development
|
90
|
+
To get started with development:
|
77
91
|
|
78
92
|
```sh
|
79
|
-
git clone https://github.com/ankane/scs.git
|
93
|
+
git clone --recursive https://github.com/ankane/scs.git
|
80
94
|
cd scs
|
81
95
|
bundle install
|
82
96
|
bundle exec rake compile
|
data/ext/scs/extconf.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
require "mkmf"
|
2
|
+
|
3
|
+
def run(command)
|
4
|
+
puts ">> #{command}"
|
5
|
+
unless system(command)
|
6
|
+
raise "Command failed"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def inreplace(file, pattern, replacement)
|
11
|
+
contents = File.read(file)
|
12
|
+
File.write(file, contents.gsub(pattern, replacement))
|
13
|
+
end
|
14
|
+
|
15
|
+
arch = RbConfig::CONFIG["arch"]
|
16
|
+
puts "Arch: #{arch}"
|
17
|
+
|
18
|
+
scs = File.expand_path("../../vendor/scs", __dir__)
|
19
|
+
Dir.chdir(scs) do
|
20
|
+
case arch
|
21
|
+
when /mingw/
|
22
|
+
inreplace("scs.mk", "USE_LAPACK = 1", "USE_LAPACK = 0")
|
23
|
+
run "ridk exec make"
|
24
|
+
else
|
25
|
+
run "make"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
File.write("Makefile", dummy_makefile("scs").join)
|
data/lib/scs/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kane
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11-
|
11
|
+
date: 2019-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -70,13 +70,13 @@ description:
|
|
70
70
|
email: andrew@chartkick.com
|
71
71
|
executables: []
|
72
72
|
extensions:
|
73
|
-
- ext/scs/
|
73
|
+
- ext/scs/extconf.rb
|
74
74
|
extra_rdoc_files: []
|
75
75
|
files:
|
76
76
|
- CHANGELOG.md
|
77
77
|
- LICENSE.txt
|
78
78
|
- README.md
|
79
|
-
- ext/scs/
|
79
|
+
- ext/scs/extconf.rb
|
80
80
|
- lib/scs.rb
|
81
81
|
- lib/scs/ffi.rb
|
82
82
|
- lib/scs/solver.rb
|
@@ -196,7 +196,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
196
196
|
- !ruby/object:Gem::Version
|
197
197
|
version: '0'
|
198
198
|
requirements: []
|
199
|
-
rubygems_version: 3.0.
|
199
|
+
rubygems_version: 3.0.3
|
200
200
|
signing_key:
|
201
201
|
specification_version: 4
|
202
202
|
summary: SCS - the splitting conic solver - for Ruby
|