mirror of
https://github.com/RAIRLab/Spectra.git
synced 2024-11-09 11:10:34 -05:00
Added timing code
This commit is contained in:
parent
13b3879630
commit
f44c75e3a6
1 changed files with 3 additions and 0 deletions
|
@ -50,6 +50,7 @@ public final class Runner {
|
||||||
|
|
||||||
for (PlanningProblem planningProblem : planningProblemList) {
|
for (PlanningProblem planningProblem : planningProblemList) {
|
||||||
|
|
||||||
|
long start = System.currentTimeMillis();
|
||||||
Set<Plan> plans = astarplanner.plan(
|
Set<Plan> plans = astarplanner.plan(
|
||||||
planningProblem.getBackground(),
|
planningProblem.getBackground(),
|
||||||
planningProblem.getActions(),
|
planningProblem.getActions(),
|
||||||
|
@ -57,9 +58,11 @@ public final class Runner {
|
||||||
planningProblem.getGoal(),
|
planningProblem.getGoal(),
|
||||||
ConstantHeuristic::h
|
ConstantHeuristic::h
|
||||||
);
|
);
|
||||||
|
long end = System.currentTimeMillis();
|
||||||
|
|
||||||
if(plans.size() > 0) {
|
if(plans.size() > 0) {
|
||||||
System.out.println(plans.toString());
|
System.out.println(plans.toString());
|
||||||
|
System.out.println("Time (ms): " + (end - start));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
System.out.println("FAILED");
|
System.out.println("FAILED");
|
||||||
|
|
Loading…
Reference in a new issue