These are called recognition problems . The theory of Computational Complexity restricts attention to these problems for uniformity. A solution to the original TSP problem is a tour of specific length which we can immediately compare to L and so also solve TSP-rec. Conversely, suppose we have an algorithm, say A, for the TSP-rec problem. At the end, the set of links which have their lengths unchanged form an optimal tour.
Similar results hold for most problems of interest.
The goal is to load the container with X 1 pieces of item 1, X 2 pieces of item 2 etc., so that the total value is maximized. In fact, if we had computers capable of executing this extra instruction, there would be no need for Computational Complexity Theory.