Fantastic tool for medical student clerkship block scheduling
AnsweredHi, just downloaded an academic license 2 days ago and I can't believe how well Gurobi is solving our clerkship scheduling modeling. We used to spend hundreds of hours trying to maximize teaching capacity and minimizing over-enrollments using some other optimizers. With AI's help I'm now realizing our problem fit perfectly in the Mixed Integer Linear Problem set. Gurobi is finding the best mathematical solution in seconds - solutions we couldn't find running things for weeks in the past. Very exciting and maybe useful for other medical schools dealing with teaching capacity deficits.
-
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 -
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 -
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 -
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 -
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.
Comments
5 comments