Every possible combination of rectangles packed inside another rectangle

Hello, everybody.

I’m trying to achieve a way to position a collection of rectangles within the boundaries of a bigger one. What I want to get as a result from the defintion is to get the combination that is closer to the total area of the boundary rectangle, even though if the rectangles are repeated.

Right now I’m tring to do it in an analytical version, but I would like to attain a grafical one.

Any suggestion will be very appreciated.