1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

2d bin packing + selective grouping

  1. Dec 4, 2012 #1
    Hi everyone!

    Let me introduce myself, my name is Francisco and I'm an architecture student. I've recently become interested in algorithmic design, which is basically utilizing math to help design (an example would be structure or space optimization). To contextualize, Im a noob with numbers, so as far as algorithmic architecture goes, I´ve just played with some tools that help with it (Rhino Grasshopper for example, which is a 3d parametric modeler).

    I want to develop a software in which I input areas (represented by rectangles) and it organizes them and presents me various possible solutions to a floor plan. You may think this belongs to the computer science subforum, but I first want to grasp the mathemagical / logical concept of it before tackling it in a programming language.

    The problem consists in trying to group a bunch of rectangles in the least possible space (not within a container, no boundaries). at the same time, I want some of these rectangles to be closer to others, so there is a hierarchy of proximity between rectangles. For example, if I wanted various possibilites of a house floor plan, I'd input spaces such as kitchen, dinning room, living room, bedrooms, etc., and it would not only group them in little space, but also ubicate them according to desirable proximities (kitchen - dinning room for example) and viceversa.

    So basically, it would be some sort of 2d bin packing, but is there a way to control how the objects "pack" so I have the desirable proximities between them. In the software "grasshopper", I tried using a genetic algorithm to search solutions reducing space between the objects but the software wouldnt let me input more than one fitness (is this possible if I program my own genetic algorithm? I mean, multiple fitnesses).

    Thanks in advance, open to suggestions,ideas or anything.
  2. jcsd
  3. Dec 4, 2012 #2


    Staff: Mentor

    in general in a genetic algorithm, you score your possible solutions so at that time you could score using multiple criteria like you mention. For example, you could score better if the bathroom is closer to the bedroom, and the kitchen is closer to the game room.

    In any event, it seems like overkill to be doing this. I mean a home has so few rooms and bin packing is usually reserved for dozens or hundreds of boxes.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook