设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8070|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
9 |5 Z- E4 |! L/ F- ~
+ t* [" a( a) X$ ~  d底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去' Q" W; n0 f, C* X1 l. a
1 ^& t$ U( [) p/ m4 [, r2 W
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!- J4 w$ }! \: t/ D% y5 f
6 g" c5 d. X9 L7 G+ Q& \
--------------------------------------------3 c1 e0 O' u3 u2 @% b! D
begin P_something arriving
9 g' N8 k# w$ j; X) p6 S   move into Q_wait
5 Y# Z1 I# u% x) P1 a   move into nextof(Q_mA,Q_mB,Q_mC)! r- |/ a: {4 G; l+ z# O. B3 F7 o% r) v. h
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
2 r: G" A; D/ C% g; A+ ]   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
$ _2 ^: }5 Z3 U. k   send to die
+ X0 o' @0 R+ ]$ [+ x* Tend

1 c0 M# q6 ~9 j1 H2 M5 M
/ Q* T( j5 [9 m- l% r( ]begin P_mA_down arriving1 Y9 F# M' }$ d* C) \# l1 M$ o
   while 1=1 do + K+ P2 n- y* U$ t) D( T
   begin' X0 Y: P- D& I% ?& K& c8 o) m$ z
   wait for e 110 min
- W  Z( b# y% S9 a& z0 m9 K   take down R_mA
2 S( t. Q+ n2 H+ X  w, @   wait for e 5 min
1 b" u- G1 e; }; u6 X   bring up R_mA6 x4 G: D. |7 `# H
   end$ N& Z/ e# F& i1 ]" G3 O
end

# x/ C" o$ w' {2 Q- g- R * K7 N* B0 V" ~  W5 }4 Z( p
begin P_mB_down arriving, ?  B9 A* {  `
   while 1=1 do0 Q% U4 {5 g) k- e; Q
   begin
5 O7 i( l6 x  F1 m2 @  B   wait for e 170 min
/ }4 C! H; [* C; \   take down R_mB
, @: M/ A- \8 P# l, W. q4 E0 }( s   wait for e 10 min
/ b# k  J$ V  s( u. Q   bring up R_mB
- L8 Y% N! o; o# K7 `" r" B2 {   end( }3 R+ r4 F- ~* G( b* I; S1 {' L/ k
end

) V( B3 ?$ P' v4 n2 {1 o, p ; C2 K( [- f( u' H5 f! ]
begin P_mC_down arriving
* D2 }6 R) w; r. D3 x0 M& A2 l. k$ B   while 1=1 do $ w+ A8 d) @6 _: b" F+ {/ s
   begin
( {9 w, i4 C/ B3 T   wait for e 230 min
1 n+ V" t2 X5 F$ ^5 G! t- a" }   take down R_mC8 q7 C6 M# X: J$ V' j8 M
   wait for e 10 min
9 D2 T4 ^% u+ Z" `: `2 C   bring up R_mC9 z' O+ d  g/ |8 L, y4 G
   end
: B  u4 @0 m( J. ^* u6 Yend

0 r+ o2 _" M, R( y, E) m$ K
" r  x7 W% d5 _9 ]begin P_mA_clean arriving% f% d6 q& ~5 i0 I, V
   while 1=1 do
( n/ g4 Z6 K5 ?$ m+ R, H7 C6 X   begin
& `( H- a% d* x5 E0 m9 ^5 h# u   wait for 90 min
6 G9 ~4 y) E8 t  K- h/ f9 `   take down R_mA" ?) \; @. S* V: J- i
   wait for 5 min  z+ S+ q" y! r. O4 n
   bring up R_mA; Y5 h: g/ K2 p6 ?( O
   end
( u/ Y; u, O# M9 H8 Iend

* l- U5 ~# [1 h' X0 M : ~% V; P9 t& Q, A2 O4 h7 x, P. u
begin P_mB_clean arriving: L) G( W% M% ^- x2 z
   while 1=1 do# w9 @* l. B0 r9 x; N% \, ~* Q( p7 k
   begin( T, X( n% J& L6 q) g# d/ P1 b3 r
   wait for 90 min
0 M# R* I4 }+ A6 m   take down R_mB, L* d. y) ?: b
   wait for 5 min0 l2 x% ^( t1 a6 y5 o
   bring up R_mB) ~. {8 x. U7 r. A/ K7 [
   end
( X8 m) ?/ Q  dend

" {3 C% L; e$ S3 o; ]
- H. c9 \- X* fbegin P_mC_clean arriving
! A* `* S7 h' d  |$ b+ n6 b3 W7 g/ V5 ?   while 1=1 do
1 k8 _% w) |3 }2 J" Q% @* z' x   begin
1 d" [2 Q6 M: C4 L$ `; N, h) y1 i   wait for 90 min
$ U! m' f+ @0 J2 A) N   take down R_mC
$ w# ]7 i2 ^! ]5 \5 d   wait for 10 min" G% l1 Y& Y' _
   bring up R_mC
3 H8 i5 x1 k% l% U4 w   end+ r7 K/ M+ T1 P1 S6 r
end

, y$ k2 w5 ?& M1 ?----------------------------------------9 H# d/ b4 o, ]" ^6 }

0 t9 _% U/ ]: eExercise 5.9
5 K/ E0 S  U$ V# j; d- I! i8 Y! k+ z+ U" |0 }! N) j/ p& V

0 J9 `6 P0 A0 s9 ~Create a new model to simulate the following system:
6 P& y/ V' s& o7 P3 jLoads are created with an interarrival time that is exponentially
- Z" t# ?6 k% Z7 N0 B9 {distributed with a mean of 20 minutes. Loads wait in an infinite-: S0 P: r( ]% n
capacity queue to be processed by one of three single-capacity, + P2 Y+ B+ p* ~6 G, p/ h
arrayed machines. Each machine has its own single-capacity queue
1 [. q* p5 y- w5 c; K/ \! bwhere loads are processed. Waiting loads move into one of the three
/ W6 Z# }9 J* ^3 aqueues in round-robin order. Each machine has a normally
+ `% |8 q9 n: i  o2 T+ V5 |! |! u; |distributed processing time with a mean of 48 minutes and a standard
4 G$ y5 I/ ~4 l! N  qdeviation of 5 minutes.
% f, {0 `3 e4 P1 P. E7 MThe three machines were purchased at different times and have % B2 `' }5 g- u3 i, d7 q
different failure rates. The failure and repair times are exponentially # S- y/ d9 ~0 o8 ~
distributed with means as shown in the following table:   V8 j- B0 V" E6 ?% G6 L4 Q
Note The solution for this assignment is required to complete
- J+ ^2 f$ x+ V8 Pexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 4 b% G& `6 p% O- k, Q+ V4 ^
your model. : s* {5 c3 y$ s( H, r( ~  M- G

+ U: ^: e2 N7 U  @8 |MachineMean time to failMean time to repair/ G) z( \3 t. d, O
A110 minutes      5 minutes" y# ?2 `* a9 u
B 170 minutes     10 minutes
" f0 q+ w0 |& a& s6 M6 A, q* FC230 minutes      10 minutes
) Q0 a* y' x$ o
' @) n0 D! g, X% \The machines also must be cleaned according to the following
3 A1 S, m8 R- y  [1 x% Eschedule. All times are constant: / ?" |) X/ g9 Q1 F9 {' r( ~

8 X' P/ c% H. q  u' ^' p; e& cMachineTime between cleanings Time to clean
! ?# j- V7 v% F, J0 W" B1 HA90 minutes        5 minutes
/ y7 _# D. {9 |* ^B 90 minutes       5 minutes) U( a" s9 k' _, ^4 s
C90 minutes        10 minutes+ ?# g0 Y0 D" t

5 x  i+ O8 ~' H$ x0 TPlace the graphics for the queues and the resources. 4 w  P. X# \: {
Run the simulation for 100 days.
! D' _4 q: B: FDefine all failure and cleaning times using logic (rather than resource ' i+ P0 f" J2 A& \+ K, N) M
cycles). Answer the following questions:
" F0 r6 V# Z3 @: k! Aa.What was the average number of loads in the waiting queue?
0 M0 V% \/ {% ~/ C. `b.What were the current and average number of loads in Space?
/ z( ~3 D1 c+ {) _' V. kHow do you explain these values?
% n8 i) k" I- L! A

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉8 Q2 d9 }7 t+ N& z$ N: N  f
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)9 d) X( j# _. e  U
这行好像也不太对,各位先进觉得如何呢?
5 U$ X4 Y* [  `9 e
1 G. w4 t) B$ J) ^1 s6 Ubegin P_something arriving
3 u% L  {  T4 {' l) z! [   move into Q_wait
4 ]" `8 c) e7 Q- U   move into nextof(Q_mA,Q_mB,Q_mC)
! ?7 I. r! W5 I! r) R   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
- ^/ M6 V3 p# }8 Y' h/ ?! }   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
$ u$ ]5 |- @, f7 r6 A6 i6 P0 [& H1 ^end
1 `4 W6 F3 ]4 s6 c" c( k& U! i/ ~' u) {5 o. X; w- F$ Y
begin P_mA_down arriving
7 i- m, I5 T8 u. _5 S   wait for e 110 min3 K" V, ^  f5 a0 p" W
   take down R_mA
& `' d' j2 [5 z0 M8 S; h   wait for e 5 min
/ R0 `  Z7 j( u2 d! e+ U+ r   bring up R_mA; ~! B( e1 p' i* C! v, A
end
% J' P7 j4 v6 k, s6 v* y! h* n& a0 g3 q5 b0 X2 Z0 `, Y1 V8 l
begin P_mB_down arriving9 R% f6 w3 V  m8 t& O  _+ u
   wait for e 170 min  H, q) \( @9 u6 ^. Z  _2 x: l; R. y
   take down R_mB' p  R' u) V$ D9 X1 e5 K- t6 y
   wait for e 10 min
4 l6 J) Z0 s9 \, b0 P& Q/ u   bring up R_mB
& q# K2 |! V5 P: {3 d# z% |end3 c  X/ D9 l0 U3 W

+ z: Z) y" z* E  i6 C- c+ Kbegin P_mC_down arriving. b' q0 O" b( }( `4 X
   wait for e 230 min' C: U3 ^$ B; M' b; y4 L- E6 a
   take down R_mC8 k/ j) @2 _' {# n
   wait for e 10 min
! n  q* g/ u7 G9 ^, M6 A; ~7 x   bring up R_mC
0 U& h  ~. O$ Yend
+ p% f$ p! X9 a/ l' k% j& n) U, f# P/ r
begin P_mA_clean arriving
3 x9 {$ J1 i2 G/ F  D$ ~' X2 E   wait for 90 min3 a+ m5 @! \1 n( f4 V
   take down R_mA, F; I" i8 Q& a+ e5 e
   wait for 5 min
" O- n. E/ r7 ~7 j. O( t  o/ i   bring up R_mA& {& e& V* O0 L! Z, Q- Y6 M
end
( E* |" h, P6 U7 r$ H' [1 W
, Q" S8 }0 F: K7 L: t; f' tbegin P_mB_clean arriving' o6 }8 J1 }4 `$ z  V0 r0 W
   wait for 90 min/ u3 O$ B, F* `3 X
   take down R_mB3 v. s% w" L+ V& U9 U
   wait for 5 min
3 n6 ?, x% {4 n$ ^4 L  K# B) O   bring up R_mB0 j, m% t" a. v9 V9 `
end; R& y" [) M2 i
; n' G  ~. k; W- t
begin P_mC_clean arriving
7 u' H+ a# A* M+ U+ f   wait for 90 min$ z) ?) P3 O6 e) V) R
   take down R_mC
/ K! e( o+ _7 T9 C- N   wait for 10 min1 }% C4 T/ |0 J0 c' y# ^6 }6 F
   bring up R_mC2 L1 p3 h. |6 C4 X' n, F
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving% u8 D5 `/ v# W. F; Y" F9 y  Z1 s8 P
   move into Q_wait
+ A$ V  l9 F2 s! {   set A_q to nextof(Q_m1,Q_m2,Q_m3)1 i4 _+ L7 J) X- T% B( K
   move into A_w
# K& m* H8 |3 y6 K$ [   if A_w=Q_m1 then use R_m1 for u 48,5 min5 h& G% c/ M; p3 L, Q
   else if .....then use ....for u 48,5 min
# [( @. j: C3 h# j% j   else if .....then use ....for u 48,5 min  8 `7 ~) O/ R: v* S
   send to die
4 ~' J* a4 r6 nend
1 |$ h' [7 n3 X, n+ H) L/ T. x$ T' I3 p( h! u
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-28 07:47 , Processed in 0.013551 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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