ࡱ> GyCompObjpi279E? n``@y2U@y2Ufo>@u( $length_boxh.'(2dLabel4E$# Frame2: $# Fill_CBE#$$# Measure:  ;F=>?@ Microsoft Forms 2.0 FormEmbedded Object9qZ[\]^`VERSION 5.00 Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} SelectOptions Caption = "Select Options" ClientHei \pPardisa Ba= ThisWorkbook=K]X/#<X@"1Geneva1Geneva1Geneva1Geneva1Geneva1Arial1 Arial1Arial14Arial1 Arial1Arial1Arial1,8Arial18Arial18Arial1>Arial14Arial1<Arial1?Arial1.h8Times New Roman1Arial1 Arial1GenevaC"1J'D"\ #,##0_-;"1J'D"\ #,##0\-M$"1J'D"\ #,##0_-;[Red]"1J'D"\ #,##0\-O%"1J'D"\ #,##0.00_-;"1J'D"\ #,##0.00\-Y*"1J'D"\ #,##0.00_-;[Red]"1J'D"\ #,##0.00\-*?_-"1J'D"\ * #,##0_-;_-"1J'D"\ * #,##0\-;_-"1J'D"\ * "-"_-;_-@_-,)'_-* #,##0_-;_-* #,##0\-;_-* "-"_-;_-@_-,G_-"1J'D"\ * #,##0.00_-;_-"1J'D"\ * #,##0.00\-;_-"1J'D"\ * "-"??_-;_-@_-4+/_-* #,##0.00_-;_-* #,##0.00\-;_-* "-"??_-;_-@_-"$"#,##0_);\("$"#,##0\)!"$"#,##0_);[Red]\("$"#,##0\)""$"#,##0.00_);\("$"#,##0.00\)'""$"#,##0.00_);[Red]\("$"#,##0.00\)72_("$"* #,##0_);_("$"* \(#,##0\);_("$"* "-"_);_(@_).)_(* #,##0_);_(* \(#,##0\);_(* "-"_);_(@_)?:_("$"* #,##0.00_);_("$"* \(#,##0.00\);_("$"* "-"??_);_(@_)61_(* #,##0.00_);_(* \(#,##0.00\);_(* "-"??_);_(@_)                                                                      ff         P  P        `            a>   20% - Accent1 20% - Accent2 20% - Accent3 20% - Accent4 20% - Accent5 20% - Accent6 40% - Accent1 40% - Accent2 40% - Accent3 40% - Accent4 40% - Accent5 40% - Accent6 60% - Accent1 60% - Accent2 60% - Accent3 60% - Accent4 60% - Accent5! 60% - Accent6 "Accent1 #Accent2 $Accent3 %Accent4 &Accent5 'Accent6(Bad) Calculation* Check Cell+,-./Explanatory Text 0Good1 Heading 12 Heading 23 Heading 34 Heading 4 5Input6 Linked Cell 7Neutral 8Note 9Output: ;Title <Total= Warning Text`-Sheet1! col_layout_initial eval_layout Forced_Switch layout_main layout_new_plant show_flow_lines transitiongcc||>a}A} 00\);_(*ef;_(@_)D}A} 00\);_(*ef;_(@_)D}A} 00\);_(*ef;_(@_)D}A} 00\);_(*ef;_(@_)D}A} 00\);_(*ef;_(@_)D}A} 00\);_(*ef ;_(@_)D}A} 00\);_(*L;_(@_)D}A} 00\);_(*L;_(@_)D}A} 00\);_(*L;_(@_)D}A} 00\);_(*L;_(@_)D}A} 00\);_(*L;_(@_)D}A} 00\);_(*L ;_(@_)D}A} 00\);_(*23;_(@_)D}A} 00\);_(*23;_(@_)D}A} 00\);_(*23;_(@_)D}A} 00\);_(*23;_(@_)D}A}  00\);_(*23;_(@_)D}A}! 00\);_(*23 ;_(@_)D}A}" 00\);_(*;_(@_)D}A}# 00\);_(*;_(@_)D}A}$ 00\);_(*;_(@_)D}A}% 00\);_(*;_(@_)D}A}& 00\);_(*;_(@_)D}A}' 00\);_(* ;_(@_)D}A}( 00\);_(*;_(@_)D}}) }00\);_(*;_(@_)D,##0_-"1 * "- _-@_}}* 00\);_(*;_(@_)D???,##0???_-"1 ???* "- ???_-@_}-}/ 00\);_(*}A}0 a00\);_(*;_(@_)D}A}1 00\);_(*;_(@_)D}A}2 00\);_(*?;_(@_)D}A}3 00\);_(*23;_(@_)D}-}4 00\);_(*}}5 ??v00\);_(*̙;_(@_)D,##0_-"1 * "- _-@_}A}6 }00\);_(*;_(@_)D}A}7 e00\);_(*;_(@_)D}x}800\);_(*;_(,# _- * }}9 ???00\);_(*;_(???,# ???_-  ???* "- ???_-@_}-}; 00\);_(*}U}< 00\);_(*;_(,# }-}= 00\);_(*M 20% - Accent1 ef %M" 20% - Accent2 ef %M& 20% - Accent3 ef %M* 20% - Accent4 ef %M. 20% - Accent5 ef %M2 20% - Accent6  ef %M 40% - Accent1 L %M# 40% - Accent2 L湸 %M' 40% - Accent3 L %M+ 40% - Accent4 L %M/ 40% - Accent5 L %M3 40% - Accent6  Lմ %M 60% - Accent1 23 %M$ 60% - Accent2 23ٗ %M( 60% - Accent3 23֚ %M, 60% - Accent4 23 %M0 60% - Accent5 23 %M4 60% - Accent6  23 %AAccent1 O %A!Accent2 PM %A%Accent3 Y %A)Accent4 d %A-Accent5 K %A1Accent6  F %9Bad  % Calculation  }%  Check Cell  %????????? ??? Comma( Comma [0]&Currency. Currency [0]G5Explanatory Text %;Good  a%G Heading 1 I}%OG Heading 2 I}%?G Heading 3 I}%239 Heading 4 I}%uInput ̙ ??v% K Linked Cell }%ANeutral  e%"Normalb Note  wOutput  ???%????????? ???$Percent1Title I}%MTotal %OO? Warning Text %XTableStyleMedium9PivotStyleLight16BĘ7ɹq1  .  dMbP?_*+%"??U>@m 7 Sheet1ggD& ThisWorkbook$(__SRP_e : __SRP_f"%[Sheet1.+  !"#$&'()*,-./0123456789:;<=>@ABCEFGHIJKLMNOPQRSTUVWYZ\]^_`abcdefghijklmnopqrstuvwxyz{|}~  "     P .p @H. ,X &  (8 @ P"  X`hp H.x     ( 08@ HB P X  Dm0 x.  TF#(8 P X ZpJ(<(  ` p x   xpA@o] 8]PhP'* .!< G'*jno . 8$6!:find menu.j . 0 8$6%:!@', 0!< &G',j 0 , .!< &$ J 8$6%:!@2 2(Hko](]@newMethod = "Add ORMM..." . 8$6!: & 8$6%:%@$:find items on OR_MS menu related to add-in and delete them J!< & 8$6%:B@R5H &A@N9Hk L dHC@Rk8|0q(k  Jk .oX]]] . 8$6%:!@in'T .!< &'Td@ T .!<'V V$_ .B@Rd'TFykkko]'F'X 0!<'^ ^CreditsGzj54We reached the end of the list put it before credits ^ &G'FFzjI!the add-in is already on the list ^$_'\ \ X Z a Sadvance title counter until the caption is a name on the list or newMethod is found X$Z &GzjM+put the add-in name at the current location ^ X$ZG'\jNfound a title on the list X 'X(k  F 'F 0i  *kX( A@$A@0 o InitMP_Models2find menu. Add it if its not present < 8$6!:%>.4,add method to menu if necessary &< (B &$FD 8$6%:!@%>.2 8$6%:!@!P'LAfind items on menu related to add-in and delete them 0 8$6%:!@ checksmA@ Add OMIE... Process Flow MRPD'Z Attribute VB_Name = "ThisWorkbook" Bas0{00020P819-0C$0046} |GlobalSpacFalse dCreatablPredeclaIdTru BExposeTemplateDerivBustomizD2Option /licit 1 P*. Sub w_Open() add_,e_menu " ", "checxksmlayoutInitializ{'MP_Models End ? Ebefor(Cancel As Bo`olean(e"%oL@Tm@ICoN+$xS ng\=/r== s )s** ! )2CC t% ?@`x`_ A1`Left(x, 1)Qb_, O s ?e:,_+Za*12u*FunRv O})Q&:s'k_array0MIE_@cin_@titlesԵ,` i_qu Imy_cd`Y,SO-A("zGz@Pro 0FlowAoMRP"0U = Fw Ow//c =SE07'j"ditsEN'We {he e of1{ lis utD cÇ3! 0: }Exit Function 'the add-in is alr`eady d`l@ist If Left(m y_cap|, 1) <> "_" ThenVdi_qu= False 6Do @Until $Or k_array > UBound(OMIE_in_titles) C'adv ance  c4ter uW name or newMethodf:/0bzD(U) =! put. EBa current loca=5C=True 'h| a8^=Fa+ 1 $LoopKGEnd If@=_omie_index@. Next mi`tem ť rU !iY!IA aq)Q*q.i!!#4))Q` ` IWWp8$:LN<<:lN\\\6\<  @8$ \<0 0   pzUT%d$ d400a O [t)d064 ttW4 :T]354}pz tu^ kzp:%T%d$ d400a O   h)d064 px:%T%d$ d400a O  aQ [p)d064 tpW4  T354px pu kx l hkD%:%T%d$ d400a O  aQ l) d06 4 fT%l D,tlph4 d04 0   0 X  mL:<lL:,lL:lL: lLL LZ hpzpx:%<%$ aO  aQ [X)6rXA `1P5 lP0,/lPF<] ,3Opz/(PM<@  :,]@5pVkVkxh5I x@h ,35/!lPF,]x@h35pV kxpx~ kzpz Xs/ 8 PhX6 L440rU @$`T(A`X I#,`\aa//(``a/(`da/,A`ha/&n<D#xME (SLSS  *LLL LL   j`kgg`lzOM_I`nx@%`pvx`rXt@td @`Vbdd O ` 99i`ptval`r@t `V l` ` ` -` `H ` k`z`x`v`t 8` dk55Ip Ir `z`Vx v`H4kxI Il `xx `t 8h0% 8H0x@p @l @\ @`L @< @8 x@4? p@ x xvz|~@P w@@@ @0 tt@(, @ @ @ @X @p @ f@ @`@@ 0@h`X@@ @!@h `0 h!@ @| @l @ \ ( @X  T( `% %X  3@D @ ;@@`  h ;P < `  %h L@ , @  @8 @ @ ` @ `%P ^  H ` H x X xf@t @ d @T x  @P`%p  @ @ @ 0 @ @(  @@ @ @  X @ 8 @ @ @ @ @ @ h x ` ` % H  ` %x 0 @t @d p(X@ 8xz|f@pd @T @P @L @< @H: ` @8 H@( H@ @ @ @ @ h8;G$*\Rffff*01473b7848*\R1*#10$*\Rffff*02473b83ac*\R1*#1c8*\R1*#1c4*\R1*#d7*\R0*#2*\R0*#14*\R1*#dc*\R1*#e8$*\Rffff*06473b7848*\R1*#d7*\R1* 6= 20 &XP ;x 9  9   3 Hf Hfh Dg 7    0  @  X h p x "             8 P p x "       ,@  p    <  H H8 D F FX ` x    ("08 ;X,xBT $A$A HZ  <]h F] 0W DZ  FZh<  " \ J82    8"$X BT 5 (  n  2BT BT ` 'h ' '  &Y  &X ;@ "AX ; &A ; $A ; $A ;@ X Ax;  (}    " $ (0"H hxxNdraws the plant, which is represented by a matrix with (lgt*W) number of cells@@mSub LayMakeVector(RR_start, CC_start, RR_stop, CC_stop, Prefix, Firstval, V_Type, V_Border, Optional V_Color)*CSub laymakecolseries(RR_start, RR_stop, CC_start, Prefix, Firstval) ]@Xp x _facility lA@v l z!>B@H x _facility |(-d8 x _facility$zB@HD Ͽ$~'n n G|j ( x _facility$zB@R ( z!>B@H x _facility |(-+Worksheets(nme & "_facility").Columns.ClearlayoutcirlesdeleteActiveSheet.Buttons.Deletek ( |!($599qHq@$ ; ρǬ; ; ; ;;= x_name7(= x_number7(= x_length7(= x_width7(= x_parea7(7( x_value7(07(q$$$f7 A@7A@ 9 7(q'V$: V; x_method V7( V 'V V; V 'Vρ V; V 'V V; V 'V: V;  V; x_num_col V7(F V 'V ρ V;  V; x_cw V7(7 V7$f7 A@7A@ 9 7(qA@q A@$( 'pF 'r p r p r   SeriesA@ p r p   r SeriesA@ p r p   r    A@  p $(  x_plnt95(7!'t t5(qxA@oh](@Xp]]A@ ' '' B@ GgjA@A@ x_cw$f   x_cw+f  x_num_col+f'kh    G'j x_number$f!' x_length$f!' x_width$f!' |!B@RA@ x_plnt$f. !!P  !!P  !'p !'r p r$7 !!P !!P7$fB@q p r p r   SeriesA@ p r p   r SeriesA@ >Range(Cells(RS - 2, CS + W), Cells(RS + L, CS + W + 10)).Clear p r p   r   FillA@ p r  $ p  r  $$fB@  x_plnt95(7!'t t5(q0'k   x_plnt$f.' !( GA@jkA@o](@Xp x _facility$zB@ |!!P'  G  F |%B@Fj x_plnt$f! ' x_plnt$f! '  $col_layout_initial A@   $ eval_layoutA@   $show_flow_lines A@  $ layout_main A@   $ Forced_Switch ρA@   $layout_new_plant A@  $B@HoOmakes an array of colors corresponding to different departments and adds buttonCSub laymakecolseries(RR_start, RR_stop, CC_start, Prefix, Firstval)]  p r$ρ9; ; ;ј x ;ј y;ݬ;F'V  =INDEX( x_depts, ,1) 7(  7!(  7( h.Offset(i, 2).Formula = "=ROUNDUP(INDEX(" & nme & "_darea," & i & ",1)/" & nme & "_cw,0)*" & nme & "_cw"+ROUNDUP(INDEX(Plant_darea,1,1)/$E$7,0)*$E$7=INDEX( x_darea, ,1) 7(d =INDEX( x_darea, ,1) 7(k 7( 7( 7(  ; 7  V7$f 9 9q 7 7$f7 A@ x_color7(7 A@ x _area_def7(7 A@ x_x_cent7(7 A@ x_y_cent7(7 A@ If I_Sequential Then x_seq7(7 A@ End If7 V7$fA@qqo8] !.'l  !z ! G'lj oh` 9Attribute VB_Name = "plant_mod" Option Explicit Sub makeP() 'draws the r, which is represented by anx with (lgt*W) number of cells 'aLayMdVector(RR_start0, CC opPrefix, Firstval, V_TypeBordeHr, alColor) G 9G9'Dim xNew As4 Ig=poHnse RS C rowh, xWFindMP WS2 n& "_facili8ty"?IfE= 0 Then {Worksheets.Ad`d.Sel[A@ctiveS.D ' EKG5(N )F= MsgBox(" @ @ ρ ϿA4c;A0vbNoBCit G/Apa.DisyAlertsFa(:DTte#TruH f"Af'daumns.Cle araoutc@irlesd'CButt[.IEnd If cW Vow*Gridline* DolWid =T 5c WC(1, 1h=.Valu @AAa.Fone.SizY!16 e.@orIndex@$  #2,Offset0) " Ёi.` ϐʠ3, @i XE4E( [5EӨʜ6 s160rmula =" &ƙn@?B)!1)length{`#wAR$parea%W0o:`ue N!Format=!,0$+U*Ra0nge(S+02)0vB68, 2)X6W@zAqz_1 $0Aa, LtYponwg ys;. Horiz9alPAligPdn xlC(J8-oacRigh> vq8;d05: 5t( |methb5EDx + 1x$?6 tLPqy4BF "AȐx DCKK1!P_ϰ ":UVM Oѯ@_=pcw h4 1144!4 4$p/5rW Ao5o5q2 ?595a5pu4t__O0]te>r Sp Dept 1 t2F!( !u1dy@= 11: tCS O1T G @- gCS,i8W r""~Sb RSC@+ Lsr2 + |  5S )ъ0h S`Qݽplnt92L3qʀs .RowsAHeXA+#s@`!@ $new_(T4!As, a1Boomy_ 1Sng, i_fill_old,Pi* loc!ge11Inx=f= h = (˳Cs.S@how If Not Im_OK Then Endput _layoparameters p0clear_com* Range(nme & "_cw") <> plantZl_wixdtho23= 2-numWf2,new = 0Trueu IfZi_fil`l_oldV Or IniZ -*N7kTber").Va lCLlengtthW ActiveSheet.Linesp.DelGc@irlesdS etCZplnt,")CH(p.Rows.Coun2tAJL)AIColumnHW)yS@C Wi@Cells(RS, CSD$ X.Offset(-2, `-1),  -,;@0*)).CAGAGLayMakeVector RS - 1#, + W"","Series0, 0+ L@E'@HA#B(+ 10i "F@hH:'L@SW\onGa@.N@ K_"WLS?W= 3rowhaC(1)." ` aHeight I  v"a_2#bIn@iorAorIndex ~eval#AŨ _bu0ttonASub ne(DxDim xx Asteger, yynkAWorks!s&facility"atD = Shap > 0 F@}k"1 To :aDCut: Next |= _R``^1#4@LyT/AddB- {$- ~xx~"coliialr" "t~ 5B #A\ut  a0sဈ_floyj ` >,# _maina (+ ced_Switchq ρʀ_ Q V <1q  4 .#OF5c5@i8Depwr 'mjs an array of P!ors`rresponding to diffHere|detmd adds < 'Q< srm(RR_`startao p@\C%Prefix, FirstCX?ij=)@^Nӓ@9"UNeh1)1(2 ,ҏ3 ϕ%4ј (x ?15 ˤy6": !Z6Ii@-INwi ip).!mula=INDEX("йeIQts,i1,|1)qcq i /2?A0`BiKqf_Sequp'J 1'2 ROUNDUP( dareaz /icw,0)* P̣1/$E$7q    ElslC.F}53p(H4O}H5OO/#1v rB3v=eN PT)G .Horizontal0AligO= xlC0(erKU1h(@+P\`dŎ_P LtYeV $5^dake_Color .Offset(0, 2), LtYello0w 3).Name = n & "_area_def" fLayoutM҂3Greenh4hx_centU(f4 f53y-353'If I_Sequ[ial \Th x6Fs\eqx6GE nd IfBorders RaPnge(|,ɉx ))With'CK ASub A FindMPWS2(WS, xNewDDim nwks As Object, currObookSet= Application.ActiveWorkC  0CFEach)In .shpeets ]t('WS)u01 Next>Dd%kzD%P$ XPT:[N:\N<<T Z P6T<]kxDd%kz D%P$ XPT:]N:^N<<T Z P6T<WkxDd%kzD%P$ XPT:_N:`N<<T Z P6T<ZkxDd%kzD%P$ XPT:aN:bN<<T Z P6T<ZkxDd%kz D%P$ XPT:cN:dN<<T Z P6T<C6 d5kzD%z@(0%lP>d=LC6d(kzD%z@(0%lP>drU~| eiY..!/@A/!y44R.5iWq.6667a797 8W XYXXID7Xa8=>>Y1Y D16IYyYY ZaZZ [A[AVI 9A01C[[[ \]]]9^^^)_8IEQ__ :__ `A`q``y/90a00)a`aaQbbbbYccad d 4 zM0@:P@ 5@ kz@ ' %'%'0%'P%,$ , (  ),*:P@%,$ @,,5@;:P@%,$ , d  ),5@/''':P N@@^ px6@kx" ,$ , ,;:P@%,$ , d  ),5@" ,$ , ,@ ' %'%'0%'P%,$ , (  ),*:P@%,$ @,,5@ fP%,$ D,,,((P%,$ @,W@C,5@6(P%(%,$ X,@q,:P%lClA@q(P%lC(P%lC q q6(P%(%,$ X,@q,(P%(%:%lD(P%(%:%lD(P%(%:%lD(P%(%:%lD(P%(%:%lD(P%(%:%lD<:P@:0%(%(%l>C6@<:P@:0%(%(%l>C6@<:P@:0 %(%(%l>C6@<:P@:0!%(%(%l>C6@<:P@:0"%(%(%l>C6@&(%(P%(%l>@C5@1:P#@%(0%( %l>C6@&:$%(P%(%l>@C%5@ q~(P%(%,$ X,@(%(l%$ XX@$ QXT),6@;(P%(%T@(@&o '6@9(P%(%T@'@&o (6@P%T,9%(P%(%T@&,,,,5@cTpb6(P%(%,$ X,@DDq@,b@(0%: )%l@D2:P*@%b@(%l@>C6@ kbpbb@(0%: +%l@D kbpbb@(0%: ,%l@D kbpbb@(0%: -%l@D kbpbb@(0%: .%l@Db@(0%u/D %l@D2:P0@%b@(%l@>C6@ kbpbb@(0%: 1%l@Db@(0%u2D %l@D2:P3@%b@(%l@>C6@X(P%(%l@B@b@(|%l@B,@$ Q,<6@;(P%(%<@(@&o '6@9(P%(%<@'@&o (6@P%<,9%(P%(%<@&,,,,5@c< 4 q@((@ 56@3(%(P%,$ `,@C,5@ pv ptf(( :l6N(,:7Nktu8DkvDtM0@kvD@ 9$6@, f(( :l6N(,:7NktDkvu:DktD@vMP@ 9$6@, g( (:l;N,,(:7Nktu8Dkvu:D@tM0@vMP@ 9$6@, 7(%kvDP%,$ `,@C,5@, $ Q,:P<@%5@(P%W@C5@ (P%@A=d5@dW@>C?5@c @4 D,T<Dd8 ,X@, 0  ;L:dT%P$ P d LT)PL5T,P$ @PWTUAC6 dnT:@Id:0NkzD :K%z@(%lP>C6 d'(%z@(0%lP>dC5d'(%z@(0%lP>dC5d'(%z@(0%lP>dC5dz@(0%kzD%lPD zdY(@%( %lPBdH@x@lPBtd$ Qt6d@%,(@ %,cX(@%( %lPBdH@(%lPBtd$ Qt6d;(@%( %d(d&o '6dA:@Od%(0%(%&tt,nt6d;(@%( %d(d&o '6dA:@Pd%(0%(%&tt,nt6d;(@%( %d(#d&o '6dA:@Qd%(0%(%&tt,nt6d;(@%( %d(#d&o '6dA:@Rd%(0%(%&tt,nt6d;(@%( %d(#d&o '6dA:@Sd%(0%(%&tt,nt6d;(@%( %d(#d&o '6d}(@%( %d(%kxD%t&o%d&o%$ 'dQto (6 ddc qP $0T(tdd|$lp$ p HQltp (\btW<48x5`=> 9M8 __SRP_c#D__SRP_dXLayoutDataDialog" __SRP_14[  TA/aB6L"p$ @pW``1xp5`lxpv kvu+'''0:PN`` 6`0 kvxMP@`  `9p'@%:P `%$ pa0Uz p6`05p'@%:P `%$ pa0 p5`9p'@%:P `%$ pa0Uzp6`09p'@%:P`%$ pa0Uzp6`0   t+'''0:PN`` 6`0!$ u u +'''0:PN`` 6`0%((0:PN``  6`0L(x p`0*<'@%:`P%$ Q<x5P (`vu c8(kvD`%xPA(*sp6P(npj`P vd8GT(x<P(fhprU $ `$ `n8$*\Rffff*02473b83ac$*\RfrU @$!&&9'a'<P '''0@00. 481Y2!3 ! "1"Y"!4"PF/X?@$HP X h "p x$ $x' A@roP@o@o0 $'x &G&Please enter the number of departmentsA@~F|j &$(X'/converts dialog box entries into integer format0 ,'*  . G.The number of departments can be no more than .A@~F|j!  G-The number of departments must be at least 2A@~F|j 2$(X'0%/converts dialog box entries into integer format~ 0 4 G/The number of fixed points can be no more than 4A@~F|j ,'* 8'6' A@ro 6'8 Production'$ '&m', 0'2o@8Attribute VB_Name = "LayoutDataDialog"  Bas0{44EA0E3A-4D9BDE-8575-AEC6754B8609}{02340ECE-A133J13-919C-3F65106@0ED63} dG lobalSpacoFalse CreblPredeclaIdTru BExpose0Template DerivCustomizaDOption 0licit P!% Sub Cancel_C @k() Ipm_OKRD U@nload End$ ,Label1,e2 OK $n#fBoxD.f NoDept@0"" Then Msg("Pleenter the numbof departms"):Y@Kit5NCInt(Val()) 'converts dB box @ries intoegforma_lin_dimLinM%'0 > max@$/3S, can b3o more6" &3BII < 2 D mAat 1Pt 2KIAN_fixGJumF7J$ " ;+##po/sY#C#w3i_ra]= Rom_CB?d6fzA!eeUserF D_Init Iizeq ECD_"Proxduc|b1`10GMAm%G4d8u$x&~(,*@x @h 86@X @HH @08 @`( @x @ @ @ .20486 *'/e.EOuTahomaTop = (:8Cancele@ q$ 6<OK@ OnfoVer = 19 End  Microsoft Forms 2.0 FormEmbedded Object9qVERSION 5.00 Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} Solution_Option Caption = " " ClientHeight = 2400 ClientLeft = 0 ClientToL(jxME4(f> " L<8<<<  p`@k`x0`v D `(k & x%`v `Vptsp 8%X@(|~xf@p @X` @@P @p@ @0 @ @ @ @ j0xf@` @hP @@ @< @@: X@8 @@( @ hp;G$*\Rffff*03473b7848*\R1*#1c8$*\Rffff*02473b83ac$*\Rffff*0u473b7838$*\Rffff*01473b7848$*\Rffff*01474f58e7*\R1*#1c8$*\Rffff*06473b7848*\R0*#f*\R0*#14*\R1*#e8*\R1*#2ac2 <"$Hpx "N9  958 9X9x :+    ( 08 +@ %  " ^x* (  x5This routine called when enter layout button pressed.Dlast sheet seen = lyoutan]@]X |!' _layout' G,The active sheet must be a layout data sheetA@~F|j6   $'x x_number$f!' x_parea$f!' x_length$f!' x_width$f!'A@   -Sum of areas Exceed Available Space in Plant.A@~|d B@ GgjA@j A@d() ρ . A@~k k _facilityA@opXfuntion checks and makes sure that sum of entered departments does not exceed plant area]] x_darea$f.'   $!'V  V 'oAttribute VB_Name = "trans_to_facility" Option Explicit 'This routine called when ent@er lay6 tpressed. Sub iZ() 'last sheee?= l: Dim my_nAs Sng loc Itger0= ActivteS\.= In'(1,0, "_[", d0)If0 TpMsgBox (" a0 _muebe a!data "):it Sub,nLeft(GXD4- 1>NRange(&Onumber").Value$areap LlengthK WN wid perform_checks!@Jsum > #JqLS@ofsDceAvailable Space in Plant."AAEx OEls?SelectCs.ShowG@%Not Im_OKoEnd0make Init_col G' @_i@ ial%A F>()  ǀ ρʀ  . @ 1 πBAUnd If#f`_sc0rollNF, }e1'aBYCzA(a6'funCD a A-s sure tha}A"I@deVtms does not exbDpBFcLge!dgia, xSinglFS= ldAOaZ= 0C For id1 To Nc4HVZB7goaBIFxoaBIFD(xE?\OMEH@SPSSS>"LL LLL LHFX6P0 BH 2   ,0`hpx *(&$@"h& 0R@ & &xProgram Constants]$dH dp 22 ]$ ( arrays that depend on plant size] P '$gO@xME(0f6 < <ʘ@ 2BʐBPED @%eAF|jl ts ds into i tXP!<'*j8 8$6pCrIECredit%:k80phP PH0h0(x h`_pareaH  x(% %80%XP(%xp%;%zt!@~#@  $@ꀂH&!@ꀆ`(#@p)$@ʀx +&@ꀶ-(@ꀴ.)@ʀ 0+@ʀP 2-@ 3.@ꀪ850@ꀎ72@ꀐ`83@ꀔ :5@@  <7@ʘB=ʘ B?ʘ#BAʘ&BB꘠(BDꀢ0  F9@ꀤP G:@ꀨx I<@ꀬ (K>@ꀮ*L?@ꀲ0NA@ꀶ<PC@<xʘ.p dBʘ>dBʘ4(2BF @H @J8 P@L`  @N  @P  @R 0 @T h @V( $ @XP ( @Zx , @\ 0H @^ 4 @` 8@b <@d@ @(@fh D`@h H@j L@ P@lT@n0X0@pX\P@r`p@td@vh@xl @||"@ꀀ% @ꀄ8'"@0*%@ʀ ,'@ꀈ/*@ʀ*( 1,@ꀬx4/@ꀌ61@ꀒ94@  ;6@ʘhB>ʘ6B@ʘBC6  E8@ꀦX  H;@ʀ  J=@ꀰ ,M@@ꀴ 8OB@(` 0 P  P8(( 88  H `Pp x X x P  H@0 x h @  ` X(h p QH Dmatrix of department locations",arrays that depend on number of departments]  ]  00-1 matrix to determine departmental adjacencies] 8 ` ]    <+vector of department Y coordinate centriods]  (vector of number of cells in departments] ( ] P BBoolean vector which identifies departments with variable location] x   <arrays that depend on number of departments and fixed points]  ]  ,arrays that depend on number of fixed points] @ ] h  rangese pl]   0by a m] Xt*] DTotal Cost of Current Layouttor(] ] ] ] ]  D,, ] H8erGlobal Variables] D` the number of departmentsop, CC] pthe number of fixed points]  the name of the problem]  the area of the plant] length of the plant] Wth of the plant] width of column] ] (] Px8] `colors]$@ h6#&] ( 0 PX x]     ~Attribute VB_Name = "Declaration@s" Op$ Explicit 'Program CNtants 0 PubH" m axdep100,lngth)wd5fiHxed50 Gbig4 ^ 9}'arrays that aend on pl size?P() As Integer, PT!  'max of#artment loc~6 number!Dist5SiHnglHAD@0L-1BtoBt@ermineGal adjacencie1seqJu e', _ini>|X!J, CYdc0olor @'vecto: Y coordina@'0od'CNKNcells inH;GHrCoRVRBoolean '+which didtifM wivariable{FIcniIX Y ҉ aûpoiI~F[>_not_zerokJ) FEFEbranghRCp nRςQ"pDn_- xtxy,iTcD #6 p'TotfGAtCurr!{Layo&u SVADo't1l Lhsav|sIpm_OKS "i<sj`er _`Qaxb1GloZb`VZiNi 'theN_cF $rJn!ɣA prolmfarea"fLAFle2ZW*WzCwi! umnsum, lin_diI_r"iearFI_Sti`.%&*abes2L&j_.c&cE y_heduric my@nrU $`$A`$`$`$`$A`$`$`n)NQNyN@ )SelectOptions (__SRP_18& __SRP_19jSolution_Option , C2DE821-36A2-11CF-8053-00AA006009FA}#2.0#0#C:\WINDOWS\system32\FM20.DLL\2#Microsoft Forms 2.0 Object Library*#5e$*\Rffff*06473b784848<@DHLPTX\`dhlptx|u "" (0 8HP Xh p " x  "  ":$ $ $ .1HP X.1h $L= (0*Ppx0U   $ | V  4d 6dX$$  "    " "  (08@ HPX`hpx  %JEJ  J@:` 9  xA@o`@ ' ('d( (kooxoh]@`xinto i ' X' X'  > The maximum plant length is >A@~|k  @ The maximum plant width is @A@~|`kX X'    1The aisle width must be an integer between 1 and .A@~|k  H.? ' x_darea$f.'    $ H.?   '8  'If sum_area > plant_area Thenu MsgBox ("The plant design will not fit the departments. You must change the length, width or number of columns.")O width_box = Int(((sum_area / my_length) / col_width) + 0.9999) * col_width Exit SubEnd If ' ' ' '   x_width$f%(<ar   x_length$f%(in '' ' ' A@rdependo8' A@r0oHA@o ''d''k ''d''kA@ 'd`'kP x_cw$ x_cw$f!'f ded'k X G'jL x_width$f!'nt x`t q"߫b;~I t_D"dJPa~4}[DWVPz]rSҧ6Fjj@!vxrSҧ6Fjj@!v߫b;~I t_MEP@SPSSS(f>" LL LL ~@@ d @` T @ P @x @ @ 0 @ @  @X @ @ xf@0  H  @ 0 @p @ @ @ @ 0 @ @x @t ( r%l!z` (;G$*\Rffff*01474f58e7*\R1*#1c8*\R0*#1d*\R0*#1e*\R0*#14*\G{AC2DE821-36A2-11CF-8053-00AA006009FA}#2.0#0#C:\WINDOWS\system32\FM20.DLL\2#Microsoft Forms 2.0 Object Library*#5d*\G{AC2DE821-36A2-11CF-8053-00AA006009FA}#2.0#0#C:\WINDOWS\system32\FM20.DLL\2#Microsoft Forms 2.0 Object Library*#44*\G{AC2DE821-36A2-11CF-8053-00AA006009FA}#2.0#0#C:\WINDOWS\system32\FM20.DLL\2#Microsoft Forms 2.0 Object Library*#55*\R1*#1c8*\R1*#e8*\R1*#2ac$*\Rffff*02473b83ac*\G{AC2DE821-36A2-11CF-8053-00AA006009FA}#2.0#0#C:\WINDOWS\system32\FM20.DLL\2#Microsoft Forms 2.0 Object Library*#47*\G{A_length$f!' x_scale$f!' x_number$f!' 'oPHAttribute VB_Name = "SelectOptio ns" Bas0{9364CAA9-35CF-46D2-B16B-24D846571915}{E7347E9F-C37D-445B-9EC8-5756E6507A5D} d@GlobalSpacoFalse CreatablPredeHclaIdTru BExpose0TemplateDerivCustomizD 0licit P&* Sub Col _OB_Ck() iniHt_s seEnd  If& Then %'I'Blan>k4t .En1D cB+REeJ ^ 3IfC66Fr2GD  5C$` OK !Dim dept_a As Range, my_widthIntegerlengO; _]A&OsunmFn"kI_Sequential@a-= C@(_box0C(G> ma xlBIMsgB`ox ("aiPmum  is " &b?xitcY$Aac%BwA0?$4"Ais#Dcn'4' JYCXdesign 5ll not fVthe$artm os. You 8cha6 c,d<@#number ofumns8Bo56(F/g$thEk'AAc'CB'Bc/= 'C(U$").Off`m(0, -1).Valu{32 scalz   *!i_fi= "F`_CB Im_OKjey%!O_r ilinearRuUnloa@{i o|Canceliz?nsOtveTradkAUser=m_`fizeN01JhKOi<y->2 1!(%O x  K =_ D'f $+ Euc|li['n d ?lay_checkrK9cw")Lxp`7;5$g ) u 1AR@D? "_FRCNN^[EF: ` uGfXx! x x5XcXx! x x5XcXx! x x5XfXx! x x5X ufXx! x x5XcXx! x x5XcXx! x x5XfXx! x x5XX:cXx! x x5XXcXx! x x5X%:hXH H6XHJx'8%:hX% $ xaH4! 4  )x46XH(Xx! x  x5X'Xx! x  XEx5X3(Xx! x  x5XJx'8%:h X% $ xaH4! 4  )x46XHJx'8%:hX% $ xaH4! 4  )x46XH:x'8%:hX% $ xaH*}x6XH9x'8%:hX% $ xaHUzx6XH uhx! x x5hH`$( x4XHX|`hTDd \AO P`AO1P`d""` ha$ ` U5LxM(lCAIxF 6OiD{o`CJxMESPSSS<(<,<<<< <$<0<4<8<<<0{42F74784-FB4A-419F-9D39-C9D1C6365DAB}{F3402EEC-7843-405E-8B40-796334DA2005}p "@`h@ `  :`h@ % %@`%%8(x @h @r(x @h rU (%N&N@AV9iY9'>= <a88 aV.VQRB168 ''')NQNyNNN4i#N8i#N<i# O@%I)ODAOiO`HAOOLOOPAOO Ta$ %`IXAOG` \AO P`AO1P`d""` ha$ ` l$)$p$)!%t$)9%xOP|OP`oWW<  $ x! Qxoh5hpfhx! x x5hx! x Pxchx! x x5hx! x Px$$ xh0   8$ $Td! d TVzd5T$Td! d  TEpvd5T$Td! d  TEptd5T ktd1'''0d#P*FT /P6T0 kv21'''02#P*FT /P6T0$Td! d  TEppd5Tkpkpkvg='''0kv#P*#*FT 2P6T0kvkpH.?pr*d' %:@T% $ Qdx5Tpnjuc$UknDkjD@%xTkpD0H.?kpDUpn6T jd ktkvplkvzktzkpzkrzduxj%(%(%d' %:@ T% $ d0tt,)dt6T0duxj%(%(%d' %:@T% $ d0tt,)dt6T0$Td! d TVzd5Tz$Td! d TVzd5Td! QdoT V!d"$# $d(x4 PdtT00   <  $ h8T ;G "$   @ P" X` h x"  ! (x' 'i_final = Not i_stop ( A@r'o(@' A@ro ' '!Final_OB = i_final And Not i_stopo0(Attribute VB_Name = "Solution_Op0" Bas0{42F74784-FB4A-419F-9D39-C9D1C6365DAB}{F3402EEC-R3-405E-8B40-796334DA2005} dGlobalSpacAoFalse CreatablPredeclaIdTru BExpose0Template DerivCustomizD 0licit 0 P"& Sub OK_C @k() I0m_OKQi_+p Stop_OB'i_final Not  Unload& A3>7`LgxME(Switch_Dialog trad_layout__SRP_2*__SRP_3jSPSSS0{899FCB13-1486-4129-96E2-E841BF448E8B}{39909A36-C657-4D19-B2C5-5A9A0AC00F2E} @ " `` :`80%`8 %@t wix8h;G% "  ( "08 H X\hD  (8"@HP`x"  $     (0@x' A@roP@] X' X'        GDepartment not definedA@~F|j  G!The departments must be differentA@~F|jx' ' ' A@ro] !|!'x x_' x  $'x x_flow$f!!P' A@  $( $(  ' 'd' 'kqoAttribute VB_Name = "Switch_Dial og" Bas0{899FCB13-1486-4129-96E2-E841BF448E8B}{39909A36-C657-4D19-B2C5-5A9A0AC00F2E} d@GlobalSpacoFalse CreatablPredeHclaIdTru BExpose0TemplateDerivCustomizDOption 0licit 0 P"& Sub Cancel_Ck()  Im_OKSE UnloaLd %En ub*OK(Dim sii As Integer,p sjjC= C(1$  2*f<= 0 Or> NThen MsgBox ("Department not defined"):@KitGC=,@ s m` be differ@PDWCWsj[@8@yAiiC^]rUserForm_InitizeEt_myN\n(AppaA.ActSheet..A!C=oSt r(1, , `"_", hLeft( -N5Range &flow").Rows.CounS!"LMpWithPaIf Val(sih) >AA Sj6C$L-12!j'E"'1N If8 F9rU~| 0  0 @  0  0   0   0 H  0         "#$%&'()*+-./012356789:<=>?@ABCDEFGHIJKLMNOPQRSTUVXYZ[\]^_`abcefghijklmnopqrstuvwxyz{|}~ HP (h   $ & &( 6P (" ( " 0 "P` h x   "&;;P|` hx%           8 @ 83P ,$3*K( X `h p   *  $ :( H X `x  *(*+i xME<6 <<<< <<<<< <$<(<,<0<4<8 H( @`  `  ` `` `J  `JTT&`z `x`Hv`p`n`l`nj`` "H`J z *`  .` ` `` `J`z`0t `b ((`z`x`v  x `XJ ""`z`x   ` `j`h`4d`6` &@ `tJX 33I8 xI: I I `j`xh`f`<d`\b`>``n^`@T`B L`DD`F<`Hh4`J 2 `L80 `, ( `J PPRI I `Rz`Tx`8v`Vt`Xr`Vp@`Zn`\l"Ap`^jting`` h`bf`dd`fbange h `J8 I X - 1,I cp).`Vzout `Zxatio jH `J I  I ( HIn H Ip h (Ir  It  jIv$  Ix( `z z`|x!`V( v`Zt_fac l` I  I  In  ceMaIp  'zIr ( ElIt H CostIv h GIx the `zThe `|the `V`ZH @Hx@ x %fp $@l @\ $@L @< 08` +h( @ @ x( $di@ 11, stkh EnH`hPRH20@pv  @t  @r % 4p   0n HXl pj h h(jdhX n l  (H0bdv`^ (##8\ Pr`Z x diX 1,  ` V T H hXD 04  @$ 0h X  l %h\ @L < @,  @  @  x``|~xp\ @L X(< @, B"|zp  @ @ @  @ $N@ se@ x@ ($FDA@p @# @# @$ @$ &V(v((8)H @`;p ; <x <>X ?X @ @ @  |L@l ( @\ @L p< @,  ` @  @   RJDVitt  r 0( p 0`n @ Px  l  j  h X f  8Hd @`lab p $~(X 8!8(l  Hf`@ZVJNP( @    '   (  X x (  h !  @  @ ! @ t X$Ph8(#"VhD"pP P"@ @0 , @* ""( ""& "(#$ ##pjlX @ @ @ 8 X x @$p$DT$v $$t $$r $$p %` @P %@ @0 @ @ @ @  %  0 h   &'T'Xd @T @D @B 0'@'@/ X'h'> '' 2  @@      Z60` b(!$@ >X         ( lU0 *  82  ,( X`h "  p\x 2+ 0 H P X` "h    V *(Xp "    0 Pp & H,  " &=H p "x&=  & F, H "h&=  "&=    ( H $h  F,   " &= ! H! "P!&=x! !! $! D,!  " "@"&=h" " ""&=" """# "  ## #8# "P#h# A#.# %##7# $ $ $  $ "  ($@$`$p$ x$ $ $$$ A$.% (%8%@% AX%.x% % % %  % %% "  %%& &(&@& X&p&& &&&&& '('@' P' X'  `' p'''xA@ A@dPA@k@o8@]"Application.ScreenUpdating = False A@ G|jA@A@  '|A@rp = Range(nme & "_plnt").Row cp = Range(nme & "_plnt").Column display_2 rp - 3, cp - 1, cost/Cells(rp - 2, cp).Value = "Current layout cost"!Application.ScreenUpdating = TrueoHA@ A@d A@A@ko]H`x] (' A@ B@ Ggj ( |!B@R G|j'~ x_plnt$f!' x_plnt$f!'   x _facility$z%  B@ B'Switch:'A@"A@ ~  b  ' CentroidsdistanceMatrix  |'z cost = intlcostElse cost = computeCostk |  G"The last move increased the cost. A@~j!The last move increased the cost.A@$      $F  +D  $D  +  $F$T  $!(A@" CentroidsdistanceMatrixcost = computeCost$display_inter 10, W + 11, 8, 1, costp = 0 ClientWidth = 6405 StartUpPosition = 1 'CenterOwner TypeInfoVer = 5 End J(  },R KQDBTahoma,(:8Cancel(D:HEOuTahoma( *'/e.EOuTahoma*n/~'1*E'F G' EH1/ F81 (1' *9H6 (' /1 1' E4.5 F/k{| End Ifkdisplay_2 rp - 3, cp - 1, cost    $&'~ ~ |' $V $V  A@(dp      $D  +F  A@(kA@"A@dA@" $display_inter 10, W + 11, 8, 1, costk output Endp z ~ 'v : z? ; :  |? ' A@~outputoA@A@  '|A@oHA@ B@ G|j GA@,cGA@.joP] A@ G|j         G|jA@ $V $V  $J6Departments are not equal in size and are not adjacentA@~|PkHk@distanceMatrixcost = computeCost!Application.ScreenUpdating = True x_plnt$f!' x_plnt$f!'   x _facility$z%  B@  A@(A@A@  '|A@Switched departments  and  A@$$display_inter 10, W + 11, 8, 1, costdisplay_2 rp - 3, cp - 1, costo]Ph !|!'x x _facility'0 0  x_' x  $'x x_method$f7SequenceG'cG'j7AisleG'cG'j7YesG'cG'j7 RectilinearG'cG'jqd&Something is wrong with this worksheetA@~gko]3compute the centroids and find the adjacency matrix   +P +R    +J      $D' $P   +P $R   +R CN(k) = CN(k) + 1    $D  $D  $D  $D+J  $D  $D+Jk    $D   $D  $D   $D+J   $D  $D+Jk   $V $P $V +P $R $V +Rd` +P +Rk80o($computes interdepartmental distances]H`For i = 1 To N For j = 1 To N Dist(i, j) = 0 NextNext      $P $P  $R $R   +Hd $P $P  $R $R  $2  +Hk 0    0  $P  $h  $R  $j   +dd $P  $h  $R  $j  $2  +dk x p kh o` x]]keeps a sum of fij * dij values]D "keeps total cost of current layout'4'6  '4   4  $X  $H '4  0  0 4  $b  $d '4 k 6 4 '6  6'v +MsgBox "The flow-distance measure is " & TT 6' i ] 8Ph]Lvalues of making switch]](,Dim si, sj As Integer 'departments to switch:SV is the savings, si and sj are the departments to switch'x''   $Z'JF $V'\ J \    Sif neither departments are fixed evaluate the exchange. leave out empty departments $Z'LF $V'>F  $J'< L > [if the department areas are the same or they are adjacent they are candidates for switching \ >  $J  $N'@8see if the savings are better than that previously found @ x @'x ' 'ksvknot CNknot VR k  x  : ρ     x? '  P$~'n n G'&Fzjk Switched departments  and  A@$ x'&d! A@$zki@)] 8Ph+the following switches the department areas x_plnt$f. $V $V 'R ' R'ksi is larger. sj is smaller  A@h 'T'8 'V'Xst = 0Ofind the top most (TM), bottom most (BM), left most (LM) and right most (RM) of$range for si (the larger department) V  Z  Z V$D  Z V G Z'Vj Z X G Z'Xj V T G V'Tj V 8 G V'8jkP(j,i) Z V $P $Psi is to the right of sj $R $Rsi is to the right and below sj '\F'^F'`F 'bF'dF'f 8 T X V  si is wider than it is tall   \ ^ ` b d fA@jd si is taller than it is wide   \ ^ ` b d fA@lk0d(si is to the right and above sj '\F'^F'`F'bF 'dF'f 8 T X V  si is wider than it is tall   \ ^ ` b d fA@jd@ si is taller than it is wide   \ ^ ` b d fA@jkkdsi is to the left of sj $R $Rsi is to the left and below sj'\F '^F'`F 'bF'dF'f 8 T X V  si is wider than it is tall   \ ^ ` b d fA@jd si is taller than it is wide   \ ^ ` b d fA@lkXdPsi is to the left and above sj'\F '^F'`F'bF 'dF'f 8 T X V  si is wider than it is tall   \ ^ ` b d fA@jdh si is taller than it is wide   \ ^ ` b d fA@lkkko]x  V  Z  Z V$D   Z V+D $T Z V$!(  Z V$( Z V$D ed Z V+D Z V$!(ko 2 13850]   0 $V'z'| V n p r Z t v x Z V$Dd | $V  Z V+D $T Z V$!(  Z V$( | '|d  Z V+D $T Z V$!(  Z V$( z 'zkXkP Z Vo(H 2 13850]    $V'z'| Z t v x V n p r Z V$Dd | $V  Z V+D $T Z V$!(  Z V$( | '|d  Z V+D $T Z V$!(  Z V$( z 'zkk V Zoxp'Attribute VB_Name = "trad_layout" Option Explicit Su@b eval(")Nget"_parters4If I_Sequential pThen2`KcoOElse "#nd If E  0Dim iquit As Boolean, rpInteg`er, c 3'Ap}a.ScreenUpd$ngFaTConvert2|9= True|/AWCroiddistanceMax"cost5compC pi3, J '?= Ra nge(n& "_plnt")p.Row@DColumr' ""2AT- 3R- 1+'CellDs(@- 2)0.ValECurr@B Þ <_UU_main>ǥD vgWfkĶH67, Mssga_SMng  bjresponselastBTjDoubl$wfVs[0-hS Mo_.ShSlNot Im_OKknd/GctiveSheet.Lines.Del et_x savingA1Cjj )GoTo refedce:@=WorksswfacilitVyxHm8Am `q), _oll := 8= biAmy_heur ic3"Switch:rbQC {] ,Dc_4Do While(> 1 / 1AA4ED+ ,A!ntHb:!1GintlbZ=B'$'K! {Aaab >ji_stop^MsgB`ox ("  move in@ased the. "daMmP@re4AqFor io\ Lu1j5W?uP(i, j)PT o|nts.Aa~rior.ko@rIndex dq`or(<Nex_1 o*'*y $MO Q`y_*er4, W @3xg@*yExy'=*,gRsDDep, s90 sj05> .0_:G2_: CN(siQ%%4QMake_M4K?=Q;1Q;1?(1.7_)_Q|45L^e`*&Ӛ_aY<^o,,/) '@]Pa#LoopSTX=T`-j : "h & pF(a70.5)P"; `b+ Q]r ՠ//@%/is7 f forced>_> v38_D0ogOIJpBol & R?˜E aH/VqNi < POrH > N j6j2K)4O<>ONOADPQ, sj) = 0 Then MsgBox ("Departments are not equal in si@ze and2adjacV") Exit Sube*EjIf 'distance@Matrix 'costcom`puteC Application.ScreenUpdng.True'rpRange(nme & "_plnt").RowcColum7GoTo r efereW:=Worksheets2facility4Cells(D- 6, 6- 1), _>]oll:=Y Make_Switch, sj CroiۻC'"EC&L.=A,5CWith @Chod$.Offset(00"SzEY" I_ti`}= A EC? (C凨 " AisleE nit_HDt [ 2, C Yes i_fill F K Re @! o$,A1k E  &ez1P :jP W_ qQ) _ \ 0 B_ BB] ! "*p *?Zg ,s/ Cߔ-s.@90Aoh) 1 ~@{() e=s@qz]4r/Csc S' ' <D =W 'c_Q OsQ=I:Z(aAb$s(- pj))`'BB@Y(@?C 1QzSqDr(^ 2(c" P~`@7'Noxp+ o3{qO^i`-P* FXL _Reb*WAl3?A98 Funpon }y 6ycTJDzSle'keep sum of fijdPvalue1respon,seEwsDouble, FF J xd)xb 'values of mak`ing sevrBoolean, vrMssg:Str{# ' 'departments to 9 'SV i @he sav%sAi and are t != 0@si FjFor= 1 To N 8- 1 {= VR(i): i0= CNGIfCG&> 0 Then8i +'i f nei5r 5:fixed eiat>exchange. @dve out empty On4>j4%4= AD(E&B:}B:j S: A3Khmasnsam- rqyadjacGc@{id'svsnotcoVRNext (#cb$'P i_stop== " : ρ " & &&ǣj@" ,b(+ 80.5%4&= MsgBox(abYesNo`vbNo$T0: Exit Functioi%col_m"SbHa/`CSV+0Else- 퐀"$ "'C Sub Ma(ke_(st, LMRTB_xRyJBTjstephI:Iip!FfollowP!{aKgGaASe`Gl(ant@#Rb(nW-_plnt"'C@'`si) yuT q1P(y, x)`]Ty ` y 5ydbo `xbBxb> pbl 'P(j,iT[|#(CX=) >j~{T% Cs)bYfootRbe@6*>`(: JTQ: == -1: <(p;;Q -I -po wide; _3t3;Y_Fir-#Q, JB0T@aD, 0b +]U":n X 9I5eeo e 3qjaboWAL:@ųH!q49\g ;So8(Co8__812R8WW8B9tw-@P0NO8 B8% than it is tall Y_First si, @sj, JB T, jstep, IIi zElse "'sier wid )X7ynd If{ oe l eft aab8oveq Yw =@ 1: JTWf:{ IB L:m If (RM - LM >= BTM) ThenL ˄?fEjSub   repla@ce_sj()MDim x As Intege0r, yHForo To WyAjLkP(y, xr)sjiA iA@,nt.'rior.ColorIndexdcA@4D3A IValue"LAEK*i^*100*14Next#9# 87, X X xY Yy) ' 01385a   'F < /Fo  N: se  = seq_( @ZVnL( (, @* uenc@ ` ( P  x  & '   $/ +N  @    |   +`P  1If0 al Or @ &n disp*_iter @   Swit@   $ $0~ tche @ X  @  x h0P0xT la@D 4 LpPR$ eq@  $Z@  @  pfmaX f de@ @ $Z `H`@h`5#X @H @8 PR( @ @ @ De@ @ @ @ @Xp 0Hl X @P H0bd`N L x < H, @ @ ( @       @xH ;G$*\Rffff*0u473b7838 (" @ Hh (     (28  *     (  0  &@ h p Zx   "      & 0  H P X p  +     )       * 0 *8 h   (          ( 0 8   @ H   P `  h p x  >    (      '      0 8 @ X T`  (  "  T  Ph px "    \  0H P Xx $ 8 Xx  40 ,8"h "   $ 8 @ H P`.h    ^+ '@ P X` h$x  $       0^+Pp' 0 8 @   H P 0p 4q=08 H:uP= *"   "8>7P @w= 04n8=p      $   03@ X hpx 4p=(0@ H*"X      0  F84q= :u=8 X*"h   ">7 8H@w`=4m=8 @HPX ` h x  $  3    @4pX=  *" 8 @  H P X h p "  x       &<    !! !(!"8!  P!"@X!"@!6U!6U! "8" @" B  H"P" h"p"-" "0" "0"  8D"0# 8# H#X# p# #  8J# ### " # $ $6($`$h$p$$$$$$%P(%x%%%%%%%@% (&:0&p&x&&x]@h(]Px]0H`]xx]]"Application.ScreenUpdating = False'A@ !' !' B@ Ggj!Application.ScreenUpdating = True  F $L +NF A@A@  '|  F $V +\F $P +^F $R +`F |' 'A@'\'~ _facility x_plnt$f! x_plnt$f! A@ ~  \b  ''  F $L +NF$D 'Switch:'  '   $L' $Z $V     $L' $Z $V  $V $VA@    $N '|dseq_temp = sequence(i)  +L  +L  A@ A@  '|k |  |' ' 'display_layout_iterkX $V $V  +L  +L  F $\ +VF $^ +PF $` +RFTkkk     '~  F $N +LF  $L' $L'Best Switch:Department $L with  $L for a savings of  ~H.? '  P$~'n n G 'Fxjk` /For k = 1 To N: sequence(k) = seq_init(k): Next $L' $L' seq_temp = sequence(i_best)  +L  +L A@A@  '| |'  F $L +NF  F $V +\F $P +^F $R +`F x 1If Not i_final Or i_stop Then display_layout_iter \ A@dA@kxSwitched departments  and  A@$k8d0'~ No improving switches available.A@$ A@A@  '|A@  $%(kInitial measure: ? ; Final measure:  ? ' A@~o]H`]x'A@ |!B@RlayoutcirlesdeleteA@4'   +Lx x_seq$f.lB  D $Z $V  $l+L  'k' !('n#make random sequence of departments   $Z $V    $ ''   $L  '  x  +Lykkd  'kA@A@7col_depts d_start, d_stop, i_index, i_color, i_centroid' a A@A@  '|A@ A@ 'kInitial layoutA@$' _facility x_plnt$f! x_plnt$f! A@!Application.ScreenUpdating = TrueoA@ _facility x_plnt$f! x_plnt$f! A@ A@A@  '|A@A@$o`](@XA@Ulay_scroll "_facility", Range(nme & "_plnt").Row - 6, Range(nme & "_plnt").Column - 1 A@A@  '| x _facility$zB@ ! 'p !'r !!P '  G'j | x_value+f | p r$, x_x_cent$f.r x_y_cent$f.t x _area_def$f.n x_seq$f.l+R  P $V $n( $P $r( $R $t(-If I_Sequential Then s_range(i) = sequence(i)%If I_Sequential Then col_put_sequenceValue of current layoutA@$ ohp]Ph]$R]0layout departments' 'WC is the column width$R'''   ''  'Range(nme & "_num_col")'''   a    QThe plant is not large enough to fit the departments. Change the facility design.A@~A@'| k $L' $p'  H.? ' ' '   s a su +P v +R +Vtok  k_cells = 0 a'6   4QThe plant is not large enough to fit the departments. Change the facility design.A@~bApplication.Goto reference:=Worksheets(nme & "_facility").Cells(1, 1), scroll:=TrueA@'| k  odd numbered column6' *check if cells can be added to current row             $    $$f.,Di      A@ts'  'SVd    $     $$f.'      A@   'F   G'F  'j k   'ifkcolor the rectangular blocke exch    G  +? 'cG  'jJ  >       $      $$f.      A@'   'Jd   $    $$f.ings      A@ly'  'kPdH'k8   'k    VRchange to the next even column'  '   '   %'   ' ''dcolor the remaining area      $    $$f. dep      A@   '  ' d   '   G'F  'j]kp   'kXkPdH even numbered column*check if cells can be added to current row   lnt     @Range(plant(nrow - krows + 1, w_st + 1), plant(nrow, w_st + WC))j    $    $$f.'V      A@fi'  'bod    $     $$f.e for      A@   '   G'F  'jD k`   ' kHcolor the rectangular blockG    G  +? 'cG  'jP          $    $$f.      A@\'   ''d   $    $$f.      A@ i''kd'k   'k  han change to the next odd column b'  '   'si   %'bo   '\''dcolor the remaining area   X   $    $$f.      A@f    si'  'wik   '   '   G'F  'jkkk  'oH]H`x]  G 9j G G $T5(jj5!P'5!P'  'q $V'   +V  ! !  ' ! !  '  $P       +P  $R       +Rarea_left = area_left - kcko]@Xp'N        $X  $X '  $X  $X 'D N  D   $H  $H  'Nk  0  0  $b'  $b'D N  D   $d  $d  'N ki](A@         G|j''   $L G 'j $L G 'j0    x_plnt$f!' x_plnt$f!'   x _facility$z%  B@ $L' $L +L  +L A@A@  '|A@Switched departments  and  .A@$d-There is a problem with the sequence numbers.A@~koxAttribute VB_Name = "column_layout" Option Explicit Dim k As Integer, i j myarea $dept$ASi_oddBoolean, nrow& Sub _main() iquiShRrp Pc M(ssgSnglnitcos!Double- firs , s'resp0onseOi_ d 'Apa.ScreenU$pdngFalsWiters 0get_0infoCE= plant.RowFC„CS@_.Sh If Not Im_OK Th2end[-Tr"u-For@= 1 To N: seq_id(i)2@uence@: NexA}5Ys 1, N<, A$diHstaMa|xK{=@mp@CG@#cniC"CRN CXXYY(1Fs.y= )@fyŸr 2,J : =@savitng1}_scroll "_facility", Rang(e(n&plnt")D - 8CE Do @While >:/ 10 AndE9i_beo= dVajpwDDG c -! m@y_heurCi"cM"Swh:?a0(+ AKG!aaSiKX@hVR()$BL > 0j!j i eoA gji'j& 7D= d@!Eqeg7`,s"4_K'#ua .EF- '`%_temp6+B.w{ %=i, j); ] K2?&/s6& QEk`/x 0!P=O((k -O) * Rnd() c1/'aj'Ei ?-c@ib@P jC` !?/<l< Exit SI>+_ Z!o+K-?K ?BAaB(yshpow_lwc'CAÿd_st ,: oჀP, :ioroidIm_OK`9"CDo Until e'! u X k+fD$B $Znew_B< %Wy"hbuhDl [(0_scroll "_facili ty", Qplnt").Row;8GumnA 'Application.ScreenUpdngllevalbd qlesO O "@O _$O 1/(q! ' ?'&.' RҤ-lbiRSQ~, Ckoff(/c }%%%6%%a?? ??WorkssFi2).a= RcPcurr QO?y(yynty!krows@wido, k ߋwzmax +yCJeAA#P _V3v'\WCP=kt_col_width 'WC is the umn  i_odd = TrueDnrow@1dp _left&W - WCLw_sE$0max6I@nt(W /&) 'Range(nme & "_Hnum")2kdksJ.Do Until@ k > d|opIf n?> D+ 1 OrB*0 ThenMsgBox (" plantnot large enough to fitdepartments. Chl facility design.o2dis/y_layout_iter, FalseUIm_OK'c ExNSub End If3Gmy0lsequence(kDb)myarea@ ( leng= Ax y+ 0.9  EmyGGAui_c\r`oid A6=BbuCX.@2A7CYNWS'k&llG5<= ".A/?@qVA a'Application.Go`referF:=Worksheetsf{` ").Ce"(1, 1), _9E scroll:=%efo Lfg=ak"R᧭O'`b$d'check if c$ can be addDedcur,tN No _fillaB>cN> aI- k" OSet AAkb(!, BŽ+# `?PWC) a orr"AA, , k_i_index, olorD/&E = dܟ ~E #"#+ f3%ʟ%ws=&!%=S>1w$ : ex7`'0+!? ''RQrect'u block\308 0^Lh ~i#;Ԏt t) q& 4S>O F  0;2 -pD *.ߐv@_7@ H&@OAGOAOAu:.A=, %OB,(LSOoL&:"0??`@̕ ߿78=WX@q_6> BQonext even7= +!4t|Ou= Min(w,`O~W5uE$O (u#J_maining?1`_>U>?>F?7>O_range AA, mydep t, k_hi_index, i@_color entroid  If w_st + area_left = WC ThenlUMkfs,1&nrow%+ ,Else#q<Y+q>l = 1: Ond Inf5 -ϓE( "O'even numbered kumu'check if cells can be add@ to curr@ @r D Not@fill A4[1d?HeJ 'R(plant(n %s@1,Ų01), WC))0ESet?66or_layout?- Y)\-!pSo##v0%`$=y`=(`Z`4a a'( the rectfular block q0xF> 0xi_~ kq= I`s*('/)s0.999) LZtt!1 >]`M ! 6] f_ \\_./w[=sp"%OB Y[vYophoco_0_: /EW9?FD?6< ~` a{ Inext od `= Truon!Waҭ=WC = Application.Min(width",LG- #o97@^mainingbO!@,g!_9==A ?QfFO>O>I ``d_bo4o?Ls+JooOo u[Loopuk3kQ$ QSub @!!( $`Dimcs A"sege AA_"9k_ah )!xcaS6le, y3Wit~hp@ R' .Value0coTlor Then .Interi or.CoIndex = dc4(mydept) AA_ ds^umnsunt Brow BR si) As@Dj)Ly ="rCost(k@*@ +A/kH[B >JBF @J j,~ M @G)N6 + ('- FJ)@(Di@(#CH'hNext kEN_fixed > 0 B+)+$F#_! LF+[!B !H" !$VX`Yj `z_(D*Useq_tempRVrciJj,get`_info#5si < 1 OrX@6N"jfjbBExit Bq>F= d&8guence(k)0i"E"@IA eqj(!0FF!QtOS,= Range(nme & "_plnt").@# A/@'A@pplica.Go referA:=Works heets fa@cilityC ells(- 6, - 1), _g Scroll:=TrueG= +E (wo0+E$fUZs 1, N\, dEaMatrixs`computeO:qy_layout_i@pFals\ol_msg "ScCI artm`ys$ "si1 a`\j.";qE0MsgBox ("p1re is a pro blem h the6 numbers."4A4rU~| 0  0   0   0   0 p  0 H  0   0   HrU $`$`$`$`<!`/////@I`!1I//////,q`!//$`nrU $`$`(`a/(`/$!`$I`$q`0` ///,`!/P;G$*\Rffff*02473b83ac*\R1*#e8*\R1*#e8*\R1*#e8*\R1*#e8*\R1*#e8*\R1*#e8*\R1*#e8*\R1*#e8*\R0*#f$*\Rffff*06473b7848*\R1*#1e0*\R1*#1df*\R1*#1de*\R1*#1dd*\R1*#1dc*\R1*#e8*\R1*#2ac*\R1*#43*\R0*#f*\R0*#14*\R1*#e8*\R1*#d7*\R0*#f*\R1*#1c8$*\Rffff*01473b7848$*\Rffff*05473b7848*\R1*#10*\R0*#13*\R1*#2c*\R4*#1f*\R1*#e8*\R0*#f*\R1*#e8*\R1*#dc*\R1*#d7 "( . 8 "@ (Hph . P  X h p  x      " 2( (x>= P=P@=  "   H.   (10 P` hx   "   "  "(8 "@H`h$x     2K  @ $PH p x T ]#7xME> LLLLLLLL *LLL LLLL<<<<<<<<<<<<<<<<<<<<<<<<<<<<% ` kH I&  `2x  ` hk`x `k `&xrue`v(`X86v,% X`k)I `Tz `.(t ` =` ` E `pkJ`x`v`t`p`l `h `kiI  I @I `z`x`@v (`(kI I   `(kh I I*   `8 l+  ` `$+( I `Vj  `X0k I6 I8 I:  @@Pt @Xd `@T @hD  (p@p  @@ @0 @ @  @ @ @@ @X @( @ @ @ @ p @` 8Hhx ` 868@ p @ ` @ P @ @ @8 < @P , 0@  @ @h  @ @ @ @ @ @ X`@ @ @   0@l  ~@h @ X @8H @8 @P( @h @ @ @ @ @ @@ @ @( @X @x @h H`Hx0(XPx|@@d @` @pP @@ @<  @8? h@( @ @@  @8 @ @x @P@ x xhx`@l @\ @L  @H`@8 @( .2( h $&(@ l @h`@8X @PH @8 @( @ x` `x8P@p`h8@P` @P @@ @0 | @, @ @  @8 @ @h @ @ ` @`xH86`@p @` @P @@ @ < @8, @ @ @P @h @ @ @ @? (H(@p@l f@X @H @8 @4 @$ @(xz@l @\ @XX @pT @P @@ @0 ` ` ,BT ($P0 X` hp " x    .[((0)H` h p"  R&$0&H$`&x$&$ "       ( "0 8 @ H P X  ` h p  x  B    1      "  2q   ]p]  $ Ԙ Ԑ  $ 1385/11/25 $7  $www.barajin.com'  About Add-inA@~ox!expands and compresses menu items]  8$6%:!@qo]h8Afind items on menu related to add-in and delete them _...< FLcreditssubB  D7>.2_ <refresh_layout_buttonsB  D7>.2q oadditems](@ . 8$6%:!@in'T .!< 'Td T .!<$_ .B@RdP'TFyk8k0k( oX] 8$6B@  ! B@RoShort cut key = Ctrl+Shift+R 8$6B@ox]0H`]x] !.  !z !'x x _facility'  x  $'x B@$SequenceG'cG'jA@A1 |%f  B@d@ x_layout'  x  $'x B@ |!!P'  G  F |%B@FjA@A1 |%f  B@kXkPHo@]`x 5'5'' 9 9 5(  95(q       |!%B@H ?5!( 5!!( 9BqHApplication.Goto my_loco KPuts a grid border on a selection. AA is the range that is to be bordered. $ G'j  $ 7"(  7"( $ 7"(  7"( $ &7"(  &7"( $ (7"(  (7"(qo( !9 *9 .9, 290qo'0'''''''d'o0]H4 $f!'V'z 4 'i ` 8 : x 6$z%  B@o @0 @5H &A@9Hd &A@9Hk _ <getdataB  D7>.28 @ H  & 8$6%:%@ & 8$6%:%@!'0  '&x Attribute VB_Name = "control" Dim currentbook As Object Option Explici Sub FLcreditssub() MssgrSng.s " & Chr(13) _9& "Ԙ2  8"+<51385/11/25 D ȁ1 &www.barajin.comMsgBox ~, 0, "About Add-in End    checksm'expaPnds  ,presses menu itemsnewMepthod  @` *With MBars(xlWorksheet).As("T `"CI(DIf .C0ed Then'@Csmdelet:eB- F = FalseEFTsmad@== Tru@XU.>Iwi!(SeDt = .@Q(Cab|:="_@ ̠b", OnAcgetdatabefore:=1+ 1> + ref@[h_lay@dB_`tons2 p...K  3 &!tlFePFcvj[x(PJbG#__m@'AEBoolean, rxȭ(ac'fK| ip#relatmxto ℣ pthemkFor EachInU b.J̤!a Gv~!@ jbLeft(,T_"E#DB%":it + ȑ lANENex!AcallG9Ipn@IӺRe|se!F 0 This`.тDf .9 <et 'Short cokeyCtrl+Shift+R#O gD BBirdS, n"Z, 1:lll93gnwksq_rU= ApaaQT.TveuR.Bx = SC = In (1me_facility"HǑ 2> 00"4, -:^! G7Cells(3, 5)Q7Sequenc"e7 I_tialQ? 58q1plantbiGoTo #eЭckcS.Range("A1"), Scl:={H{o@SlYqQ8 h`"kShapes.CounT? 2!K02= 1 nk: (1).Cut:I OEeftl0BS!JJButt(my_loc,boPytitle{c-topQ@6D1lfJTizehSWq Top{"1!x= 20.Valu" yerticalAHligP&nt!xlC.F `.Bold{0.Horiz= Colorp3c1%R*(msoOval, - gc0,J).S|q brR@.Line.Weigh0.75B.FillIPreB.Sm{1po$'0"q(Sub3LMake_Borde9AAP»Tmycap+'Put grid br on a selection. AA is the ran$ge$atDo be bordered. If IsMissing(mycolor) Then  = 0VWithx.Bs(xlLeft).Weight1xlThin)ChIndex-i.RQ#Y&-Top#,&+Bottom,!.End ASub  LayoutMake_(AA,4 V)CRk.InteriorW1PatnBxSolidCxlAuCaticC P33l3Initialize(1N_fi(xed@5Cplant__wid=  2 I_Sequen@True _rlinearLdata%DRa@g= _densidty 10Έn @ Fun <_check@p(KCL5($8%l%lh>(KCG5( qh dX$ (hl A\FLLqH(l%lHCG8%lHCGl%lHCHl%lHCI qH Th(L\|Lzzzzz clzz (ldL$ XKG14'8%X%$ 4a$"pj45$ cXl fXl XX(l4$xqT: l\%X$ X d\T@] c0%@P$ P 7)XTP6\@Lx$ XTP\@    /lAD 5DxMd@ fd%lC xMd@  cd%lC  q ,x4 t@, `!//$ `(9 `!/0a ` )A///n%p$ p@<rU 0` 1///$`$`,`Yi//0!1c8*\R0*#15$*\Rffff*01473b8ab6*\R1*#1c3*\R1*#d7$*\Rffff*02473b83ac*\R1*#10*\R1*#1c8*\R1*#1c4*\R0*#2*\R0*#14*\R1*#dc*\R1*#e8*\R1*#2ac$*\Rffff*01473b7848$*\Rffff*06473b7848$*\Rffff*02473b86e5*\R1*#e8*\R1*#dc*\R1*#d7*\R1*#e8"   (0 "68 p  ".  @( *8X;`X/"F&  98 8 P ` px O!KxME\@(f>  L *LfoHNti02L n``0 2U0 2UfrU~|  ^!iYIAA)yA <048)Q  (a(((9)y))*Q**-)++ ,,I-.q...!/@A/y///# 090a00 :79:a:;:: G!G6AG6Ga<G4 HAHaHHHHy4d4:X. h /hH:80(  /:1  /:2  /:x3h`1x6hH(h.'('H:84NhhxMX@ 56hH((x< hH(hl 6CxlxF%: -%d%t$ tD@@a0O  aQq) t@ 6D0lAD 5DxMd@ fd%lC xMd@  cd%lC  q ,x4 t@ D0H :-%`%p$ p@<P:(?%d$ @dP@ c%P`$ ` 7)d`5P|::(AP`1p5Plp3zlp3:P  P: l<,d$ @dWPBA@CUpvd6P@ kv#tkvc#7((%d$ @d@BDd5@td EP:(?%d$ @dP@ c%P`$ ` 7)d`5P lu8B<$<8phlxd`P@l qplpA`MUpz5`lpA`NUpx5`pv@%lpCOP%lpCPcP%lp=`QCR5`P%lpCS(P%lp=`QCG5` qp[P %kxkvD0%z@v@v@,$ @,W`B>TU,6`, $ Q,(P?%W`V=WCL6`)(P %W`V=X=YCZ6`@%[c(,`X l J (lbl qh&H%l%lh>(KCL5($8%l%lh>(KCG5(&H%l%lh>(KCL5($8%l%lh>(KCG5(&H%l%lh>(KCL5($8%l%lh>(KCG5(&H%lL "LLLL<`` @I@ `I IB  F`|k D`XxkGG`lz`nx`pv`r8t`Vr`Hp N0` hk++UIp Ir  R8`kp88Ip Ir IX  Zx%`\v`t`r T@`kx++Ip Ir IX  Zx%`\v V`t `r7 P`p k''Ip Ir `Bx$ `t% `k 08@gene<%@DA@R$Ph X( (P xvz|~@@`  @P @p@ @< @, @P `@h  @ @ %@ @ @@`(@h @ @ @ @ @`@ $%0*f|8 `% ) NPRT@x 8 P ( f@ x @h h @ X @ T ` (%@ D @ 4  @ $ @  @  @8 @P @h x @ %@ @@ @ @ @  `%  *x6@X x @h ( @ X p fbx@8p @` @P X @L` @ < @ , %@  @ @  @P @ X@h @ @ @ @ @( 8 @@ @t @d @` @XP @p@ @0 @ @ @ @  6 p8 x@l @8\ @L (@H`@P8 @h( @ @P @ @`@ ( @` @h @ @ @ @ @ @p @` @(P @@@ @X0 @p @ @ @ @ @ @ @`8@H ` @( pHHf6`%`%@@ @ @P h('@x P'@ x(@ (-P.`%2xz @0l @\ @X @T @HD @`4 @x$ @ @ @ @ (xx`@(` 0@x\ @L @p< @8`@@( @X @( @ p @` @ @0`  @@ @p @X @ @ @ @p @` @P @@ @00 @H @ @ xf^@\@ @ @ @ @ @ @ H@`0X`p 8;G$*\Rffff*05473b7848*\R1*# '%"2 &'(8$2P x,'(&2 &'%0 2H &Xh  9 ; 9  1 0 (8 0!`  >% <% (D)8 @n  " 3 ( 8HPF` B; H  ,Cp;`(Nx;H6> BYP *N  6 > BY8 (N   6 *E *E (N8  ` " h p F 2 <.  0  @ #P  h  x    #        ( D JH h  @T  @T  &X 0 &8`&Xh  &   N(  *0 Ph ".    > 8 PX`h" px 0 2 P    #( 8H  P #Xp     (@tJ,]PBDR x I      (&H68pFR  (" 0 t8 J JP2`x   J( x6N6J/HH`/F0"J8/N X HX,K`"L  "; > *0 $` 2U x @'x ' B'*A@DoH*displays dialog box and enables data entry B@ G|jA@Do`!MAIN driver for program interface] 8Ph] x_layout lA@v l z!>B@He x_layout |(+d x_layout$zB@H n G|j$R x_layout$z!B@  |!JB@Rkclearall ( !('pF'rhan  p r$e next 95( 5(siq8'V p r$% V7( x V7( x_name V7( V 'V ρ V7(  V7( x_number V7( V 'V ρ V7( 0 V7( x _num_fixed V7( V 'V V7( * V7( x_dim V7(7 V7$f 9 7(7 A@7A@qqA:A$B@LA@Ngenerate information segmentA@Pgenerate info matrix  A@Rgenerate flow matrix 0   A@T(generate fixed point matrixk  A@R$generate flow cost matrix 0    A@T-generate fixed point matrixk(A@ add buttonsA1 x_layout$z%f  B@o p r$B@H  95(5(q` p 'p  p r$% p r$%$f( p r$% p r$%$ffresh_ 97 A@q p r$% p r$%$f A@ p r + x_scale p r $(Cells p r +_I  p r $(!< p 'p * p r+ 6G  p r +cG p r +j=ROUNDUP(RC[-1]/ x _scale,0) p r $(V  x_length p r $( p 'pSh * p r+ 6G  p r +cG p r +j=ROUNDUP(RC[-1]/ x _scale,0) p r $(Vx x_width p r $( p 'p * p r+=R[-2]C*R[-1]C p r $(V'=R[-2]C*R[-1]C p r $(V B@ x_parea p r $(o0] 'x? Construct from-to matrix using values obtained from dialog box p r$ XG 9cG 9jX5(H 5(7FROM9' 5(' 9q79TO9 5( qq p 'pF r 'r p r p   r    A@ Ap p r $   a gri=INDEX( x_depts,  ) 7(V=INDEX( x_depts,  ) 7(Vx7 7$f 9 .Interior.ColorIndex = LtYellowq7 7$f 9 .Interior.ColorIndex = LtYellowqq X x_flow p r$ p   r   $$f( 6 x_flow$f.Z'  H  !'  $ '\ \  G \  +Zjkkd p r$ p   r   $$f x_cost99q ko8]() Construct from-to matrix for fixed flows X p r$5( 5( 97x-Prop.9 5( 9q7y-Prop.9 5(q q p 'pF r 'r p r p r 0  Fill A@ x_fix_loc p r$ p r 0  $$f( p r r 0  A@^  p r$ p r 0  $$f( p 'p p r p   r 0   A@ x _fix_flows p r$ p   r 0  $$f(d  p r$% 95( 5( 9qx p 'pF r 'r p r r 0  A@^  p r$ p r 0  $$f( p 'p p r p   r 0  Fill A@ x _fix_costs p r$ p   r 0  $$f(k@ o8 @mSub LayMakeVector(RR_start, CC_start, RR_stop, CC_stop, Prefix, Firstval, V_Type, V_Border, Optional V_Color)CSub laymakecolseries(RR_start, RR_stop, CC_start, Prefix, Firstval)CSub laymakerowseries(RR_start, CC_start, CC_stop, Prefix, Firstval)] p r$ ρ9V5(5(;F/V;; ;q@ p r$% p r$%$f!( p 'p p p   rρ 1A@b  p r$ p   r$$f( p r p   r DSeries A@ x_depts ( p r p   r VFill A@ x_fixed ( p r p   r Fill A@ ROUNDUP(RC[-1]/( x _scale)^2,0)'B p r p   r BFormula A@ x_darea ( x_info p r $ p   r $$f(RRange(Cells(RS - 1, CS), Cells(RS + N - 1, CS + 4)).HorizontalAlignment = xlCenter infobutton 6 x_darea$f%.` x_parea$f '`ko x_layout$zB@7ActiveSheet.buttons.Add(216.75, 12, 95.25, 25.5).Select$Selection.Characters.Text = "Change"Selection.OnAction = "changes"Range("H10").Select$ transition A@oxF (sheet) . Ͽ$~'nx 9 */unit p r+ζAttribute VB_Name = "data_mod" Option Explicit Sub layout_samp@le(mynn, mydeptmeas) nD" NV lin_dim:runD End uD |get() 'disps dialog@ box a-e`nable? entryRL=D0.Show If Not Im_OK Theyit;cF FMAIN driver for program interface4DtxNe@w As I ger, response RS C x,rr FindMPWS2 & "_x", C?%= 0?CA>Worksheets.Add.SelecAct@n2.0 po}Ju\#  2 *+ 2:5`,[x cost n D a_ r_ Bj'add 3ApAR.GoToPfere`nce:=}U).#6"A1"), _Scroll:=!%;jjk=@c bmYF:mߤsB85m51!bv@E 4`+0Po3!H).B^FcB#2v2))v_S-JIFP{ Maroo+s N? )hY2? 9 Q3SjZ" p "adqb/punit!))`mscaleSqKq"e)&O S2p Ei<_r!"Ϯ PN =q 2)rmulaR1C1 "=ROUNDUP(RC[p-1]/prA_q,0)MengthS AEB lsT5Q 1!sFo ]won`ʏ( S + 1).FormulaR1C1 = "=R@[-2]C*01@]C" Cells(RS, C25Nam en & "_`pareabh End Sub  flowMatrix~, i_)0Dim#rang@e As R, my$Integer7 j ' Construct from-to m; using values ob@tained dialog boxFWith 'RIf\ Then .V( " Elsex 4(n t.Siz16 ColorIndex2LtB_T.Offset(2, 0H*'FROMh FoCRedG Horiz @alAlig|nt"xlRigh>t {A#G&1,B&TOK&CDg& KRS'+ 3: =@LayMakeVector C†,N - )I + ""-, " CMaroonXC7'` i#1 To N >?DmiAm@LtY ow''k=@ f1N)ZCerK5%c +䵱S)).̰!B" ਫ਼d"' aSe=c(O '[ j_a <> je D= `D(Rnd@() * 2`N >yB"(@nj)#k!a7IfoKc+ V>BXL@cost}AeV1A  q{zixed{@"D{{{{{{q fZfas A#rL#wz }poxi xq.?Or  T &rx-Prop.< 2_|_| /O1  ; : [y?   / ~1~~CЯ⁶~_S&b"FillO"ߟZf'Z1Z _loclaymrowseri0@ "  C =K 刉 dw _!_!qabG!$ OGD(ot%Z(RR_startfC2op$PreD, Firstϳval, V_TypepBorder, OptionalColor) 'Sub laymakecolseries(RR_st art, op, CC$Prefix, First row/< OE Dim FF As String, deptrangJeR )With CelluSS.FormulaR1C1 = " ""nt.Size16 Index5Offset(1, 1) "*2F/V34 \End Gz( .'G J4))K?9S@7RS + 2 R_N - CC"Z ", "1?7P+(F&HorizontalAlignment@#xlRighBt#LayM@Vector"C+!$@"D"SCMaro on, 0Sel.NamA@ & "_As02@0""VFilNl@ed3`a0.4lcROUNDUP(RC[-1]/("scale@)^2,0)4`FF!q.LtY@Qow}-pareaEA9)sF@aZL7info ' %V PCQerc' buttonIf i_@d ThedSet= L")et@8-1Hǡ= Int(p / NdIf ! A  dat$a_s(Worksheets(}out").ActivateeS..Add(216.75_95.2@25.5).klCharacters.Tezx{"@6GOnon@"chaq:"H10 ## B@3c5>"siS" 0@&$ X xC x6Xh 4(Dhb 6 :D=#h%x$ X xx5hu8T< 4(Dh%uD%x$ X xx5h; 4(Dh%( %x$ X xx5hY:D9h:4:X% ($%x$ X xC;x6hXN:D>h% $(4X%x$ X xC x6Xh 4(Dhb 6 :D?#h%x$ X xx5hE:@% 4(Dh%x$ X xXC;x6hXE:@% 4(Dh%x$ X xXC;x6hXN:DAh% $(4X%x$ X xC x6Xh \,T0 xhXxhl2 l$ X l\LLqHl 8S:8X%lHCb:8Y%lHC(8%lH=\C5\(8%lH=\C5\#(8%(%lHB\q:8Z%lC(8%l=\C5\8%lC6 q#(8%(%lHB\q:8[%lC(8%l=\C5\ q qH ((8\b ((8\b((6: \N(0:`QNPPuD(pp (uD8\(ll M$6\pP0J ((8\%(%l$ X lqltucT:8]\:(^ktD:_%t@(%l>C;6 \T:8]\:(^ktD:_%(%t@l>C;6 \ td_X(8%(%lB\@(%lBl\$ Ql6\8%,cX(8%(%lB\(%@lBl\$ Ql6\8%,c q 8 l$ X lp uD((%uD(`%$ X P:8`\%Pp$ ,n)l6 pP\u8*l'(%:8`\%$ Qlx5\tucruc{ ktkro'\ aupv5\ kvuo"ktD8%krD%kvD%x rd td d l$ X l (uD8\(%uD(%$ X pp$ Q)l6\p:8b\%,n5\(8%,cClD,LxDl\pP0 `2 \$ X \L<1>a>>>A?a????Y@ @9A!AiAAA0A BaBBB CaDDE)E1CIEyEEEFEy/FFIaIIII9JJJ L9L0  X($ u ($ zM@@:`P 5P kz@ '%',%'@%'`%<$ < (  )<*:`P%<$ @ < <5P;:`P%<$ < d  )<5P/''':`oNPP^px6PkxF:`P%<$ < d W)<6P&<$ @ PC5P%r@(@%l>PC5P2:`P%r@(,%l>C 6P krpr':%r@(@%l>PC5P(uD%r@(@%l>PC5P2:`P%r@(,%l>C 6P krpr':%r@(@%l>PC5P(u D%r@(@%l>PC5P2:`!P%r@(,%l>C 6P krpr':"%r@(@%l>PC5P%#r@(@%l>PC5P2:`$P%r@(,%l>C 6PX(`%(,%lBPr@(%lB<P$ Q<|6P`%|,9%(`%(,%|P<<,<5P;(`%(,%|P(Po %6P9(`%(,%|P'Po &6Pc| q1:`'%<$ ` <(<5((P )6P((P *6P!c(uDP + 6P u %cuDuDP , 6P%f(uDP + 6P u )fuDuDP , 6P -n:@.%:`P%<$ < d / c%x$  x 0)<x6P0|(<xP\3 x$ X xX x5Xx $ QxT:D1%T(D%TWhC5h(D%TWhC5hcT 4(Dhb (D%($% x$ X xhB(%(% $ X XB%$ ,)x6hX(D%($% x$ X xhB(%(% $ X XB$ Q)x6hXD%,;(D%($%h(6hoX &6hXc(D%($% x$ X xhB(%(% $ X XB$ (hQox %)x6 hXxhC :Dp#h:43X%x$ X xx6hX; 4(Dh%(%x$ X xx5hN:D4h% $(4X%x$ X xC x6Xh; 4(Dh%:5%x$ X xx5hH% 4(Dh%x$ X xXC6x6hX 4(Dhb 6 :D7#h%x$ X xx5hu8< 4(Dh%uD%x$ X xx5h; 4(Dh%( %x$ X xx5hY:D9h:4:X% ($%x$ X xC;x6hXN:D<h% $(4X%x6L`@  \$ X \ ((%u D(%$ X `:`jL%`$ ,n)\6 `L](@:QN``u D(l ((`L k6 `@ ((`L%\$ X \ (%pu D(P%$ X `%`$ ,)\6` ((`Lb ((6:0\N( :pQN@@u D(`` (uD`L(ll M$6L`@  \$ X \` uD((%u D(p%$ X @:`lL%@`$ ,n)\6 `@L I(`%(% \$ X \LBq\5L:`m%lC(`%l=LC5L(`%l=LC5L`%lC6 q ((`Lb ((`LbH(:QN(u D`L(ll k6L \$ X \ (u D`L(%$ X %$ ,)\6L ((`Lb ((6:0ON( :pQN@@u D(`` (uD`L(ll M$6L`@  \$ X \` uD((%u D(p%$ X @:`nL%@`$ ,n)\6 `@L8 <xD\L`@ D2 p$ X p`PPqLp: L `k@CC If `Ih Ij inteIl hIn outIp Ir$  outIt( @I*, That`zfine`xlete ^`kGIf !JIh Il 0In PIp `z b`kXIf Ij Ih (In HIp `(z ` ''iI IH I ```d%hHX@ph @X @H @8 @( f@$ @0 @` @H @x @ @ @ @ @ @ x` `@@H ^bf@h @X @0H @8 !@`( @x @ @ q@ @ X@ p0P ` @x h @ X @ H @ 8 @ ( Def~p`w@ $ @8  @h  "@P @ @ @ (e@ @ @ @ h;G$*\Rffff*01473b8ab6$*\Rffff*02473b83ac*\R0*#13*\R1*#17*\R1*#15*\R1*#1c8*\R1*#e8*\R1*#2ac JP " X 8` ( , ( * HH P , ^ Hp P  \ Rh (0@ $OX    (}(P X$Oh5 (} 2 ( (}@ 2h (} (} 2@HCXx (} (} (} (}8`h p, ,(} ( " 0 B8 R  Z ( f h$ j l$$f *A@(k f h$ j l$$fB@Ho;Makes a series in a row. RR_start is the index of the row.(LCC_start is the index of the starting column and CC_Stop is the index of the ending column.ructTPrefix is a constant prefix for the series, and Firstval is the first in the series.]p l h ' n  p f h$(H  G n  p  f h $(j  9 f h $ f l$$fB@ f h$ f l$$fB@H ~| l B@zp rko?Makes a series in a column.CC_start is the index of the column.IRR_start is the index of the starting row and RR_Stop is the index of the ending row.( xTPrefix is a constant prefix for the series, and Firstval is the first in the series.]h j f 'r. n  p f h$(  G n  p  f h$(j  w f h$ j h$$fB@r f h$ j h$$fB@H | l B@z xkpoh2Changes the size of a matrix whose name is MatName1RR and CC are the new numbers of rows and columnsBwhen rows and columns are increased in number the current contentsof the matrix is not destroyed.] 8P $f!!P' $f!!P' H   H    $f%B@ H $f%B@  $f%B@H |B@ H $f%B@ H  e   H  H $f%B@Rk        $f%B@  $f%B@  $f%B@H |B@  $f%B@   e      $f%B@Rko׵Attribute VB_Name = "maces" 'Subroutines for the Creation and manipul of Inter@face M  Op\Explicit  LayMakeVector(RR_start, CC opPrefix, Firstval, V_TypeBorder$, palColor)Dra0ws ax screen with various coants?SI is}Oing row indexVcolumn&op%opp% %$a sgHwhichdll beVpۀeries. Say8 X_[Cnumber xDspeciff\Ilue z`AUtcxS: '"S"" metandsA C!s headed by2. T cmnautofilFill@plu/@)% lth@gh@,orm@A6D4@aX K.XBI1Aicat8wheto have gr.i@o0Mno< bBth/laym 2_b(l%Q! 28i' ?D A5 Range(66 9#a' )).DownBIfHI_⍧CCWN´F {`General@J%#pyopRighB%|)+ Ag4,hex E=v ? 0rt dO3l+!go3k3 ՝6"/Eo9^A2{9.R1C"1=" O[ 5ol/LP/t0Uo i x=.lLOjz6(7?E3--6 "a#"V_ P4s??v:2ʓ ,ROH#\!"????Aaub ߔeܡiQε ra . G?1!ߑqSAa9end$~apnt 13,bر@ ` $ 7C_start).Value = Prefix & "& Firstval If ncol > 0 Then Cells(RR_, CCp + 1H 1WqRange2(f2)uop)).Clear%M$Select%ion.DataSeries Row:=xls, TypeAutoFilEnd If Sub   laymake s&Top,,) 'Ms ab  in'umn.is the dex of@Er xing row a1@ Stop end .@ĕAa connt pfor!-,f4A/ Dim n$As Int8ege@|j= B5)-ChTÁGllaÀ2GÉ{, aaColPb`J bchgmatrix(MatName, rr, c2c]ChYsi$zeYa  whose n@!HPRRKCC areNnew numbers! /`h bs`wAincrea8sed!Sb curre\ ]tdm`not destroyed`YcRYRRold Y;-k#']B$).!.CounC1d#D4)rr`  nF@vk To@2 Ak@L !).In`xt Shift!!DownNe&xHrropyg UActiveSheet.Pasteb Cont9aElse%< ؊%)-&A #).Dte%Upgg%ʡ cc`7=x7-`{@ eU7<(ToRigh8(`<&OM)U0-d<o 6/-Hq/ToLef qBQ0* `i/////0` Iaq///n$ XC6HrU~|  @yYiY9\16\\\ \]9]i]0  0 @  get_put__SRP_a *;__SRP_bW!comb_modMY- 2 <@ " &  "    8 +@*` +0K 00 + "R"98  `"'xX',4tM(D"'^BMp  "'"',40` 9h9$ 2+ * *@+`+ ++  /000 4H  "(S<140 P  p x*     Sw) !"#$%&'(*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRTUzWXYj[\]^_`abcdefghiVklmnopqrstuvy|D7(7<xME   $ XH$ XH$ l(Qo )6H,X(h]t  $ XH$ XH$ l,Qo )6H} $ XH$ XH$ )6H(X (L8$HN|,hXHUpzOX:hH8(% $$ X$C$6H( kzhX:hH(8(% (%$$ X$C$6 H( kz& X(hH%$$ X$( $ X($ o)$6H(} $$ X$H $ X((H$ )$6H(9h%8%$ $ $$,$ ,$H(|,h XHUpzOX:hH8(% $$ X$C$6H( kzhX:hH(8(% (%$$ X$C$6 H( kz& X(hH%$$ X$($ X($ o)$6H(} $$ X$H$ X((H$ )$6H(9h%8%$ $ $$,$ ,$H(0   \ @ ` `JAAI `Vx`t`r`p`n`l`j`h`nf x`% \% X0% TP% Pp% `L% @`J`z `TJI I I I I `pz`rx` v`t`r`p`n`l 8 `kg`Vz  ` J u`z $ `J ~I   `J99`z`0 x`v`t`` r`p ` n h %`x f`d`b` ``\`X` T`X P` L`( H` D` @  ` X I x I  I  I   ǘI\ `  ` JP I p  I  alirI  I `x  `pJ `z `x $`v`t `(r ` `  I I  s anI @ I &  `N `z ` "" `$`+D` `$V``x@ 8  @` x% 8Xxf'@h xlCa@X @hH @D @P`$%8j@0 Ran@ @ +@ !hX @x @h @X no @ fnp(4 $z$ '@ @ @ j@ +f@ @ @ _cen x@ thHJLNPR$(pXZ\^`b(Xhj~(@ $VlBP( $R@6(` l ThP6(i) = x;) eque> col_p ` >x  GDterati(B@j .0J@ XJ h~ K| K7(l A@@\  Z0[ p Z ` @X 0` X` hV $la;T 7a7R b P b o$fp(N $f@qL ratiPq s%(00 Ll~ @x X;xv ;h(t $r 7If` ffse@P 3)).@@ 7@0 @ .Off0p + 20(  @ @ @   F'0 itch:p@X@!Xfhj` B@@P hL %@<  @,  @ @ h @ F ` $0 ;@ X hxff A@! @ r$@   @ B@ stan@ !p 0|7  x A@ 0 v !d x T @D (4 !0 @ !( @ x !0"(&lL@"ph "X @H (&D @B X"h"@ "(&(0 @  p @ H H# $(&h0$< @, @ @ @ @ @ @ H$X$`p$$ $(& $6P p X%%(%pt @d @T @D @@ `0 @ XP8,`(0|frtp(x\ )XL *(H @D @4 @$ @ @ @ @ @ @ @ @ &VPRp( (( ((( ((`()8)(8)| P)'`)x`x)')v )*)t )**-*d @T @D @4 @$ @ @ h+( h+ @ @ *8+`+8(+ @+DP+`+D+pHX+X @ @ @ +[,`,[(, @,^P, h,^x, ,`, ,`,b,c-(bJ- -g(-|`@-gP-z h-j-x x-j-j-v -k-t -k.r .mH.p (.m8.o`.pp.` .}.\`.}.Z ..X //V (/0T 8/H/ /pl @\ 0X @H @8 @( @ x8X21(< DF|V1X8 @( @ @ 2 02 2 H2X2 p22 22 22  x33xfn~3 @ @ @ H4 @ 33 333 3'4( 4 840H4 x40( @ =p ;G$*\Rffff*02473b7848*\R1*#1c8*\R1*#e8*\R1*#2ac$*\Rffff*06473b7848*  4] *XP            0 8  X  `  h  *x  * * *&    4]8 4fp   03 03 0 8 @ X `      4R     "   8 .P    hL &  ( @ P  \X >  ( 8@9`  1  . =0P p x  * +0K    -(,@*X Np * *   0  8 @" HP X (h,&(F & D=  hp x  :=  " $  H `  ; 67$K  @+H+h ++  , - - 4( ` ,h  DW+ "P 8 P )h ) ( /  P    83P  h *ep *f (e ,g  (`0  &S (@)`0fx! >&# <0 p x'( <M X(fp,h  9   &S :j0 &&p (>,A   (,h0 ` h ,Wx<j,&09H`x,D   ,h        0  8  X x  P  6g  "&  !(>!@!.X! x!  ! ,h! !! ! "!!!*! B" P"<`" "8" ">"8#@#" H#P#+X#x#### ## "  #  W# #" ##$($8$X$x$ &$ $ $ $$$8$%%%%  %(% @% P% Vh%  .$% (% '&   0& @& `&&&&&& & &"&'"'8' '@'X' p'  x' ' ' ' '"  '' $'''( (  (@(X(x("(((( ( (( )) 0)8) @) :H))"  )) $B)) ())) **" **8*@*  H*  YX* x* * * *  ** *dl* 0+ 8+@+TH++"  +(+++, , @, " H,P,X, `,p, (F, ,,," ,&,,- -0-8-@-H- P- X-p- (- <-|- p. x.. .. ..x.X/ `/h/p/ Tx///x,Dim k As Integer, i As Integer, j As Integerla6Dim i_odd As Boolean, nrow As Integer, ncol As Integer |!B@RA@ A@kHo@@]] @`]$CC] g coA@ x_plnt$f.ring x_info$f.r a x _area_def$f.n x _area_def$f%. !!P' !!P' x_darea$f.pnsta x_darea$f!!P'tval i x _num_fixed$f!'0hredimension arrays   HX   J&00-1 matrix to determine departmental adjacencies  L  N  P  R  T M+vector of department Y coordinate centriodshose  V@(vector of number of cells in departmentsmns   Xh!x  ZBBoolean vector which identifies departments with variable location  \  ^  `  0  0 b  0 d8 0 fXH 0 hx 0 jB@k x_cw$f' x_num_col$f' 'WC is the column width   &The number of columns is not feasible.A@~gk x_fixed$f. x_color$f. x_x_cent$f.r x_y_cent$f.t x _area_def$f.n x_seq$f.lA@   $n! +V $r! +P $t! +R-If I_Sequential Then s_range(i) = sequence(i)xRange(nme & "_info").Select   $!$$$'V Vv VVG +ZcG +Zj $!! +Tsequence(i) = s_range(i)create the flow matrix. x_flow$f. x_cost$f. B''      $!$  $!$  $!  $!'    +X   G 'j   G 'jd  +Xkd  +Xk  x= flowrng(i, j).Value 0 x _fix_flows$f. x _fix_costs$f. x_fix_loc$f.  0F +fF    0  $!$  $!$  $!  $!  +b  $b  +f  $b  G  $b'j  $b  G  $b'jkd  +bk x= flowrng(i, j).Valuexp  0 $ +hF $ +jA@ko] ]0H`x]8Xx'A@   D   FBmatrix of department locations |!B@Rcreate the fixed matrix.   +VUfrom plant definition, find the number of departments, size of plant, number of cells8for each department. Assign the indices for the P array.      +D  $!  $!!'   $T GyjH 'd8  $!'k      $(   +D $T  $!( $V +Vk xxx = xph x_info$f. x _area_def$f.n x _area_def$f%.'   $!' $V $n( $ $V  ρ  ' $~'n $If response = xlCancel Then Exit Sub'g d  $V 'k o ]( G|j"Set seqrange = Range(nme & "_seq")  F +LF   $lX $lX   $lX+Ld Department  has an illegal sequence number.A@~g k    $L There is no  in the sequence list.A@~g k k o @W(RS, CS, RM, CM, mycost)] 8P]h x _facility$zB@ ! 'p !'r !!P '  G'j | x_value+f | p r$,  x_x_cent$f.r x_y_cent$f.t x _area_def$f.n x_seq$f.l   $V $n( $P $r( $R $t( -If I_Sequential Then s_range(i) = sequence(i) %If I_Sequential Then col_put_sequencek`  x _Iterations$G x _Iterations$fB@j x_seq$f.l  p r$% 9 |; 7( 7(7A@7 A@q0  p r$%9 ;    ; $l ; 77$f( 7 7$f(7 7$fA@7 7$f A@q x _Iterations  p r$%   p r$%$f(kh   p r$% 9 ; Ǭ;;ʘ; 7(7  7$f(7X'7If k > 0 Then Range(.Offset(1, 0), .Offset(k, 3)).Clear7(75Range(.Offset(0, 0), .Offset(N + 2, 2 * N + 4)).Clearqd 7(  7(  ;  $L'F $L'd 'F 'k Switch:G  and   ;j | ; 7 7$fA@ 7 7$f A@k0q(k  r   $B@L   p r$%7    7$fB@ Distance*Cost7(    ;F  ;    $H  $X  ;7  7$f A@q 0    p r$%7    7$fB@Fixed Distance*Cost7(  0F  ;F    ;  0  $d  $b  ;807  07$f A@qkk   '    0  ' 0 G  'jk  p r$%7   7$fB@ Adjacency7(    ;F  ;    $J  ;x7  7$f A@q@k8o0] 'V x_method$f G (AlDEP) V;cG V;j V 'V GAisle V;cG V;j V 'V GYes V;cGNo V;j V 'V G V;cG V;jqo8 ]x x_seq$f.l'l    $L+lHo@  ! !+o ]0 H ` ]x   ]  ]  ( @ ]X p   ]    |!B@R ' !' !''  '  $5'5'5'5'q    draw vertical line   G 'cG 'j?+kcol is the number of columns in dept width   'F    '     'F '    A@   '    draw horizontal line  'F 'dX 'F 'k8 '        'd      'k    A@    'k   'kp 'XoP ]     |!%B@H   '  \ 5!( \   @5!( \   @5!( \   @5!(k(k k \ 5!!(d 5!!(kkq3Selection.ShapeRange.Line.ForeColor.SchemeColor = 9op ]     |!%B@H @5!( 5!!(qo ](@Xp]A@ 0  ! !$5'5'5'5'q`  0 $f  $h     $j     A@kk _facility x_plnt$f! x_plnt$f! A@oX      |!%B@H !!!(  !!(  !!B@ x_fixed_  (o`] 0  0 x_fixed_  |%B@RHk@o8](@XpA@ |!B@R ! !$5'5'5'5'q       $X  $X  5draw line from the centroid of i to the centroid of j  $P   $R   $P   $R   $X  $X A@kx 0    0  $b  $P   $R   $h    $j    $bA@kk _facility x_plnt$f! x_plnt$f! A@o( Attribute VB_Name = "get_put" Option Explicit 'Dim k As Integer, i j\ i_odd,Boolean, nrowNcol Sub _info () ActiveSheet.Lines.Delete33Facilit yI64If Not iIitial Then1show_l' End If EG-Ill `, myposqfixedrng RangPe, xSng, Mss ÃB,flow Wlor r*.n_reqresponse އ20cost+_l 0K 8Fa SR?ph Y#_not_zero(?ej% (`Lr, ~F MRcϣ_aP_wid@0-c>w&} WC  'Pis the0,JC> W Msg@Box ("u ,N ` feasi#.u!#UA]Kim? qoldorx_rxV_;y hy۞eeet1JaK0 _rWOSFHi1` To N@Fi)pT (iZ^PP4 b'P!I_SX ~s3 Nlexp'zhS]c4s = Left(LCase(LTrim("3m)),6 y3 "v" OrV", QTrue ElpFa ?q`'rHior&Index}G'hAuS'c`pc!8r.0䠝+y+}qui0r_wP bigax0csqj`=(sIsNumeric(! p=(i, j)Z& .ʻ p_e * c,Abs Q) ggB eq<}Bs ,=  tq Kr6Q0$"\u/ ' x=Oua35o{6e&ǰE_s3qp%LedyN 0 SU_not_zero(j)HTrue68< ipi0_min> = ˖W4:>0ax:.Ef$Els7FQ`S0' x=~NextKFor\FXx_loc(1: FY 2UlayoutLSub  Convert(iquit)CDim x As String, Mssg iAger#JkJ_ xi+w hd ]fo*respon  ˔ q= ~kSd l>I?l[ q?pa}<= N = 1x`tQq5/ !j= " "i1 !p\" Vg= gpBox(1q A'0 xlCanKb 7w{ub/pz/7Q+56#$  @B_i_seque} ( h{ iP' \al? 'Q(t%("7L: J0: _'0sC;(NӴDDAqShOMsQ ("D'wq%kr%has an ipllegl.B@'RvN>o@_ ` bre is no2# { list  P q1A)dispY$y__i(showIpt߁t7 adjac) '(RS, C0RMp0my!. A/RSWC/11Ooff mtj8UWPorksњs_ft").Ҝ P .Row - 1s u um+A {s u + 2@#Q< 15>315hvn"31CqT) d-d( = cost PIf show_dept` ThenXSet x_rangeR(nme & "_x_@cent") ZyZyZn-areaf ]seq +For i1 To Nn>(i).ValuqCN]X{Y'I_Sequial s'TdceNexـ["col_0put_bEnpd IfE{iLniM{lajheckYzIterations"),˂.Cle|arAY%m With Cells(RS, CS).Offset(-2, offn" "D0, 1)@XǿAL0).Horizont@alAlignt@ xlRighGa'Lef LayoutMake_Bordpers  0H C ol , LtGre}RFWUC*ݼ)"`/aok@'qo.k, 03kLb7I(k A*d! #TH%0),o,W=/6 1! N!K C}e(b0@N 1C $B? E% G)r uqvK + 6)).Na= HT=Z`V3,Di sR0 B 툡*o " d 2[" 3b-PʘY#_a 7$B)4N00Y3PIumnWid[= 8gk0 CInt(s1)mk > #L 0$ 5 _ x Cells(RS, HCS)0,&) Y-@Y0IY)2@Z)).Cl8earC.ValueI"ACQcy" Fvi1 To N#e+iAi:|0wO AjXIŴADOϦ Nҩ'qǨEu ASu b  put_l_parames(rDim x AsR gehxC06znme & "_@hod" @YI_Seqbu_ialO1x, /"(AlDEP)" Else4f>Ax@H]a nit_coA Aisle +` il Yes No_rectilinb%@  =@W>>#_!?sb2c e >k>Set r`?==`whCgk@mr%(Bk)pkcFb&#Uamsg(mmScplant.Row - umn mm_ "-^WC_leftH!,, rtopn&Ag)), kA i_odd!Boodmax#0qB0Ccwidth  heighstartK,  _Single, y bot+ArA K#3A2veSheet.LP3s.DV=." w.W3=c If Abs(myflow) >= intercost_min + myrange / 4 Then .ShapeRJ.Line.Weight = 2v#Z)2qwt3tx(3 *w^)x&A4AEnd If Ca > 0ForeColor.Schemg0!ElseO&8}U1:3AWithB'Sel@ectionf9 Sub  layoutAdd2(start_x, y, endDy)BDimƸAs SinglB  A@$veSheet%s..3A9 8đG?IN fH\P'fixed(## A#cellwidth #I`ger, h|,topjleft# kc8cirletsd Bt1_Nz_" _cb-C s(plant.Row, C@axumn$%#= .W ( HbLTop L!'g3%: ku1 To "F6_not_zer0o(k)tcCi0rclebb+ FX* W`}!-(# $iA< Y#L$BCb / 2, kaቢNext#)@_scroll "_facili ty", (nme &plnt")= - 8w#@1#{my_radius,`indexIC(msoOxvalEi )憩~Fill. ~8#(Visib = Tru#OJSolid]Na= 9$_"my q"ZIZ > GAOn Error Resu"A}3e 5O$ k).DTHu*Ah show__lАsTTll2TYTrt";iXT, j>UgetF43pInfocrs3TTw> NLT4SSPVS 1 B !iR>Ej~iTp$QmrC(i@)j, i)@@'draw  from thepSntroid of i toN>j;YYCX(i)YXCYC+ jrts\ 2;;wuq5q O ;OOg?&Ovb vjFY( u, _ j ? 1uiu_u`wu0   0   0 @  `pz*D'H%:hX%$ QD@5Xux::%kzDh%(0%@XDDD5X::%kzDh%(0%@XDDD5X kzpzu :: %kzDh%(0%@XDDD5X<:: %kzDh%(0%@XDDD5X kzpzu :: %kzDh%(0%@XDDD5X::%kzDh%(0%@XDDD5X kzpz ::%kzDh%(0%@XDDD5XR::%kzDh%(0%@XDDD5Xc@$|`(@DX0 8  0   0  0    0    0  0   0 `  0        %rU $ `$ `( `/$ `<! ` )Q/////$I `$q `( `/$ `< `y/////8 `y////$9 `8a `y////$ `$ `nL'TxMEOptimize_dialog d_VBA_PROJECT[,3dirh__SRP_0(0zz8(SPSSS0{D7B936B2-EBD1-4755-99B9-F0A7F7AE5C44}{BE499EF0-ADCA-4558-B037-AF126DFFFB8B} @ . 0x{@E " :ph@%p %@8@p "  ( "0 8 "@ H "PX`h p x " x' A@roP@o@o0 2' 4' 6'' A@rxop '2d'6 '4oH@ͱAttribute VB_Name = "Optimize_dialog" Bas0{D7B936B2-EBD1-4755-99B9-F0A7F7AE5C44}{BE499EF0-ADCA-4558-B037-AF126DFFFB8B} dGlobal!SpacoFalse CreatablPre declaIdTru BExpose0TemplateDerivCustoGDon 0licit P"& Sub Cancel_Ck() Im_OKSE Unload ɱ&End$+DH_CB, L@abel26` OK %I_d@*KD/_Ra%= "C_de`nsityAC_BoxCE@Cj$@UUserForm_InitsEWB CB/CD"@10082/ J^pꪴKO`D&A4 zy2K#LKݿJcSZ4GEsVǤ_hOfg1*=?7N_2D2b E3rmI ?"躄cY}DՊc0N84S dBh#C#]=!B4ZQ-G(D.UqݝxnG D5 JG29`M_+ -1 C}L@:8 ku DJ54`/0|wExcel+VBAWin16Win32MacVBA6#layout%stdole`MSFormsCOfficeu ThisWorkbook$ _Evaluate workbook_Open add_omie_menuUchecksm?layoutInitialize!workbook_beforecloseCanceldelete_omie_menu, newMethode newAction om_iemenuNewmenu+rmenu!mitemNewItem1 NewToolsItemWMenuBars0xME(,C31B_?geVDelete_Problem@qQ0b\e\\n\\F8% xlWorksheetMenus!LCaptionxAddr MenuItemsOnActionbeforeput_omie_indexChecked0amenuq itemcountUdelete_omie_itemsDCount0vDeletex delete_more1uxok_arrayOMIE_addin_titlesui_quitD my_captioneSheet1Worksheet_SelectionChangeYTargetFRange plant_mod]o makePlantVxNew responseRS_CS\rowhU FindMPWS2nmeʹ Worksheets ActiveSheet%NMsgBoxRvbNo% Application* DisplayAlerts ActiveWindowzBDisplayGridlinesmXColumnsp9 ColumnWidthiqCellsValueKFontUSize ColorIndexOffsetFormulaqY NumberFormatRLayoutMake_Color5CLtYellow4LayoutMake_Borders[HorizontalAlignmentS@xlCenterxlRighte plant_col9plant_col_widthjput_layout_parameters)LayDept_columns LayMakeVector,WnLc SelectionZRowsU RowHeightN plant_buttons-layout_new_plantQ: new_layoutpmy_nameŶ i_fill_olde Init_col_oldmylocget_layout_parameters'Init_col`i_fill- SelectOptionswOShowIm_OK܋layout_clear_comۓNeLineslayoutcirlesdeleteòplant#RowColumniClearInterior;eval_col_layoutxx_yy `nkf^kbActivate|Shapes<Cut. layoutAddButti` I_SequentialLtGreen]WS_nwksh currentbookActiveWorkbooktrans_to_facility; transitionZareaBperform_checkssumcol_layout_initial lay_scroll_ arearange,LayoutDataDialog Cancel_Click Label1_Click Label2_ClickOK_ClickRNameBox NoDeptBox[Vallin_dim& LinMeasBoxYmaxdep9N_fixed NumFixedBoxmaxfixedi_randG Random_CBUserForm_Initialize5c Declarationsmaxlngth?maxwdthrbig yPgPT^DisteAD~\sequence]seq_initYCX\CY\day) *\G{000204EF-0000-0000-C000-000000000046}#4.0#9#C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6.DLL#Visual Basic For Applications*\G{00020813-0000-0000-C000-000000000046}#1.5#0#D:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXE#Microsoft Excel 11.0 Object Library*\G{00020430-0000-0000-C000-000000000046}#2.0#0#C:\WINDOWS\system32\stdole2.tlb#OLE Automation*\G{0D452EE1-E08F-101A-852E-02608C4D0BB4}#2.0#0#C:\WINDOWS\system32\FM20.DLL#Microsoft Forms 2.0 Object Library*\G{422CB84C-DA0F-4CEF-9FBE-D12A2DA5DB79}#2.0#0#C:\DOCUME~1\Barajin.Com\LOCALS~1\Temp\VBE\MSForms.exd#Microsoft Forms 2.0 Object Library.E .`M &*\G{2DF8D04C-5BFA-101B-BDE5-00AA0044DE52}#2.3#0#C:\Program Files\Common Files\Microsoft Shared\OFFICE11\MSO.DLL#Microsoft Office 9.0 Object Library  VProgram to layout departments in a facility Macintosh HD:Documents:productio;G  ThisWorkbook01473b86d9ThisWorkbookY! Sheet10a473b7830a Sheet1plant_mod01473b7848hplant_modxP808"trans_to_facility03473b7848 "trans_to_facilityx0Hp LayoutDataDialog02473b86e5 LayoutDataDialogx`Declarations06473b7848<DeclarationsxUSelectOptions01474f58e7SelectOptionsxw"Solution_Option0j473b7830Solution_Option)Switch_Dialog0k473b7830Switch_Dialogtrad_layout0t473b7838trad_layout icolumn_layout0u473b7838~column_layoutMUcontrol02473b83accontrolx0 7data_mod05473b7848<data_mod`x08 Kmatrices01473b8ab6dmatrices8i&get_put02473b7848get_put<xP% comb_mod0r473b7830comb_mod0hOptimize_dialog09474f591b!Optimize_dialogT-H8 Phx`colorCN\ InterCostzVR_cni CXiCYiFixedInterCost FixedDistؑFixed_not_zeroFXK]FYL]seqrangen_rangeHdeptOx_rangey_rangeTcostTSV*_intlcostmcost4savings[si_sj_ intercost_min intercost_maxޝWC_ I_rectilinear/A plant_width plant_length plant_scale4 LO_method2 i_initialhCRed)LtBlue'CDkBlueCMaroonPinkDkYellowi_stopsi_finalogI_datay I_DataRand Data_densityitersii_bestj_bestc_bestz my_heuristicfmy_cost Col_OB_Clickv init_sol_setCol_OBX Init_Blank_OBEnabled۪ Init_col_OB Frame2_ClickInit_col_OB_Click dept_areasqmy_width my_length@my_colK col_widthcsum_area plant_area7 width_box length_box Aisle_widthcFill_CBRect_OB u Trad_OB_ClickTrad_OB Euclid_OBylay_checkrange[qSolution_OptionlStop_OB3 Display_OBO Switch_DialogsiisjjSwitch1)Switch2)mypos trad_layout eval_layouteval_trad_layout5 iquitDlrp^cp\Convert Centroids NdistanceMatrix= computeCostBdisplay_layout_iterf layout_mainMcol_layout_mainHtrad_layout_mainD8Mssg5jalastcostScreenUpdating! referenceeScroll trad_eval2Ycol_msg switchDep Make_Switch1 forced_switch col_switchtZ trad_switchl left_nameSqr(TD=_TTM_RM^CM\adijcnj!sjFF9]FJ=]xi_xj_vriOvrjPswitch_savingsvbYesNost(_LM^TMF_BM\ypJB]JT]jstepIB]IT]istep replace_sjHY_FirstlX_Firsto$XB_XT_xstepZ~YB_YT`ystep(icountljcount column_layoutlmyareaomydept;}i_oddnrowMncolinitcost firstcostdeptij5deptjk5 get_col_infoW col_deptsb3myrand6nrandZ length_leftRndRcol_put_sequence col_show_lineseval_layoutcomb.off!d_startd_stopsi_indexi_colorK i_centroidRhkrows7 width_leftRkcols area_left-w_stmaxcol5mylengthAA{\k_AAF@color_layout_rangeMinAA_colslAA_rowsk_dept`xc_yc_FI<]seq_temp~i_switchVzj_switchzcontrolOMIECreditsSub|RChrK~ FLcreditssub smdeleteitems smadditems6xindex IndexPJ_NameM) deleteallmenupnmeReset>Namesο resetmenu^refresh_layout_buttonsgrnmeNlll data_buttons,my_loc{ActionRtitle~celltopcellleftH buttonsizeRTop5VerticalAlignmentʡBoldxlLeft9AddShape, msoShapeOval͖ ShapeRangeWeightFill, ForeColor SchemeColorxmycolor IsMissingBordersC"xlThinwxlTopxlBottom?V_Color,PatternixlSolid7nPatternColorIndex xlAutomatic@ makefalse`mysheetQmyrow>mycoldata_mod layout_sampleZmyname mymeasnrunData*getData(rr_Buttons]AutoFit& plant_infot infoMatrix flowMatrix0 fixedMatrix FormulaR1C1Si_flow}> flowrange޸myflow-laymakerowseries. deptrangelaymakecolseriesHmatricesRR_start.CC_startRR_stop#CC_stopPrefixFirstval7GV_TypeuzV_Border)FillDown9T FillRight DataSeries6WRowcolxlRows xlAutoFillD xlColumnsh laychgmatrix`MatName`cc\RRolde3CColdInsertrShiftxlDownUDCopyʿPaste ClearContents{xlUp xlToRight|xlToLeftWYget_putgetFacilityInfofixedrngYfflowrngcolorrng%U inforanges]n_reqcostrng fixed_locbzflowcostcol_get_sequenceOptimize_dialogeRun_layout_comb_formulasvalrangece_seqAddresslayout_search_combgv Data_CB_Click Label26_Click{Data_CB DataRand_CBb Density_Box@Workbook BeforeClose~;_Defaultj _B_var_LeftQ _B_var_Chr\;UserFormNOK^Label1,Label2,Label3,Label4,Label5,Click InitializeNFrame1Frame2Measurew _B_var_LTrim& _B_var_LCase'D_Frame=(e )! +   = '$ai  .2  *A\y˴q@$@`H @ P H@ d0* pHdlayout+,Progra m to , departments in a facility@V`rog am t lay u dPepr m ns+inafciU7iy[?i =.   ;GH  <xstdole>U s7dTlK h^*\G{00020430-C 0046}#2.0#0#C:\WINDOWS\system32\22.tlb#OLE Autom`ation0MSFor ms>SFFrs3 ED452EE1-E08F-101A-8-02608C4 D0BB4EFM20.DLL#Microsoft B @/ Object Libr@ary/;"1?@:@@00}#0@# 5h0 A422CB84C-DA0F-4CEF-9FBE-D12A2DA5DB796DOCUME~1\Barajin.Com\LOCALSTemp\VBE\DU.exd<".E .`M ËOfficċOf@ic5‹ A22DF8D0@25BFAiB-BDE5JAA42H2EFiles\10mon GiShared\OFFICE115Oq& 9.0 r@""}^ThisWorkbookG T@_is"WOkbok2` (H1pY!X",""!rSheet1G Se,t1 a2  plant_modGWb!_oo`2/8/\ %`trans_to_%G"tbn1_`o_MaMi2 y/p/,AL"DataDi alogG@ZLyED`t`Da@*A¶m2oo;(*ءJDecl s#]DJc=rbi ?-#]#]/U)/> SelOpAU!c4O`t'os_N2 eeCtK/vwp%=8?8 PSolu _# G;o!_Jn2 I _)1witchV_(wth_3(./lp!gɿ2  & 0>d_G6=d 92?i? ;cmnEc`lu0On?> ./? MU  acontrolGbX6l.2?7_\`dL#`Md@a`m@vd92RL=̪KrPkPImr+s5=i&get_pTutgGt@p}P t _%2_<{OcombAmpv97=`M0ILmize_Zdk8eSm`zP_Pi?3M3Md n_ -0] T?M rU~~~~~~~~~m a          +Program to layout departments in a facility????????????????RMCMsisjXBXTxstepYBYTPlantlayout_new_plant plant_buttonsLayDept_columns FindMPWS2 get_col_infogetFacilityInfoConvertcol_get_sequencedisplay_layout_iterput_layout_parameterscol_put_sequencecol_msgcol_show_lines layoutAddLinelayoutAddLine2 layoutfixedlayoutAddCirclelayoutcirlesdeleteshow_flow_lines transitionperform_checksFDtDhǬQ^F&LL8 L7IQDFWorkbook workbook_Openworkbook_beforeclose add_omie_menuOKdelete_omie_menudelete_omie_itemsput_omie_index @ Facility Layout checksmFF1YdFeFCaption OM_IEfF Credits OMIECreditsSubgFhFChecked1h Add OMIE... Process Flow MRP _VBE6.DLL AY x Ai  Index "'J,'/ ~1HG ,/J/- getdata "5A-G '5DJ J/E'F- ,refresh_layout_buttons /1('1G (1F'EG- FLcreditssub layout_samplegetDatarunData plant_info flowMatrix fixedMatrix infoMatrix data_buttonsC  D"#    $(x,048<@DHLPTX\`d8 plant layout plant pl Delete _New Layout... _Layout Buttons ~1HG ,/J/- _About Add-in ~1HG ,/J/ 5A-G '5DJ 71'-J /1('1G..."[Cu@3E%wnӌ rTJBCd^ e|/mFjW9TqLgD(xE?\OBDAm>4HVZB7goaBIFȏ[qJ eUserFormA5{7MBrZ F3Dynamic ")"pҋB `NameBox!-6S`  Range #{lFWJO"-?@Label1Label2 LinMeasBox NoDeptBoxLabel3Label4 NumFixedBoxLabel5BҋB ` Random_CBCancel Cancel_Click Label1_Click Label2_ClickOK_ClickUserForm_Initialize pCҋB ` ProductionҋBs~xK*y           rU ~~~~~~~~~~~~~~~~~~~~~~~3Q~~~~~~~~~~~~ &&[NWBi ) a q 9i a  9ia Aaa &%&9&a&&Ia Qya QQ)QQQyQa&%Q&a   ! A i ) I i a    1 Q 9a   ) I q Iyaa  Iq )ya  q@@@@a  1Iy)Qy )  ThisWorkbookSheet1 plant_modtrans_to_facilityLayoutDataDialog Declarations SelectOptionsSolution_Option Switch_Dialog trad_layout column_layoutcontroldata_modmatricesget_putcomb_modOptimize_dialoglayoutF /C:\PROGRA~1\COMMON~1\MICROS~1\VBA\VBA6\VBE6.DLLVBAeval_col_layout 1 Y0F4D:\Program Files\Microsoft Office\OFFICE11\EXCEL.EXEExcel a@0FC:\WINDOWS\system32\stdole2.tlbstdole qP.E .`M C:\WINDOWS\system32\FM20.DLLMSForms QQy`[JuIG0xP 1C:\DOCUME~1\Alireza\LOCALS~1\Temp\VBE\MSForms.exdcol_layout_initial 1QYpL-[DR?C:\Program Files\Common Files\Microsoft Shared\OFFICE11\MSO.DLLOffice a  eval_layouteval_trad_layout layout_maintrad_layout_main trad_eval forced_switch trad_switchget_layout_parameters CentroidsdistanceMatrix computeCost switchDep Make_Switch replace_sjY_FirstX_First col_layout_maineval_layoutcomb col_deptscolor_layout_rangeswitch_savings col_switch  FLcreditssubchecksm smadditems smdeleteitems deleteallmenu resetmenurefresh_layout_buttons layoutAddButtLayoutMake_BordersLayoutMake_ColorlayoutInitializelay_checkrange lay_scroll  make ` m#=h8+3qG?,2qLy''y' -5A-G '5DJ 71'-J -/1('1G... ~1HG ,/J/_ _5A-G '5DJ 71'-J _/1('1G... _~1HG ,/J/ 5A-G '5DJ 71'-J_ /1('1G..._ EGF/3J 5F'J9 >FH4*G 4/G *H37 9DJ16' FH1J *',1 @/'F4/G 5F'J9 /'F4'G "2'/ B2HJF 1385/11/25 n(1'J /J/F /3*H1 'D9ED EJ *H'FJ/ (G "/13 0JD E1',9G FJ/ www.barajin.com About Add-in A`  AS  J/E'F '1.'FGFWorksheetsName _facilityActivate Sequence A1 _layout Shapes CountCutiֆjP(Gj ܹ  LPlease enter the number of departments \The number of departments can be no more than  ZThe number of departments must be at least 2 ^The number of fixed points can be no more than  AE F Select pThat sheet is already defined. Do you want to delete it?Columns ClearButtonsFF '7D'9'* ~1HG ValueFontSizeColorIndex Offset F'E ~1HG _name /unit *9/'/ /~'1*E'FG' _number ,*9/'/ /~'1*E'FG'J +'(* _num_fixed H'-/ 'F/'2G J1J _dim A:AAutoFitInteriorPattern "PatternColorIndexBorders Weight AP  '7D'9'* '1.'FG H'-/  _scale Cells &HorizontalAlignment 7HD =ROUNDUP(RC[-1]/ _scale,0)FormulaR1C1 _length 916  _width  E3'-* =R[-2]C*R[-1]C _parea $'7D'9'* /~'1*E'FG' F'E F/V E3'-* 3DHD G'MF /~'1*E'F 4E'1G 1 LayMakeVectorlaymakerowserieslaymakecolseries laychgmatrix D Series _depts V Fill _fixed ROUNDUP(RC[-1]/( _scale)^2,0) Formula _darea _info   RowcolTypeDataSeries GeneralNumberFormat = E'*1J3 ,1J'FG' E'*1J3 G2JFG G' FROM TO =INDEX( _depts,  ) _flow _cost AQ  transition *91JA E3&DGTopLeft "VerticalAlignmentBoldAddShapeCol_OBShapeRangeLineFillForeColorSchemeColorOnAction Fixed Points x-Prop. y-Prop. _fix_loc _fix_flows &G2JFG G'J FB'7 +'(* _fix_costs% A'JD (sheet) /J1J /1 -'D ',1'3*. "J' EJ .H'GJ/ ,'J2JF A'JD A9DJ 4H/  EBJ'3  FB'7 +'(* XThe active sheet must be a layout data sheet ZSum of areas Exceed Available Space in Plant.C7#_>G^ez~߫b;~I t_D"dJPa~4}[DWVPz]rSҧ6Fjj@!v length_box Aisle_width width_boxFill_CBRҋB `Trad_OB Euclid_OB?F`MeasureRect_OB Init_Blank_OB Init_col_OBBGWK1߫ QP)"XFrame1Frame2 Col_OB_Click init_sol_set Frame2_ClickInit_col_OB_Click Trad_OB_Click  bThe aisle width must be an integer between 1 and  .$ ,/'HD E1(H7G EH,H/ EJ ('4/ "J' EJ.H'GJ/ ,/'HD ,/J/ ,'J2JF "FG' 4H/F 71-(J/E'F) 'HDJG 1' (' ~1 1/F 3DHD G' (' '9/'/ /~'1*E'F G'J E1(H7G *9JJF FJ/.(1'J /J/F F*'J, G1 E1-DG EJ *H'FJ/ ,/HD 1' ('2.H'FJ FJ/ _cw 8The maximum plant length is  6The maximum plant width is ColumnWidth 7HD (1 -3( 3DHD 916 (1 -3( 3DHD "E3'-* (1 -3( 3DHD G2JFGFormula _value 0 :1H4 -D _method &F-HG J J/E'F 'HDJG "/~'1*E'FG' ~14/G 1H4 E-'3(G E3'A* :*9/'/ 1'G1HG' _num_col 916 /~'1*E'F _plnt WidthRowsRowHeight *H'DJ(AlDEP) 1A* Aisle .'DJ Yes No E3*BJE ~D'FJ /~'1*E'F 1F A6'J EH1/FJ'2 A6'J *91JA 4/G E12*BD E-H1x E12 +BD E-H1y 1/JA _depts, ,1) _darea, _color _area_def _x_cent _y_cent _seq $col_layout_initial &'J,'/ J/E'F *5'/AJ eval_layout ('2.H'FJ show_flow_lines FE'J4 ,1J'FG' layout_main -D E3&DG Forced_Switch (,'(G ,'JJ /~'1*E'FG' layout_new_plant (*9HJ6 E4.5'* '1.'FG Cellsc__SRP_1zLayoutDataDialog"3PZ2U=2Ufko24ystepd_startd_stopi_indexi_color i_centroidAAmydeptk_AA newMethodPJ_Namemy_locActiontitlemycolorV_ColormysheetmyrowmycolRSCSWSxNewiquit show_dept show_initmm show_iter show_distance show_adjacentstart_xstart_yend_xend_ymyflow my_radiusmyindex )Cancel newActionmynamemymeasi_flow #" $i#( $a$8 $$H $%XRR_startCC_startRR_stopCC_stopPrefixFirstvalV_TypeV_BorderMatNamerrcc $AOh $Ox yP"0    }",R KQDBTahoma (:8Cancel!$6<OK$!(2HLabel1O{$$NameBox (2TLabel2xN( $NoDeptBoxR(2pLabel3xg ( $LinMeasBoxRg ( Random_CBx( 2l Label4xO ( $NumFixedBoxS ( 2 Label5x (D:HEOuTahoma( *'/aEOuTahoma(*F'E ~1HGeuTahomaH,1{04* *9/'/ /~'1*E'FG'{uTahomaH,{0P*<H'-/ 'F/'2G 1(ft., m, etc.){uTahomaH,{0dF:0{0','/  E3&DG (G 5H1* *5'/A)5TahomaL*8*9/'/ FB'7(/~'1*E'FG') +'(*{uTahomaH,{0+z*H,G : B(D '1 *'/ ('/  A'D(Sheet) .'D ('2 1/G ('4/ N5Tahoma Microsoft Forms 2.0 FormEmbedded Object9qVERSION 5.00 Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} LayoutDataDialog Caption = " " ClientHeight = 3750 ClientLeft = 0 ClientTop = 0 ClientWidth = 6405 StartUpPosition = 1 'CenterOwner TypeInfoVer = 15 End CompObj5aVBFrame+SelectOptions[G8=2U2Uff      !"#$%&'()*+,-./0123456789:;<=>?ABCDFHIJoLWNOPQRSTUVXYZc\]^_`abKdefghijklmnpqrtuvwx{|}~so7=i08; n``=2Upe?2Ufo:<oKMCompObjpCompObjJO#aVBFrame%3CompObjpi36C n```2U`2UfoBDSwitch_DialogURG2U>`2Uf*oQS,CompObjT9a5Tahoma(*/~'1*E'F 1 {uTahoma(*/~'1*E'F 2 {uTahomaH, {0H, {0=>?@!$6<OK!(2Label1(2HLabel2(2HLabel3E$$Switch1$$Switch2Es Microsoft Forms 2.0 FormEmbedded Object9qVERSION 5.00 Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} Switch_Dialog Caption = " ρ" ClientHeight = 2400 ClientLeft = 0 ClientTop = 0 ClientWidth = 6405 StartUpPosition = 1 'CenterOwner TypeInfoVer = 7 End VBFrame;/Optimize_dialog W>`2U@r2Uf@koVXFD,  }",R KQDBTahoma(:,Cancel!{(2hData_CBc, 2dDataRand_CB(2PLabel25ea ( ,Density_Box (2Label26; ( ('24*EOpHF0*.55 G2FG G' 5TahomaDF0'7D'9'* *5'/A5Tahoma0*'D G2FG(%) uTahoma@H,{10'F EFH 51A' (1' 1H4 G' /1 E ('4/ G /1 F3.G G' (9/ '1'&G E 1//.(O5Tahomartuvwx{|}~bedded ObjectForms.Frame.19q\F4{0'DH1*E Traditional Craft5TahomahF@/{01H4 Opt.sequence('DH1*E ALDEP)5TahomaXJ  "} 'DH1J*E -D E3&DGblR KQDBTahomaCompObjpCompObjAF aVBFrame*Solution_Option P1I2UG2U,  &@}",' ¯NCh0 (:8Cancel!(D:HEOuTahoma( *'/oEOuTahoma\*H916 /~'1*E'F((1 -3( 3DHD)(1' AlDEP {uTahomaH,{0H,{0D* n``Microsoft Forms 2.0 FrameEmT$|Trad_OB$Col_OBB" .916 '1.'FG((1-3( 3DHD){uTahomaH,{0D*07HD '1.'FG((1 -3( 3DHD){uTahomaF n``Microsoft Forms 2.0 FrameEmbedded ObjectForms.Frame.19q\F2K{0/~'1*E'FG' (G 5H1* E*H'DJ)5Tahoma\F4{0'1'&G 71- 'HDJG *H37 '1(15TahomaXJ  "$} F-HG J 41H9 J/E'FR KQDBTahoma`( !|Init_col_OB.{, "|Init_Blank_OB CompObjYPaVBFrameR%PROJECTwmWoPROJECTZad!O0 '3*A'/G '2 -/'+1 916 EEF (1'J 'DH1*E ALDEP 5Tahoma n``Microsoft Forms 2.0 FrameEmbedded ObjectForms.Frame.19q<Fp {0.7 E3*BJE5Tahoma8Fg {0'BDJ/3J5Tahoma Microsoft Forms 2.0 FormEmbedded Object9qVERSION 5.00 Begin {C62A69F0-16DC-11CE-9E98-00AA00574A4F} Optimize_dialog Caption = "Optimize" ClientHeight = 2580 ClientLeft = 0 ClientTop = 0 ClientWidth = 6405 StartUpPosition = 1 'CenterOwner TypeInfoVer = 8 End ThisWorkbookThisWorkbookSheet1Sheet1LayoTJ  & }] 1H4 E-'3(G E3'A*R KQDBTahomaX$%\Rect_OB{( &XEuclid_OB3 $6<OK!(2|Label2!( $Aisle_width.'? $#Frame1( $width_boxth.'(2dLabel3q    ! "$&'()+4-./01235678:<=>?ABCDEGHIJKLMNOQSTUVXYZ[\]^_`bcdefghijklmnopqrstuvwyz{|~Root Entry F`܄IO}1Workbook^O/_VBA_PROJECT_CUR"\62U2UVBA)2UPZ2Ught = 5805 ClientLeft = 0 ClientTop = 0 ClientWidth = 6405 StartUpPosition = 1 'CenterOwner TypeInfoVer = 19 End (   }, ¯NCh0$#D_FrameOO n``Microsoft Forms 2.0 FrameEmbedded ObjectForms.Frame.19q\F2{0*HBA /1 G1 9u !"#.%&'()*+,-/02345678no;F=>?@ABCDE:GHIJKLMNOPQRSTUVWXYZ[\]^`jbcdefghi_klmpqrtvwz{|}~ E1-DG '2 (G(H/15Tahoma`F8({0(/HF *HBA(FE'4 *F,G FG')5Tahoma@J   } FE'J4h.R KQDBTahomaX$|Stop_OB( Display_OBh.(D:HEOuTahoma(utDataDialogLayoutDataDialogDeclarationsDeclarationsSelectOptionsSelectOptionsSolution_OptionSolution_OptionSwitch_DialogSwitch_Dialogtrad_layouttrad_layoutcolumn_layoutcolumn_layoutcontrolcontroldata_moddata_modmatricesmatricesplant_modplant_modtrans_to_facilitytrans_to_facilityget_putget_putcomb_modcomb_modOptimize_dialogOptimize_dialogID="{5B7CBE7A-9B53-4AD8-86C0-B64D821ED06C}" Document=ThisWorkbook/&H00000000 Document=Sheet1/&H00000000 Package={AC9F2F90-E877-11CE-9F68-00AA00574A4F} BaseClass=LayoutDataDialog Module=Declarations BaseClass=SelectOptions BaseClass=Solution_Option BaseClass=Switch_Dialog Module=trad_layout Module=column_layout Module=control Module=data_mod Module=matrices Module=plant_mod Module=trans_to_facility Module=get_put Module=comb_mod BaseClass=Optimize_dialog HelpFile="Macintosh HD:Documents:production" Name="layout" HelpContextID="0" Description="Program to layout departments in a facility" VersionCompatible32="393222000" CMG="1A18143C2A402A402A402A40" DPB="34363A5E4E794F794F79" GC="4E4C404040405B415B41A4" [Host Extender Info] &H00000001={3832D640-CF90-11CF-8E43-00A0C911005A};VBE;&H00000000 [Workspace] ThisWorkbook=0, 0, 0, 0, C Sheet1=0, 0, 0, 0, C LayoutDataDialog=0, 0, 0, 0, C, -210, 42, 446, 400, C Declarations=0, 0, 0, 0, C SelectOptions=0, 0, 0, 0, C, 0, -18, 656, 483, Solution_Option=0, 0, 0, 0, C, 0, 0, 492, 337, C Switch_Dialog=0, 0, 0, 0, C, 22, 29, 514, 366, C trad_layout=0, 0, 0, 0, C column_layout=0, 0, 0, 0, C control=0, 0, 0, 0, C data_mod=0, 0, 0, 0, C matrices=0, 0, 0, 0, C plant_mod=0, 0, 0, 0, C trans_to_facility=0, 0, 0, 0, C get_put=0, 0, 0, 0, C comb_mod=0, 0, 0, 0, C Optimize_dialog=0, 0, 0, 0, C, 88, 116, 580, 453, C SummaryInformation(]x DocumentSummaryInformation8}CompObjmOh+'0 PXp Facility LayoutOR/IE Paul JensenBarajinMicrosoft Excel@$@'~2U՜.+,0 PXt | University of Texas  Sheet1  Worksheets F!Microsoft Office Excel WorksheetBiff8Excel.Sheet.89q