genmodel 0.0.35 → 0.0.36
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b00ca971e4317b62941f01c9b4cb4a68ee0e330b
|
4
|
+
data.tar.gz: f3945cce1eaf1321b20c9cfec104a2c0cc67f77b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fbd5de5c51efdcfdd95dc01b16aee1a29f3d934c24b0a49f4fa6408f2b9d59f3fcd4379193996a321c5edbf8ea21984d64340339f0816213046db2641bb09a3a
|
7
|
+
data.tar.gz: f494b386d0255862625d2d1bbf1183563d77d4766e3c2b48e7743c25108e0620df6dc13f188603a897b6052a391a98197a7137053ddde6b7d7494aaefea236d0
|
@@ -7,10 +7,12 @@
|
|
7
7
|
* mathbouchard@gmail.com
|
8
8
|
****************************************************************************/
|
9
9
|
|
10
|
+
#ifdef OSI_MODULE
|
10
11
|
#ifndef GENMODELOSIINTERFACE_H_
|
11
12
|
#define GENMODELOSIINTERFACE_H_
|
12
13
|
|
13
14
|
#include "OsiClpSolverInterface.hpp"
|
15
|
+
|
14
16
|
#include <string>
|
15
17
|
|
16
18
|
using namespace std;
|
@@ -40,4 +42,6 @@ private:
|
|
40
42
|
ClpObjective * quadraticObjective_;
|
41
43
|
};
|
42
44
|
|
45
|
+
|
43
46
|
#endif //GENMODELOSIINTERFACE_H_
|
47
|
+
#endif
|
@@ -5,6 +5,8 @@
|
|
5
5
|
* Author: mbouchard
|
6
6
|
*/
|
7
7
|
|
8
|
+
#ifdef OSI_MODULE
|
9
|
+
|
8
10
|
#include "ProblemReaderOsi.h"
|
9
11
|
|
10
12
|
int ReadFromFile(GenModel* pgm, string fn, int type, string dn)
|
@@ -75,4 +77,5 @@ int ReadFromObject(GenModel* pgm, OsiSolverInterface* pm)
|
|
75
77
|
}
|
76
78
|
|
77
79
|
return 0;
|
78
|
-
}
|
80
|
+
}
|
81
|
+
#endif
|
@@ -5,6 +5,8 @@
|
|
5
5
|
* Author: mbouchard
|
6
6
|
*/
|
7
7
|
|
8
|
+
#ifdef OSI_MODULE
|
9
|
+
|
8
10
|
#ifndef PROBLEMREADER_H_
|
9
11
|
#define PROBLEMREADER_H_
|
10
12
|
|
@@ -29,3 +31,4 @@ int ReadFromFile(GenModel* pgm, string fn, int type=0, string dn = "");
|
|
29
31
|
int ReadFromObject(GenModel* pgm, OsiSolverInterface* pm);
|
30
32
|
|
31
33
|
#endif /* PROBLEMREADER_H_ */
|
34
|
+
#endif //OSI_MODULE
|
data/ext/Genmodel/extconf.rb
CHANGED
@@ -72,14 +72,16 @@ if is_darwin
|
|
72
72
|
search_file = "/include/coin/OsiClpSolverInterface.hpp"
|
73
73
|
puts "Looking for OsiClpSolverInterface.hpp in "+search_path+"/*"
|
74
74
|
file_exist = nil
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
75
|
+
if File.exist?(search_path)
|
76
|
+
Find.find(search_path) do |path|
|
77
|
+
if (FileTest.directory?(path))
|
78
|
+
puts path+search_file
|
79
|
+
temp_name = (path).gsub(/\/usr\/local\/Cellar\/cbc\//,'')
|
80
|
+
count = temp_name.count('/')
|
81
|
+
if ((count == 0) && (File.exist?(path+search_file)))
|
82
|
+
file_exist = "-I#{path}/include/coin"
|
83
|
+
break
|
84
|
+
end
|
83
85
|
end
|
84
86
|
end
|
85
87
|
end
|
@@ -280,4 +282,4 @@ end
|
|
280
282
|
|
281
283
|
#swig -ruby -o ext/GenModelGem/Genmodel.cpp -c++ src/Genmodel.i
|
282
284
|
|
283
|
-
create_makefile (extension_name)
|
285
|
+
create_makefile (extension_name)
|