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 +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +7 -1
- data/lib/glpk/problem.rb +4 -0
- data/lib/glpk/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 690771cd02dd1a3291ddf745247b26e45277bb5c3da3d40c3c3bd0d0162d91a7
|
4
|
+
data.tar.gz: 051ded67d27bb14cfa1633c70e15b770920ebc01bbbbb6d32cac24a9f605902e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4561bc766f46edad790f9dff4259c91f2a5fb06008694dd3f6d668342472fb5eaf9faace3e714da01cf785b2681ae182c6a4ccd4d9e4bdc9e93dfe9042d5a3fc
|
7
|
+
data.tar.gz: 8baebc4a5c8e7de113d87bec86fc7d6fe491c562bec192c91e7d5b5bbb76757902fee0d09f33f267044ff2eb5428fe5ecb3d9df6e32763ccef26f871109677d9
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -12,12 +12,18 @@ First, install GLPK. For Homebrew, use:
|
|
12
12
|
brew install glpk
|
13
13
|
```
|
14
14
|
|
15
|
-
|
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
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.
|
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:
|
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.
|
45
|
+
rubygems_version: 3.4.1
|
46
46
|
signing_key:
|
47
47
|
specification_version: 4
|
48
48
|
summary: Linear programming kit for Ruby
|