Skip to content

Commit

Permalink
add messages for troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
see24 committed Mar 28, 2024
1 parent 6bdd893 commit a711c4d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions R/projectRoads.R
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ setMethod(
}

sim$g <- getGraph(sim, neighbourhood,weightFunction=weightFunction,...)
message("graph done")
print(gc(full = TRUE))

sim <- switch(sim$roadMethod,
snap= {
Expand All @@ -234,25 +236,44 @@ setMethod(
},
ilcp ={
sim <- getClosestRoad(sim, ordering)
message("closest done")
print(gc(full = TRUE))

sim <- lcpList(sim)

message("lcp done")
print(gc(full = TRUE))

# includes iterative update graph
sim <- iterativeShortestPaths(sim)

message("short path done")
print(gc(full = TRUE))

sim <- outputRoads(sim, roadsOut)

message("out roads done")
print(gc(full = TRUE))
},
mst ={
sim <- getClosestRoad(sim, ordering)
message("closest done")
print(gc(full = TRUE))

# will take more time than lcpList given the construction of
# a mst
sim <- mstList(sim)
message("mst done")
print(gc(full = TRUE))

# update graph is within the shortestPaths function
sim <- shortestPaths(sim)
message("short path done")
print(gc(full = TRUE))

sim <- outputRoads(sim, roadsOut)
message("out roads done")
print(gc(full = TRUE))
}
)

Expand Down

0 comments on commit a711c4d

Please sign in to comment.