Maxrect solver with priority usage