genmodel 0.0.47 → 0.0.48
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 +8 -8
- data/ext/Genmodel/GenModelCplex.cpp +27 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZGM0YjRkZTgxY2JiYWI3NzJmMmJmZGMyMjk0OWU5NzJhZjJmYTI5Ng==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzQ5NGNmNDI4NmQzZmE4YWQxZTA0ZDVjOTQ5OWVhN2ZkZThjYmVjMw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
YWViMjRiMWEyODJlYjA1MGUwOTQ3OWExOGQ4YTUyZGNkYTEzOWQ2OGE3NjA1
|
10
|
+
OGJhNzk2NDU4M2ViY2UxOTY2NjY0NzMxYjM3NWM2YjI2ODE2OTBkMjczYzA0
|
11
|
+
NWM5Yjk1MDdiNTU5ZGNhZDU2N2U4ZDZjZDMxYzczYjQxYWJmZTc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODIxM2QwMjQ4YmQ0YWFmMmEyOGM0MGRkMzczYTg3MjFjNmIzYTM5MTY5ZTJl
|
14
|
+
ZGQ4NDQxNWIxMmEyYmM1ZGM1NjQ4MzAxMGMxZGE5NzQ4NDY1ODQ4NTJkMzI0
|
15
|
+
NTJhZGQxMTBlZmUxOWRlNzhhYTMzNTE3M2YwMTQ4ZDkwOTdmNmY=
|
@@ -699,7 +699,7 @@ int mip_cb(CPXCENVptr env, void *cbdata, int wherefrom, void *cbhandle)
|
|
699
699
|
d->solver_info.nb_lazy_cuts += nb_lazy_cuts;
|
700
700
|
d->solver_info.nb_soln_pool_cuts += nb_soln_pool_cuts;
|
701
701
|
|
702
|
-
//d->solver_info.nb_solutions
|
702
|
+
//d->solver_info.nb_solutions += CPXXgetsolnpoolnumsolns(d->env, d->lp);
|
703
703
|
|
704
704
|
if(d->stop_solver)
|
705
705
|
return 1;
|
@@ -786,18 +786,24 @@ long GenModelCplex::Init(string name)
|
|
786
786
|
// if (status)
|
787
787
|
// return ThrowError(getcplexerror(d->env, status)+string(". ")+string("Failure to get the default mip callback function"));
|
788
788
|
|
789
|
-
status = CPXXsetusercutcallbackfunc(d->env, cut_cb, this);
|
790
|
-
if (status)
|
791
|
-
|
789
|
+
// status = CPXXsetusercutcallbackfunc(d->env, cut_cb, this);
|
790
|
+
// if (status)
|
791
|
+
// return ThrowError(getcplexerror(d->env, status)+string(". ")+string("Failure to set the cut callback function"));
|
792
792
|
|
793
793
|
|
794
|
-
status = CPXXsetmipcallbackfunc(d->env, mip_cb, this);
|
795
|
-
if (status)
|
796
|
-
|
794
|
+
// status = CPXXsetmipcallbackfunc(d->env, mip_cb, this);
|
795
|
+
// if (status)
|
796
|
+
// return ThrowError(getcplexerror(d->env, status)+string(". ")+string("Failure to set the mip callback function"));
|
797
797
|
|
798
|
-
|
798
|
+
status = CPXXsetinfocallbackfunc(d->env, mip_cb, this);
|
799
799
|
if (status)
|
800
|
-
|
800
|
+
return ThrowError(getcplexerror(d->env, status)+string(". ")+string("Failure to set the mip callback function"));
|
801
|
+
|
802
|
+
|
803
|
+
|
804
|
+
// status = CPXXsetincumbentcallbackfunc(d->env, sol_cb, this);
|
805
|
+
// if (status)
|
806
|
+
// return ThrowError(getcplexerror(d->env, status)+string(". ")+string("Failure to set the solution callback function"));
|
801
807
|
|
802
808
|
|
803
809
|
CPXCHANNELptr cpxresults, cpxwarning, cpxerror, cpxlog;
|
@@ -828,6 +834,18 @@ long GenModelCplex::Init(string name)
|
|
828
834
|
SetParam("log_level", 0, "long", "Failure to set log level", false);
|
829
835
|
SetParam("use_data_checking", CPX_PARAM_DATACHECK, "bool", "Failure to turn on/off data checking");
|
830
836
|
SetParam("nb_threads", CPX_PARAM_THREADS, "long", "Failure to set the number of threads");
|
837
|
+
SetParam("nb_threads", CPX_PARAM_PARALLELMODE, "long", "Failure to set the parallel mode");
|
838
|
+
/*
|
839
|
+
-1 : Enable opportunistic parallel search mode
|
840
|
+
0 : Automatic: let CPLEX decide whether to invoke deterministic or opportunistic search; default
|
841
|
+
1 : Enable deterministic parallel search mode
|
842
|
+
*/
|
843
|
+
SetParam("nb_threads", CPX_PARAM_MIPSEARCH, "long", "Failure to set the mip search mode");
|
844
|
+
/*
|
845
|
+
0 : Automatic: let CPLEX choose; default
|
846
|
+
1 : Apply traditional branch and cut strategy; disable dynamic search
|
847
|
+
2 : Apply dynamic search
|
848
|
+
*/
|
831
849
|
if(boolParam.count("use_preprocessor") > 0 && !boolParam["use_preprocessor"])
|
832
850
|
{
|
833
851
|
SetDirectParam(CPX_PARAM_AGGFILL, long2param(0), "long", "Failure to use preprocessor (CPX_PARAM_AGGFILL)");
|