Simulator

Test algorithm changes on real orders before publishing; compare the published algorithm with the draft side by side on a single order or in batch.

Simulator (OMS › Packing locations › Simulator) shows how an algorithm change will affect where orders are sourced before going live. The Simulator does not save or publish anything; publishing is done on the Algorithms or Matching rules screen.

At the top of the page, select between Single order and Batch comparison. Next to it, it shows which algorithm is compared with which draft: "Published · <name>" vs Draft.

Two sides

  • Published (A): the source the engine would choose if it replanned this order now (with current stock and statistics; ignoring existing work orders). Visible to any user who can open the screen.
  • Draft (B): the same candidates are rescored with the draft formula. Results are shown with the Estimated badge: the engine rescoring the first 100 plans returned, preserving live order on ties.

The draft side requires location write permission and OwnerAdmin or TenantAdmin role. If missing, the draft box shows the reason and only published results are shown.

Draft selection

The Draft box contains:

  • No draft (published only)
  • "<name> · saved draft": the default algorithm’s draft saved in Algorithms.
  • "<name> · v<version> · <date>": one of the last 5 unpublished versions of the default algorithm.
  • Saved city rules (not published): rules saved in Matching rules but not published.
  • Edit by hand (not saved): formulas open on the page and are used only for this comparison. Insert template writes the aggregate template without confirmation; if formulas already match the template, the button is disabled and "Formulas already match the template." is shown. Back to published restores formulas to the published state.

The selected draft is first validated with OMS ("Draft is being validated with OMS…"); run buttons are disabled during validation. If draft fails validation, OMS is unreachable, or draft cannot be calculated for this order, a yellow warning appears and only published is simulated. Draft issues never block the published side. If the draft no longer exists at the address (e.g. city rules published), a note appears; Clear the draft clears the selection.

Single order

Enter the order number and press Simulate. Next to the box, some recent open orders ("Recent open orders:") appear for quick selection; clicking one simulates that order.

Candidates are listed in the result: the top three from each side and the best split plan from each side (even if not in top three). Each candidate shows source type, shipping zone and distance, score bar and components (Handling, Carrier, Stock effect, Workload effect, Other (order formula)), and the selected candidate shows the Selected badge. The source with the lowest score is chosen. A and B bars measure separately; scores of the two algorithms are not compared.

  • The Why? section explains the winner and closest runner-up for each side, component by component.
  • The verdict line states whether both sides chose the same source. If the draft source changes, the percentage change in handling + shipping cost is shown.
  • Candidates shipped in multiple packages appear in the list as Split: <sources>, and in sentences as "<sources> (split)". If not selected on one side, the Why not chosen? line shows that candidate’s score, how many points higher it is than the chosen one, and which component contributed most to the difference. The distinction between handling and weight effect is approximate (marked "approximately"); if difference is very small, it says "very close to chosen; ranked later".
  • The engine returns only the best 100 plans according to the published formula. If the order hits this limit, a note states that plans outside this limit (including split shipments) are not evaluated.

The Engine's detailed simulation panel is the same simulation tool as in order details and runs a separate simulation; it loads only when Load details is pressed. The panel is shown to users with order read permission and admin session, and who are not hiding source names (OwnerAdmin, TenantAdmin, or with location write permission).

Batch comparison

Scope is selected in two ways:

  • Paste list: paste up to 100 order numbers separated by space, comma, or line breaks into the Order numbers box (duplicates removed), then press Compare.
  • Recent open orders: select from, to (max 30 days), Sales channel, Delivery city, and At most (max 100), then press Load orders. Select orders from the list and press Compare selected N orders. Only orders in a simulatable state are loaded; customer info is not shown. This method requires order read permission; if missing, an explanation is shown, but paste list still works.

In the Result section:

  • Metric cards: Source changed, Handling + shipping cost, Share shipped from stores, Average shipping distance, Handling cost, Shipping cost, Stock effect: last product used row, and Workload effect: row from full source (sources that reached daily target).
  • Summary sentence and numbers (result · empty · error · timed out). Orders for which draft could not be calculated are excluded from comparison; their count is shown separately.
  • Source type orders ship from, Shipping zones (packages), and Workload per source (A, B, Change, Daily target; daily target not shown for DC).
  • Orders table: Order, Delivery, A choice, B choice (estimated), Cost change (estimated). Split selections show the Split badge. The Only source changed filter shows only draft results. Clicking a row opens that order in Single order view.
  • Download report downloads the result as Excel; draft columns are marked "estimated", and separate package count columns exist for A and B.

Running: Stop, Resume, and retry

Simulation runs only when you press a button; opening the page or switching tabs does not start simulation, and no simulation retries automatically.

In batch comparison, orders are simulated sequentially in chunks of 20. While running, "Simulation running…" is shown and the Stop button appears.

  • Stop prevents starting simulation of next orders; the current chunk’s result is discarded, finished chunks remain on screen. Progress shows "Stopped: X / Y orders".
  • Resume continues a stopped run from where it left off; finished orders are not resimulated.
  • When finished, Simulate again reruns the same orders from the start (ignores stored results).
  • If results are missing, a retry button appears with the reason: Retry timed out, Retry missing, Retry missing and timed out, if only draft orders failed Recalculate the draft, if both exist Retry incomplete results.

60-second wait

Simulation in OMS is a heavy calculation and continues for a while even if the screen is abandoned. To protect OMS:

  • At most 2 simulations run simultaneously per company, including all users and tabs, comparisons on Algorithms screen, and order detail simulations. Other orders wait in queue.
  • Timed out or Stopped simulations continue running in OMS, holding their slot up to 60 seconds. Thus, after Stop, all simulations for the company may wait up to 60 seconds.
  • The same order is not resimulated within 60 seconds if the previous simulation timed out or was stopped.

In this case, the order appears as On hold with a reason, for example:

  • "N orders not simulated: OMS is finishing previous calculations for this company; try again in ~N seconds."
  • "N orders not resimulated: previous simulation timed out and OMS may still be calculating it. Try again in N seconds."

After the time passes, press retry or Resume. Pressing immediately will return waiting orders as On hold again.

From draft to published

"Draft is not published here." The screen provides a single button depending on the selected draft: for saved draft or previous version, Open in Algorithms; for city rules, Open in Matching rules; for hand-edited draft, Copy formulas. Hand-edited drafts are not saved; to publish, copy formulas and recreate in Algorithms (where its own comparison is done).

Notes

  • "Published" is the plan the engine would choose now, not the decision made at order time. For multi-address orders, the delivery city of the line is taken from the package.
  • Invoiced, shipped, canceled, closed, or payment-pending orders are not simulated (return empty). Orders from sales channels marked as sourcing left to source in OMS also return empty.
  • Orders older than RetrySourcingJob.StartDate in OMS cannot be simulated; this date is shown under Recent open orders. If not set, only orders from the last day are simulated.
  • If the engine runs with the "Default" strategy, simulation returns empty; formulas work only with AK strategy. The strategy used is shown in single order results.
  • If the OMS update required for draft side is not live, "Waiting for OMS update" is shown and only published is simulated.
  • If draft cannot be calculated for an order, it shows "Draft could not be calculated for this order." and is excluded from comparison.
  • Time limit is 30 seconds per order, 60 seconds per chunk of 20; unfinished orders return Timed out.
  • Simulation results are cached per user and order for 10 minutes; Simulate again bypasses this cache. Large simultaneous batch comparisons may clear cache earlier (causing rerun, not an error).
  • OwnerAdmin and TenantAdmin see all source names. Users without these roles and without location write permission have DC, HUB, and Vendor source names hidden ("Hidden source (DC)", "Another packing point"); types and counts remain visible.
  • Simulation cannot run in permission preview; context and order list are visible.

Video tutorials