Optimization problem over bidirectional connected graph
This is the special case of the multidimensional knapsack problem where each item (tray) has the same value (consider the set of trays you don't select).  It presumably remains NP-hard, but can be solved by a number of methods.  Probably the easiest to try first is to formulate this as an instance of integer linear programming and then apply an ILP solver to it.