Print plan statistics only if plan found
This commit is contained in:
parent
704fbcf130
commit
a9ee64ed81
25
main.c
25
main.c
@ -222,18 +222,27 @@ void printStatistics()
|
||||
break;
|
||||
}
|
||||
|
||||
const auto planLength = seqs[solutionIndex].sati->nOfTPoints - 1;
|
||||
printf("plan:\n found: ");
|
||||
|
||||
int numberOfActions = 0;
|
||||
if (solutionIndex < 0)
|
||||
printf("false\n");
|
||||
else
|
||||
{
|
||||
printf("true\n");
|
||||
|
||||
const satinstance sati = seqs[solutionIndex].sati;
|
||||
const auto planLength = seqs[solutionIndex].sati->nOfTPoints - 1;
|
||||
|
||||
for (int t = 0; t < sati->nOfTPoints - 1; t++)
|
||||
for (int i = 0; i < sati->nOfActions; i++)
|
||||
if (vartruep(sati,TACT(i,t)))
|
||||
numberOfActions++;
|
||||
int numberOfActions = 0;
|
||||
|
||||
printf("plan:\n length: %i\n actions: %i\n", planLength, numberOfActions);
|
||||
const satinstance sati = seqs[solutionIndex].sati;
|
||||
|
||||
for (int t = 0; t < sati->nOfTPoints - 1; t++)
|
||||
for (int i = 0; i < sati->nOfActions; i++)
|
||||
if (vartruep(sati,TACT(i,t)))
|
||||
numberOfActions++;
|
||||
|
||||
printf(" length: %i\n actions: %i\n", planLength, numberOfActions);
|
||||
}
|
||||
|
||||
if(flagOutputDIMACS == 0) {
|
||||
printf("iterations:\n");
|
||||
|
Loading…
Reference in New Issue
Block a user