add javadoc to profile router
fix number of trips in each pattern of a segment
fix hop/stop off-by-one errors