设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8211|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
9 t2 S: ^0 A! b( ^3 E# I5 {4 r6 s8 D6 l. V6 e0 o; |5 g
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
' {# v& |4 z% N" C2 h3 s/ L+ B! L. x: ?" s
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!1 x: ?( O; O- M7 ?
3 z; y8 U' y' t& ]$ [9 d
--------------------------------------------
5 R% Y; P1 w( P$ @/ @begin P_something arriving
4 y  y# G' }' {4 U" t; E   move into Q_wait
/ n, P1 B# a4 Y3 m- }   move into nextof(Q_mA,Q_mB,Q_mC): @7 {9 [+ g* t0 [
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min, l, V6 d9 W0 f; o, X, X" c/ Z6 g
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
5 I$ D8 Z, G9 q  p* R   send to die
# V; a" r7 I1 H9 r: Kend

% \: c! v. v" |  N
. i( T0 x8 a% L: Ybegin P_mA_down arriving
* O; V0 ~" w/ p+ i, z- P   while 1=1 do
6 M$ f( P9 B; D+ z8 x/ a/ R2 t! L+ K   begin7 r( w! b, a* Q
   wait for e 110 min
: v; U: [6 x2 T; Q" S: J   take down R_mA% S: y, N5 _$ P& Z1 t/ D5 t* F
   wait for e 5 min8 ], E. n' W# B5 z: t4 h7 H7 U' M+ J4 M
   bring up R_mA
; _/ J, F8 A! C   end
% R. U  T+ Q' g; x- A) vend

# ?" n# _0 \. N
& p" X4 P- L* |) b5 ~3 zbegin P_mB_down arriving1 w) K6 _9 h" e
   while 1=1 do+ ^: Q& ^1 o& D8 Q* ^, P
   begin/ E4 w- }$ Y2 Q8 W% U( A
   wait for e 170 min& n# T% c$ e! G( F( F' J' y
   take down R_mB  @$ m  n# N5 D$ H0 I- U- P
   wait for e 10 min
7 }7 B5 ~+ u6 R( d   bring up R_mB
  B, X7 G% l/ F   end
9 m  |7 a* Y2 zend
( E' M% ~! V8 \/ ~

! l0 u% N7 X. m8 ibegin P_mC_down arriving4 q- L! u2 ]( t0 Q( Y
   while 1=1 do * S0 g# k  }/ Y" Q! K* f' e
   begin& c$ D9 g, j( Q" ], C
   wait for e 230 min
$ p2 J2 a0 o5 E* B* `/ B; D   take down R_mC) F* Z9 N3 ]3 ^! ?
   wait for e 10 min- ~( T* c6 Z: {  Q6 h& H. n
   bring up R_mC
4 a! ?) d  ^. l, t/ z; v& B. O   end) f4 J8 j" ^$ N$ I* ?. s
end
- Q5 G" X1 F, Y' M7 G! r; K

. |: b- ~0 Z4 V; d# b" e; Nbegin P_mA_clean arriving
  Z# Q! K1 r& ~! E' W   while 1=1 do
( [: v( i4 y* m1 d& }; M9 B2 E   begin/ L9 z+ X' q' ~4 W
   wait for 90 min
2 l( Z2 I: X% n8 F2 {   take down R_mA
7 |6 R- \1 n5 F" e/ T, p' Q& \   wait for 5 min
9 R$ T& l9 B) a8 X% \   bring up R_mA/ T* u2 [$ \" m# V% w1 `
   end8 R* D: f" U2 |, R
end
9 U% Z' }7 N( }! O7 b2 m

# G" H- a3 Q6 n5 Z% ?begin P_mB_clean arriving! `! n1 G7 |! X
   while 1=1 do$ Z3 ?' ^$ ~6 _' S5 C
   begin
) d) Q6 q7 o5 c' r2 \' R   wait for 90 min/ R- d3 E! t8 V/ l
   take down R_mB
% X: z% j% n0 b$ z9 B$ |9 m; P   wait for 5 min" y. X  O# O! |' l
   bring up R_mB; ?4 S$ [- `! q  ~1 h
   end
7 a; T& j5 c, ^) K4 Lend
* m5 @9 v# n0 \6 ?

( o: |9 `( o/ |* A1 abegin P_mC_clean arriving% ]! I9 {( }# N7 ~
   while 1=1 do% S0 P7 h8 y. d4 ^- c/ L
   begin
. Y+ @7 R! o3 j$ y) i, M( u3 g   wait for 90 min
+ z/ [( R7 Y/ a- a4 q- o" J   take down R_mC" `3 s3 o0 U$ H; N$ m; g9 l* |- A2 K2 G
   wait for 10 min
' c/ e. k8 H: O2 s$ Q7 a- e; E* {; n   bring up R_mC
9 y& E( K4 w: i  V! ^3 @   end3 W/ @; j# k- K1 f$ v/ h, A0 L% I& Y
end

0 [/ a  q2 `3 D' U& b----------------------------------------
* L! X3 v9 {4 ]. m. _# K4 @6 W8 `9 @0 }
' x% B2 {  b7 x" B: r, m# ^Exercise 5.9$ E+ C( v- O0 @5 g
; D2 s- E' r# V, z( ~. N7 A
5 d; D, C1 J& c% T2 x" p! j# y) m
Create a new model to simulate the following system:
! C' ~; J3 t) U. s' l9 n5 a' @" }Loads are created with an interarrival time that is exponentially , ?5 v9 }5 F; O4 y+ _4 s, Y( B
distributed with a mean of 20 minutes. Loads wait in an infinite-
8 Z# L% u# w" T9 ]capacity queue to be processed by one of three single-capacity,
. H8 r3 N) E7 G' ^5 marrayed machines. Each machine has its own single-capacity queue . s" N+ W8 N' [+ Q# O
where loads are processed. Waiting loads move into one of the three & B/ t- Q+ |$ T
queues in round-robin order. Each machine has a normally * w6 ~& m' Y; J+ P( L) B6 \
distributed processing time with a mean of 48 minutes and a standard & s$ g* q9 J3 a) I& J* N
deviation of 5 minutes.! A1 g: |6 N* u# a8 ?, B  s$ [
The three machines were purchased at different times and have " R# i! i1 C$ T- p! }/ t
different failure rates. The failure and repair times are exponentially / z/ y! [; e+ X3 m+ j1 g
distributed with means as shown in the following table:
0 j  |" ?0 A; Y' b4 PNote The solution for this assignment is required to complete
9 f6 K( i: S8 B7 p7 C$ eexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
; r& `3 z3 r% E% Oyour model.
$ j" a% A) m4 h! C- j4 p1 D) h. S* L/ z- V0 Q" x
MachineMean time to failMean time to repair
3 N3 K& [% J- pA110 minutes      5 minutes
6 ~; v% i- }  @B 170 minutes     10 minutes$ K8 F5 _& c6 P- l8 E6 _9 {! x
C230 minutes      10 minutes
' K  @, l" l5 [' F& Z
+ L: O: f- x6 @3 y3 iThe machines also must be cleaned according to the following
% N' w" A# P" N7 Yschedule. All times are constant:
" k0 X7 W, ~- u% j9 Q2 N5 e. Q: J" Z1 ]/ s& B5 F
MachineTime between cleanings Time to clean
% ?* H3 u0 }$ w$ t& h% WA90 minutes        5 minutes- F3 q- u1 k* u% F. ]
B 90 minutes       5 minutes
* U  u; G/ ^) G; `7 @4 U" w2 mC90 minutes        10 minutes4 S! R. `" J6 X8 O- K
2 U$ [2 z9 K3 h2 o: ~' n
Place the graphics for the queues and the resources. : n6 C& ]& m5 n3 j- D
Run the simulation for 100 days.5 S; Z) j4 b: r  o% P1 T
Define all failure and cleaning times using logic (rather than resource % \' X! p( u& h$ Q- Y0 c' r/ H, T
cycles). Answer the following questions:
8 t) W/ u+ F9 L3 g% Xa.What was the average number of loads in the waiting queue?
0 i* B! h! w6 g' b5 O5 ]7 u1 R0 zb.What were the current and average number of loads in Space? 0 S' q. r& e4 ?4 x
How do you explain these values?
& `3 e4 ^0 Y  t1 y

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉  @4 u; W  k! F7 |: L
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 e/ K" x$ r* t' z' f# T这行好像也不太对,各位先进觉得如何呢?9 k% j0 |3 a. T3 F

& }6 a) b& N% T9 sbegin P_something arriving
2 T& m, H# u; k  D   move into Q_wait
# o# ^" m; x' l, r- j   move into nextof(Q_mA,Q_mB,Q_mC) ! k6 F6 b6 q2 G8 v' s
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min8 t/ X0 N  F0 |  T: z
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) ( a2 X. G. q2 h( S" f
end
) Z$ ~) {1 C& D# r, l) Y2 L6 x2 {3 P8 {* H% T
begin P_mA_down arriving5 u( r3 q; _' W* `; x* M
   wait for e 110 min" W0 @) V9 g) j$ {+ M
   take down R_mA
+ A4 ]7 T- K1 P2 h6 E   wait for e 5 min
: r. Y2 o, l( L; o- t- K8 w   bring up R_mA
9 M) n; Y; Y- w# ?# L1 nend
1 ?0 @% k$ r5 o. `( f: j; |& O7 p& x3 |' F( _8 n4 H
begin P_mB_down arriving
) A4 |/ t9 p9 v   wait for e 170 min
, H+ d6 z. M0 |4 T3 c% o* O4 O   take down R_mB
5 x% c2 g3 F* L. Y0 p5 k   wait for e 10 min. H: a4 z! ?9 a* Q( R, p4 r/ L( [
   bring up R_mB
% Z" Q- w+ n9 d" ]2 G0 b9 qend
: E' n# x% i$ q7 _- e: V% ~) G
7 \4 G2 o& }; @: F! n8 ~begin P_mC_down arriving
7 b0 _' F* X0 w: n' O8 |0 _9 c   wait for e 230 min4 v9 [+ R& K# v! p4 S
   take down R_mC1 ^, T8 x; Z3 h3 _# X( ~. n
   wait for e 10 min
6 U! |1 G! `. B" c# h   bring up R_mC8 h, c6 T# _8 H, B, Q
end8 H4 c: n- f! b# }- ?- ^2 B

! W2 {3 X- g1 T/ s+ |begin P_mA_clean arriving1 i; V& Q/ w3 o  d" L5 O1 N. C
   wait for 90 min  T" u2 k1 ]+ d1 K; f6 i
   take down R_mA
, k. R/ K6 g2 T( f+ A" v/ ~   wait for 5 min; y4 k( N9 A% p9 [0 j% x
   bring up R_mA
& Z2 N  A$ W- H/ W% v% Iend
6 @( ?" |( B- ^# T1 F) b$ B( u$ ]! P1 E, O( Z; T* i
begin P_mB_clean arriving
7 I4 G/ T( p2 L2 V2 q   wait for 90 min: `9 L: O6 [3 R5 d
   take down R_mB
8 q( B$ q0 X' i/ i- ?   wait for 5 min, w1 Q& e. N7 P  Q% t: w: b
   bring up R_mB
0 @2 w4 J& E5 X: f) m5 @4 Nend
- Z- \% p" ], w* C0 n6 Q
) M5 B4 S( K" j0 _% n: p0 qbegin P_mC_clean arriving. |0 j" F( A8 V6 d5 l$ G& t8 j. Q
   wait for 90 min" j5 e- E. z) k0 P
   take down R_mC* H4 K& C: o4 j8 t
   wait for 10 min9 S. |! K1 b+ L
   bring up R_mC
6 ?  U5 J  N0 O! Send
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
5 e" R# C5 ?- O2 A4 J   move into Q_wait
. z# s- f' i6 K' w4 X5 d   set A_q to nextof(Q_m1,Q_m2,Q_m3)
' ~8 \8 @0 Z( ^: b" _6 j   move into A_w
1 G; n; e( M5 X4 S# r0 `/ R7 E   if A_w=Q_m1 then use R_m1 for u 48,5 min
6 }) N8 x  h( T  A' b6 G5 ^4 N   else if .....then use ....for u 48,5 min
/ w. u/ G, b1 _. t+ X6 t0 N   else if .....then use ....for u 48,5 min  
# x5 g  O, _& l6 X' z   send to die
) G8 T5 ]7 W5 m5 Z% m; @end4 g( ~( O+ p# u5 ]

( u6 K6 F7 V7 \8 b1 A: T供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-27 06:13 , Processed in 0.012385 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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