scs 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/LICENSE.txt +1 -1
  4. data/lib/scs/solver.rb +0 -5
  5. data/lib/scs/version.rb +1 -1
  6. data/vendor/scs/README.md +3 -1
  7. data/vendor/scs/linsys/amatrix.o +0 -0
  8. data/vendor/scs/linsys/cpu/direct/private.o +0 -0
  9. data/vendor/scs/linsys/cpu/indirect/private.o +0 -0
  10. data/vendor/scs/linsys/external/amd/SuiteSparse_config.o +0 -0
  11. data/vendor/scs/linsys/external/amd/amd_1.o +0 -0
  12. data/vendor/scs/linsys/external/amd/amd_2.o +0 -0
  13. data/vendor/scs/linsys/external/amd/amd_aat.o +0 -0
  14. data/vendor/scs/linsys/external/amd/amd_control.o +0 -0
  15. data/vendor/scs/linsys/external/amd/amd_defaults.o +0 -0
  16. data/vendor/scs/linsys/external/amd/amd_dump.o +0 -0
  17. data/vendor/scs/linsys/external/amd/amd_global.o +0 -0
  18. data/vendor/scs/linsys/external/amd/amd_info.o +0 -0
  19. data/vendor/scs/linsys/external/amd/amd_order.o +0 -0
  20. data/vendor/scs/linsys/external/amd/amd_post_tree.o +0 -0
  21. data/vendor/scs/linsys/external/amd/amd_postorder.o +0 -0
  22. data/vendor/scs/linsys/external/amd/amd_preprocess.o +0 -0
  23. data/vendor/scs/linsys/external/amd/amd_valid.o +0 -0
  24. data/vendor/scs/linsys/external/qdldl/qdldl.o +0 -0
  25. data/vendor/scs/src/aa.o +0 -0
  26. data/vendor/scs/src/cones.o +0 -0
  27. data/vendor/scs/src/ctrlc.o +0 -0
  28. data/vendor/scs/src/linalg.o +0 -0
  29. data/vendor/scs/src/normalize.o +0 -0
  30. data/vendor/scs/src/rw.o +0 -0
  31. data/vendor/scs/src/scs.c +7 -4
  32. data/vendor/scs/src/scs.o +0 -0
  33. data/vendor/scs/src/scs_version.o +0 -0
  34. data/vendor/scs/src/util.o +0 -0
  35. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6336ca9d1433f92e77c259062923fa2ce96888d215a6070b5e780730b621571a
4
- data.tar.gz: 264f3030f2ddf34565c33dba5d1af5dc6ac8bc11f7ef1f4cf9130646825b48b5
3
+ metadata.gz: cf0730fd042983c36ce96ea46ad28c0a330c5765e1521f8cfb28eb3321507df9
4
+ data.tar.gz: 677ebb1dc72dc2c1e51857c8644a11e91f9a332c95574ee8c452e31f36f4ec88
5
5
  SHA512:
6
- metadata.gz: 6a8ffbd1707be25370186a84542eec3b37f13e452a7f202b04c1386c11fb0df05ccadf86d4268a926cae2266e6b21daf3f19925731bf71eb934360e5772f7b9a
7
- data.tar.gz: 850a9e91d62bade7ac1e644745f7eb3b9194d09f894ed6e54f29ab3923d746a8f6ee641c99789f9a0768563e280654b585293ff9bbd9ada09a9f613d4155434a
6
+ metadata.gz: 889d538aba521314bc093e11fc584eb58f519116f72fedcab865b9a49a44fec44eaffbc20e28d1f2673c294922474c7ccc91f7ee7f0b08243c9e20ae52150e3c
7
+ data.tar.gz: 25ca5f1af62a227f1f05c34031d8f1554e1b9121c2d8c43bb40c4bd12d0af5d106b73a601f8abb8a3849fbdcde310b51a2fecfe17bb9e4bba4d3a70e5fd59fff
@@ -1,3 +1,7 @@
1
+ ## 0.2.2 (2020-07-21)
2
+
3
+ - Updated SCS to 2.1.2
4
+
1
5
  ## 0.2.1 (2019-11-29)
2
6
 
3
7
  - Fixed installation on Windows
@@ -1,4 +1,4 @@
1
- Copyright (c) 2019 Andrew Kane
1
+ Copyright (c) 2019-2020 Andrew Kane
2
2
 
3
3
  MIT License
4
4
 
@@ -44,11 +44,6 @@ module SCS
44
44
  raise Error, "Error code #{ret}" if ret != 0
45
45
  end
46
46
 
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
47
  def float_array(arr)
53
48
  # SCS float = double
54
49
  Fiddle::Pointer[arr.to_a.pack("d*")]
@@ -1,3 +1,3 @@
1
1
  module SCS
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -12,7 +12,9 @@ and can be used in other C, C++,
12
12
  [Python](https://github.com/bodono/scs-python),
13
13
  [Matlab](https://github.com/bodono/scs-matlab),
14
14
  [R](https://github.com/bodono/scs-r),
15
- [Julia](https://github.com/JuliaOpt/SCS.jl), programs via the linked
15
+ [Julia](https://github.com/JuliaOpt/SCS.jl), and
16
+ [Ruby](https://github.com/ankane/scs),
17
+ programs via the linked
16
18
  interfaces. It can also be called as a solver from convex optimization
17
19
  toolboxes [CVX](http://cvxr.com/cvx/) (3.0 or later),
18
20
  [CVXPY](https://github.com/cvxgrp/cvxpy),
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -625,15 +625,16 @@ static void print_footer(const ScsData *d, const ScsCone *k, ScsSolution *sol,
625
625
 
626
626
  static scs_int has_converged(ScsWork *w, ScsResiduals *r, scs_int iter) {
627
627
  scs_float eps = w->stgs->eps;
628
- if (r->res_pri < eps && r->res_dual < eps && r->rel_gap < eps) {
628
+ if (isless(r->res_pri, eps) && isless(r->res_dual, eps) &&
629
+ isless(r->rel_gap, eps)) {
629
630
  return SCS_SOLVED;
630
631
  }
631
632
  /* Add iter > 0 to avoid strange edge case where infeasible point found
632
633
  * right at start of run `out/demo_SOCP_indirect 2 0.1 0.3 1506264403` */
633
- if (r->res_unbdd < eps && iter > 0) {
634
+ if (isless(r->res_unbdd, eps) && iter > 0) {
634
635
  return SCS_UNBOUNDED;
635
636
  }
636
- if (r->res_infeas < eps && iter > 0) {
637
+ if (isless(r->res_infeas, eps) && iter > 0) {
637
638
  return SCS_INFEASIBLE;
638
639
  }
639
640
  return 0;
@@ -747,7 +748,9 @@ static ScsWork *init_work(const ScsData *d, const ScsCone *k) {
747
748
  if (!(w->accel =
748
749
  aa_init(2 * (w->m + w->n + 1), ABS(w->stgs->acceleration_lookback),
749
750
  w->stgs->acceleration_lookback >= 0))) {
750
- scs_printf("WARN: aa_init returned NULL, no acceleration applied.\n");
751
+ if (w->stgs->verbose) {
752
+ scs_printf("WARN: aa_init returned NULL, no acceleration applied.\n");
753
+ }
751
754
  }
752
755
  return w;
753
756
  }
Binary file
Binary file
Binary file
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.1
4
+ version: 0.2.2
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-29 00:00:00.000000000 Z
11
+ date: 2020-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -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.3
199
+ rubygems_version: 3.1.2
200
200
  signing_key:
201
201
  specification_version: 4
202
202
  summary: SCS - the splitting conic solver - for Ruby