genmodel 0.0.25 → 0.0.27

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: cb21eb0a2b3bee9704f777ba8eb6fdfc5dc201f3
4
- data.tar.gz: b57e970b21c5174c0764cf002c9871c09f22f25f
3
+ metadata.gz: 4a9e11086d7c33940bd05e4258dfc7a067737805
4
+ data.tar.gz: 3b69dcb615e7f2819c2459d4909bc7a14057d13f
5
5
  SHA512:
6
- metadata.gz: a6363350698cb2401603dbe2cd47c05e43ea3c14ba7e65319c878b34c636d83b291f8fe6de3158eb7c4a73097a66f9661f2bc3b02dc69d8cc8aae73c10018942
7
- data.tar.gz: 28389755879adbf16ec35fb859d5d0141b07ea89eecbbcaeb50ac611a540bcebb85144615334ab963dff75e994d90c050a778f0202b13f2fa361423038eaba38
6
+ metadata.gz: 9933617e60fa8b5a23a178f77d4bb1db693c700e3fbfa52de30647d074d63ed1fbdda7bf8bfdc0909b0ba379bc85dfcf1db978bc75f425408a2e5ef446d213d2
7
+ data.tar.gz: 6db5a36602e04f21c1a6c278029ed1ffe8366acbceab6bf5a1f89c9dd677d1cf37ae1120a219341835b778a1ec87a1922af4b6c75ef95d727125956571784a57
@@ -21,7 +21,7 @@ using namespace std;
21
21
 
22
22
  void printmsg(char* msg, GenModelOsi* p)
23
23
  {
24
- if(false && p->boolParam.count("log_output_stdout") > 0 && p->boolParam["log_output_stdout"])
24
+ if(p->boolParam.count("log_output_stdout") > 0 && p->boolParam["log_output_stdout"])
25
25
  printf("%s", msg);
26
26
  }
27
27
 
@@ -30,8 +30,10 @@ long GenModelOsi::WriteProblemToLpFile(string filename)
30
30
  if(!bcreated)
31
31
  throw string("WriteProblemToLpFile() not available : Problem not created yet;");
32
32
 
33
+ size_t pos = filename.rfind(".lp");
34
+
33
35
  OsiData* d = static_cast<OsiData*>(solverdata);
34
- d->model->writeLp(filename.c_str());
36
+ d->model->writeLp(filename.substr(0,pos).c_str());
35
37
  return 0;
36
38
  }
37
39
 
@@ -230,7 +232,7 @@ long GenModelOsi::Solve()
230
232
  // Switch off most output
231
233
  if (d->mipmodel->getNumCols()<3000)
232
234
  {
233
- if(false && boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
235
+ if(boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
234
236
  d->mipmodel->messageHandler()->setLogLevel(1);
235
237
  else
236
238
  d->mipmodel->messageHandler()->setLogLevel(0);
@@ -238,7 +240,7 @@ long GenModelOsi::Solve()
238
240
  }
239
241
  else
240
242
  {
241
- if(false && boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
243
+ if(boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
242
244
  {
243
245
  d->mipmodel->messageHandler()->setLogLevel(2);
244
246
  //d->mipmodel->solver()->messageHandler()->setLogLevel(1);
@@ -250,7 +252,7 @@ long GenModelOsi::Solve()
250
252
  }
251
253
  }
252
254
 
253
- if(false && boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
255
+ if(boolParam.count("log_output_stdout") > 0 && boolParam["log_output_stdout"])
254
256
  d->mipmodel->setPrintFrequency(1);//(50);
255
257
  else
256
258
  d->mipmodel->setPrintFrequency(0);
data/lib/Genmodel.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Genmodel
2
- VERSION = "0.0.23"
2
+ GENMODEL_VERSION = "0.0.27"
3
3
  end
4
4
 
5
5
  require "Genmodel/Genmodel"
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.25
4
+ version: 0.0.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mathieu Bouchard