I will start with an example of a problem that is supposed to belong to the area I'm looking for.
What tree with N nodes has the smallest sum of the distances between every two nodes?
(Answer: a star where one node is connected to every other node, because 2 is the shortest possible distance between non-adjacent nodes.)
An important property of this problem is that the answer is a graph.
Question: is there an area of graph theory that deals with problems where the goal is to find the graph that is optimal according to the specified rules?