this user was given a reference , or order , generated by an algorithm designed to take in the time when the port was opened , the precise distance to the destination and the line which the port was opened on .