glpk 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 86566e1e5bf15191e73ee45386a860854d42be93ca39d149eea0821128a5116a
4
- data.tar.gz: c14d0f10736dc2180b3d90c284f3816fb30bf424de6a112a4c281c4952a76c07
3
+ metadata.gz: 690771cd02dd1a3291ddf745247b26e45277bb5c3da3d40c3c3bd0d0162d91a7
4
+ data.tar.gz: 051ded67d27bb14cfa1633c70e15b770920ebc01bbbbb6d32cac24a9f605902e
5
5
  SHA512:
6
- metadata.gz: 32d6f945c5abc14eaa7e8e7f08696f0d6db629bcfbf4edb42bb1fe8dc68de10b01a4aff472ddd6ae154ba857fe293a017beba34d0337e9f352dbbb02542040ca
7
- data.tar.gz: c1be49795ce8d6eb3a22d81dd02a7d2045401aaef038d1c1f933b8f03ec1d338a00adee08bb624855a6959d9dfffeb58155b027038a785f87e7a4211240e02b8
6
+ metadata.gz: 4561bc766f46edad790f9dff4259c91f2a5fb06008694dd3f6d668342472fb5eaf9faace3e714da01cf785b2681ae182c6a4ccd4d9e4bdc9e93dfe9042d5a3fc
7
+ data.tar.gz: 8baebc4a5c8e7de113d87bec86fc7d6fe491c562bec192c91e7d5b5bbb76757902fee0d09f33f267044ff2eb5428fe5ecb3d9df6e32763ccef26f871109677d9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 0.2.0 (2023-01-25)
2
+
3
+ - Improved MIP status when LP fails
4
+
1
5
  ## 0.1.0 (2022-04-13)
2
6
 
3
7
  - First release
data/README.md CHANGED
@@ -12,12 +12,18 @@ First, install GLPK. For Homebrew, use:
12
12
  brew install glpk
13
13
  ```
14
14
 
15
- And for Ubuntu, use:
15
+ For Ubuntu, use:
16
16
 
17
17
  ```sh
18
18
  sudo apt-get install libglpk40
19
19
  ```
20
20
 
21
+ And for Fedora, use:
22
+
23
+ ```sh
24
+ sudo dnf install glpk
25
+ ```
26
+
21
27
  Then add this line to your application’s Gemfile:
22
28
 
23
29
  ```ruby
data/lib/glpk/problem.rb CHANGED
@@ -135,6 +135,10 @@ module Glpk
135
135
 
136
136
  status = FFI::RET_CODE[ret_code] || FFI::SOLUTION_STATUS[FFI.glp_mip_status(model)]
137
137
 
138
+ if status == :root_lp_optimum
139
+ status = FFI::SOLUTION_STATUS[FFI.glp_get_status(model)]
140
+ end
141
+
138
142
  {
139
143
  status: status,
140
144
  obj_val: FFI.glp_mip_obj_val(model),
data/lib/glpk/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Glpk
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glpk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kane
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-04-14 00:00:00.000000000 Z
11
+ date: 2023-01-26 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: andrew@ankane.org
@@ -42,7 +42,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
42
42
  - !ruby/object:Gem::Version
43
43
  version: '0'
44
44
  requirements: []
45
- rubygems_version: 3.3.7
45
+ rubygems_version: 3.4.1
46
46
  signing_key:
47
47
  specification_version: 4
48
48
  summary: Linear programming kit for Ruby