Print plan statistics only if plan found

This commit is contained in:
Patrick Lühne 2018-01-26 18:46:42 +01:00
parent 704fbcf130
commit a9ee64ed81
Signed by: patrick
GPG Key ID: 05F3611E97A70ABF

11
main.c
View File

@ -222,6 +222,14 @@ void printStatistics()
break; break;
} }
printf("plan:\n found: ");
if (solutionIndex < 0)
printf("false\n");
else
{
printf("true\n");
const auto planLength = seqs[solutionIndex].sati->nOfTPoints - 1; const auto planLength = seqs[solutionIndex].sati->nOfTPoints - 1;
int numberOfActions = 0; int numberOfActions = 0;
@ -233,7 +241,8 @@ void printStatistics()
if (vartruep(sati,TACT(i,t))) if (vartruep(sati,TACT(i,t)))
numberOfActions++; numberOfActions++;
printf("plan:\n length: %i\n actions: %i\n", planLength, numberOfActions); printf(" length: %i\n actions: %i\n", planLength, numberOfActions);
}
if(flagOutputDIMACS == 0) { if(flagOutputDIMACS == 0) {
printf("iterations:\n"); printf("iterations:\n");