设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7787|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
- t$ I# F! h+ D  \) G0 O* e% k8 {2 J2 W- g' A7 O$ {5 K
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
9 m. A* j7 |& i( `5 C$ J
3 w# {* V9 \2 p; c/ \不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!+ |  I5 x- Q. |  o- Z1 l) w8 r: Q7 x

# D+ z' O4 [9 `: b
--------------------------------------------* X0 {2 S) p2 [7 e7 e
begin P_something arriving7 K; u7 v  K% d( n# z& Q
   move into Q_wait
4 D0 o5 U! x7 k) o' T5 G, T6 l   move into nextof(Q_mA,Q_mB,Q_mC)
6 g$ X; j) j. g& U   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min; \0 }# P5 ]! P0 i! Y3 Q
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
) V% U9 T! k7 H; A% M* }( k   send to die
3 X' j2 N" r* a; |end

/ a' R  u) @/ m' ?
4 o; |" C0 P: X6 v) l3 `0 Kbegin P_mA_down arriving" p2 D5 w% T5 d+ J3 f6 M# Y
   while 1=1 do
4 l. w' M3 V; r$ z# V   begin
5 `* I9 c) z$ c/ R' }: t" S   wait for e 110 min( e8 y' ~7 v( j. A. A4 q
   take down R_mA) ~( N: b+ |: X( y* Y/ Q* a
   wait for e 5 min
9 e1 [  T' d4 w. p: ]8 O; H! }   bring up R_mA5 q1 y; i" I9 ~1 q
   end
% o7 f9 X0 C- u$ H" @5 Jend
4 z: U; {0 H% M
; n& ]0 C  A, ]; m% K) D
begin P_mB_down arriving
4 J) m6 ~2 E, K   while 1=1 do
4 b3 s/ m% K2 ]   begin
4 t# a+ l( G" {( r   wait for e 170 min
+ s$ ~% P/ }1 V   take down R_mB
* \  D. F6 Z0 \8 z   wait for e 10 min7 `2 A: m) ?7 y+ q
   bring up R_mB
; s) [0 ]2 X$ F7 n. o5 g8 a# P   end
; z7 S# V: o& [) ?) Hend
* k. a) k: @6 }6 k& y+ d& }

$ i. U* g, ~$ h, mbegin P_mC_down arriving, X+ w9 j9 ^& }8 |) A* N
   while 1=1 do % R( w. e2 [" r# ?+ n7 m  V
   begin
  o. P4 u4 |9 l; A   wait for e 230 min
4 _9 @) W4 [. q$ f   take down R_mC' O3 ~! j: B+ B1 t- X& @
   wait for e 10 min% O9 k* |5 [/ {& a
   bring up R_mC
2 d9 L$ G( R, D2 \: ~: U   end
6 ]' i! d- E8 n: a! I& Pend

* C7 q8 G0 x. c/ Y) h1 X. P 1 i: [$ g, s9 F$ u8 n
begin P_mA_clean arriving
/ p6 z3 G9 @, J; t' f, z   while 1=1 do, `+ E; _+ D4 z: v8 X6 d; Z" y& e
   begin
/ b; F. a$ i4 j   wait for 90 min
, B* i8 A2 o! d, j   take down R_mA6 h+ G* Y" m- P9 }
   wait for 5 min( @3 O# N, w7 H
   bring up R_mA
1 b" ~+ l) J3 b   end
4 w8 t5 q9 c5 O) A2 Wend

% J- s/ s6 k% X3 H" W1 n  H
8 d  {  \, m5 J' Tbegin P_mB_clean arriving
4 G, {  a( }0 l/ X! P. n4 {   while 1=1 do8 G, Q+ u8 q7 M, x) g
   begin
# U+ Y' S. c3 i6 A9 v; b! E# R   wait for 90 min  ~: e, V) s. X. B8 d# \! z) [
   take down R_mB
, K6 T, {+ J  b' ]  D0 H   wait for 5 min
8 \. f6 X' _, I" e8 C+ B   bring up R_mB
% S- ^) h' G8 Z4 `   end
6 D: x4 ~0 M# k3 n- _  Jend

9 b% s3 I+ b8 Q 7 d, d; a1 m; E% d" w
begin P_mC_clean arriving; g+ t, x; u3 O* b) N$ E
   while 1=1 do
/ r8 @" H3 g. ^" ?   begin
: G! U1 U: h+ J5 u; N   wait for 90 min
8 ?, E$ x0 x' m- N, u, Y% B1 B   take down R_mC
1 u2 i" X& b4 k   wait for 10 min! z, A6 w6 H9 D7 K
   bring up R_mC
+ O3 K8 r3 _1 ^+ V   end. F( R! [& O1 x4 n: c
end

: V* h( U- [$ L9 l9 R' |  g& f----------------------------------------
5 G& B* }; r( Y  K$ z; C, L - x2 Q  ?! e6 U1 g& ]' i' L: Y2 H
Exercise 5.9
: p5 a% u) r% e- ~: |7 K% Q. }, f) D. X9 r$ E- {! w: V9 {
* v$ l9 q, o6 s6 u
Create a new model to simulate the following system:( @. r8 U0 {9 ?0 E" u0 c4 g' t
Loads are created with an interarrival time that is exponentially
* N( i& X: I& Y0 [; f% \distributed with a mean of 20 minutes. Loads wait in an infinite-( l7 M) X. V$ Z+ F2 D
capacity queue to be processed by one of three single-capacity,
7 ^4 |0 D( x+ J* \+ Barrayed machines. Each machine has its own single-capacity queue
$ v. \& _0 Q& A. s  pwhere loads are processed. Waiting loads move into one of the three
8 n) @! c+ w' m4 G% ]3 Uqueues in round-robin order. Each machine has a normally
% U3 S" N+ D0 v! L( H4 |2 Edistributed processing time with a mean of 48 minutes and a standard : Y% q( W" H# E5 z. T% }
deviation of 5 minutes.
: `& {: W0 O* d: ~& R$ K  v/ E% M2 t7 RThe three machines were purchased at different times and have
' Z4 F+ J2 C7 p9 j( j! x+ R6 Pdifferent failure rates. The failure and repair times are exponentially - d/ x" P. D2 O( \# g& X1 T
distributed with means as shown in the following table:
8 B3 O+ w7 m1 |/ L9 G0 f/ iNote The solution for this assignment is required to complete
' J9 H8 \- d) Qexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
' Y4 ^  I# l; [) ryour model.
1 u: }! d+ O( g8 l
. N) K0 O+ F& V9 Z5 I/ i8 DMachineMean time to failMean time to repair
6 n/ v& e9 _& B3 h1 O+ [A110 minutes      5 minutes
* I3 B2 k5 U4 _  y1 IB 170 minutes     10 minutes. N" t' q6 v4 [: i0 U" u
C230 minutes      10 minutes
: r7 `- _. f- v
# g. w% T$ Y! w3 G4 q( M; ^The machines also must be cleaned according to the following
& x; a9 ~* B4 }: M% M+ fschedule. All times are constant: 6 `7 Y7 O% X  T4 J! \- Z9 i

/ R! D* x7 \% s" z6 oMachineTime between cleanings Time to clean. |0 @0 I/ ?' t; L; Y
A90 minutes        5 minutes
, B2 m' ^" u' F2 |* ^: W( FB 90 minutes       5 minutes4 v/ a2 O1 i7 |2 l& O0 y
C90 minutes        10 minutes
$ P! C- _* T* n2 m
. b! V; T# X% @% _# G: {Place the graphics for the queues and the resources.
) D8 O) s7 a  d: Q# eRun the simulation for 100 days.
& m! B$ U! ^/ i& v6 gDefine all failure and cleaning times using logic (rather than resource
, `; a0 Q8 c8 _* h+ T* j: e; Mcycles). Answer the following questions:) ~2 g  G/ m) E" S" K. K
a.What was the average number of loads in the waiting queue?
8 y' [0 @( k8 T, u: w5 lb.What were the current and average number of loads in Space?
: L# U; |5 s7 N; q% v* [! EHow do you explain these values? + |, U7 a: ~; x, T" R# j# |

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
% W3 z  F( c3 `2 k+ U, l6 ssend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
9 y' B( |+ v! [9 ]1 ^* m3 A, A这行好像也不太对,各位先进觉得如何呢?# Q: {! z5 ?- j) O& M; g

% H5 h7 h4 |& H: e# k. ibegin P_something arriving" j4 ~# F) v$ q6 ]1 [
   move into Q_wait" A8 W0 V% p6 f+ K: G0 s$ ?
   move into nextof(Q_mA,Q_mB,Q_mC)
$ X5 Y/ w4 l/ i3 ?   use nextof(R_mA,R_mB,R_mC) for n 48,5 min2 P, Q1 m5 `  a8 }& ]
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) ( W0 `; v1 W( c! L) p! z$ r9 S
end
: Q/ q! O8 T0 H( U. S1 u  I, n2 Q3 r  I9 y6 }
begin P_mA_down arriving1 R% ?& |2 o, O
   wait for e 110 min* g2 Y# c- M* \. w; {
   take down R_mA; u' h1 ?1 [5 U- T
   wait for e 5 min) P0 k- T5 Z, T7 m
   bring up R_mA/ C, c$ j4 q1 h+ Q
end/ J. o' W% Q$ W  X* ]( `* r

- {* W9 [3 v& t, L8 ~: `3 I6 \begin P_mB_down arriving
: c9 H8 k2 |1 W& `7 k3 ~   wait for e 170 min/ L) U3 c7 P; ^# w" P0 `
   take down R_mB
3 J5 [* K3 l3 ^5 ^   wait for e 10 min/ A& i3 \- O/ G" g$ A
   bring up R_mB  O2 H6 q1 u) }
end
2 {1 [+ a, w# Q8 a: z
* z( D, r$ u: T: I% `2 s& [7 Cbegin P_mC_down arriving
: R% b, C" ?5 x8 R" }$ H( p   wait for e 230 min2 I* i0 h( e% d0 w8 Y/ W: M
   take down R_mC& ~; r6 @5 Y0 C, q0 p
   wait for e 10 min
" `+ U/ M0 ]- B, q9 C   bring up R_mC
$ X: z, d9 n& A% [% {/ d9 ]" qend
6 q) r4 N$ H8 }9 |% u5 H
' M) l: X4 y' e: P: p9 }begin P_mA_clean arriving
- k8 m: S- _( G5 b/ ^* g: a   wait for 90 min
" M" E  s* a0 i2 \# q   take down R_mA
  j& x3 i" ]0 c0 ]' ]   wait for 5 min
. r% {# t4 `: ?% b   bring up R_mA  @$ C0 S8 x6 l; ?
end1 L% l9 y  ^, w) y4 Z' Y
7 `/ ]; _& C  s6 V1 e
begin P_mB_clean arriving
  h  z; i2 u! E- D  F# |  i   wait for 90 min/ U) ^1 b* Q% v5 x
   take down R_mB
$ y3 o' ?- z& \7 R   wait for 5 min% [! w- v8 r( {1 n8 V& f4 f
   bring up R_mB
; _& V) p. D4 f, S9 }! w. Pend5 s9 s$ s' [  B0 p) q% q: W3 t0 ~
" P& s  i8 T. i' Y: I
begin P_mC_clean arriving
# s; q7 L5 e( S) t8 M- N# A) e6 F   wait for 90 min9 [! D; Q+ H* y
   take down R_mC
4 a9 S! s% X" P  b4 j; }( r9 e# O   wait for 10 min
  U  I0 M7 p1 ?3 t( Y4 s   bring up R_mC
. F3 I& {8 i! \: w8 |end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
0 n( ^# Z) t/ s9 O4 x: |   move into Q_wait
( U; ~) u0 ^" k! I( h! t   set A_q to nextof(Q_m1,Q_m2,Q_m3)4 o  u0 _. O# J
   move into A_w6 A% k) H5 [9 }- R0 j9 Y* \
   if A_w=Q_m1 then use R_m1 for u 48,5 min
" V' }( Y# |0 Z; F9 S, w* n! K   else if .....then use ....for u 48,5 min
0 _  K7 X  k4 }6 A   else if .....then use ....for u 48,5 min  : @. O6 L+ ^! `
   send to die' M; H8 u$ w0 v6 _
end% c( Y; N' ?! a! t$ z2 N
6 A$ m- }1 j4 {  @0 I7 f8 R0 B
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-17 20:22 , Processed in 0.018139 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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