From 6c25431873324661142c6cad4780877180cf6bb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20L=C3=BChne?= Date: Wed, 31 Jan 2018 17:24:06 +0100 Subject: [PATCH] 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. --- main.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/main.c b/main.c index ff16978..a10cb41 100644 --- a/main.c +++ b/main.c @@ -35,6 +35,14 @@ #include #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); }