@@ -246,68 +246,79 @@ SCIP_RETCODE computeAutomorphisms(
246246 /* call sassy to reduce graph */
247247 sassy.reduce (G, &sassyglue);
248248
249- /* create bliss graph */
250- bliss::Graph blissgraph (0 );
249+ if ( G->get_sgraph ()->v_size == 0 )
250+ {
251+ dejavu::big_number grp_sz = sassy.grp_sz ;
252+ *log10groupsize = (SCIP_Real) log10l (grp_sz.mantissa * powl (10.0 , (SCIP_Real) grp_sz.exponent ));
253+ }
254+ else
255+ {
256+ /* create bliss graph */
257+ bliss::Graph blissgraph (0 );
251258
252- /* convert sassy to bliss graph */
253- convert_dejavu_to_bliss (G, &blissgraph);
259+ /* convert sassy to bliss graph */
260+ convert_dejavu_to_bliss (G, &blissgraph);
254261
255262#ifdef SCIP_OUTPUT
256- blissgraph.write_dot (" debug.dot" );
263+ blissgraph.write_dot (" debug.dot" );
257264#endif
258265
259266#ifdef SCIP_DISABLED_CODE
260- char filename[SCIP_MAXSTRLEN];
261- (void ) SCIPsnprintf (filename, SCIP_MAXSTRLEN, " %s.dimacs" , SCIPgetProbName (scip));
262- FILE* fp = fopen (filename, " w" );
263- if ( fp )
264- {
265- blissgraph.write_dimacs (fp);
266- fclose (fp);
267- }
267+ char filename[SCIP_MAXSTRLEN];
268+ (void ) SCIPsnprintf (filename, SCIP_MAXSTRLEN, " %s.dimacs" , SCIPgetProbName (scip));
269+ FILE* fp = fopen (filename, " w" );
270+ if ( fp )
271+ {
272+ blissgraph.write_dimacs (fp);
273+ fclose (fp);
274+ }
268275#endif
269276
277+ /* compute automorphisms */
278+ bliss::Stats stats;
270279
271- /* compute automorphisms */
272- bliss::Stats stats;
273-
274- /* Prefer splitting partition cells corresponding to variables over those corresponding
275- * to inequalities. This is because we are only interested in the action
276- * of the automorphism group on the variables, and we need a base for this action */
277- blissgraph.set_splitting_heuristic (bliss::Graph::shs_f);
278- /* disable component recursion as advised by Tommi Junttila from bliss */
279- blissgraph.set_component_recursion (false );
280+ /* Prefer splitting partition cells corresponding to variables over those corresponding
281+ * to inequalities. This is because we are only interested in the action
282+ * of the automorphism group on the variables, and we need a base for this action */
283+ blissgraph.set_splitting_heuristic (bliss::Graph::shs_f);
284+ /* disable component recursion as advised by Tommi Junttila from bliss */
285+ blissgraph.set_component_recursion (false );
280286
281287#if BLISS_VERSION_MAJOR >= 1 || BLISS_VERSION_MINOR >= 76
282- /* lambda function to have access to data and terminate the search if maxgenerators are reached */
283- auto term = [&]() {
284- return (maxgenerators != 0 && data.nperms >= maxgenerators); /* check the number of generators that we have created so far */
285- };
288+ /* lambda function to have access to data and terminate the search if maxgenerators are reached */
289+ auto term = [&]() {
290+ return (maxgenerators != 0 && data.nperms >= maxgenerators); /* check the number of generators that we have created so far */
291+ };
286292
287- auto hook = [&](unsigned int n, const unsigned int * aut) {
288- sassy.bliss_hook (n, aut);
289- };
293+ auto hook = [&](unsigned int n, const unsigned int * aut) {
294+ sassy.bliss_hook (n, aut);
295+ };
290296
291- /* start search */
292- blissgraph.find_automorphisms (stats, hook, term);
297+ /* start search */
298+ blissgraph.find_automorphisms (stats, hook, term);
293299#else
294300
295- /* Older bliss versions do not allow to terminate with a limit on the number of generators unless patched. */
301+ /* Older bliss versions do not allow to terminate with a limit on the number of generators unless patched. */
296302#ifdef BLISS_PATCH_PRESENT
297- /* If patch is present, do not use a node limit, but set generator limit. This approach is not very accurate, since
298- * it limits the generators considered in bliss and not the ones that we generate (the ones that work on the variable
299- * set). */
300- blissgraph.set_search_limits (0 , (unsigned ) maxgenerators);
303+ /* If patch is present, do not use a node limit, but set generator limit. This approach is not very accurate, since
304+ * it limits the generators considered in bliss and not the ones that we generate (the ones that work on the variable
305+ * set). */
306+ blissgraph.set_search_limits (0 , (unsigned ) maxgenerators);
301307#endif
302308
303- /* start search */
304- blissgraph.find_automorphisms (stats, dejavu::preprocessor::bliss_hook, (void *) &sassy);
309+ /* start search */
310+ blissgraph.find_automorphisms (stats, dejavu::preprocessor::bliss_hook, (void *) &sassy);
305311#endif
306- *symcodetime = SCIPgetSolvingTime (scip) - oldtime;
307312
308313#ifdef SCIP_OUTPUT
309- (void ) stats.print (stdout);
314+ (void ) stats.print (stdout);
310315#endif
316+ /* determine log10 of symmetry group size */
317+ dejavu::big_number grp_sz = sassy.grp_sz ;
318+ *log10groupsize = (SCIP_Real) log10l (stats.get_group_size_approx () * grp_sz.mantissa * powl (10.0 , (SCIP_Real) grp_sz.exponent ));
319+ }
320+
321+ *symcodetime = SCIPgetSolvingTime (scip) - oldtime;
311322
312323 /* prepare return values */
313324 if ( data.nperms > 0 )
@@ -326,10 +337,6 @@ SCIP_RETCODE computeAutomorphisms(
326337 *nmaxperms = 0 ;
327338 }
328339
329- /* determine log10 of symmetry group size */
330- dejavu::big_number grp_sz = sassy.grp_sz ;
331- *log10groupsize = (SCIP_Real) log10l (stats.get_group_size_approx () * grp_sz.mantissa * powl (10.0 , (SCIP_Real) grp_sz.exponent ));
332-
333340 return SCIP_OKAY;
334341}
335342
0 commit comments