ࡱ> Root EntryRoot Entry*0_^z Contents    !"#$%&{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset0 Courier New;}} {\colortbl ;\red0\green0\blue255;\red0\green0\blue0;\red0\green175\blue0;} \viewkind4\uc1\pard\cf1\f0\fs20 MODEL\cf2 : \par \cf1 TITLE\cf2 Deterministic periodic review for airplane production; \par \cf3 ! Dynamic lotsize model;\cf2 \par \cf1 SETS\cf2 : \par PERIOD: CP, K, C, R; \par \cf1 ENDSETS\cf2 \par \cf1 DATA\cf2 : \par H = .2; \cf3 ! Holding cost per unit/period;\cf2 \par PERIOD= Wntr Sprg Sumr Fall; \par K = 2 2 2 2; \cf3 ! Setup cost;\cf2 \par CP = 1 1 1 1; \cf3 ! Production cost/unit;\cf2 \par R = 3 2 3 2; \cf3 ! Demand requirement;\cf2 \par \cf1 ENDDATA\cf2 \par \cf3 ! Note, the production cost is allowed to vary from \par period to period, so this model will automatically \par answer questions like how much to advance purchase \par when the supplier announces a future price increase;\cf2 \par \par \cf1 SETS\cf2 : \par PXP( PERIOD, PERIOD) | &1 #LE# &2: CR; \par \cf1 ENDSETS\cf2 \par N = \cf1 @SIZE\cf2 ( PERIOD); \par \par \cf3 ! Define: \par CR( i, j) = cost for period i to end if there is a \par setup in i and it satisfies all demand just up to j, i <= j. \par C( i) = cost for period i through end if there is a setup in i, \par but nothing stipulated as to when next setup occurs;\cf2 \par \par \cf3 ! Computing C( i) is easy;\cf2 \par \cf1 @FOR\cf2 ( PERIOD( i): \par C( i) = \cf1 @MIN\cf2 ( PERIOD( j)| j #GE# i: CR(i,j)); \par \par \cf3 ! Computing CR( i, N) is fairly easy;\cf2 \par CR( i, N) = K(i) + \par \cf1 @SUM\cf2 ( PERIOD( s)| s #GE# i: (CP(i) + H*(s-i))* R( s)) \par ); \par \par \cf3 ! Computing CR(i,j) for j < N is a little harder;\cf2 \par \cf3 ! = cost of satisfying periods i thru j from i, plus C( j+1)\};\cf2 \par \cf1 @FOR\cf2 ( PXP(i,j)| i #LE# j #AND# j #LT# N: \par CR( i, j) = \par K(i)+ \cf1 @SUM\cf2 ( PERIOD( s)| i #LE# s #AND# s #LE# j: (CP(i)+ H*(s-i))* R( s)) \par + C( j + 1); \par ); \par \par \cf3 ! Solution: j+1 can be a production period if \par a) i is a production period, and b) C(i) = CR(i,j);\cf2 \par \par \cf3 ! A free copy of LINGO can be downloaded from: \par http://www.lindo.com;\cf2 \par \cf1 END\cf2 \par }