scs 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -0
  3. data/LICENSE.txt +18 -18
  4. data/README.md +28 -9
  5. data/ext/scs/extconf.rb +29 -0
  6. data/lib/scs/ffi.rb +30 -13
  7. data/lib/scs/solver.rb +32 -14
  8. data/lib/scs/version.rb +1 -1
  9. data/vendor/scs/CITATION.cff +39 -0
  10. data/vendor/scs/CMakeLists.txt +272 -0
  11. data/vendor/scs/Makefile +24 -15
  12. data/vendor/scs/README.md +8 -216
  13. data/vendor/scs/include/aa.h +67 -23
  14. data/vendor/scs/include/cones.h +17 -17
  15. data/vendor/scs/include/glbopts.h +98 -32
  16. data/vendor/scs/include/linalg.h +2 -4
  17. data/vendor/scs/include/linsys.h +58 -44
  18. data/vendor/scs/include/normalize.h +3 -3
  19. data/vendor/scs/include/rw.h +8 -2
  20. data/vendor/scs/include/scs.h +293 -133
  21. data/vendor/scs/include/util.h +3 -15
  22. data/vendor/scs/linsys/cpu/direct/private.c +220 -224
  23. data/vendor/scs/linsys/cpu/direct/private.h +13 -7
  24. data/vendor/scs/linsys/cpu/direct/private.o +0 -0
  25. data/vendor/scs/linsys/cpu/indirect/private.c +177 -110
  26. data/vendor/scs/linsys/cpu/indirect/private.h +8 -4
  27. data/vendor/scs/linsys/cpu/indirect/private.o +0 -0
  28. data/vendor/scs/linsys/csparse.c +87 -0
  29. data/vendor/scs/linsys/csparse.h +34 -0
  30. data/vendor/scs/linsys/csparse.o +0 -0
  31. data/vendor/scs/linsys/external/amd/SuiteSparse_config.c +1 -1
  32. data/vendor/scs/linsys/external/amd/SuiteSparse_config.o +0 -0
  33. data/vendor/scs/linsys/external/amd/amd_1.o +0 -0
  34. data/vendor/scs/linsys/external/amd/amd_2.o +0 -0
  35. data/vendor/scs/linsys/external/amd/amd_aat.o +0 -0
  36. data/vendor/scs/linsys/external/amd/amd_control.o +0 -0
  37. data/vendor/scs/linsys/external/amd/amd_defaults.o +0 -0
  38. data/vendor/scs/linsys/external/amd/amd_dump.o +0 -0
  39. data/vendor/scs/linsys/external/amd/amd_global.o +0 -0
  40. data/vendor/scs/linsys/external/amd/amd_info.o +0 -0
  41. data/vendor/scs/linsys/external/amd/amd_internal.h +1 -1
  42. data/vendor/scs/linsys/external/amd/amd_order.o +0 -0
  43. data/vendor/scs/linsys/external/amd/amd_post_tree.o +0 -0
  44. data/vendor/scs/linsys/external/amd/amd_postorder.o +0 -0
  45. data/vendor/scs/linsys/external/amd/amd_preprocess.o +0 -0
  46. data/vendor/scs/linsys/external/amd/amd_valid.o +0 -0
  47. data/vendor/scs/linsys/external/qdldl/changes +2 -0
  48. data/vendor/scs/linsys/external/qdldl/qdldl.c +29 -46
  49. data/vendor/scs/linsys/external/qdldl/qdldl.h +33 -41
  50. data/vendor/scs/linsys/external/qdldl/qdldl.o +0 -0
  51. data/vendor/scs/linsys/external/qdldl/qdldl_types.h +11 -3
  52. data/vendor/scs/linsys/gpu/gpu.c +58 -21
  53. data/vendor/scs/linsys/gpu/gpu.h +66 -28
  54. data/vendor/scs/linsys/gpu/indirect/private.c +368 -154
  55. data/vendor/scs/linsys/gpu/indirect/private.h +26 -12
  56. data/vendor/scs/linsys/scs_matrix.c +498 -0
  57. data/vendor/scs/linsys/scs_matrix.h +70 -0
  58. data/vendor/scs/linsys/scs_matrix.o +0 -0
  59. data/vendor/scs/scs.mk +13 -9
  60. data/vendor/scs/src/aa.c +384 -109
  61. data/vendor/scs/src/aa.o +0 -0
  62. data/vendor/scs/src/cones.c +440 -353
  63. data/vendor/scs/src/cones.o +0 -0
  64. data/vendor/scs/src/ctrlc.c +15 -5
  65. data/vendor/scs/src/ctrlc.o +0 -0
  66. data/vendor/scs/src/linalg.c +84 -28
  67. data/vendor/scs/src/linalg.o +0 -0
  68. data/vendor/scs/src/normalize.c +22 -64
  69. data/vendor/scs/src/normalize.o +0 -0
  70. data/vendor/scs/src/rw.c +161 -22
  71. data/vendor/scs/src/rw.o +0 -0
  72. data/vendor/scs/src/scs.c +768 -561
  73. data/vendor/scs/src/scs.o +0 -0
  74. data/vendor/scs/src/scs_indir.o +0 -0
  75. data/vendor/scs/src/scs_version.c +9 -3
  76. data/vendor/scs/src/scs_version.o +0 -0
  77. data/vendor/scs/src/util.c +37 -106
  78. data/vendor/scs/src/util.o +0 -0
  79. data/vendor/scs/test/minunit.h +17 -8
  80. data/vendor/scs/test/problem_utils.h +176 -14
  81. data/vendor/scs/test/problems/degenerate.h +130 -0
  82. data/vendor/scs/test/problems/hs21_tiny_qp.h +124 -0
  83. data/vendor/scs/test/problems/hs21_tiny_qp_rw.h +116 -0
  84. data/vendor/scs/test/problems/infeasible_tiny_qp.h +100 -0
  85. data/vendor/scs/test/problems/qafiro_tiny_qp.h +199 -0
  86. data/vendor/scs/test/problems/random_prob +0 -0
  87. data/vendor/scs/test/problems/random_prob.h +45 -0
  88. data/vendor/scs/test/problems/rob_gauss_cov_est.h +188 -31
  89. data/vendor/scs/test/problems/small_lp.h +13 -14
  90. data/vendor/scs/test/problems/test_fails.h +43 -0
  91. data/vendor/scs/test/problems/unbounded_tiny_qp.h +82 -0
  92. data/vendor/scs/test/random_socp_prob.c +54 -53
  93. data/vendor/scs/test/rng.h +109 -0
  94. data/vendor/scs/test/run_from_file.c +19 -10
  95. data/vendor/scs/test/run_tests.c +27 -3
  96. metadata +30 -73
  97. data/ext/scs/Rakefile +0 -11
  98. data/vendor/scs/linsys/amatrix.c +0 -305
  99. data/vendor/scs/linsys/amatrix.h +0 -36
  100. data/vendor/scs/linsys/amatrix.o +0 -0
  101. data/vendor/scs/test/data/small_random_socp +0 -0
  102. data/vendor/scs/test/problems/small_random_socp.h +0 -33
  103. data/vendor/scs/test/run_tests +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3d577e9f481249087408220ac5a609c9eef5efcd8befd5b81368f3b84daca30
4
- data.tar.gz: 1d1a05bcb8326b8a5f06a29715bae4a9788fdf9ee416410d33134da102efc1e9
3
+ metadata.gz: b9f5ea6b779ddcbadb769df873b68fa590378cb01aa8770fe3e4efebf471f487
4
+ data.tar.gz: 4e218fccbf2270d438d57f9d7efbd793838a250845d3aae09a1229ca250595bc
5
5
  SHA512:
6
- metadata.gz: 50e6df0f1faef9c92d5659557b0dcaf4fc1342ea224a61fee1f45abf3c22031314ccc7c61ec7c4756722d29f02f30dddb3e5dc0bdba3e1618e3b6f600622f38b
7
- data.tar.gz: 6a2e023b50207693e349dac6f159fe97d58dfc3fa3dc095c6a580da24c61a39b795b412c4120b3950ffa3f3ffec5e1b93319ca537e0b645e431ad02fb96943c7
6
+ metadata.gz: b58f4154cd9ab36ed7fc152bbe3ccaa9effc9c820b689503289ab31ccf5dbb3304eb6fb6254b5dbc254f621e40c14740297a5e5c30c33e821f905ec50f9ddf3c
7
+ data.tar.gz: e4f8d67c93889ccdbd5008e97cf4e2875f52dd4209c504eb16bac41b90c942f25cd7312e523fffaed0b35e1c8c6187dd9f858f3c114c73a047ea8ab619525bb8
data/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## 0.3.0 (2021-10-05)
2
+
3
+ - Updated SCS to 3.0.0
4
+
5
+ ## 0.2.3 (2021-09-09)
6
+
7
+ - Updated SCS to 2.1.4
8
+
9
+ ## 0.2.2 (2020-07-21)
10
+
11
+ - Updated SCS to 2.1.2
12
+
13
+ ## 0.2.1 (2019-11-29)
14
+
15
+ - Fixed installation on Windows
16
+ - Removed dependency on rake for installation
17
+
1
18
  ## 0.2.0 (2019-11-16)
2
19
 
3
20
  - First release
data/LICENSE.txt CHANGED
@@ -1,22 +1,22 @@
1
- Copyright (c) 2019 Andrew Kane
1
+ The MIT License (MIT)
2
2
 
3
- MIT License
3
+ Copyright (c) 2012 Brendan O'Donoghue (bodonoghue85@gmail.com)
4
+ Copyright (c) 2019-2021 Andrew Kane
4
5
 
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
12
 
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
15
 
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
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://github.com/ankane/scs/workflows/build/badge.svg?branch=master)](https://github.com/ankane/scs/actions)
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
- result = solver.solve(data, cone)
32
+ solver.solve(data, cone)
29
33
  ```
30
34
 
31
35
  ## Settings
@@ -35,16 +39,21 @@ Default values shown
35
39
  ```ruby
36
40
  solver.solve(data, cone, {
37
41
  normalize: true, # heuristic data rescaling
38
- scale: 1.0, # if normalized, rescales by this factor
39
- rho_x: 1e-3, # x equality constraint scaling
40
- max_iters: 5000, # maximum iterations to take
41
- eps: 1e-5, # convergence tolerance
42
+ scale: 0.1, # if normalized, rescales by this factor
43
+ adaptive_scale: true, # heuristically adapt dual scale through the solve
44
+ rho_x: 1e-6, # x equality constraint scaling
45
+ max_iters: 1e5, # maximum iterations to take
46
+ eps_abs: 1e-4, # absolute feasibility tolerance
47
+ eps_rel: 1e-4, # relative feasibility tolerance
48
+ eps_infeas: 1e-7, # infeasibility tolerance
42
49
  alpha: 1.5, # relaxation parameter
43
- cg_rate: 2.0, # for indirect, tolerance goes down like (1/iter)^cg_rate
50
+ time_limit_secs: nil, # time limit for solve run in seconds
44
51
  verbose: true, # write out progress
45
52
  warm_start: false, # warm start
46
53
  acceleration_lookback: 10, # memory for acceleration
47
- write_data_filename: nil # filename to write data if set
54
+ acceleration_interval: 10, # iterations to run Anderson acceleration
55
+ write_data_filename: nil, # filename to write data if set
56
+ log_csv_filename: nil # write csv logs of various quantities
48
57
  })
49
58
  ```
50
59
 
@@ -56,6 +65,16 @@ SCS comes with two solvers: a direct solver which uses a cached LDL factorizatio
56
65
  SCS::Solver.new(indirect: true)
57
66
  ```
58
67
 
68
+ ## Dependencies
69
+
70
+ BLAS and LAPACK are required for SCS.
71
+
72
+ ```sh
73
+ sudo apt-get install libblas-dev liblapack-dev
74
+ ```
75
+
76
+ On Heroku, use the [heroku-apt-buildpack](https://github.com/heroku/heroku-buildpack-apt).
77
+
59
78
  ## Resources
60
79
 
61
80
  - [Conic Optimization via Operator Splitting and Homogeneous Self-Dual Embedding](https://web.stanford.edu/~boyd/papers/scs.html)
@@ -73,10 +92,10 @@ Everyone is encouraged to help improve this project. Here are a few ways you can
73
92
  - Write, clarify, or fix documentation
74
93
  - Suggest or add new features
75
94
 
76
- To get started with development and testing:
95
+ To get started with development:
77
96
 
78
97
  ```sh
79
- git clone https://github.com/ankane/scs.git
98
+ git clone --recursive https://github.com/ankane/scs.git
80
99
  cd scs
81
100
  bundle install
82
101
  bundle exec rake compile
@@ -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/ffi.rb CHANGED
@@ -41,14 +41,17 @@ module SCS
41
41
  "scs_int m",
42
42
  "scs_int n",
43
43
  "ScsMatrix *a",
44
+ "ScsMatrix *p",
44
45
  "scs_float *b",
45
46
  "scs_float *c",
46
- "ScsSettings *stgs"
47
47
  ]
48
48
 
49
49
  m::Cone = struct [
50
- "scs_int f",
50
+ "scs_int z",
51
51
  "scs_int l",
52
+ "scs_float *bu",
53
+ "scs_float *bl",
54
+ "scs_int *bsize",
52
55
  "scs_int *q",
53
56
  "scs_int qsize",
54
57
  "scs_int *s",
@@ -67,31 +70,45 @@ module SCS
67
70
 
68
71
  m::Info = struct [
69
72
  "scs_int iter",
70
- "char status[32]",
73
+ "char status[128]",
71
74
  "scs_int status_val",
75
+ "scs_int scale_updates",
72
76
  "scs_float pobj",
73
77
  "scs_float dobj",
74
78
  "scs_float res_pri",
75
79
  "scs_float res_dual",
80
+ "scs_float gap",
76
81
  "scs_float res_infeas",
77
- "scs_float res_unbdd",
78
- "scs_float rel_gap",
82
+ "scs_float res_unbdd_a",
83
+ "scs_float res_unbdd_p",
79
84
  "scs_float setup_time",
80
- "scs_float solve_time"
85
+ "scs_float solve_time",
86
+ "scs_float scale",
87
+ "scs_float comp_slack",
88
+ "scs_int rejected_accel_steps",
89
+ "scs_int accepted_accel_steps",
90
+ "scs_float lin_sys_time",
91
+ "scs_float cone_time",
92
+ "scs_float accel_time"
81
93
  ]
82
94
 
83
95
  m::Settings = struct [
84
96
  "scs_int normalize",
85
97
  "scs_float scale",
98
+ "scs_int adaptive_scale",
86
99
  "scs_float rho_x",
87
100
  "scs_int max_iters",
88
- "scs_float eps",
101
+ "scs_float eps_abs",
102
+ "scs_float eps_rel",
103
+ "scs_float eps_infeas",
89
104
  "scs_float alpha",
90
- "scs_float cg_rate",
105
+ "scs_float time_limit_secs",
91
106
  "scs_int verbose",
92
107
  "scs_int warm_start",
93
108
  "scs_int acceleration_lookback",
94
- "const char* write_data_filename"
109
+ "scs_int acceleration_interval",
110
+ "const char* write_data_filename",
111
+ "const char *log_csv_filename"
95
112
  ]
96
113
 
97
114
  m::Matrix = struct [
@@ -103,14 +120,14 @@ module SCS
103
120
  ]
104
121
 
105
122
  # scs.h
106
- extern "ScsWork *scs_init(const ScsData *d, const ScsCone *k, ScsInfo *info)"
107
- extern "scs_int scs_solve(ScsWork *w, const ScsData *d, const ScsCone *k, ScsSolution *sol, ScsInfo *info)"
123
+ extern "ScsWork *scs_init(const ScsData *d, const ScsCone *k, const ScsSettings *stgs)"
124
+ extern "scs_int scs_solve(ScsWork *w, ScsSolution *sol, ScsInfo *info)"
108
125
  extern "void scs_finish(ScsWork *w)"
109
- extern "scs_int scs(const ScsData *d, const ScsCone *k, ScsSolution *sol, ScsInfo *info)"
126
+ extern "scs_int scs(const ScsData *d, const ScsCone *k, const ScsSettings *stgs, ScsSolution *sol, ScsInfo *info)"
110
127
  extern "const char *scs_version(void)"
111
128
 
112
129
  # utils.h
113
- extern "void scs_set_default_settings(ScsData *d)"
130
+ extern "void scs_set_default_settings(ScsSettings *stgs)"
114
131
  end
115
132
  end
116
133
  end
data/lib/scs/solver.rb CHANGED
@@ -6,13 +6,13 @@ module SCS
6
6
 
7
7
  def solve(data, cone, **settings)
8
8
  cdata = create_data(data)
9
- set_settings(cdata, settings)
9
+ settings = create_settings(settings)
10
10
  ccone = create_cone(cone)
11
11
 
12
12
  solution = calloc(ffi::Solution.size) # alloc clear memory
13
13
  info = ffi::Info.malloc
14
14
 
15
- ffi.scs(cdata, ccone, solution, info)
15
+ ffi.scs(cdata, ccone, settings, solution, info)
16
16
 
17
17
  solution = ffi::Solution.new(solution)
18
18
  x = read_float_array(solution.x, cdata.n)
@@ -26,15 +26,24 @@ module SCS
26
26
  iter: info.iter,
27
27
  status: read_string(info.status),
28
28
  status_val: info.status_val,
29
+ scale_updates: info.scale_updates,
29
30
  pobj: info.pobj,
30
31
  dobj: info.dobj,
31
32
  res_pri: info.res_pri,
32
33
  res_dual: info.res_dual,
34
+ gap: info.gap,
33
35
  res_infeas: info.res_infeas,
34
- res_unbdd: info.res_unbdd,
35
- rel_gap: info.rel_gap,
36
+ res_unbdd_a: info.res_unbdd_a,
37
+ res_unbdd_p: info.res_unbdd_p,
36
38
  setup_time: info.setup_time,
37
- solve_time: info.solve_time
39
+ solve_time: info.solve_time,
40
+ scale: info.scale,
41
+ comp_slack: info.comp_slack,
42
+ rejected_accel_steps: info.rejected_accel_steps,
43
+ accepted_accel_steps: info.accepted_accel_steps,
44
+ lin_sys_time: info.lin_sys_time,
45
+ cone_time: info.cone_time,
46
+ accel_time: info.accel_time
38
47
  }
39
48
  end
40
49
 
@@ -44,11 +53,6 @@ module SCS
44
53
  raise Error, "Error code #{ret}" if ret != 0
45
54
  end
46
55
 
47
- def read_string(char_ptr)
48
- idx = char_ptr.index { |v| v == 0 }
49
- char_ptr[0, idx].map(&:chr).join
50
- end
51
-
52
56
  def float_array(arr)
53
57
  # SCS float = double
54
58
  Fiddle::Pointer[arr.to_a.pack("d*")]
@@ -119,15 +123,30 @@ module SCS
119
123
  cdata.m = m
120
124
  cdata.n = n
121
125
  cdata.a = csc_matrix(data[:a])
126
+
127
+ if data[:p]
128
+ raise ArgumentError, "Bad p shape" if shape(data[:p]) != [n, n]
129
+ cdata.p = csc_matrix(data[:p])
130
+ end
131
+
132
+ raise ArgumentError, "Bad b size" if data[:b].to_a.size != m
122
133
  cdata.b = float_array(data[:b])
134
+
135
+ raise ArgumentError, "Bad c size" if data[:c].to_a.size != n
123
136
  cdata.c = float_array(data[:c])
124
137
  cdata
125
138
  end
126
139
 
127
140
  def create_cone(cone)
128
141
  ccone = ffi::Cone.malloc
129
- ccone.f = cone[:f].to_i
142
+ ccone.z = cone[:z].to_i
130
143
  ccone.l = cone[:l].to_i
144
+ ccone.bu = float_array(cone[:bu])
145
+ ccone.bl = float_array(cone[:bl])
146
+ if cone[:bu].to_a.size != cone[:bl].to_a.size
147
+ raise ArgumentError, "Expected bu and bl size to match"
148
+ end
149
+ ccone.bsize = cone[:bu].to_a.size
131
150
  ccone.q = int_array(cone[:q])
132
151
  ccone.qsize = cone[:q].to_a.size
133
152
  ccone.s = int_array(cone[:s])
@@ -139,10 +158,9 @@ module SCS
139
158
  ccone
140
159
  end
141
160
 
142
- def set_settings(data, settings)
161
+ def create_settings(settings)
143
162
  set = ffi::Settings.malloc
144
- data.stgs = set
145
- ffi.scs_set_default_settings(data)
163
+ ffi.scs_set_default_settings(set)
146
164
 
147
165
  # hack for setting members with []=
148
166
  # safer than send("#{k}=", v)
data/lib/scs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module SCS
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
@@ -0,0 +1,39 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use this software, please cite it as below."
3
+ authors:
4
+ - family-names: "O'Donoghue"
5
+ given-names: "Brendan"
6
+ - family-names: "Chu"
7
+ given-names: "Eric"
8
+ - family-names: "Parikh"
9
+ given-names: "Neal"
10
+ - family-names: "Boyd"
11
+ given-names: "Stephen"
12
+ title: "SCS: Spltting Conic Solver"
13
+ version: 3.0.0
14
+ date-released: 2021
15
+ url: "https://github.com/cvxgrp/scs"
16
+
17
+ # Original SCS paper:
18
+ preferred-citation:
19
+ type: article
20
+ authors:
21
+ - family-names: "O'Donoghue"
22
+ given-names: "Brendan"
23
+ - family-names: "Chu"
24
+ given-names: "Eric"
25
+ - family-names: "Parikh"
26
+ given-names: "Neal"
27
+ - family-names: "Boyd"
28
+ given-names: "Stephen"
29
+ journal: "Journal of Optimization Theory and Applications"
30
+ month: 6
31
+ start: 1042 # Start pages
32
+ end: 1068 # End pages
33
+ title: "Conic Optimization via Operator Splitting and Homogeneous Self-Dual Embedding"
34
+ issue: 3
35
+ volume: 169
36
+ year: 2016
37
+ doi: 10.1007/s10957-016-0892-3
38
+ url: https://dx.doi.org/10.1007/s10957-016-0892-3
39
+