How the easyopti WebAssembly optimization engine works
Discover the mathematical and technical architecture of our platform: a C++ combinatorial optimization solver running locally in your browser for speed and privacy.
In short
easyopti runs an operations research solver written in C++ and compiled to WebAssembly directly in your browser. It combines LAHC and VNS metaheuristics with exact 64-bit integer arithmetic to solve complex organizational problems in seconds, without sending your calculation data to a remote server.
1. Why combinatorial optimization outperforms spreadsheets
Scheduling a team of 20 employees over 30 days with only 4 possible choices per day represents more combinations than there are atoms in the observable universe. A spreadsheet or a human brain can only explore a tiny fraction of this search space.
In operations research, this problem belongs to the family of NP-hard problems. It requires a mathematical engine capable of evaluating millions of neighboring states per second while avoiding local dead ends.
2. Our hybrid LAHC-VNS algorithm
The easyopti engine is based on the combination of two proven metaheuristics in combinatorial optimization: Late Acceptance Hill Climbing (LAHC) and Variable Neighborhood Search (VNS).
- Rapid exploration via LAHC: The algorithm compares each new solution with a sliding memory of previous scores. This allows it to temporarily accept a minor degradation to overcome obstacles and find a better global solution.
- Structured diversification via VNS: When the search stabilizes, the engine dynamically changes its neighborhood operator (shift swaps, multi-day permutations, block reallocation) to escape local optima.
- Exact 64-bit integer arithmetic: Unlike engines based on floating-point numbers subject to cumulative rounding errors, our objective function uses 64-bit integers. Hard and soft penalties remain strictly exact at each iteration.
3. Strict hierarchy between hard constraints and strategic objectives
To ensure actionable results in the field, the solver mathematically separates two levels of rules: hard constraints and soft constraints.
Hard constraints cover the mandatory rules you have configured: qualifications, absences, minimum rest periods, maximum working span, and hour limits. Soft constraints then balance cost control, fairness of difficult shifts, and respect for your team's preferences.
How the solver handles impossible constraints
In practice, a schedule can sometimes be mathematically insoluble (e.g., too many simultaneous absences to cover all shifts). Unlike strict solvers that fail without results, our engine never blocks: it produces the best possible compromise following a strict 4-level hierarchy and flags each remaining conflict in red in the alert table.
| Level | Protected rules | Behavior in case of conflict |
|---|---|---|
| Level 1 (Absolute priority) | Blocking manual locks, approved leave, and mandatory skills. | Never bypassed by the solver. |
| Level 2 | Blocking rotation sequences, max consecutive days, and max shifts per day. | Prioritized before loosening lower layers. |
| Level 3 | Minimum rest between shifts, hour caps, and maximum daily spread. | Protected before shift coverage to prevent illegal schedules. |
| Level 4 (Adjustment variable) | Numerical coverage of staffing needs. | The engine intentionally leaves the understaffed shift visible so the manager can decide on reinforcement or adjust a rule. |
4. C++ compiled to WebAssembly: local computation and native privacy
Traditional SaaS software sends your data to remote servers to run calculations, which introduces queues, high infrastructure costs, and network exposure of your HR data.
| Technical criterion | WebAssembly local solver (easyopti) | Traditional cloud server solver |
|---|---|---|
| Privacy during computation | 100% local on your device | Mandatory transfer to external servers |
| Latency and queue | Immediate start with no queue | Variable depending on server load |
| Execution speed | Close to native C++ code in a dedicated thread | Depends on the CPU quota allocated per subscription |
| Offline functionality | Possible after initial page load | Not possible without a permanent connection |
Data flow: where is your data at each step?
To ensure total transparency regarding privacy and GDPR, here is the exact location of your data depending on the features you choose to use.
| Usage step | Data location | Network transfer |
|---|---|---|
| Data entry, CSV import, and grid editing | Local browser memory | No server transfer |
| Schedule generation (LAHC-VNS engine) | Local execution in a WebAssembly Web Worker on your device | No server transfer |
| PDF and CSV exports and local backup (.ezplan) | Files generated directly on your computer | No server transfer |
| Cloud backup (optional, with account) | Isolated storage on Google Cloud / Firebase in the European Union (europe-west) | Only when you click Save |
| Magic Link and Employee Portal (optional) | Firebase in the European Union (europe-west), pages protected against indexing | Only upon voluntary publication by the manager |
Frequently asked technical questions
Does WebAssembly calculation freeze my browser during optimization?
No. The calculation engine runs in a Web Worker separate from the graphical interface. Your browser remains smooth and responsive throughout the optimization process.
Why use an LAHC-VNS metaheuristic rather than an exact linear solver?
On real schedules containing rolling rest rules, cyclic sequences, and non-linear fairness objectives, exact methods can take several hours. An LAHC-VNS metaheuristic delivers a very high-quality solution in just a few seconds.
Do my employee data leave my computer during optimization?
No. By default, all calculations take place in your browser's local memory. Cloud uploads are strictly optional and only triggered if you create an account to save or share a schedule.
What team size can the engine handle efficiently?
The solver is designed and calibrated for small and medium-sized businesses managing up to 200 employees over horizons of up to 366 days, with typical calculation times of a few seconds on a standard computer.
Test our optimization engine in your browser
Try easyopti Opti-Planning for free to measure the speed of the WebAssembly solver on a ready-to-use business template.