upgrade to gecode5.x API
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Mon, 29 Jan 2018 14:51:42 +0100
changeset 815 a5c0cf9f6941
parent 814 11a23b86752b
child 816 fbe93b245bca
upgrade to gecode5.x API http://www.gecode.org/doc-latest/reference/PageHowToChange__5.html says that brancher handlers have been removed and that `BrancherGroup` should be used instead. use the `BrancherGroup:all` static member to get the special brancher group that gathers all branchers in a space, and fetch the number of branchers it contains. cf. http://www.gecode.org/doc-latest/MPG.pdf Do the same thing for propagators.
rql/gecode_solver.cpp
--- a/rql/gecode_solver.cpp	Tue Nov 28 14:43:01 2017 +0100
+++ b/rql/gecode_solver.cpp	Mon Jan 29 14:51:42 2018 +0100
@@ -369,11 +369,17 @@
 	unsigned int n_p = 0;
 	unsigned int n_b = 0;
 	if (s->status() != SS_FAILED) {
+#if GE_VERSION<PM_VERSION(3,2,0)
 	    n_p = s->propagators();
-#if GE_VERSION<PM_VERSION(3,2,0)
 	    n_b = s->branchings();
 #else
+	#if GE_VERSION < PM_VERSION(5, 0, 0)
+	    n_p = s->propagators();
 	    n_b = s->branchers();
+	#else
+	    n_p = PropagatorGroup::all.size(*s);
+	    n_b = BrancherGroup::all.size(*s);
+	#endif
 #endif
 	}
 #if GE_VERSION<PM_VERSION(2,0,0)