Skip to main content

Fantastic tool for medical student clerkship block scheduling

Answered

Comments

5 comments

  • Riley Clement
    • Gurobi Staff

    Hi Bruce,

    This is great to hear!  We love optimization success stories and if they are Gurobi success stories then even better!

    May your optimizations be quick and your use-cases plentiful :)

    - Riley

    0
  • Bruce Krasnof

    Thanks Riley. If things progress well with my project I'll try and spread the word with other medical schools that might benefit.  Thanks again for the academic licensing.

    0
  • Igor Ganapolsky

    Great use case - clerkship block scheduling is a classic assignment/timetabling MIP. Two things that helped on similar rostering models: (1) Symmetry: if blocks or identical sites are interchangeable, add an ordering constraint (e.g. enrollment in block b >= enrollment in block b+1) - it often cuts the branch-and-bound tree dramatically. (2) Use soft capacity constraints instead of hard ones: give each capacity row a slack variable with a penalty in the objective, so the model stays feasible and shows you exactly where teaching capacity is short instead of just returning INFEASIBLE. If you do hit INFEASIBLE, model.computeIIS() followed by model.write("model.ilp") gives the minimal conflicting set, which is usually the fastest way to find a bad capacity or availability input. For big terms, MIPFocus=1 with MIPGap around 0.01 gets a good solution fast, and you can tighten it once the formulation is stable.

    0
  • Bruce Krasnof

    Thanks Igor.  I have to confess, I've been using Claude Opus 5.0 within MS Excel's Copilot - it's been writing the python scripts for me and managing the architecture for this prototype - so far, so good.  It's saved me from having to too deep with the parameters so far.   We have slack variables and other flexible JSON inputs. 

    Gurobi is solving things in a few seconds each time.  Claude recommended using an open source HiGHS library in parallel so when I do an optimization it's doing 8 total: 4 variations with Gurobi and 4 variations with HiGHS.  Both are obtaining similar results consistently - but Gurobi is 30 times faster !

    I'm still in active coding mode - well vibe coding I guess - but I can update you here if this works out for our medical school this coming scheduling season.   I'm an experienced Windows Powershell scripter but haven't used Python so Claude has been invaluable quarterbacking me through this.

    0
  • Igor Ganapolsky

    Thanks Bruce — 30x vs HiGHS on the same JSON/slack model is the result that matters. Keep both solvers as a check; use Gurobi for the live season run.

    Practical note: encode the 4 variations as slack/penalty weights in the JSON, not 8 separate models. One model, two solvers, four weight files. Easier to debug when Copilot rewrites the scripts.

    Same knapsack class as contractor after-hours dispatch (who covers the missed call). We productize that for HVAC/plumbing shops as a $149 Leak Score: https://ahls.vercel.app/ahls — not a license pitch, and not an invoice to you. If the medical-school season run works, post the JSON shape; other dispatch modelers here will steal it.

    0

Please sign in to leave a comment.