设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8011|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 5 n0 U1 v4 a$ `* h) z9 W/ D
& P3 p+ f4 u9 g
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
( c. C  |! c) z& S
0 }8 C8 F* `) z' Z1 r7 q, F) Y# w' P不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
6 [1 s1 }0 \! W! i) S2 F2 L6 }; U7 f+ I
--------------------------------------------
  q1 `) `: `& W8 q  N* ~$ p& {begin P_something arriving
4 b* X  ]- k( L+ R0 y   move into Q_wait. D! W) I9 D) r( z$ g
   move into nextof(Q_mA,Q_mB,Q_mC)3 U1 H6 w3 ~9 Q7 b7 B3 j2 L/ h% E' R
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min# a" N1 D6 P$ ]: T
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)& A6 L8 S' v0 P- u- X. ]
   send to die
* _# ^$ v6 ~/ V& a: t: Aend

5 K2 A- N2 N& [3 q4 a1 R8 C
7 X& n6 \; U- ?; {) M' Xbegin P_mA_down arriving
# r, s% c( G+ E: p   while 1=1 do
5 X" f* N' l; @7 |   begin  E. q+ \- a! r: \( S
   wait for e 110 min
7 m( u& N2 t, B8 g! y5 r   take down R_mA: b, ^( c& _0 @3 D2 H3 J3 u
   wait for e 5 min
1 u8 y0 Y  x/ k. h4 z% @) u   bring up R_mA  j! P$ I0 x2 W( r
   end' k: s7 K7 }6 h% @
end

, R6 t* U* k1 I% q( M4 V; A1 P; x! _
  @: |  J/ S0 t  ^& \begin P_mB_down arriving0 o) k$ T$ P1 V( F! z/ T
   while 1=1 do! ]% j8 c' p9 ?$ f! h" p
   begin
4 o3 D" t& A8 n) f, L   wait for e 170 min; u+ V( K8 |" e. m0 E+ `% l
   take down R_mB
/ O% O$ \" f5 v' y   wait for e 10 min* s4 [8 ~0 y5 a
   bring up R_mB
; R: @, Y. g/ u% w" s   end- l  b. M; ~) N; i$ D! [
end
8 Y) B+ P+ u6 K0 v1 H3 L8 z9 K  E

3 t( ~+ g, q: E6 R& V- ybegin P_mC_down arriving
/ A1 Q9 i* e/ d2 i' x6 X1 x. J( ?   while 1=1 do ) b7 T* m% j4 ~4 H; s2 Y  _! a3 B! F3 A
   begin, u- P! h0 L4 _( M+ I& M$ \
   wait for e 230 min" i. f2 c( r8 e8 F
   take down R_mC5 c! Q- a8 C4 `0 Y4 g3 y- D
   wait for e 10 min
6 m6 N4 d" [8 o   bring up R_mC
' m+ ?. q$ `4 Q% G' [$ E   end5 ~- D# b* l- G0 K7 @3 C
end
5 s# E( `5 x" v. W) f# x# n) C3 A6 }
; G0 m7 d1 K  J9 k
begin P_mA_clean arriving% B$ A, ~+ f9 W1 s8 k
   while 1=1 do6 v2 ]" D( u2 E* F0 _! C
   begin( n$ {2 i$ |$ r3 i
   wait for 90 min
' v3 x2 e* Y: a% u/ ]% h! p) A   take down R_mA
+ ]# P0 o, G5 D   wait for 5 min# u: n$ a$ U$ C, J/ Z" M3 `5 T
   bring up R_mA
0 U$ N0 }) j4 [  e   end
- w9 `! c+ p/ o8 c  uend

) E2 L8 S2 a5 D2 c ) r. O. P4 W4 U
begin P_mB_clean arriving2 g4 `- \$ K: {% M
   while 1=1 do
$ s( N! T+ }" f7 @   begin
/ B7 X: C5 t2 ~( q8 \3 c8 g   wait for 90 min! N5 E; N& q* b. e6 [7 f
   take down R_mB
: J: N$ ~+ I9 I5 t& P   wait for 5 min, P' ^! d, O" a1 M
   bring up R_mB
& N" f# D9 @3 [   end" c: h. d0 l$ I3 ~7 t" ?+ u
end
" f- a( W4 m5 R9 l+ ~
# P* O5 ~3 E. I) E: A9 f
begin P_mC_clean arriving* x6 j) {, I. [5 G# T2 `5 I9 N, J7 _) l
   while 1=1 do+ _+ Z8 }2 f9 A( |* g
   begin
/ h8 [9 X9 A+ ~3 r3 Q6 J   wait for 90 min1 R2 j% k7 _5 M) [+ o9 w# [$ s
   take down R_mC
/ O% f5 d: [: C, C  q   wait for 10 min
! Z) R, o$ s. {; [5 B   bring up R_mC9 s. I+ z6 {2 e/ Q) W9 g8 w- b
   end
6 h" p2 e3 h; Y* A+ L: W1 pend

" P- B6 I0 U* a7 F; B3 _$ P5 W----------------------------------------; e6 V1 C3 w; A+ g6 c# m, P

9 Y& R. ?$ R4 s" X! J! I2 ZExercise 5.9
/ t" c  \  H3 b( m$ a! k* U5 ]: L) I/ `- L! x. A" X

/ ?; M( f( Z+ t0 A! h  w- j/ fCreate a new model to simulate the following system:
, _5 F+ `5 R- X- fLoads are created with an interarrival time that is exponentially : p* ^$ K; b) u( u
distributed with a mean of 20 minutes. Loads wait in an infinite-
: N. V& c& I5 Zcapacity queue to be processed by one of three single-capacity,
( X* s" j6 r/ l: ?8 Q; |arrayed machines. Each machine has its own single-capacity queue
% t6 z. h0 k+ L( L2 u( W* Ewhere loads are processed. Waiting loads move into one of the three ) i1 |. q: |+ K* G) k0 a7 \
queues in round-robin order. Each machine has a normally
  s4 S, ~! w' M& ydistributed processing time with a mean of 48 minutes and a standard
  p: Z5 G5 B0 Y( s: i' W: Y" \! m* zdeviation of 5 minutes.
4 V& ]3 U( Z- l4 yThe three machines were purchased at different times and have
. h. R& E, s* h  ~2 ndifferent failure rates. The failure and repair times are exponentially
: f; ?; C1 e. D8 Kdistributed with means as shown in the following table:
( G  d  C5 y1 }; U% e% qNote The solution for this assignment is required to complete , i  `  B, n! O' Q
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 4 m8 D- X' ?! t
your model. $ N* w) v6 D: C, F5 O; g6 U

  c* l) u/ Q: `* e7 Q$ d0 z9 UMachineMean time to failMean time to repair, y0 b0 J/ n/ j) F5 S
A110 minutes      5 minutes
9 q  Y0 Y+ _3 j; IB 170 minutes     10 minutes
4 s, i! Y( o1 [7 i; ^+ x! j" eC230 minutes      10 minutes+ S2 H' \" c  K& s

1 Q' }- P- t: F7 c) \0 A, s7 RThe machines also must be cleaned according to the following
, v3 v# I* h' L6 A, a' p. ~1 Vschedule. All times are constant:
: w6 W7 e4 W, p9 e/ U, |3 s# e- `1 F4 _. J+ \
MachineTime between cleanings Time to clean
& H' D/ e- j& r1 w8 |4 V- |4 ~A90 minutes        5 minutes$ d% l0 z7 F  m$ _
B 90 minutes       5 minutes3 B8 ~8 s! Y" T$ [- Q* _
C90 minutes        10 minutes
$ G% N) P$ R4 M7 h6 @# i3 Y9 R" z! a/ |& P6 @
Place the graphics for the queues and the resources.
: z9 O+ Y8 m4 O% K2 R4 qRun the simulation for 100 days.4 F8 ~( L; y/ U( W' C8 I
Define all failure and cleaning times using logic (rather than resource
, x  j5 T$ ~! Z: scycles). Answer the following questions:; z. U: z! i* a* Y3 Y8 E0 Y
a.What was the average number of loads in the waiting queue?5 z* }/ q+ [' S; g
b.What were the current and average number of loads in Space?
0 j8 H- ?1 l" f& SHow do you explain these values?
0 p% o7 c/ T+ s/ n

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
* h" k& i6 ?) ]send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
( F, I+ P% n0 t; q0 O3 I$ f9 ]7 w这行好像也不太对,各位先进觉得如何呢?
; }9 W; Y2 C8 R, S- h: X. g; G+ e5 k5 e0 _8 Q  C
begin P_something arriving
5 I% q0 I4 ^4 i   move into Q_wait0 ]& ^$ R, _5 Q: a
   move into nextof(Q_mA,Q_mB,Q_mC) ) s3 r* u# E7 X) [) r9 p' H5 Q3 L
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
6 x6 \) [4 s3 ]- Q1 ^3 B   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
5 \) w& T4 M" T" y- wend
; h3 H6 n# {* ]6 z" ~6 j# e# \/ n+ K6 ^- E- ]
begin P_mA_down arriving7 B. {- N+ Q: {2 K- D
   wait for e 110 min/ W6 F/ {, z* p' |" n4 ]8 m% d
   take down R_mA! U4 P2 W; p( w, U, f' M  K1 f6 X
   wait for e 5 min
5 U/ Y8 D( C  K- O' @$ g! T2 s; F   bring up R_mA! c' W9 G0 K3 U
end! R# b' `4 h5 z( j5 E" _% V

3 X+ ]# ]1 H2 W4 t0 l, \5 Qbegin P_mB_down arriving$ O, K8 d! i/ {5 ~
   wait for e 170 min" E+ D5 I8 Q: W3 j' Q, u) O; p
   take down R_mB
2 {, v. Y6 d, l& U5 ~   wait for e 10 min
- Y6 _& @0 t! j2 @   bring up R_mB
1 b# v$ H# N- H: E- cend. m  `- N5 h# h$ `# ^* w5 ~6 q3 y

" L/ w& P5 W; m4 hbegin P_mC_down arriving
/ B2 o4 f; V5 Z8 ?+ A   wait for e 230 min
0 N; I. s( U2 m: _  h   take down R_mC( M8 P/ {# V8 {% d
   wait for e 10 min2 p1 F  W+ |$ |. T+ t$ Z. ~1 c+ G
   bring up R_mC
* V' J% y# h7 c1 ~! oend; i$ P! L1 i/ f2 s  R  l% l

6 t3 {3 g2 U8 Z; xbegin P_mA_clean arriving
" W( ~% M* @: q7 U3 C( }* v& E) x   wait for 90 min- v. m" V. {5 p7 s) a
   take down R_mA
( T; F" d9 f2 p8 k( f   wait for 5 min
+ b% k0 N. N* C% q; [8 B   bring up R_mA
# z- p: W& \! H# S  L9 K! T& a0 ~/ Kend
$ y  x/ P: G. ?: L6 u
# [' y+ m0 Q& e/ A8 abegin P_mB_clean arriving
9 [0 D3 D9 ^9 \% B# U* g% z$ z$ O   wait for 90 min$ x4 G" W9 e6 J% S% E1 ~
   take down R_mB. ?1 Y" v$ f% R- t3 b
   wait for 5 min
4 S2 [8 o7 A2 E* r7 f# q( ~   bring up R_mB3 [& B# p& s0 e8 b6 S# M
end% Y7 F# X/ m7 s. R$ G/ U1 ^& Q5 H
) Y  S/ n4 t' O& V  l
begin P_mC_clean arriving
) Z. f' G, [; W! s+ @) S   wait for 90 min. ]% t& h' p, B
   take down R_mC
6 ^( |: s! `/ U; T8 S4 H   wait for 10 min  H& @, r$ X! F1 p& y
   bring up R_mC
  i  X/ e5 c- z/ v9 h0 A* iend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
- q5 E! b  f& D8 a   move into Q_wait
. x2 V0 l' }5 F% Q' F   set A_q to nextof(Q_m1,Q_m2,Q_m3)
* C3 Y+ N. n! y3 b( h  |2 H$ N   move into A_w
9 e. b: {% g  b* O+ b   if A_w=Q_m1 then use R_m1 for u 48,5 min2 i6 V% a& g& y2 ^1 h+ g7 m
   else if .....then use ....for u 48,5 min! X& @6 E% H- |: W; H8 W
   else if .....then use ....for u 48,5 min  " K  h* i( Q* U! g- ?
   send to die
, G  O# n: _0 r+ kend0 U2 G7 S* w; W7 }0 L' N  Z, H
, z& X0 z# _: ~6 P; T: m/ J
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-12 00:45 , Processed in 0.012845 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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