Stochstic Progrmming Project Konrd Borys Model for Opticl Fiber Mnufcturing. Introduction Opticl fibers re mde of solid rods of glss clled preforms. he s of the preforms re heted nd fibers re drwn from them. he fibers my rndomly bre during the process. he rndom lengths of fibers produced re cut into stndrd lengths immeditely fter their production. ime is divided into periods. Demnd for ech product is ssumed to be nown for ech period nd deliveries re mde t the s of periods. We ssume tht lrge number of preforms re to be processed during ech production period. In the present model we consider only one production period. Our gol is to find such cutting rule tht minimizes the expected loss due to unstisfied demnd.. Rndom Yield he collection of semi-finished products produced from given number of preforms will be clled yield. We ssume tht loctions of microscopic defects in the fiber tht cuse brege form homogenous Poisson process. We chrcterize yield of single preform by the number of semi-finished products of different lengths. Let H totl length of the fiber tht cn be drwn from single preform φ h number of those semi-finished products which lengths fll into intervl [h, h+, where h H hen the rndom yield of single preform is chrcterized by φ = [φ,, φ H ] And the rndom yield of N preforms is ф = φ + + φ N
3. Cutting Rule Let h < <h m be the stndrd product lengths nd h,,h m re integers. Let h be length of semi-finished product, h H. A cutting pttern for the length h is vector such tht v = [v,, v m ] m = v h h, nd v,, v m 0, integer he cutting pttern mens tht we cut v pieces of stndrd length h. Convex combintions of cutting ptterns for length h re clled generlized cutting ptterns. We define cutting rule A s m by H mtrix, where column h is generlized cutting pttern for length h. Suppose the yield ф is cut ccording to A. hen the number of products of length h will be pproximtely ф, where is th row of A. 4. Formultion of the Cutting Rule Finding Problem Let b = [b,, b m ] be demnd for products of length h,,h m. For given cutting rule A nd yield ф [ b Aф ] + is the unstisfied demnd. Let q = [q,, q m ] be cost vector, then the loss due to unstisfied demnd is q [ b Aф ] + Our im is to choose cutting rule tht minimizes the expected loss minimize E[ q [ b Aф ] + ] subject to A is cutting rule
5. Computtion of the Vlue of the Objective Function By multidimensionl limit theorem ф hs H-vrite norml distribution with n expecttion µ nd covrince mtrix C. e b C m C q C b b q A b q E A ] ] [ [ µ π µ µ φ = + + Φ = = 6. Computtion of the Grdient of the Objective Function ΓA is m by H mtrix, nd n entry in th row nd h th column is e b q b q ν σ π ρσ σ ν ν + Φ where µ ν = e h µ ν = h = e h Ce σ C σ = σ σ ρ h Ce = 3
7. Algorithm Fesible Direction Method 0. Initil cutting rule A = 0. Compute ΓA. For ech column h=..h of ΓA solve n integer npsc minimize Γ h A d h subject to m h d h = h h d,..., d m h 0, integer 3. Let D = [ d,, d H ] hen D = D A Is fesible direction tht minimizes the directionl derivtive ΓA 4. Solve one-dimensionl convex problem ' minimize A + λd subject to λ, rel 5. If the length of the step λ is very smll return A ner-optiml cutting rule else A = A + λ D go to 4
8. ests Smll exmple In this exmple the prmeters re: H = 5, m =, probbility q = 0.97, N = 00 demnd b= [60.0, 80.0] costs q= [., 3.4] stndrd lengths: h = h = 4 Solution # IERAIONS = 803 λ = 5.3783e-008 objective vlue = 566.6934 A = [ 0 0.739 0.739 0 0 0 0.6304 0.6304 ] 5
Smll exmple he following prmeters re given in this exmple: H = 5, m =, N = 300, probbility q = 0.97 he stopping tolernce epsilon for lmbd is 0.000 he demnd vector b is [6.0, 37.0] he prices q re [., 3.4] he stndrd fiber lengths h, h re nd 4. Solution # of itertions = 856 λ =.4e-008 objective vlue = 34.8444 A = [ 0 0.3 0.3 0 0 0 0.8389 0.8389 ] 6
9. Mtlb code function [Expecttion,Covrince] = step0h,q,n miu = zerosh,; for h=:h miuh = q^h - logq * q^h * H-h; for h=:h- Expecttionh = miuh - miuh+ * N; ExpecttionH = miuh * N; miu = zerosh,h; for h=:h for g=:h if H-h-g > 0 miuh,g = logq^ * q^h+g * H-h-g^ - * logq* q^g+h * H-h-g + miumxh,g; else miuh,g = miumxh,g; %----------------------------------------------------------------------------------- ex_mh_mg = zerosh,h; ex_mh_mgh,h=miuh; for h=:h- for g=:h- ex_mh_mgh,g = miuh,g - miuh+,g - miuh,g+ + miuh+,g+; %================================================================== Covrince =zerosh,h; for i=:h for =:H Covrincei, = N*ex_mh_mgi, - Expecttioni*Expecttion/N ; 7
function [gmm] = GmmA,q,b,Expecttion,Covrince m = sizea,; H = sizea,; for =:m p = A,:H; if p == 0 for h=:h gmm,h = -q * Expecttionh; else miu = p*expecttion'; sigm_squre = p*covrince*p'; sigm = sqrtsigm_squre; for h=:h miu = Expecttionh; sigm = sqrt Covrinceh,h ; ro = p*covrince:h,h; ro = ro / sigm * sigm ; gmm,h=-q*miu*normcdf b-miu/sigm + q*ro*sigm*/sqrt*pi*exp - /*sigm_squre*b-miu^ ; 8
function [D] = stepha,gmm,hm M = 000; m = sizegmm,; H = sizegmm,; D =zerosm,h; D,=; D,3=; t = [ 0]; t = [ 0]; t3 = [ 0 ]; for h=4:5 obj = Gmm:,h; if t*hm<=h mx = t * obj; x = t; if t*hm<=h o = t * obj; if o < mx mx = o; x = t; if t3*hm<=h o3 = t3 * obj; if o3 < mx mx = o3; x = t3; D:,h = x'; D; D = D - A; function f = Deltx lod'daa', 'A', 'DD', 'q', 'b', 'Ex', 'Cov' m = sizea,; f=0; for =:m = A,:; d = DD,:; if ==0 & d==0 f=f+b*q; else miu = + x * d*ex'; sigm_sure = + x *d *Cov* + x *d '; FF = normcdf b- miu/sqrtsigm_sure ; expon = exp -/*sigm_sure * b - miu ^ ; f = f + q* b- miu * FF + q* sqrtsigm_sure/sqrt*pi * expon; f; 9
function [success] = minq,b,hm,ex,cov,itertions lod'daa_a', 'A' for i=:itertions Gmm = GmmA,q,b,Ex,Cov; DD = stepha,gmm,hm; %step sve'daa', 'A', 'DD', 'q', 'b', 'Ex', 'Cov'; x = fmincon@delt,0.,[],[],[],[],0,; if x<0.000 i x Deltx A A = A + x*dd; return A; A = A + x*dd; i A x Deltx sve'daa_a', 'A' function smll_exmple H = 5; qq = 0.97; N = 300; [Ex,Cov]=step0H,qq,N; hm = [ ; 4 ]; b = [ 6 37 ]; q = [. 3.4 ]; A= [0, 0, 0, 0, 0; 0, 0, 0, 0, 0] sve'daa_a', 'A'; minq,b,hm,ex,cov,3000; 0