设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6596|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
! b$ [- E4 X  t- v. @
+ Y! J" a' J4 l4 J. f% O底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
+ _. g4 B* f$ C- V9 a$ j$ v
" ~1 d; F" z# k5 J; V' r0 V不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
# v* E( u/ T, D: {
6 C; ^* j, X" b' [1 B% h7 ^
--------------------------------------------
& h, j5 p/ o6 H4 d7 H' }begin P_something arriving7 p( u  U% e- j8 N
   move into Q_wait% j: A2 w3 F) h1 L5 ~1 ?4 i
   move into nextof(Q_mA,Q_mB,Q_mC)
) G& b, \7 K; L! @   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min- \7 k& J# ?% q4 I& i7 _
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)# @: S8 c8 T8 T, O' K
   send to die
& M; v2 D* B. m8 Bend

2 G3 o; o& t; v' G7 K
/ [4 r) e! _6 y8 v2 @2 w* \) \: ]& Rbegin P_mA_down arriving
: W0 R/ y3 P$ E4 ]7 x4 c: B   while 1=1 do ' v2 C5 O( X, h' L8 Z: v5 q3 v/ D( C
   begin- _8 F  `) d( e7 ^  H5 I8 b
   wait for e 110 min3 h3 N( n* g2 _( c  B2 @" @* l
   take down R_mA  D+ }" E0 h0 o7 k; r4 C
   wait for e 5 min! k( g- \/ q$ k! s
   bring up R_mA
0 T+ z9 K  z5 U! s! w   end3 F) s2 |3 Q& ^' L/ C
end
2 `2 R6 z0 x" E- f; K

. w8 S" F% g7 ~* e+ w2 c) w$ \begin P_mB_down arriving. B0 p9 L$ |# m& J  o
   while 1=1 do
6 |( o) N% ~: m5 G: ^) {% ]   begin* Q) ^+ _4 x* r" X
   wait for e 170 min
% C- ^1 P  p5 k/ J1 V1 ]' s8 w3 A   take down R_mB
  k: x' m9 [/ A) Q   wait for e 10 min0 I, E+ G& v1 v- k& m) s4 k
   bring up R_mB
3 e, O1 D* e+ _/ z  u& J6 f   end
* k+ L5 m. ~/ \; z& x" ~; Q! _$ ?4 tend

( v! o8 h5 j$ W# p$ B7 J% k* L
9 ]; l- U3 y! y8 W; j" {begin P_mC_down arriving9 f5 |) j4 Y. a) F) T8 A% e
   while 1=1 do , N0 s0 G* W/ B1 a6 P; ?, z/ t
   begin
7 P( \& s' g( J) b   wait for e 230 min
9 N* G# N! L8 r; ?2 U   take down R_mC
' E1 d) L$ a& g   wait for e 10 min
7 ?9 E; P7 q3 P# A" [% y+ q$ N9 Q1 ?   bring up R_mC5 Q( f% Q. I% `, R. t' N4 |. V
   end
8 j- _% M* w0 B5 T3 ?8 bend
9 A( y+ ]0 o5 y( [0 f/ L$ ?

& u, B1 y" T# |$ o3 o, @3 O) h0 ]begin P_mA_clean arriving9 f( r  K4 h8 M# L5 q3 a8 P* d
   while 1=1 do) Q! X  ]/ b: [4 U& h& N
   begin
5 g5 \' M* c3 Y   wait for 90 min$ ~% Z) H3 Y  O- J1 }4 g! M
   take down R_mA
3 W* X( s1 y' C% d  M$ M+ u   wait for 5 min
, f2 Y, T6 L( v   bring up R_mA5 w, o' v0 B: ^% U, V$ r. h
   end) y/ ]. P9 H# Y$ P2 |& O
end
0 y4 P; a( W% {( M" S, ]

/ z8 A- T; K0 ?# H) Ybegin P_mB_clean arriving$ H) D9 i% ?& l/ ~
   while 1=1 do
0 m4 F! |( J$ a, Z! S4 I2 y   begin0 o, c. C! p3 H7 l4 i7 E
   wait for 90 min6 M: n& C1 u5 I% N. q3 L
   take down R_mB
. ]8 I  @7 B0 H# H( v' Q   wait for 5 min
5 E# F  j2 {/ P   bring up R_mB! @) ?: t, {6 @$ F+ h! i
   end
5 _3 J2 w0 F- ^9 Mend

2 ~% U7 i6 {- B: ?
) \4 o: X8 I/ ]4 B6 ^2 Abegin P_mC_clean arriving+ y5 }* [6 i# q+ [7 s0 W
   while 1=1 do( B2 ~( d, y8 F( S
   begin+ R+ N& t+ @! q" n% v0 w1 N( ?
   wait for 90 min
/ f8 ^2 O7 e, s   take down R_mC3 w" A# Y  a- w/ G2 b
   wait for 10 min8 p/ h4 a8 b* Z& I1 B' l
   bring up R_mC
9 ?3 T# z3 i; K* L2 z   end
! x& \5 z  E0 S8 `$ m% @" y6 Send

4 H% G  \' `2 h1 o----------------------------------------
  O, b, V; Z4 A- Q' Z , A# W8 h: \% K( U- M6 F
Exercise 5.9
7 D. v  u/ v3 i  S3 c) e
* U: ^) W+ K0 o* C
; W0 z1 o& a/ E+ y) Q5 g! l% iCreate a new model to simulate the following system:0 }2 }/ O; d+ D4 \- F4 f* l
Loads are created with an interarrival time that is exponentially
- _' W2 o1 X9 u1 I0 Udistributed with a mean of 20 minutes. Loads wait in an infinite-
. s3 a5 l; W; c0 k# f# [7 m0 _capacity queue to be processed by one of three single-capacity, 6 n8 W' N, w" x  X0 i" f
arrayed machines. Each machine has its own single-capacity queue
7 P" b" b' {5 U+ A) T2 g, W' Ywhere loads are processed. Waiting loads move into one of the three 5 s/ Z6 V* m$ y  `; X
queues in round-robin order. Each machine has a normally + O& H* A$ k  \& I3 h% I
distributed processing time with a mean of 48 minutes and a standard
/ Z1 n9 Y) i  F4 X, f" Ideviation of 5 minutes.
  C3 g3 A0 |6 R8 w6 H6 s* gThe three machines were purchased at different times and have & v% M: A. Z* K) v
different failure rates. The failure and repair times are exponentially
  }0 D/ g* k. S2 L7 ]% ydistributed with means as shown in the following table:
( d4 x# p3 G; g6 y! ~( ]9 \Note The solution for this assignment is required to complete
  H( Y4 u* G! c) a) z- |3 uexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of $ L. u- s  I2 ?
your model. 1 ?" L& I% Y( g. j; Y1 p
9 {  v+ ^9 L# U. @6 m" A4 }, O
MachineMean time to failMean time to repair
+ X3 E  r/ j1 g+ j4 u. ?A110 minutes      5 minutes0 \% `: S) B* l1 B8 ~7 |$ l) e' H
B 170 minutes     10 minutes  g- A' h( x: ?0 G  K7 s7 p+ T- y
C230 minutes      10 minutes3 x. F7 P" ?/ `: F' @$ H' _" Y

6 q* e5 s* h) DThe machines also must be cleaned according to the following + ]( D( k: m/ Q0 y+ p5 G5 p4 _% X
schedule. All times are constant: : b: Y& ]; m2 ]4 T6 k

' c+ n/ p2 \: E0 E1 ]5 o/ pMachineTime between cleanings Time to clean
4 M1 H; L6 g8 R8 n! N/ M' a, F! jA90 minutes        5 minutes
- I7 Y6 {, ^7 D# t+ YB 90 minutes       5 minutes7 ^6 x1 |3 l% S& I$ c* G4 Z3 M4 a
C90 minutes        10 minutes
$ u: {% j+ D: n- |: }' Z7 W* t& N" w* Q! r3 O4 N% u% }; M+ S
Place the graphics for the queues and the resources. 1 ^: X! C4 H5 @; T" j$ t
Run the simulation for 100 days.  ~5 z# [; K, R
Define all failure and cleaning times using logic (rather than resource " t& g2 j7 R: `) y
cycles). Answer the following questions:
, ?% U6 o. L5 c# Y6 j* _# E- `a.What was the average number of loads in the waiting queue?& j! t/ c5 g# D0 C& H3 `9 f' p. N+ [
b.What were the current and average number of loads in Space?
3 L% v  M7 L" a8 a" M7 {$ n0 bHow do you explain these values?
8 E& @5 N6 S6 }' s

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
( ^8 @$ ]% o$ h0 Xsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% J/ `7 z% f" D/ Y, ]" K, o# E这行好像也不太对,各位先进觉得如何呢?
7 ~) q% _- M2 w6 _* S1 J' H/ a" [7 Z$ t9 D$ t; B8 j2 O2 a$ c% l
begin P_something arriving
' p1 L6 D* Z+ c& A2 N; g   move into Q_wait$ l/ r" j! x$ S9 _( E
   move into nextof(Q_mA,Q_mB,Q_mC)
" w: Q4 O6 f  O   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
& W( e1 w1 b( e6 a5 N   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) $ W% ^' F5 D- q' z
end
4 v% a4 U- E* C* d$ T2 P4 ]
4 z2 W( j7 L9 R! Wbegin P_mA_down arriving
% z0 e' v1 Q( R$ G: R6 u$ j; u   wait for e 110 min
/ l. [  \. a5 U7 [, Q! `   take down R_mA5 L: K% w$ E- ^& G& f
   wait for e 5 min
" I$ n2 U9 d4 [- z/ Q1 t# s  l9 B   bring up R_mA
2 O& v5 H- P5 \3 ^, a: \$ _end# N0 a9 A1 K4 K) d! s4 d

' a" t) \0 r( N" abegin P_mB_down arriving1 K' ?* k  L# n2 N) s& [. }/ V
   wait for e 170 min
2 k; j% E9 }/ m  b) H3 [1 G$ J   take down R_mB7 U/ p5 N, w; ~; j# e% f
   wait for e 10 min4 X  n: \- ^2 [  y
   bring up R_mB
% p) F. c- p7 Y* H# \end
) h6 _& W/ O+ U! j+ C! J& U3 V: p" y* [
begin P_mC_down arriving
0 i5 V- _% Z. q' d% j+ Z   wait for e 230 min# \* c4 }. z( V" w% s) U1 T4 s
   take down R_mC+ J, S# q: c3 ~# ?! P8 W
   wait for e 10 min
: {, N$ L, Z! [   bring up R_mC9 \( u* Y1 E: S
end1 e1 G8 H) b" v; [) I
7 C% k  ~' C& F8 o
begin P_mA_clean arriving
0 ?1 W0 m6 a! N5 d4 M/ s   wait for 90 min
$ U4 F) m) {% s6 i9 e( x- d   take down R_mA
6 K8 `6 ?; N" m! v0 L7 e! [   wait for 5 min
; v5 C0 T) Y0 Z$ J   bring up R_mA
  ]5 S+ d' Q* C9 ?& }! Vend! x4 e  F, P, m
& A( T0 c" n5 {) z
begin P_mB_clean arriving. {9 ]) z( {5 \" X
   wait for 90 min
4 R( y( z2 X2 p, F/ b" g3 i3 |   take down R_mB1 r9 Y# a  ]% T5 f: `4 x
   wait for 5 min7 u: u8 }* `$ O4 F9 ]6 V% H
   bring up R_mB$ D' K7 h3 X" J8 X5 l
end! |  C( F. D: c% ]+ g/ H
# q. A3 G- T+ V& ]! P% O. g
begin P_mC_clean arriving1 c" H+ k; t0 S1 S: X- r/ T
   wait for 90 min& C% ]7 x0 Q# A9 m; u4 [' ^
   take down R_mC% r9 Q3 {" Q/ n( |" s: L# u8 J, ~# p/ y
   wait for 10 min
7 @6 \/ K1 Q4 d' r7 t3 W   bring up R_mC( [8 W: z+ S. X0 w$ E7 f* n
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving! U. [% O* D2 O- V
   move into Q_wait
+ V) |! S5 \0 q* }% X5 w! ^, \   set A_q to nextof(Q_m1,Q_m2,Q_m3)
% N# J9 p0 _4 E1 s! h6 m   move into A_w
9 r( u8 l9 N+ z' G   if A_w=Q_m1 then use R_m1 for u 48,5 min
1 H% F" R7 t3 U$ I   else if .....then use ....for u 48,5 min
- e7 J6 Y2 g! C& A   else if .....then use ....for u 48,5 min  , b6 X! c- {* s! d5 n
   send to die* ~7 m" o) a/ T2 o) y  ^
end, }4 m0 k& A" t1 ~' W) ?
6 I. j: J! B1 _4 R3 N2 k, ?- B
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-6-26 20:38 , Processed in 0.018526 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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