This is related to the foillowing Q on Cross Validated https://stats.stackexchange.com/questions/483002/experimental-design-problem-with-goofy-constraints which I am trying to answer, but the optimization problem needs some other expertize which I hope to find here ... Very brief summary: There is a rectangular matrix $B$ with nonnegative numbers (some complications described below) and one want to find some rectangular subarray (not necessarily contiguous) with maximum sum, given an (approximate) size of the subarray. What are some effective algorithms? Please see the linked question for details and background (and, this is my interpretation of that question, I might have misunderstood something.)
Complications: Some of the entries of $B$ might be undefined, and we know very little about the possible patterns of unefinedness. I have thought that maybe just replace the undefined entries with some large enough negative number, but not sure that is good enough. A solution without considering this complication woud be interesting, but even better some ideas about how handling the complication.