设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8039|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
2 w6 S0 h$ Q0 ]2 h+ y
7 @$ g, x5 J& d9 ?! }) B底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
$ F3 N6 ?+ e$ M* c4 M6 B4 K9 r
% y& ]( t! U3 o! w# s不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!% ]6 L- i  y! [7 L$ v2 j* G4 i
7 R( k& ~0 Z  E( u7 I+ k- D& |" a+ {
--------------------------------------------' x2 Y' R5 O/ L2 }9 `% h
begin P_something arriving
/ k' ^6 I3 U- S. q; M   move into Q_wait
+ g& V0 H' M. l; ]" Y# B0 ^: D$ B   move into nextof(Q_mA,Q_mB,Q_mC)
0 b- C7 d8 a5 a) [* A   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min2 c7 p+ t2 t! w* V
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% s' j5 S# p) }8 H& V# h6 f   send to die! {# V/ G" }; J1 b
end

4 V$ h" I$ k* c, X ( H& T1 ], V3 N- J. y7 H
begin P_mA_down arriving5 K# t% a, N" J
   while 1=1 do
5 _$ X& I8 J$ _+ `1 ]3 G% A5 b' P   begin
' [7 d1 V( f: s1 W   wait for e 110 min
- T" q. T6 [, M$ R% C5 R1 Q   take down R_mA
3 G+ G  \6 L( u7 u# o( l   wait for e 5 min
! R+ b. o7 F, \; p9 I* \0 j$ |, W) \   bring up R_mA
3 K: O7 p. ?0 i7 C   end
" h8 G0 g0 \) e, ^( F# u9 \' lend

  o0 U8 @9 s9 F; ~
9 v  S1 U+ k6 Mbegin P_mB_down arriving
9 p  s5 E* h# }   while 1=1 do; V" `/ F( P" l
   begin
, ?" g2 L& q2 @2 J   wait for e 170 min
6 x/ w3 g3 l/ V; ^& c   take down R_mB
9 b) u# \: @* `6 K* }1 ?   wait for e 10 min
. K7 V6 \, D$ n+ l. `/ t   bring up R_mB
6 F( t7 c. P' x9 t" J: Y) x   end
+ V3 j4 _& G& s+ n& ?; fend
/ A+ N, y1 E4 @" j" o
0 |: q4 L7 l% d$ j/ q% O
begin P_mC_down arriving
" ~# u0 C& {' Y+ D! _   while 1=1 do # S# r) v. d1 \
   begin/ V  J" S6 a$ G8 l6 |- Y
   wait for e 230 min
* {; U4 y( d& R0 A   take down R_mC0 N. F  x: w, L3 Q
   wait for e 10 min
+ J% L5 K" v4 ?9 }) P$ m$ O- M   bring up R_mC
, I5 {! _: X6 B4 V' K   end% c2 k0 E' Z# M1 w. D2 d, l* G
end

' ^  M% j/ e' u  N$ ^
: o, O+ v2 Z# I: c% A; C$ _- @7 G& sbegin P_mA_clean arriving
7 N0 I: r! m% u4 v( t3 t& \" q' ^   while 1=1 do# F# j0 V3 I) m. W+ x( i
   begin$ q' @. k% ]- O- u$ u8 X/ R
   wait for 90 min) o4 c8 }5 A# `* E
   take down R_mA, i0 X) Z* m5 M  r
   wait for 5 min
9 x: ^9 ^* p, W2 q1 h   bring up R_mA
8 a" Z, q& W/ H   end7 G2 ~/ l* N9 h( U0 ?: c4 H1 h
end

8 T' g" q6 e* C# ^0 Z( W
2 N3 E0 h" S7 zbegin P_mB_clean arriving
" D0 {3 W8 |6 e3 i   while 1=1 do1 F/ ?- s4 m; M
   begin
% W. E" n6 }) s: ^1 Y   wait for 90 min
& ^9 v8 A/ z- T' V7 |; k* X   take down R_mB
& P) n- _: N3 |  g0 J- D1 P   wait for 5 min3 I2 z* C: E" G2 \' K# ]# E2 o
   bring up R_mB
4 }. K; M4 K/ c   end% a3 b/ G0 w2 _
end
: `$ q6 m. s5 l6 c' y
9 U* I' H) P  a
begin P_mC_clean arriving: o& X4 `( c. [
   while 1=1 do$ y/ k5 o7 O1 `+ S4 |2 ~
   begin
% d) H- P+ K& H! w9 z) F   wait for 90 min
8 ~6 M6 c3 B9 ]# m9 @0 M6 h3 q' @7 V; Y   take down R_mC
) d) H, O  H2 R  ]+ a   wait for 10 min
* A* T8 g! m& `   bring up R_mC# M: Q- f- j4 V0 i. H
   end' |" u6 a. L7 }2 S( ~4 Q! M
end
2 m2 F! c9 o" @
----------------------------------------
$ n1 m# B' {! N! g6 a ) c8 p( i  H. s2 G6 ]
Exercise 5.98 w; F' O& t( V  H% b7 G' \2 Y

/ K% F$ B( W1 D& a; ]( J+ S0 ]0 i& O4 D/ f
Create a new model to simulate the following system:
4 U; d- z: n+ V! ALoads are created with an interarrival time that is exponentially " C" Q+ E! \' ~* `! f
distributed with a mean of 20 minutes. Loads wait in an infinite-& _  P" Z" X. e. q2 f1 U
capacity queue to be processed by one of three single-capacity,
' e/ ^4 ]. {' A. S. Jarrayed machines. Each machine has its own single-capacity queue
/ H. |7 ]. b- L2 U, Z8 Iwhere loads are processed. Waiting loads move into one of the three
5 H' B6 U& f# wqueues in round-robin order. Each machine has a normally
4 l( O; C' D; H6 C. ndistributed processing time with a mean of 48 minutes and a standard
- w' v2 M6 l$ M& Udeviation of 5 minutes.
$ b! v1 i0 Y' Q6 _; R" KThe three machines were purchased at different times and have
& {6 x! _) I) J6 `3 O( z2 ?% wdifferent failure rates. The failure and repair times are exponentially
/ N6 K! \" P* j/ h" cdistributed with means as shown in the following table: : U: l9 r1 J& r  B5 p
Note The solution for this assignment is required to complete % @" @% w, X3 b; ^( n. f
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 4 M' `% s, a% I; j2 g/ R, }
your model. ; Q0 q2 A& H  f% l, s! J! Q! E

" [% x" ^% T$ S0 T1 gMachineMean time to failMean time to repair
- ?- V, G: R7 f, Y+ M, H$ |A110 minutes      5 minutes5 P7 S( O) L, x! [# h; U0 G: T
B 170 minutes     10 minutes4 O& Q" L: z! L' l' E) A9 ?
C230 minutes      10 minutes3 D/ f5 c4 E+ x
( D7 v+ _7 j6 T8 i
The machines also must be cleaned according to the following & _# A# u6 @% z! i7 m+ s
schedule. All times are constant:
: n$ r$ w( r3 e2 R; Q3 B# c7 I; }8 ]3 H) O7 B
MachineTime between cleanings Time to clean  j* k: ]' N) U  T$ i! v8 a
A90 minutes        5 minutes. N' G7 C) n8 s0 T) _+ t
B 90 minutes       5 minutes
) {9 j. j! Q9 g/ x# p$ `1 y$ i# n9 zC90 minutes        10 minutes
7 M) w+ R1 p5 D( P' ^% X
+ @+ Q) {! N' S: W' {Place the graphics for the queues and the resources.
4 K: f1 T% W# n" u0 eRun the simulation for 100 days.. J4 U) I# o& q( Z0 r* P# C
Define all failure and cleaning times using logic (rather than resource - i5 G6 ^! Y- R
cycles). Answer the following questions:8 t) b9 [4 G) K( f' s3 Y! R( I: i
a.What was the average number of loads in the waiting queue?& u: S! z0 ?/ ]4 ^1 \& d
b.What were the current and average number of loads in Space?
9 A) Y$ O* j4 @8 Y. l9 oHow do you explain these values? " ?% b& H- r/ k, y+ K5 a

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉6 T& Q9 a; Y! \( q& u& ^
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)8 f+ H0 h1 J; S3 C* r9 \; h3 i
这行好像也不太对,各位先进觉得如何呢?
& b6 F/ \, y8 d4 ~. I& G/ {% K: [! O3 a3 o8 h8 @- J" ?
begin P_something arriving
  N' n. A5 M0 [; O1 W8 f5 n& z2 d   move into Q_wait& V) i1 q3 O' D# Z3 Q
   move into nextof(Q_mA,Q_mB,Q_mC)
0 d: R+ x: Q: L9 c, n7 B   use nextof(R_mA,R_mB,R_mC) for n 48,5 min% \6 J; a" w% F& r0 N- V8 R
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 4 i$ x5 Z1 L* h0 F+ U1 y0 j
end+ E- X! s1 t3 E/ T2 X7 w- @0 r
  f5 L" t, X) _- B6 {# u- v
begin P_mA_down arriving
% x0 O% Y+ I: F& {7 C, P   wait for e 110 min
' ^: _% e3 ~+ f- N$ m, l   take down R_mA& \9 D) A7 F4 {/ V* p3 C+ q
   wait for e 5 min
) I( {" C4 m  G   bring up R_mA7 v7 {% u5 n* e
end
; K7 m$ N' n7 j$ x9 P5 b
0 {8 O. O# _8 l! M. o# C+ Lbegin P_mB_down arriving
) O  j* \# {- H* l8 T. N   wait for e 170 min
, s" w9 u0 O; I$ |* ^- E3 E. Y( ]   take down R_mB9 \& n& Y& m! J0 C
   wait for e 10 min3 p6 i+ O' F' E: ]+ J8 w" b/ Q/ a' k
   bring up R_mB: r& v4 O8 k$ n  V5 k
end7 `! z, v) O0 w/ H

# d* `. m3 `4 d( ?/ D% Hbegin P_mC_down arriving% N- y5 W# L% ?8 Z0 O
   wait for e 230 min
! y# D5 @# a: d6 U: f5 j! g   take down R_mC
6 T; h" u+ b! G! O* D4 O; ?+ f   wait for e 10 min
8 r% o, N# b. }   bring up R_mC
, {! |2 k  Q* e3 i4 o) d3 y  jend
' C- j/ p& V# o, W* x" n& x2 i$ M( ^4 `; G  W
begin P_mA_clean arriving
5 C* \& \; I$ V8 X- |1 j6 F) u  [( `. s   wait for 90 min8 v) Q6 W2 s  J8 ^
   take down R_mA7 U0 ^. M  j! p% A  G/ e- u
   wait for 5 min) Q& U* X- p' i8 N- z
   bring up R_mA  Y: {5 h3 A. l! s7 f, k( a$ E
end
2 p. |& j$ Y2 r6 {+ V( k. f
3 Q. G* f0 }' r) kbegin P_mB_clean arriving
; S' n; L' D" F$ Z   wait for 90 min( a6 \; V& x  D
   take down R_mB
+ r' h# P" `3 C0 B4 W1 [( s   wait for 5 min' s- T5 f0 [- `$ L
   bring up R_mB# b0 u, m8 ^8 T/ ~
end
. F+ V" {2 R( V- r8 t
) d/ k( E' p8 H+ m3 k( Ubegin P_mC_clean arriving8 k6 Q' P" m9 D# {) p6 y: D2 M' G
   wait for 90 min
$ b$ N; Z- a0 g& d   take down R_mC
. V8 l6 j  Z5 L6 B  i1 M! \   wait for 10 min
3 [  T, X- _$ g1 c   bring up R_mC4 r0 {+ m& @8 b. r1 |# L6 r! o
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving( }; U) `3 c; \- j9 z, Z' _( W
   move into Q_wait
- C% V5 ?* l5 g$ }$ N1 {   set A_q to nextof(Q_m1,Q_m2,Q_m3); \! K! R' G2 ^: i+ E* c+ e
   move into A_w
- [* o2 e  C& o; w- o! G6 ^$ D   if A_w=Q_m1 then use R_m1 for u 48,5 min
0 d2 J- j# r) `0 t  @9 N+ ~   else if .....then use ....for u 48,5 min1 m* ]- [# D  y4 {! g5 T1 J
   else if .....then use ....for u 48,5 min  % b3 f. ]! T+ g1 r* ~
   send to die- o; j! [. v/ [8 o  M( b
end
% y# }+ I/ i$ @2 Q: a4 q( e$ q; z! A, V6 N, f4 X2 g
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-22 20:12 , Processed in 0.011312 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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