@@ -269,68 +269,79 @@ SCIP_RETCODE computeAutomorphisms(
269269 /* call sassy to reduce graph */
270270 sassy.reduce (G, &sassyglue);
271271
272- /* create bliss graph */
273- bliss::Graph blissgraph (0 );
272+ if ( G->get_sgraph ()->v_size == 0 )
273+ {
274+ dejavu::big_number grp_sz = sassy.grp_sz ;
275+ *log10groupsize = (SCIP_Real) log10l (grp_sz.mantissa * powl (10.0 , (SCIP_Real) grp_sz.exponent ));
276+ }
277+ else
278+ {
279+ /* create bliss graph */
280+ bliss::Graph blissgraph (0 );
274281
275- /* convert sassy to bliss graph */
276- convert_dejavu_to_bliss (G, &blissgraph);
282+ /* convert sassy to bliss graph */
283+ convert_dejavu_to_bliss (G, &blissgraph);
277284
278285#ifdef SCIP_OUTPUT
279- blissgraph.write_dot (" debug.dot" );
286+ blissgraph.write_dot (" debug.dot" );
280287#endif
281288
282289#ifdef SCIP_DISABLED_CODE
283- char filename[SCIP_MAXSTRLEN];
284- (void ) SCIPsnprintf (filename, SCIP_MAXSTRLEN, " %s.dimacs" , SCIPgetProbName (scip));
285- FILE* fp = fopen (filename, " w" );
286- if ( fp )
287- {
288- blissgraph.write_dimacs (fp);
289- fclose (fp);
290- }
290+ char filename[SCIP_MAXSTRLEN];
291+ (void ) SCIPsnprintf (filename, SCIP_MAXSTRLEN, " %s.dimacs" , SCIPgetProbName (scip));
292+ FILE* fp = fopen (filename, " w" );
293+ if ( fp )
294+ {
295+ blissgraph.write_dimacs (fp);
296+ fclose (fp);
297+ }
291298#endif
292299
300+ /* compute automorphisms */
301+ bliss::Stats stats;
293302
294- /* compute automorphisms */
295- bliss::Stats stats;
296-
297- /* Prefer splitting partition cells corresponding to variables over those corresponding
298- * to inequalities. This is because we are only interested in the action
299- * of the automorphism group on the variables, and we need a base for this action */
300- blissgraph.set_splitting_heuristic (bliss::Graph::shs_f);
301- /* disable component recursion as advised by Tommi Junttila from bliss */
302- blissgraph.set_component_recursion (false );
303+ /* Prefer splitting partition cells corresponding to variables over those corresponding
304+ * to inequalities. This is because we are only interested in the action
305+ * of the automorphism group on the variables, and we need a base for this action */
306+ blissgraph.set_splitting_heuristic (bliss::Graph::shs_f);
307+ /* disable component recursion as advised by Tommi Junttila from bliss */
308+ blissgraph.set_component_recursion (false );
303309
304310#if BLISS_VERSION_MAJOR >= 1 || BLISS_VERSION_MINOR >= 76
305- /* lambda function to have access to data and terminate the search if maxgenerators are reached */
306- auto term = [&]() {
307- return (maxgenerators != 0 && data.nperms >= maxgenerators); /* check the number of generators that we have created so far */
308- };
311+ /* lambda function to have access to data and terminate the search if maxgenerators are reached */
312+ auto term = [&]() {
313+ return (maxgenerators != 0 && data.nperms >= maxgenerators); /* check the number of generators that we have created so far */
314+ };
309315
310- auto hook = [&](unsigned int n, const unsigned int * aut) {
311- sassy.bliss_hook (n, aut);
312- };
316+ auto hook = [&](unsigned int n, const unsigned int * aut) {
317+ sassy.bliss_hook (n, aut);
318+ };
313319
314- /* start search */
315- blissgraph.find_automorphisms (stats, hook, term);
320+ /* start search */
321+ blissgraph.find_automorphisms (stats, hook, term);
316322#else
317323
318- /* Older bliss versions do not allow to terminate with a limit on the number of generators unless patched. */
324+ /* Older bliss versions do not allow to terminate with a limit on the number of generators unless patched. */
319325#ifdef BLISS_PATCH_PRESENT
320- /* If patch is present, do not use a node limit, but set generator limit. This approach is not very accurate, since
321- * it limits the generators considered in bliss and not the ones that we generate (the ones that work on the variable
322- * set). */
323- blissgraph.set_search_limits (0 , (unsigned ) maxgenerators);
326+ /* If patch is present, do not use a node limit, but set generator limit. This approach is not very accurate, since
327+ * it limits the generators considered in bliss and not the ones that we generate (the ones that work on the variable
328+ * set). */
329+ blissgraph.set_search_limits (0 , (unsigned ) maxgenerators);
324330#endif
325331
326- /* start search */
327- blissgraph.find_automorphisms (stats, dejavu::preprocessor::bliss_hook, (void *) &sassy);
332+ /* start search */
333+ blissgraph.find_automorphisms (stats, dejavu::preprocessor::bliss_hook, (void *) &sassy);
328334#endif
329- *symcodetime = SCIPgetSolvingTime (scip) - oldtime;
330335
331336#ifdef SCIP_OUTPUT
332- (void ) stats.print (stdout);
337+ (void ) stats.print (stdout);
333338#endif
339+ /* determine log10 of symmetry group size */
340+ dejavu::big_number grp_sz = sassy.grp_sz ;
341+ *log10groupsize = (SCIP_Real) log10l (stats.get_group_size_approx () * grp_sz.mantissa * powl (10.0 , (SCIP_Real) grp_sz.exponent ));
342+ }
343+
344+ *symcodetime = SCIPgetSolvingTime (scip) - oldtime;
334345
335346 /* prepare return values */
336347 if ( data.nperms > 0 )
@@ -349,10 +360,6 @@ SCIP_RETCODE computeAutomorphisms(
349360 *nmaxperms = 0 ;
350361 }
351362
352- /* determine log10 of symmetry group size */
353- dejavu::big_number grp_sz = sassy.grp_sz ;
354- *log10groupsize = (SCIP_Real) log10l (stats.get_group_size_approx () * grp_sz.mantissa * powl (10.0 , (SCIP_Real) grp_sz.exponent ));
355-
356363 return SCIP_OKAY;
357364}
358365
0 commit comments