@@ -1754,7 +1754,7 @@ end);
17541754# #
17551755InstallGlobalFunction(Morphium,function (G,H,DoAuto )
17561756local combi,Gr,Gcl,Ggc,Hr,Hcl,bg,bpri,x,dat,
1757- gens,i,c,hom,elms,price,result,inns,bcl,vsu;
1757+ gens,i,c,hom,elms,price,result,inns,bcl,vsu,costlimit ;
17581758
17591759 if IsSolvableGroup(G) and CanEasilyComputePcgs(G) then
17601760 gens:= MinimalGeneratingSet(G);
@@ -1766,6 +1766,8 @@ local combi,Gr,Gcl,Ggc,Hr,Hcl,bg,bpri,x,dat,
17661766
17671767 Ggc:= List(gens,i-> First(Gcl,j-> ForAny(j,j-> ForAny(j.classes,k-> i in k))));
17681768 combi:= List(Ggc,i-> Concatenation(List(i,i-> i.classes)));
1769+
1770+ costlimit:= ValueOption(" costlimit" );
17691771 price:= Product(combi,i-> Sum(i,Size));
17701772 Info (InfoMorph,1 ," generating system " ,Sum(Flat(combi),Size),
17711773 " of price:" ,price," " );
@@ -1810,6 +1812,9 @@ local combi,Gr,Gcl,Ggc,Hr,Hcl,bg,bpri,x,dat,
18101812 gens:= bg;
18111813
18121814 else
1815+ if costlimit<> fail and price> costlimit* 20 and Sum(Gcl,Length)> 30 then
1816+ return - 1 ;
1817+ fi ;
18131818 gens:= MorFindGeneratingSystem(G,Gcl);
18141819 fi ;
18151820
@@ -1931,10 +1936,9 @@ local combi,Gr,Gcl,Ggc,Hr,Hcl,bg,bpri,x,dat,
19311936 fi ;
19321937 result.inner:= inns;
19331938 else
1934- dat:= ValueOption(" costlimit" );
1935- if IsInt(dat) and Product(List(combi,x-> Sum(x,Size)))> dat then
1939+ if IsInt(costlimit) and Product(List(combi,x-> Sum(x,Size)))> costlimit then
19361940 Info (InfoMorph,2 ," Morpheus seems to be to costly: " ,
1937- Product(List(combi,x-> Sum(x,Size)))," vs " ,dat );
1941+ Product(List(combi,x-> Sum(x,Size)))," vs " ,costlimit );
19381942 return - 1 ; # not fail, as this is valid
19391943 fi ;
19401944 result:= MorClassLoop(H,combi,result,7 );
0 commit comments