feat: enhance documentation for leave planning concepts and solver recommendations

This commit is contained in:
nessar committed 2026-08-28 17:00:12 +02:00
1 parent dfb25b249b
commit ba8dbe92d9
4 files changed
+147 -11

No files matched your search

+68 -11
View File
@@ -5,18 +5,30 @@ VacOptimizer helps one person turn expiring leave balances into a leave plan acr
## Language
**Leave entitlement**:
Leave made available to the person by a company or generated by an applicable planning rule.
A quantity of leave granted by a company or generated by an applicable planning rule, with an availability date and an expiry date.
**Leave balance**:
The currently available, unspent quantity of a leave entitlement, identified by leave type and expiry date.
The unspent quantity of a leave entitlement, identified by leave type, availability date, and expiry date.
_Avoid_: vacation day, VacDay
**At-risk balance**:
A leave balance whose expiry date falls between the planning horizon's start and end, including both boundary dates. Its unplaced quantity is at risk of being lost.
**Unavoidable expiry**:
Leave whose expiry date precedes the planning horizon and therefore cannot be saved by that plan.
**Deferred balance**:
The unspent portion of a leave balance that expires after the planning horizon. It needs no ordinary placement in the current plan but remains available to explicit planning rules and supporting placements.
**Leave type**:
The category of leave in a balance: CP (paid leave), RTT (working-time reduction leave), or Other (a user-managed catch-all).
_Avoid_: ANY as a leave type; `ANY` is only a rule selector.
**Planning horizon**:
The period beginning today over which a plan is generated. The current horizon is a rolling 12 months.
The user-selected half-open date interval of at most 12 months within which leave may be placed. It defaults to today's Europe/Paris calendar date through the same date 12 months later.
**Working day**:
A Monday-to-Friday calendar date that is not a French national public holiday. Only working days can receive leave placements.
**Public holiday**:
A French calendar date that cannot receive a leave placement and contributes to a time-off period.
@@ -24,27 +36,72 @@ A French calendar date that cannot receive a leave placement and contributes to
**Leave placement**:
Using one or more working days from a leave balance on specific dates within the planning horizon.
**Supporting placement**:
A leave placement from a deferred balance that captures additional adjacent non-working dates, eliminates a short work sequence, or reduces the longest work sequence. Merely extending an existing period by the placed day itself is not sufficient.
**Time-off period**:
A contiguous period created by combining leave placements with weekends and public holidays.
A contiguous period containing at least one leave placement together with any adjacent weekends and public holidays, including those immediately outside the planning horizon.
**Time-off duration**:
The number of distinct calendar dates covered by all planned time-off periods.
**Non-working-day gain**:
The distinct weekend and public-holiday dates contained in planned time-off periods. Leave placement dates themselves do not contribute to this gain.
**Work sequence**:
The working days in an interval delimited by planned time-off periods or by the planning horizon edges. Intervening weekends and public holidays neither count nor split the sequence.
**Short work sequence**:
A work sequence of fewer than five working days between two planned time-off periods.
**Planning rule**:
An ordered user preference that requests leave placements around a calendar opportunity or inside a date window.
A user instruction that requests leave placements around a calendar opportunity or inside a date window. Its force is either an obligation or a preference.
**Obligation rule**:
A planning rule that every valid plan must satisfy. Obligation rules are resolved jointly; their order only breaks ties between valid plans.
**Preference rule**:
A planning rule that guides placement but may remain unsatisfied to preserve validity or prevent more at-risk leave from expiring.
**IF_THEN rule**:
A planning rule triggered when a French public holiday falls on its configured weekday. It places a complete requested pattern before, after, or around that holiday; if the pattern cannot be satisfied, the rule is skipped.
A planning rule evaluated independently for every French public holiday on its configured weekday. A preference requests a complete pattern around each occurrence when possible; an obligation requires it for every occurrence.
**IF_THEN placement mode**:
`before` and `after` fix every requested day on one side; `around` considers every split with at least one day on each side; `auto` considers every split, including the all-before and all-after extremes.
**TIME_WINDOW rule**:
A planning rule that places up to its requested number of leave days on working days within an inclusive date window.
A planning rule targeting working days in an inclusive date window. A preference requests up to its configured quantity; an obligation requires exactly that quantity.
**Rule priority**:
The order in which planning rules are applied. Earlier rules reserve their placements and consume available balances before later rules; the optimizer does not backtrack.
The user-defined lexicographic order of preference rules. Each earlier preference is satisfied as far as possible before a later preference is considered.
**Rule satisfaction**:
The relationship in which a plan fulfils a planning rule. One compatible leave placement may contribute to the satisfaction of multiple rules.
**Placement provenance**:
The consumed leave entitlement and every planning rule satisfied by a leave placement.
**Planning conflict**:
A set of obligation rules that cannot all be satisfied by one plan within the planning horizon and available leave balances.
**Invalid planning input**:
A malformed request that cannot describe a plan, such as a reversed date window. A valid but unsatisfiable request is a planning conflict instead.
**Planning outcome**:
The result of a calculation: invalid input, a planning conflict, an optimization result, or an incomplete calculation.
**Incomplete calculation**:
A calculation stopped before it completed the planning objective order. It may expose its best valid plan but never implies that the obligations conflict.
**Planning objective order**:
The lexicographic quality order applied after joint obligation feasibility: minimize unplaced at-risk leave; satisfy each preference in user order; maximize non-working-day gain; minimize the longest work sequence; minimize the total deficit of internal work sequences shorter than five days; minimize supporting placements; consume earlier-expiring balances; then prefer earlier placement dates. A lower criterion never degrades a higher one.
**Earned leave entitlement**:
A new leave entitlement created by a planning rule as a consequence of a placement. It may be used by later rules and by ordinary placement in the same plan.
A leave entitlement created for each completed occurrence of an applicable planning rule after its generating time-off period ends. It becomes available the following day, expires one year later, and may fund any later compatible placement.
_Avoid_: reward, bonus days
**Optimization result**:
One deterministic plan produced from the original balances and enabled rules. It favors useful adjacent time-off periods but does not promise a mathematically globally optimal result.
A valid deterministic plan produced after completing the planning objective order, containing leave placements and their provenance, time-off periods, unsatisfied preference reasons, and remaining balances with reasons. It does not claim mathematical global optimality.
**Remaining balance**:
The portion of a leave balance that the optimization result did not place.
Any quantity left unspent by the optimization result, reported as unavoidable expiry, an unplaced at-risk balance, or a deferred balance.