highs 0.2.3 → 0.2.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9c5b16feb544270a76c2a3ce15093240e2925f49801155567e7a8eee49163cfc
4
- data.tar.gz: 3d038818016cda19b219f03dc81ed87b0610c86ed68ed0f643cce1e15e2e58ac
3
+ metadata.gz: c3d0ceaf922a6504fef534e0f0c3dd6bf180821ca4087461a4c27197b5e4b508
4
+ data.tar.gz: 8fb06e82193f879b012f96ae53c748ec6c8d1dae22c39fa1af29091f9c2b2049
5
5
  SHA512:
6
- metadata.gz: 1f8f5957489f840c3a78f16ca94a1715774a29c57f248b7575d8ba1a063587266007ef98349ebf74cff0c47101b582fe9bb72be20db51a04e35c312d28aa3285
7
- data.tar.gz: 668f25dfee2c6d8ab117a5093579b02b8690412865d037d33a46e58c6de9ec01ecb6ef8b62aedd804f59911dc7226dd0c57554ed9f35279a653a5691e98e44fd
6
+ metadata.gz: 607c3cf811e9b09a62cb23a613a9d8838939f9149bc1ed37ef4014f589f63c38fb549c34c392aecb8544e7f138987aa4098c38f51af2ebfed7541bbe4d771bfb
7
+ data.tar.gz: d17a5822aa7ff198ec3ced50f0d9dac3e027377dd6200e2f8f1e8417ba5d6a778980ad4dc76f17c4fe499119e65f77df6eea8435594dfd2dfb7483ab769f8ce0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## 0.2.5 (2025-05-04)
2
+
3
+ - Fixed memory leak
4
+
5
+ ## 0.2.4 (2025-03-20)
6
+
7
+ - Updated HiGHS to 1.10.0
8
+
1
9
  ## 0.2.3 (2025-01-05)
2
10
 
3
11
  - Updated HiGHS to 1.9.0
data/lib/highs/array.rb CHANGED
@@ -6,7 +6,7 @@ module Highs
6
6
  @size = size
7
7
  @ptr =
8
8
  if value == NOT_SET
9
- Fiddle::Pointer.malloc(size * self.class::SIZE)
9
+ Fiddle::Pointer.malloc(size * self.class::SIZE, Fiddle::RUBY_FREE)
10
10
  else
11
11
  if value.size != size
12
12
  # TODO add variable name to message
data/lib/highs/methods.rb CHANGED
@@ -70,7 +70,7 @@ module Highs
70
70
 
71
71
  def read(filename)
72
72
  model = Model.new
73
- check_status FFI.Highs_readModel(model, filename)
73
+ check_status FFI.Highs_readModel(model, +filename)
74
74
  model
75
75
  end
76
76
 
data/lib/highs/model.rb CHANGED
@@ -4,7 +4,7 @@ module Highs
4
4
  @ptr = FFI.Highs_create
5
5
  @ptr.free = FFI["Highs_destroy"]
6
6
 
7
- check_status FFI.Highs_setBoolOptionValue(@ptr, "output_flag", 0)
7
+ check_status FFI.Highs_setBoolOptionValue(@ptr, +"output_flag", 0)
8
8
  end
9
9
 
10
10
  def solve(verbose: false, time_limit: nil)
@@ -38,7 +38,7 @@ module Highs
38
38
  end
39
39
 
40
40
  def write(filename)
41
- check_status FFI.Highs_writeModel(@ptr, filename)
41
+ check_status FFI.Highs_writeModel(@ptr, +filename)
42
42
  end
43
43
 
44
44
  def to_ptr
@@ -52,12 +52,12 @@ module Highs
52
52
  end
53
53
 
54
54
  def with_options(verbose:, time_limit:)
55
- check_status(FFI.Highs_setBoolOptionValue(@ptr, "output_flag", 1)) if verbose
56
- check_status(FFI.Highs_setDoubleOptionValue(@ptr, "time_limit", time_limit)) if time_limit
55
+ check_status(FFI.Highs_setBoolOptionValue(@ptr, +"output_flag", 1)) if verbose
56
+ check_status(FFI.Highs_setDoubleOptionValue(@ptr, +"time_limit", time_limit)) if time_limit
57
57
  yield
58
58
  ensure
59
- check_status(FFI.Highs_setBoolOptionValue(@ptr, "output_flag", 0)) if verbose
60
- check_status(FFI.Highs_setDoubleOptionValue(@ptr, "time_limit", Float::INFINITY)) if time_limit
59
+ check_status(FFI.Highs_setBoolOptionValue(@ptr, +"output_flag", 0)) if verbose
60
+ check_status(FFI.Highs_setDoubleOptionValue(@ptr, +"time_limit", Float::INFINITY)) if time_limit
61
61
  end
62
62
  end
63
63
  end
data/lib/highs/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Highs
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -1,3 +1,33 @@
1
+ ================================================================================
2
+ CLI11 2.5.0
3
+ ================================================================================
4
+
5
+ CLI11 2.5.0 Copyright (c) 2017-2025 University of Cincinnati, developed by Henry
6
+ Schreiner under NSF AWARD 1414736. All rights reserved.
7
+
8
+ Redistribution and use in source and binary forms of CLI11, with or without
9
+ modification, are permitted provided that the following conditions are met:
10
+
11
+ 1. Redistributions of source code must retain the above copyright notice, this
12
+ list of conditions and the following disclaimer.
13
+ 2. Redistributions in binary form must reproduce the above copyright notice,
14
+ this list of conditions and the following disclaimer in the documentation
15
+ and/or other materials provided with the distribution.
16
+ 3. Neither the name of the copyright holder nor the names of its contributors
17
+ may be used to endorse or promote products derived from this software without
18
+ specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
21
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
22
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
24
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
25
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
26
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
27
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
+
1
31
  ================================================================================
2
32
  FilereaderLP
3
33
  ================================================================================
Binary file
Binary file
data/vendor/libhighs.dll CHANGED
Binary file
Binary file
data/vendor/libhighs.so CHANGED
Binary file
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: highs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-01-05 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: fiddle
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
62
62
  - !ruby/object:Gem::Version
63
63
  version: '0'
64
64
  requirements: []
65
- rubygems_version: 3.6.2
65
+ rubygems_version: 3.6.7
66
66
  specification_version: 4
67
67
  summary: Linear optimization for Ruby
68
68
  test_files: []