Skip to main content

MILP-based scheduling for graduate visit days

Project description

Grad Visitor Scheduler

Docs (latest) Docs (stable) Open In Colab

MILP-based scheduling utilities for graduate visit days. Created by Alex Dowling and Jeff Kantor at the University of Notre Dame.

Motivation

Most chemical engineering graduate programs in the U.S. host admitted or prospective students for a visit or open house. A core part of those events is one-on-one or small-group meetings with individual faculty members. Building a fair, feasible schedule is challenging: faculty availability, room locations, and student preferences must all be respected simultaneously.

This package is the meeting scheduler used by Notre Dame Chemical and Biomolecular Engineering, released as a general-purpose, open-source tool. Under the hood, it formulates a mixed-integer linear program (MILP) in Pyomo, solves it with a standard solver, visualizes the results, and can export customized student schedules to DOCX.

Data Gathering

Each visitor is asked to rank up to four faculty members for meetings and to choose up to two topic areas within the department. Likewise, faculty are asked to provide any afternoon meeting conflicts. This information is used to generate three key input files:

  • A faculty catalog YAML file (names, buildings, rooms, areas, status, and optional aliases).
  • A run configuration YAML file (time slots by building, breaks, area weights, and any faculty availability constraints).
  • A visitor preferences CSV file.

Research areas are department-specific. In the included example data, they are represented as simple labels such as Area1 and Area2, but you can define any set of areas in your faculty catalog.

What It Produces

  • An optimal assignment of visitors to faculty across time slots.
  • Visual summaries (plots) of the resulting schedule.
  • Optional DOCX exports with individualized visitor schedules.

Install

pip install grad-visitor-scheduler

Solver setup:

  • HiGHS is installed by default via the highspy dependency.
  • To use CBC, install the solver binary with conda:
conda install -c conda-forge coincbc

Quickstart

from pathlib import Path
from grad_visit_scheduler import scheduler_from_configs, Mode, Solver

root = Path("examples")

s = scheduler_from_configs(
    root / "faculty_example.yaml",
    root / "config_basic.yaml",
    root / "data_fake_visitors.csv",
    mode=Mode.NO_OFFSET,
    solver=Solver.HIGHS,
)

s.schedule_visitors(
    group_penalty=0.1,
    min_visitors=0,
    max_visitors=4,
    min_faculty=1,
    max_group=2,
    enforce_breaks=True,
    tee=False,
    run_name="demo",
)

if s.has_feasible_solution():
    s.show_visitor_schedule(save_files=True)

Note: the examples/ folder referenced above is included in the repository, but it is not packaged on PyPI. If you installed from PyPI, clone the repo to access the example files.

Buildings

Notre Dame CBE is split across two buildings (Nieuwland Science Hall and McCourtney Hall) separated by about a 7-minute walk. A key aspect of the scheduler is to ensure that any visitor who needs to move buildings does so during their break slot. A typical schedule uses six meeting slots, and each visitor and faculty member gets at least one middle-slot break.

The run config defines exactly two buildings, and building_order declares which one is Building A versus Building B. Mode controls how movement between buildings is constrained:

  • Mode.BUILDING_A_FIRST: visitor starts in Building A, then may move to B
  • Mode.BUILDING_B_FIRST: visitor starts in Building B, then may move to A
  • Mode.NO_OFFSET: visitor may move either direction, but only with an empty slot

Refine the Schedule

The solver exposes several tunable parameters on schedule_visitors to refine the schedule:

  • group_penalty: penalize group meetings to bias toward one-on-one meetings; higher values discourage multi-visitor meetings.
  • min_visitors: minimum number of visitors each available faculty member must meet.
  • max_visitors: maximum number of visitors each faculty member may meet.
  • min_faculty: minimum number of faculty each visitor must meet.
  • max_group: maximum size of a meeting group at any time slot.
  • enforce_breaks: force breaks for visitors and faculty during the configured break window.
  • tee: print solver output for debugging.
  • run_name: label used when saving plots/exports.

Export DOCX

You can optionally export customized visitor schedules to a DOCX file. This facilitates easy copy/paste into individualized agendas for each visitor.

from grad_visit_scheduler import export_visitor_docx

export_visitor_docx(s, "visitor_schedule.docx")

License

This software is released under the BSD-3-Clause license. Please adapt it to your needs and share.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

grad_visitor_scheduler-0.1.2.tar.gz (22.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

grad_visitor_scheduler-0.1.2-py3-none-any.whl (19.5 kB view details)

Uploaded Python 3

File details

Details for the file grad_visitor_scheduler-0.1.2.tar.gz.

File metadata

  • Download URL: grad_visitor_scheduler-0.1.2.tar.gz
  • Upload date:
  • Size: 22.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for grad_visitor_scheduler-0.1.2.tar.gz
Algorithm Hash digest
SHA256 55cf03a5c31e9a3dc7df06cd02d29062bf32f92ff6ff591bfdd94f25afe9d182
MD5 b31caa16624b686ec2601a2ebfd21046
BLAKE2b-256 0eca36da79e2fc1352804cfd719e88079c321555c8b27aab4db5d674e1836bd4

See more details on using hashes here.

File details

Details for the file grad_visitor_scheduler-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for grad_visitor_scheduler-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 57e5f6894eb7ba63389994648879de556ff9dbfbf726491f7c93e0b07f321089
MD5 ddb5a780ae9aa14fd287b8321aaaa986
BLAKE2b-256 3c88eb542c8aa43b28a432ac9c78b7fdb435f23319824be48a4370ee7bdebe82

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page