import { CascadeVault } from './cascadeSimulation.js'; /** * Hard cap on vault count for the bitmask DP optimizer. 2^n memory + 3^n work * blow up past this. For n > MAX_DP_N the optimizer falls back to a * largest-first heuristic. Benchmark: n=18 ≈ 720ms, n=20 ≈ 5.8s — anything past * n=17 is too slow for interactive UI, so we cap here. */ export declare const MAX_DP_N = 17; /** * Main optimizer: bitmask DP over seized subsets. * * State: T = bitmask of vaults that have already been seized. * Transition: for each valid "last group" G ⊆ T, dp[T] = dp[T\G] + btcAfter * where btcAfter = totalBtc − btcOf(T) (BTC remaining after T is seized). * Validation: btcOf(G) must cover target seizure at the moment G fires, i.e. * btcOf(G) ≥ (totalBtc − btcOf(T\G)) × seizedFraction × (1 − seizureTol). * * Complexity: O(3^n) — the subset-of-subset enumeration visits exactly * Σ C(n,k) × 2^k = 3^n state-transition pairs. Single pass, no refinement loop. * * Objective: maximize sumBtcAfterEvents assuming all events fire. Debt is not * part of the DP state — it is used only when computing final metrics via * simulateCascade() on the reconstructed order. */ export declare function computeOptimalOrder(vaults: T[], totalDebt: number, seizedFraction: number, seizureTol: number, CF: number, THF: number, maxLB: number, expectedHF: number): { order: T[]; sumBtcAfterEvents: number; btcAfterG1: number; }; //# sourceMappingURL=optimalOrder.d.ts.map