设为首页收藏本站

最大的系统仿真与系统优化公益交流社区

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6864|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
1 Z4 {+ m5 f0 k5 q
& ~  J) b, Y% m/ y3 x底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去9 j9 x# k: M5 c
2 V" p; \) R+ k
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!0 d* h) u" J  K1 ?7 U5 f% D0 Y  P9 ~. n

2 ]. L, c; c+ N. I& @
--------------------------------------------; n( o6 B$ e9 v/ ]
begin P_something arriving
% h8 x0 X3 U  z   move into Q_wait2 [# |3 D% x1 E/ h  F
   move into nextof(Q_mA,Q_mB,Q_mC)
2 N$ G! P7 x6 `& \  D* o   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
: X# K0 G* y3 g" `; Q5 k1 _$ j/ |  o  Q   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
: l. u5 a& D' i$ u) ^9 F6 Y5 w   send to die% H3 w4 X  o0 Q- M9 i
end

% l9 f1 P  m, a8 L! m 5 N' }' B$ E0 l' O- ~8 Z* v  ^
begin P_mA_down arriving
2 I# p& N6 Z  I5 f5 H+ s1 Y  j   while 1=1 do ) c0 |! p. T# k% z5 J
   begin
1 F6 S5 h% U( w   wait for e 110 min. ^6 K" B, \+ t' C7 x; b! G
   take down R_mA7 T1 v$ n) ^6 @9 f# o" ^4 G, z( x
   wait for e 5 min: L% W/ Y" ?, _4 f
   bring up R_mA' v% K" I; B/ C; {" R
   end# N& {, j6 v  O* P8 N9 `$ I9 I
end
1 v# n. q! u- C+ d2 a. M! k) k0 F

" }/ [# h( F* P; B9 Z$ vbegin P_mB_down arriving4 A: R! q3 k- }- O. }& `9 v
   while 1=1 do
9 z4 p+ W4 C& m# y. V! G' i9 [0 \8 q( Y   begin; ~! q0 b! M5 j6 A- N- n/ J
   wait for e 170 min
1 G: R5 R) z; v1 a   take down R_mB: m4 ]- U2 u8 f, a, w
   wait for e 10 min
) h# h1 l; i0 s; L   bring up R_mB
: c2 p* e1 Z/ ~" X0 c2 U& k" i   end. q& t0 R/ Q( o* `0 M
end

: X. ]; x6 O+ D% e( z: w
8 Y- @8 h  F( P( y7 Xbegin P_mC_down arriving
; S4 q5 b$ M/ ~- W   while 1=1 do
% N1 v1 a# H' i' }0 X: X/ h   begin4 |5 A, g2 A/ F( h5 u3 W, ~; ~- P
   wait for e 230 min( j: V7 \/ q0 S( ]
   take down R_mC
8 E% n8 a$ f! i1 _# g- A/ j% {   wait for e 10 min' ~- e4 I5 K1 E' E. }" Z/ w! B, I
   bring up R_mC
9 V! Q: P9 X" ?3 B   end, {* |" E7 W5 D- G8 c) ~! m% B
end

1 Z2 S6 t- t0 f ( u9 r7 Z* N! U6 l/ L
begin P_mA_clean arriving
7 g) {; ?) O$ V) n, ~. O' W   while 1=1 do
# ?  E& A' Y& P" n- V( \* x) ?1 X   begin
1 {9 T2 U' R7 K( C! C4 i* e   wait for 90 min
" P9 N2 D# \8 O- d7 |  }   take down R_mA3 Z9 \) ~: o+ U. S) @+ K
   wait for 5 min- v6 c/ E1 f$ T$ O: I7 ?
   bring up R_mA% X' v9 s% J3 Y/ m
   end$ s: W' p( a0 j; B$ \" [
end

9 v/ }7 P3 V& @: I
) e0 X( @6 y3 `; f, qbegin P_mB_clean arriving# Y* W: |0 L; r7 I2 M
   while 1=1 do
1 b& z7 r5 _" `6 q  P5 T   begin; |$ ]- @) f$ z( D
   wait for 90 min' T) X3 I4 j6 v2 {1 B8 g) F: g" J& D
   take down R_mB# H9 O( \) G1 L3 v; I/ t5 _+ _
   wait for 5 min
# G* M! i, P1 _   bring up R_mB" j4 x* A- @9 a- y# L2 L
   end
0 Z- {- {- |5 y; X5 T1 ^+ Aend
- Q" j$ O, {, Q' }4 W- z2 R  O& f
# U9 G7 ?0 F' X: I! ^
begin P_mC_clean arriving
. e# L3 U6 S+ m" d  V   while 1=1 do* O1 L& Q! ?3 {2 i) _1 C9 n
   begin$ Z# s9 s- X, P6 y$ E/ v
   wait for 90 min( i9 ], B# u; u" z! ?% n) h) j
   take down R_mC
2 s# y$ u; s1 S# M   wait for 10 min0 H9 a. R; t9 m: h$ S, R
   bring up R_mC& r$ G5 V% c0 ?' B; B
   end
: z2 F0 _+ z2 H1 @8 ~! Yend

$ {' l9 M0 B, B3 A8 U; T; N, a7 E----------------------------------------0 m& c+ t1 a& E6 k; L2 t5 |0 U8 U
( n* J6 F) n% @1 N
Exercise 5.9+ H6 A: q2 J. U- D& t9 t

5 X- R9 q- B* l2 v/ s9 V: @% n1 V. B) ?# `* t$ [" ~0 ^( t9 O
Create a new model to simulate the following system:
2 K! H6 O1 U% a# w# YLoads are created with an interarrival time that is exponentially
! R% ~# \6 y" S# s; x+ l. \$ Fdistributed with a mean of 20 minutes. Loads wait in an infinite-
  K2 y" X9 h/ ?. t0 Pcapacity queue to be processed by one of three single-capacity, - a* n: f& n5 |3 i, `1 Y4 y
arrayed machines. Each machine has its own single-capacity queue ( L* F# z1 v, C* m1 g( R
where loads are processed. Waiting loads move into one of the three
- J& F5 ^- _4 r% Pqueues in round-robin order. Each machine has a normally
! n5 |8 P/ E1 [distributed processing time with a mean of 48 minutes and a standard 7 Y4 ~# P+ E2 `( `. J( O+ t
deviation of 5 minutes.
0 G3 D0 W% ]+ n- w" PThe three machines were purchased at different times and have 9 ]5 G; ^3 O9 `0 E) p8 `2 j
different failure rates. The failure and repair times are exponentially + G* A: s! {3 x) |) b# l3 M
distributed with means as shown in the following table:
8 m+ C, t  b# r7 P8 `8 C' sNote The solution for this assignment is required to complete
, y6 d0 G$ h4 texercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
. i- R$ f+ U4 j4 n* O8 _your model.
7 A+ T; l# o+ A  V- y; d6 Q( }# ~, d- x( l1 A
MachineMean time to failMean time to repair
0 j1 X0 A3 h$ jA110 minutes      5 minutes+ p. r, W* P! n# e4 l
B 170 minutes     10 minutes4 K: T; E8 B/ R" l1 m# n
C230 minutes      10 minutes
/ N* {- h+ f, ?9 @  a- J$ k8 ]
; ?6 ?( l8 C0 h1 @& A/ pThe machines also must be cleaned according to the following
' a" O, Q/ Q+ Tschedule. All times are constant:
* `8 g3 Z4 p" k6 B8 z
% ?" @9 l# N7 M8 d3 KMachineTime between cleanings Time to clean' T& [: L  {. I2 y* S
A90 minutes        5 minutes
; y: @/ e0 _. s! J8 v( ], b' mB 90 minutes       5 minutes2 @4 }9 V/ N1 T9 }
C90 minutes        10 minutes
9 T( [+ B' b. t, T+ A5 Q7 e) l5 {
' l2 f& p1 }! [' }6 N7 O4 x6 ZPlace the graphics for the queues and the resources.
% A* Y  A5 I! jRun the simulation for 100 days.* X4 f# y; o- i" w/ c) ~' K
Define all failure and cleaning times using logic (rather than resource * C7 c" Y- J& t! _1 i
cycles). Answer the following questions:" H( k) C8 b7 P$ l
a.What was the average number of loads in the waiting queue?. g) c* M3 H# q0 A# {! k
b.What were the current and average number of loads in Space?
' @4 B7 n% m" D6 h9 Q1 m! sHow do you explain these values?
( z1 Z# R. {. [1 p( c

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉6 ^+ _) d+ W4 w8 s
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)" k- J+ S6 Q, P; d! c% Z4 M
这行好像也不太对,各位先进觉得如何呢?
/ n% k7 E6 k. K' W$ S5 P( E5 d5 @; j% T$ p0 w7 R
begin P_something arriving+ |) N* ~0 c( s& U+ [1 o
   move into Q_wait) z) n, `! f* I9 @) K, c! y
   move into nextof(Q_mA,Q_mB,Q_mC) , [7 T9 l( M2 N5 `4 W
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
0 d. A8 @* n; [" x  g! c$ X& u   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) % F" X. L- x$ f' D) y2 D+ i
end
8 x$ h7 `3 V3 x( B+ Y* H' l$ G, {( K
begin P_mA_down arriving; |+ a6 d0 |8 Y- g
   wait for e 110 min
0 b! U/ R+ K. E. j. Z4 c. G. v4 O   take down R_mA
  g& k9 W& y3 _( h* k   wait for e 5 min
6 [* F" \0 A$ r# Q! {( x6 h   bring up R_mA9 c7 o& A' }+ X
end% f# c! R) x1 K1 }& ^+ w+ }% k
: L- ?6 E- q, y- c: @7 C
begin P_mB_down arriving
. k. L1 E0 ?- r- P   wait for e 170 min
5 Q& O0 {$ L$ s1 Z   take down R_mB4 S/ r; d* q6 ^" V6 Z6 h& r
   wait for e 10 min3 s5 \* t) U! A  c* d/ h4 r
   bring up R_mB; c$ P4 l9 Z1 `% O+ L. B- B4 G
end
2 g3 L, w$ z/ N* m: f; v
: n! I) @$ x1 [. u" Jbegin P_mC_down arriving8 X/ I6 n% r: y) G2 m, i
   wait for e 230 min
. D2 r6 m; d( I' N. s/ K6 Z, c! Y   take down R_mC& H/ ]$ h, d' j' J" L
   wait for e 10 min9 q7 Z/ X1 i* K& Q; F
   bring up R_mC' b- S0 J  D0 }; ]( _/ @* m' S7 `. H
end
! W' T' h1 S9 K1 R1 `
( ?& Y: O  a2 B2 Qbegin P_mA_clean arriving% E( [; C! Q" a, g6 X" m! l; W' D
   wait for 90 min  M+ R  d$ Q8 ~4 {: P
   take down R_mA
- P, p$ \- w0 I$ b# G( y' l& e   wait for 5 min' w- L5 ^& ?! ~
   bring up R_mA
* A8 N8 I% E2 U( N+ d) v1 iend
7 B! w- W2 t3 h
0 y( J# R2 \* ?; e5 Nbegin P_mB_clean arriving4 g( n! l1 L8 M. v. P( m
   wait for 90 min7 C/ y4 @4 i+ O  j8 _, U
   take down R_mB! X6 H( z# G$ h1 {; y0 W
   wait for 5 min
3 F' X) d7 N# h; r0 @$ e1 F: s   bring up R_mB
8 p( A% V$ \6 B0 Eend
" W2 \, J+ }. i# H1 x) j
# M6 W' i( {& c+ ?& g* |begin P_mC_clean arriving
# s# G4 r0 ]* B/ a8 S   wait for 90 min* w! D0 F8 e6 ~- W' A
   take down R_mC! T" j5 Z$ w% _: {4 \% l+ M
   wait for 10 min* N  x/ c) Y$ d& R: |
   bring up R_mC" \0 q. M. e( U% v+ G2 \) n. c
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving: D9 g$ L( [" D* w3 ]
   move into Q_wait
8 T0 `! b1 R7 i7 S0 c; q   set A_q to nextof(Q_m1,Q_m2,Q_m3). a( d3 E8 Z# j2 R/ @. ^
   move into A_w
5 ^+ W2 w( s4 p5 a   if A_w=Q_m1 then use R_m1 for u 48,5 min9 E6 D) I% f5 w! V! M* K
   else if .....then use ....for u 48,5 min
/ Y0 g+ u, T: J   else if .....then use ....for u 48,5 min  . B3 Z  S. C/ Z  i) H
   send to die
% Z# V+ g1 t" W1 B9 v) C( Hend" O2 D& Z; Y. O3 t6 O
2 M: L7 d, G1 R4 v8 t8 m
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|SimulWay 道于仿真   

GMT+8, 2025-9-14 00:55 , Processed in 0.012699 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表