GithubHelp home page GithubHelp logo

seating's Introduction

Seating

Multi-period seating plan optimization.

The dinner party solution you have always dreamed of. Now your guests can stop complaining they were seated next to an obnoxious boor.

example

Description

This is a Python package for optimizing seating plans for multiple periods. It describes a seating plan as a graph with guests as nodes and edges representing the relationship between guests. Both the graph structure (the table layout) and the pairwise relationship between guests are user-defined. Simulated annealing is used to find the optimal seating plan for the given graph structure and pairwise relationships by minimizing the total relationship score of the seating plan.

Over multiple time periods with the same guests, pairwise relationships are penalized if the guests sat next to each other in previous periods.

Features

  • Handles any number of guests and tables.
  • Supports multiple periods with the same guests (e.g. multiple dinner parties).
    • Pairings of guests who sat next to each other in previous time periods are penalized.
    • Guests can be fixed to the same position in each period.
  • Supports 3 table topologies each in 2 versions (strongly and weakly connected):
    • rectangular,
    • rectangular with a head and/or a foot,
    • round.
  • Seating plans and convergence plots are saved as PDFs. example

Installation

git clone [seating repo]
cd seating
pip install .

Usage

Example 1: three sequential dinner parties each with two tables, one recangular table with two fixed heads and 8 guests, one round table with 5 guests. relationships.csv is the matrix of pairwise relationship scores between guests (all named). The output is saved in figures/.

python -m seating 8 5 -t rectangular_with_heads -t round -r data/relationships.csv -s figures/ -n 3 -f 0 -f 7 

Example 2: two sequential dinner parties each with a single round table of 15 guests. Host and their partner have their positions fixed.

python -m seating 15 -t round -r data/relationships.csv -s figures/ -n 2 -f 0 -f 7 

For help with command line arguments and options:

python -m seating --help

To create a template for the relationships matrix:

template [list of names]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.