/** * @file src/tableau/simplex.ts * @description Simplex algorithm implementation * * Implements the two-phase simplex method for solving linear programs: * - Phase 1: Find an initial basic feasible solution (or prove infeasibility) * - Phase 2: Optimize the objective function (or prove unboundedness) * * Functions are designed to be bound to a Tableau instance via `this`. * Uses partial pricing for large problems to improve performance. */ import type Tableau from "./tableau"; export declare function simplex(this: Tableau): Tableau; /** * Dual simplex algorithm for warm-starting after adding constraints. * * Use when: The current solution is dual feasible (reduced costs valid) but * may be primal infeasible (some RHS values negative). This is common after * adding bound constraints in branch-and-cut. * * Algorithm: * 1. Find a basic variable with negative value (leaving variable) * 2. Find entering variable using dual ratio test * 3. Pivot to restore primal feasibility * 4. Repeat until all basic variables are non-negative * * @returns Number of iterations, or -1 if dual infeasible */ export declare function dualSimplex(this: Tableau): number; export declare function phase1(this: Tableau): number; export declare function phase2(this: Tableau): number; export declare function pivot(this: Tableau, pivotRowIndex: number, pivotColumnIndex: number): void; export declare function checkForCycles(this: Tableau, varIndexes: Array<[number, number]>): number[];