groundy
culture & society

When CP-SAT Solvers Set Your Shifts, Labor Laws Become a Soft Constraint

CP-WSP lets labor protections such as schedule stability become weighted CP-SAT penalties, so the solver can trade away fair-scheduling rights whenever the penalty is cheap.

9 min···3 sources ↓

When a CP-SAT solver assigns your hours, labor law is only as binding as the line in a configuration file that decides so. A framework published on arXiv this month, CP-WSP, casts workforce scheduling as exactly that: 14 constraints enforced as “mathematically inviolable requirements,” and 15 more objectives, including the kind of schedule-stability rules that fair-scheduling laws exist to protect, folded into a weighted penalty function the solver is free to spend. Compliance becomes a priced term, not a wall.

What the CP-WSP paper actually optimizes

CP-WSP is a declarative wrapper around a constraint-programming-with-SAT solver, aimed at nurse and shift scheduling, and submitted as a 9-page paper to the CASP:ER Workshop at ICAPS 2026. Its abstract states the problem in its first sentence: workforce scheduling is NP-hard, requiring “simultaneous satisfaction of labor regulations, coverage requirements, employee preferences and operational objectives.” The contribution is less a new algorithm than a packaging exercise. Existing CP formulations, the authors note, typically model simplified instances with 6 to 12 constraints at shift-level granularity and “critically lack explicit support for” mandatory break scheduling with midpoint placement, acuity-weighted workload equity, sub-shift temporal resolution, inter-week schedule stability, and cross-midnight shifts.

CP-WSP fills those gaps. It runs at multiple temporal granularities, from 30 minutes up to two hours, decomposes shifts into windows so breaks can be placed near a shift’s center, weights workload by patient acuity, and adds a preprocessing step for shifts that cross midnight. It was evaluated on the standard INRC-II benchmarks at both hourly and shift-level granularity, plus 36 synthetic configurations the authors ship as a reproducible benchmark suite. The paper reports 17 tables across 9 pages. As a piece of operations research, it is competent and unremarkable. The interesting part is what it does with the boundary between a rule and a preference.

How a rule becomes a penalty term

CP-SAT solvers distinguish between hard constraints, which any valid solution must satisfy, and soft objectives, which carry a cost when violated. The solver minimizes the sum of weighted violations across the soft objectives while keeping the hard constraints strictly satisfied. The hard set in CP-WSP holds 14 constraints, which the authors describe as producing “zero regulatory violations by construction.” The soft set holds 15 objectives, optimized through what the abstract calls a “unified weighted penalty function.”

The decisive detail is in the next clause: the whole thing is “configurable via a JSON specification with no code changes required.” That is presented as an engineering convenience, and for a research artifact it is. It also means the classification of any given requirement as inviolable or merely costly is a value in a file. The same framework that guarantees 14 hard constraints zero violations by construction can be told that the 15th rule, or a new one, carries a small penalty instead of being enforced. Nothing in the solver pushes back. It does what the weights tell it.

When labor law is the soft term

The paper does not claim that any specific labor regulation sits in its soft set; the soft objectives it names are operational and preferential, things like workload equity and schedule stability. The exposure is structural rather than textual. Inter-week schedule stability is explicitly one of the soft objectives CP-WSP adds over prior work. Schedule stability, the property that a worker’s hours do not lurch week to week, is also the specific good that the fair-scheduling laws of the last decade were written to guarantee.

Once stability is a penalty term rather than a hard constraint, the solver will trade it away whenever the penalty weight is small relative to the competing objective, typically coverage or cost. The deployer sets that weight. There is no natural value for it. A hospital running CP-WSP at 30-minute granularity to chase acuity-weighted coverage can dial the stability penalty low enough that rosters churn, and the solver will report an optimal result. It is optimal by construction, against the objective it was handed. Whether that objective honors the spirit of a labor ordinance is a question the framework has no mechanism to ask.

This is not a defect the authors hid. The paper is transparent that it is a framework for configurable optimization. The risk lives entirely in deployment, in the gap between a framework that makes compliance cheaply reconfigurable and an institution that has every incentive to configure it permissively.

What fair-workweek laws were written to stop

Seattle’s Secure Scheduling Ordinance and Chicago’s Fair Workweek Ordinance are the two most cited examples of a policy wave that treats erratic scheduling as a harm in itself. These laws require covered employers to post schedules in advance and to pay a premium, often called predictability pay, when schedules are changed on short notice. Several include scheduling-stability and “right to rest” provisions meant to prevent clopening shifts and the hour-to-hour volatility that makes childcare, second jobs, and basic planning impossible for hourly workers.

Specific ordinance thresholds, coverage rules, and penalty amounts are not in the research record used here and should be checked against the statute text before relying on them [unverified]. What matters for the argument does not depend on the exact figures: these laws establish advance-notice and stability entitlements, and a solver that treats stability as a priced term can violate the notice-and-stability regime whenever the price is right. Predictability pay, where it exists, softens the blow by compensating the worker after a change. It does not restore the planning horizon the law was written to protect in the first place. Compensation is not prevention, and a penalty function optimizes the cheaper of the two.

The inspection problem: nobody can audit the objective

A worker contesting a volatile roster under a fair-workweek ordinance is, in principle, entitled to ask why their schedule looks the way it does. When a floor manager wrote the schedule by hand, that question had an answer, complete with human reasoning and a paper trail. When a SAT solver produced it from a JSON file, the answer is a weighted sum the worker has never seen and is not equipped to interpret.

The objective function is not part of any notice an employer is required to give. The worker sees the roster, not the 15 penalty weights or the decision to classify inter-week stability as soft. They can observe the outcome, a schedule that moves, but not the inputs that produced it or the knob settings that permitted the movement. A complaint process designed around “did the manager post the schedule on time” does not naturally extend to “what was the relative weight of coverage versus stability in the solver’s objective.” The asymmetry is the point. The cost of contesting an erratic schedule is borne entirely by the hourly worker, and the evidence they would need to prove it was engineered rather than incidental sits inside a configuration file they cannot inspect.

Enforcement written for managers, not for solvers

Fair-workweek ordinances were drafted against a model of the employer as a person or a team making scheduling judgments. They impose notice windows, documentation duties, predictability payments, and penalties keyed to identifiable actions: a late schedule, an unposted change, a denied rest period. Each of these maps onto something a human did or failed to do.

A solver breaks that model in two ways. First, it has no judgment to examine. The “decision” to destabilize a roster is distributed across thousands of variable assignments selected to minimize an aggregate penalty; there is no single act to attribute, and no intent to weigh. Second, the configuration is authored by someone the ordinance may never name: a vendor, a data team, a consultant who set the weights once and left. The chain of accountability stretches across the employer who bought the tool, the vendor that shipped it, and the person who tuned the JSON, and the ordinance’s enforcement hooks attach most naturally to only the first link.

The likely outcome is a slow convergence toward the cheapest defensible configuration. Employers comply with the parts of the law that produce a document, the posted schedule and the predictability-pay line item, while the substantive goal, stability, erodes under a weight set low enough to keep the solver efficient. Regulators chasing this will find that the relevant decisions are technical, buried, and shared across parties who each can point to the other.

The wider pattern: configurable compliance in operations research

CP-WSP is a single, honest paper. The pattern it embodies is the norm in its field. Constraint-programming and mixed-integer solvers have always let practitioners choose which requirements to harden and which to penalize; that configurability is the reason these tools are useful for messy, real-world problems where perfect satisfaction is impossible. There is nothing underhanded about a solver that treats objectives as weighted terms. That is the entire technique.

What is new is the venue and the vocabulary. As scheduling frameworks migrate from operations-research journals into deployable, JSON-driven tools that non-specialists can run, the decision about which labor protections count as hard constraints stops being a modeling choice made by a PhD and becomes a settings toggle. The paper’s framing, “zero regulatory violations by construction,” is reassuring precisely because it implies a fixed boundary. The boundary is a config value.

The honest read of CP-WSP is that it is a competent piece of work that makes a class of scheduling problems cheaper to model and easier to tune. The honest read of cheaper, easier tuning applied to labor law is that it makes noncompliance cheaper and easier too. The solver is doing exactly what it was asked to do. The question is who set the weights, who can see them, and what recourse exists when the optimal schedule is also the one the law was written to forbid. The paper does not answer that, and the ordinances, as written, barely know to ask.

Frequently Asked Questions

Is CP-WSP limited to nurse scheduling, or can it be used in retail and warehousing?

The paper targets nurse rostering and weights workload by patient acuity, with break windows placed near a shift’s midpoint. Its JSON-driven configuration is domain-agnostic, so a retail or warehouse team could adapt it, but they would have to supply their own break, advance-notice, and rest-period rules. The framework does not ship with labor-law presets for any industry.

How is CP-WSP different from a conventional mixed-integer programming scheduler?

CP-WSP uses a CP-SAT backend, which handles logical and disjunctive constraints such as clopening bans or cross-midnight shifts directly rather than encoding them as big-M linear inequalities. Earlier CP formulations usually cover 6 to 12 constraints at shift-level granularity, while CP-WSP adds sub-shift break placement, acuity-weighted workload equity, and inter-week stability. It was submitted to the CASP:ER Workshop at ICAPS 2026 as a 9-page paper by Vipul Patel and reports 17 tables across those 9 pages.

What should a team monitor after putting CP-WSP into production?

They should track which constraints are hard versus soft in the JSON file, who has permission to change the weights, and whether any local law updates are reflected in the hard set. The solver will report zero violations of the hard constraints, but that guarantee is empty if a labor rule is listed as a soft objective. Without a change-control process, the cheapest legal configuration tends to drift toward the lowest defensible penalty.

Can the solver still break a fair-workweek law even when it returns an optimal schedule?

Yes. If advance notice or right-to-rest rules are modeled as soft penalties, the solver can issue a schedule late, change it without predictability pay, or assign clopening shifts whenever the penalty is cheaper than the coverage benefit. The output is mathematically optimal against the weights it was given, but a regulator or worker sees only the roster, not the decision to treat the rule as a cost term.

sources · 3 cited

  1. Seattle's Secure Scheduling Ordinanceseattle.govprimaryaccessed 2026-07-10
  2. Chicago's Fair Workweek Ordinancechicago.govprimaryaccessed 2026-07-10