A functional toolkit for authoring resource-leveling algorithms — compose constraint and scoring blocks, enumerate feasible schedules

feat(level-core): resolveCalendar pipeline entry master

resolveCalendar turns a ProjectFile into a ResolvedProject — the entry point of the leveling pipeline. The epoch is opts.epoch ?? statusDate ?? earliest task start, and resolving with no available origin throws rather than silently defaulting. capacityPerDay is derived as work-unit-hours per day; calendars are built into a per-id map with a synthetic Mon–Fri fallback; durations and lags are converted to working-day units from the project's minutes-per-day and minutes-per-week. WorkUnit definitions are resolved into the by-id registry here, and duplicate unit ids are rejected at resolve time so a duplicate cannot diverge the greedy and MiniZinc objectives downstream.


+790
2 changed files