 1de5117ef1
			
		
	
	1de5117ef1
	
	
	
		
			
			To avoid paying the cost of setup and of a full grounding again, move cycle detection into a separate program and check first if the solution has cycles. If it has, ground only the integrity constraint preventing cycles and solve again.