Single-Item Capacitated Economic Lot-Sizing

Online Solver - SAMPLE TEST DATA SETS
Extensions: with Storage Deterioration, with Lost Sales
Multiple Modules with Linear Production Costs
Implementation of algorithm described at
www.lutanho.net/plt/lgrthm/lotsize.html

with Start-up Costs, Piecewise Linear Production Costs and Piecewise Linear Holding Costs

min∑i=1I(ui(1-ui-1)ai+ui∑j=1Jivij(xi)(sij+pijxi)+∑k=1Kiwik(yi)(tik+hikyi))
withvij(xi)={1ifxij-1<xi≤xij0otherwiseandwik(yi)={1ifyik-1<yi≤yik0otherwise
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 *  input format: (all values must be integer)                                         * 
 *                                                                                     * 
 *  I; u_0; y_0; y_I;                                                                  * 
 *  startup; x_min, p_fix, p_var, (x_up, ...,) x_max; ...                              * 
 *   demand; y_min, h_fix, h_var, (y_up, ...,) y_max; (first period)                   * 
 *  ...                                                                                * 
 *  startup; x_min, p_fix, p_var, (x_up, ...,) x_max; ...                              * 
 *   demand; y_min, h_fix, h_var, (y_up, ...,) y_max; (last period)                    * 
 *                                                                                     * 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
 *  output format:                                                                     * 
 *                                                                                     * 
 *  u, x, y; (first period)                                                            * 
 *  ...                                                                                * 
 *  u, x, y; (last period)                                                             * 
 *  or                                                                                 * 
 *u, x, y; Inf, Sup, n;                                                              * 
 * (n is the number of pieces in the piecewise linear (cumulated) total cost function) * 
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
Input:
solve in memory saving mode (slower) . . . hint: calculation with smaller y_max values may be faster
Cost scale factor 1/ (used for Output & Table, not for AMPL Model)
Output + Model: