Lemoine-OR Algorithms
Description

What this method is

Inventory-eliminated formulation is an exact solver-backed ULS strategy. It builds a mathematical formulation and delegates the optimization step to the selected external engine while keeping the common IUlsSolver result contract.

How it works

Core idea

The method builds its portable linear or mixed-integer formulation, automatically selects an available engine in the CPLEX -> Gurobi -> Xpress -> CBC priority order, solves the model, normalizes numerical values and reconstructs a UlsSolution that is checked independently.

Implementation in ULSAlgorithmsAggregate x/y formulation with inventory algebraically eliminated
Mathematical formulation

Inventory-eliminated aggregate model

Inventory variables are removed algebraically. The implementation folds holding costs into the production coefficients and keeps the corresponding objective constant.

x_t productiony_t setup
\[ \bar p_t=p_t+\sum_{r=t}^{T-1}h_r, \qquad C=-\sum_{t=1}^{T-1}h_t\sum_{i=1}^{t}d_i \]
\[ \min \sum_{t=1}^{T}f_t y_t+\sum_{t=1}^{T}\bar p_t x_t+C \]

subject to

\[ \sum_{i=1}^{t}x_i\ge\sum_{i=1}^{t}d_i, \qquad t=1,\ldots,T-1 \]
\[ \sum_{i=1}^{T}x_i=\sum_{i=1}^{T}d_i \]
\[ x_t\le D_{t,T}y_t,\qquad D_{t,T}=\sum_{k=t}^{T}d_k, \qquad x_t\ge0,\ y_t\in\{0,1\}. \]

The cumulative-demand inequalities are exactly the nonnegative-inventory conditions after eliminating I_t.

Use it

Minimal C# example

using ULSAlgorithms.Abstractions;
using ULSAlgorithms.Models;
using ULSAlgorithms.Exact.Formulations;

var problem = new UlsProblem(
    demands:             [20.0, 30.0, 25.0, 40.0],
    setupCosts:          [200.0, 200.0, 200.0, 200.0],
    unitProductionCosts: [0.0, 0.0, 0.0, 0.0],
    holdingCosts:        [4.0, 4.0, 4.0, 0.0]);

IUlsSolver solver = new InventoryEliminatedFormulationSolver();
var result = solver.Solve(problem);

Console.WriteLine(result.Status);
Console.WriteLine(result.ObjectiveValue);

The input example intentionally uses stationary, positive-demand data so it is compatible with restricted methods too. Always check the applicability box for your own instance.

Scientific source

Reference & provenance

Brahimi, Dauzere-Peres, Najid & Nordli (2006), Single Item Lot Sizing Problems, European Journal of Operational Research 168(1), 1-16 · DOI 10.1016/j.ejor.2004.01.054