javascript-lp-solver 1.0.0 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -170,38 +170,6 @@ type Solution$1<TVariable extends string = string> = SolveResult & Record<TVaria
170
170
  type SolverAPI = typeof solver;
171
171
  type ModelDefinition = Model$1;
172
172
 
173
- /**
174
- * @file src/tableau/types.ts
175
- * @description Internal type definitions for the tableau module
176
- *
177
- * Defines types used within the tableau implementation:
178
- * - BranchCut: Bound constraint for MIP branching
179
- * - Branch: Node in the branch-and-bound tree
180
- * - SavedState: Tableau snapshot for backtracking
181
- * - OptionalObjective: Secondary objective for hierarchical optimization
182
- */
183
-
184
- type BoundType = "min" | "max";
185
- interface BranchCut {
186
- type: BoundType;
187
- varIndex: number;
188
- value: number;
189
- }
190
- interface OptionalObjective {
191
- priority: number;
192
- reducedCosts: number[];
193
- copy(): OptionalObjective;
194
- }
195
- interface VariableValue {
196
- index: number | null;
197
- value: number | null;
198
- }
199
- type TableauSolution = Solution | MilpSolution;
200
- interface TableauSolutionSet {
201
- [variable: string]: number | undefined;
202
- result?: number;
203
- }
204
-
205
173
  /**
206
174
  * @file src/tableau/solution.ts
207
175
  * @description Solution classes for LP and MIP results
@@ -237,6 +205,37 @@ declare class MilpSolution extends Solution {
237
205
  constructor(tableau: Tableau, evaluation: number, feasible: boolean, bounded: boolean, branchAndCutIterations: number);
238
206
  }
239
207
 
208
+ /**
209
+ * @file src/tableau/types.ts
210
+ * @description Internal type definitions for the tableau module
211
+ *
212
+ * Defines types used within the tableau implementation:
213
+ * - BranchCut: Bound constraint for MIP branching
214
+ * - Branch: Node in the branch-and-bound tree
215
+ * - OptionalObjective: Secondary objective for hierarchical optimization
216
+ */
217
+
218
+ type BoundType = "min" | "max";
219
+ interface BranchCut {
220
+ type: BoundType;
221
+ varIndex: number;
222
+ value: number;
223
+ }
224
+ interface OptionalObjective {
225
+ priority: number;
226
+ reducedCosts: number[];
227
+ copy(): OptionalObjective;
228
+ }
229
+ interface VariableValue {
230
+ index: number | null;
231
+ value: number | null;
232
+ }
233
+ type TableauSolution = Solution | MilpSolution;
234
+ interface TableauSolutionSet {
235
+ [variable: string]: number | undefined;
236
+ result?: number;
237
+ }
238
+
240
239
  /**
241
240
  * @file src/tableau/presolve.ts
242
241
  * @description Problem preprocessing for LP/MIP
@@ -370,6 +369,12 @@ declare class Tableau {
370
369
  simplex(): this;
371
370
  phase1(): number;
372
371
  phase2(): number;
372
+ /**
373
+ * Dual simplex for warm-starting after adding bound constraints.
374
+ * Use when solution is dual feasible but may be primal infeasible.
375
+ * @returns Number of iterations, or -1 if dual infeasible
376
+ */
377
+ dualSimplex(): number;
373
378
  pivot(pivotRowIndex: number, pivotColumnIndex: number): void;
374
379
  checkForCycles(varIndexes: Array<[number, number]>): number[];
375
380
  countIntegerValues(): number;
@@ -466,7 +471,7 @@ declare class Solver {
466
471
  * @param validate - If true, run model through validation functions
467
472
  * @returns Solution object or simplified result with variable values
468
473
  */
469
- Solve<TVariable extends string = string>(model: Model$1 | Model, precision?: number, full?: boolean, validate?: boolean): SolveResult | unknown;
474
+ Solve<_TVariable extends string = string>(model: Model$1 | Model, precision?: number, full?: boolean, validate?: boolean): SolveResult | unknown;
470
475
  /**
471
476
  * Delegate solving to an external solver (e.g., lp_solve).
472
477
  */