A factor graph-based approach that effectively models higher-order spatial constraints to generate floorplan layouts that closely align with user requirements.