Inspiration

A close friend of mine is a Speech Pathologist. She has more than 40 clients, ranging from young children to grown ups. Each having their own issues, their own days and times that they can have a session. Especially at the start of a new "season" after the summer holidays but also whenever somebody changes their preferences, she struggles with little bits of paper with the names and times of each client to find the optimum schedule for the week, having in mind who can be grouped with whom for group sessions, who must be consecutive with whom, because their parent is picking one up while dropping off the 2nd etc.

What it does

Practably enables the practitioner to enter all the relevant client preferences, needs and wants in an easy UI way, and when it's time, one push of a button finds the optimum session that satisfies all conditions, or warns when it can't. It even gives suggestions on who to move to a different day/time in order to satisfy all clients needs.

Our approach

The Auto-Planner treats the week as one problem, solved all at once, instead of a chain of separate steps. Earlier versions of the planner took two separate decisions: first what to schedule (which groups and which sizes), then when. That split was the main reason they fell short. Our current engine decides who meets with whom, at what size and at what time together, and it keeps revisiting those decisions while it searches.

The process has five stages:

  1. Compile. The practitioner's settings and client data become a fixed model of the week. All hard rules sit behind a single feasibility gate. Every placement must pass this one check, so a rule cannot be broken on one path and respected on another.
  2. Enumerate. The engine lists every legal group combination, together with the time windows its members share and the revenue it would bring in.
  3. Construct. It builds several complete timetables using a most-constrained-first strategy: the client or group with the fewest workable options is always placed next. The runs use different random tie-breaks and alternate between two construction styles. The best timetable becomes the starting point.
  4. Improve. Adaptive Large Neighbourhood Search (ALNS) then repeatedly removes part of the timetable (a day, a group, or the sessions blocking an unserved client) and rebuilds it. A change is kept only if the timetable gets better or stays equally good. Operators that produce improvements are chosen more often over time. Some operators can dissolve and re-form groups or change their size, which earlier engines could not do.
  5. Report. The engine never drops a session silently. Every session is either placed or reported as unmet. Each shortfall comes with a concrete suggestion, such as "widening this client's Tuesday window would free a slot".

Hard rules and soft goals

Hard rules are never broken: working hours, blocked times and holidays; no double-booking, including each client's travel buffers; daily, monthly and lifetime session limits; client end dates; group eligibility, accepted group sizes and allowed partners; mandatory partners; back-to-back session pairs; and exact start times the practitioner has promised.

Soft goals are ranked in strict order of importance (a lexicographic objective), so a lower-ranked goal can never be improved at the cost of a higher one:

  1. Serve every session inside the client's preferences.
  2. Stretch a preferred window as little as possible (at most a configurable number of minutes, 15 by default).
  3. Keep the practitioner's configured rest breaks.
  4. Avoid giving the same client sessions on consecutive days, where they have asked for this.
  5. Maximise revenue, for example by choosing larger legal groups and not shrinking groups without need.
  6. Keep working days compact, with few dead gaps.

This order is a deliberate design choice: promises to clients come before money, and money comes before convenience.

How we built it

The whole app was built in very long and tedious sessions with AI agents. Many iterations were needed, because, as I found out, AI agents are VERY useful coding assistants, but the systems analysis and logic are not their strong points. An experienced human analyst does a far better job (still)

Challenges we ran into

Making an auto-planner with so many parameters was a much more involved process than originally anticipated.

Accomplishments that we're proud of

The app was developed from scratch in under 3 months. That took a lot of back and forth with the AI agent, but the result is worth it!

What we learned

AI cannot do everything. and most importantly not everything it does do is correct or optimized.

What's next for Practably

Currently practably is a solo practitioner's tool. Next up: multi-practitioner, e.g. in a clinic with more than 1 doctor, at a gym with more than 1 instructor, at a music school with more than 1 music teacher. Will also handle resource availability, e.g. Piano, Drums that multiple teachers might be using, but not at the same time

R&D ahead

Planned research directions:

  • joint optimisation across several weeks at once, instead of week by week;
  • provable lower bounds, so the engine can show that a timetable is optimal or state how close to optimal it is;
  • stress-testing on synthetic practices with extreme profiles, such as practices with mostly groups or many fixed commitments;
  • learning each practitioner's real priorities from the edits they make after planning.

Built With

Share this project:

Updates

Submission history