Add more statistics
This adds the following statistics: the number of state variables before and after preprocessing, the number of ground actions before and after preprocessing, and the maximum size of a strongly connected component.
This commit is contained in:
		
							
								
								
									
										27
									
								
								main.c
									
									
									
									
									
								
							
							
						
						
									
										27
									
								
								main.c
									
									
									
									
									
								
							@@ -35,6 +35,14 @@
 | 
			
		||||
#include <omp.h>
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
int numberOfGroundActionsAfterParsing = -1;
 | 
			
		||||
int numberOfStateVariablesAfterParsing = -1;
 | 
			
		||||
 | 
			
		||||
int numberOfGroundActionsAfterSimplification = -1;
 | 
			
		||||
int numberOfStateVariablesAfterSimplification = -1;
 | 
			
		||||
 | 
			
		||||
int maxSizeOfStronglyConnectedComponents = -1;
 | 
			
		||||
 | 
			
		||||
char state_for_random[256];
 | 
			
		||||
char dump_for_random[256];
 | 
			
		||||
 | 
			
		||||
@@ -211,6 +219,18 @@ void printStatistics()
 | 
			
		||||
 | 
			
		||||
  printf("maxLearnedClauseLength: %i\n",stats_longest_learned);
 | 
			
		||||
 | 
			
		||||
  if (numberOfGroundActionsAfterParsing > -1)
 | 
			
		||||
    printf("groundActions:\n  afterParsing: %i\n",numberOfGroundActionsAfterParsing);
 | 
			
		||||
  if (numberOfGroundActionsAfterSimplification > -1)
 | 
			
		||||
    printf("  afterPreprocessing: %i\n",numberOfGroundActionsAfterSimplification);
 | 
			
		||||
  if (numberOfStateVariablesAfterParsing > -1)
 | 
			
		||||
    printf("stateVariables:\n  afterParsing: %i\n",numberOfStateVariablesAfterParsing);
 | 
			
		||||
  if (numberOfStateVariablesAfterSimplification > -1)
 | 
			
		||||
    printf("  afterPreprocessing: %i\n",numberOfStateVariablesAfterSimplification);
 | 
			
		||||
 | 
			
		||||
  if (maxSizeOfStronglyConnectedComponents > -1)
 | 
			
		||||
    printf("stronglyConnectedComponents:\n  maxSize: %i\n",maxSizeOfStronglyConnectedComponents);
 | 
			
		||||
 | 
			
		||||
  int solutionIndex = -1;
 | 
			
		||||
 | 
			
		||||
  for (int i = 0; seqs[i].sati; i++)
 | 
			
		||||
@@ -718,6 +738,9 @@ int main(int argc,char **argv) {
 | 
			
		||||
 | 
			
		||||
   NEWgroundoperators();
 | 
			
		||||
  
 | 
			
		||||
   numberOfGroundActionsAfterParsing = nOfActions;
 | 
			
		||||
   numberOfStateVariablesAfterParsing = nOfAtoms;
 | 
			
		||||
 | 
			
		||||
   printf("Parser: %i ground actions and %i state variables\n",nOfActions,nOfAtoms);
 | 
			
		||||
 | 
			
		||||
   if(flagShowInput) {
 | 
			
		||||
@@ -754,6 +777,9 @@ int main(int argc,char **argv) {
 | 
			
		||||
 | 
			
		||||
  if(flagEliminateConverses) mergecontras();
 | 
			
		||||
 | 
			
		||||
  numberOfGroundActionsAfterSimplification = nOfActions;
 | 
			
		||||
  numberOfStateVariablesAfterSimplification = nOfAtoms;
 | 
			
		||||
 | 
			
		||||
  printf("Simplified: %i ground actions and %i state variables\n",nOfActions,nOfAtoms);
 | 
			
		||||
 | 
			
		||||
  sortactions();
 | 
			
		||||
@@ -786,6 +812,7 @@ int main(int argc,char **argv) {
 | 
			
		||||
    int maxsize;
 | 
			
		||||
    TIMEdisabling = time10ms();
 | 
			
		||||
    maxsize = scc(nOfActions);
 | 
			
		||||
    maxSizeOfStronglyConnectedComponents = maxsize;
 | 
			
		||||
    printf(" %.2f secs (max SCC size %i)\n",time2real(time10ms() - TIMEdisabling),maxsize);
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user