//go to: https://www.lutanho.net/goodies/codetester.html //click on: (*)javascript //copy & paste: this text //adapt: d_avg, delta, theta_lb, theta_ub, T //click on: [run] //Grigori German, Hadrien Cambazard, Jean-Philippe Gayon, Bernard Penz (2019): //A global constraint for the capacitated single-item lot-sizing problem var h=1; //inventory costs are constant and equal to 1 var d_avg=1000; var e=10; //overall unitary production cost var theta_lb=0.4; //portion of the setup cost to the unitary production cost var theta_ub=0.6; //portion of the setup cost to the unitary production cost var delta=500; //demand is uniformly randomly generated in [d_avg-delta, d_avg+delta] var lambda=3; //production and inventory capacities are constant and equal to lambda*d_avg var T=320; function U(lb,ub) { var ll=(""+Math.round(ub)).length; var vv=""+(Math.floor(lb+Math.random()*(1+ub-lb))); while (vv.length
');
  write('//I u_0 y_0 y_I
') write(' '+T+'; 0; 0; 0;
') write('startup x_min fix var x_max demand y_min fix var y_max
'); for (ii=0; ii'); write('
'); close(); }