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: 9ca0cc9edf1f6ef9f890c42f8419e15c749e02a0
4
- data.tar.gz: e6c826c837c243e4820bb19315e3fb1df17ff994
3
+ metadata.gz: b00ca971e4317b62941f01c9b4cb4a68ee0e330b
4
+ data.tar.gz: f3945cce1eaf1321b20c9cfec104a2c0cc67f77b
5
5
  SHA512:
6
- metadata.gz: b1009916247bc14c4e9847ecc218bad9ae8994cc7b79683445aa729d58db6226af4f490f7256523e8d95d87dafc6e610ddd0e3dbce49bce8ffbaf73393e0c65c
7
- data.tar.gz: 4fb87b6db3d4aa76bf087226135f7607634c3153e697fa456000d050a577cfc798a631d132e93a1fb9c6af93c064ab7cb7df467ab6ff8d309d4bbe99bb0374b6
6
+ metadata.gz: fbd5de5c51efdcfdd95dc01b16aee1a29f3d934c24b0a49f4fa6408f2b9d59f3fcd4379193996a321c5edbf8ea21984d64340339f0816213046db2641bb09a3a
7
+ data.tar.gz: f494b386d0255862625d2d1bbf1183563d77d4766e3c2b48e7743c25108e0620df6dc13f188603a897b6052a391a98197a7137053ddde6b7d7494aaefea236d0
@@ -943,3 +943,4 @@ long OsiData::Delete()
943
943
 
944
944
  return 0;
945
945
  }
946
+
@@ -1,3 +1,4 @@
1
+ #ifdef OSI_MODULE
1
2
  #include <cassert>
2
3
 
3
4
  #include "CoinHelperFunctions.hpp"
@@ -140,4 +141,6 @@ double GenModelOsiInterface::getObjValue() const
140
141
  {
141
142
  // first try easy way
142
143
  return modelPtr_->objectiveValue();
143
- }
144
+ }
145
+
146
+ #endif
@@ -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
@@ -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
- Find.find(search_path) do |path|
76
- if (FileTest.directory?(path))
77
- puts path+search_file
78
- temp_name = (path).gsub(/\/usr\/local\/Cellar\/cbc\//,'')
79
- count = temp_name.count('/')
80
- if ((count == 0) && (File.exist?(path+search_file)))
81
- file_exist = "-I#{path}/include/coin"
82
- break
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)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: genmodel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.35
4
+ version: 0.0.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathieu Bouchard