Classical fit Rectangles in Rectangles problematic


I have the following problem and searching for a solution or good Pkg which helps with the problem.

I have n-Rectangles of different size and each rectangle has a Value, independent from the size.

I also have on big rectangle and possible duplicates from it.

The problem is to fit rectangles into the big rectangles that the sum of the Value is maximal.

The sum is decreasing if the rectangle is not in the big rectangle but a duplicate. y<1, sum(Value)*y^(nth Duplicate).

Also, it should be possible that after a set of small rectangles is used, to apply a new set of small rectangles while keeping the solution of the set before and the new rectangles are placed in the leftover free spaces.

Because we are talking of maximum 100 small rectangles each set a brute force solution may be possible.

I already made a solution with gurobi, but i dont want to depend on commercial solvers.

Thanks community.

Hi, You may be interested in using JuMP with the non-commercial linear and mixed-integer programming solver HIGHS.

1 Like