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 +4 -4
- data/ext/Genmodel/GenModelOsi.cpp +7 -5
- data/lib/Genmodel.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a9e11086d7c33940bd05e4258dfc7a067737805
|
4
|
+
data.tar.gz: 3b69dcb615e7f2819c2459d4909bc7a14057d13f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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(
|
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(
|
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(
|
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