设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6765|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
# Z+ b$ x4 P% a  M- J0 m' N2 Z- N2 _: d. g% q( ^1 r* J7 `9 o5 s% _/ ]
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
( ^. V4 @' l7 x8 o2 P1 O1 e4 [/ U) o& g; e& F& M$ `. V+ q
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!0 c+ F' _* V( W6 h2 ~

8 D- B0 d% y, F* f: z
--------------------------------------------
/ u' S5 Q& }' E1 a; {! K& F5 B9 _begin P_something arriving( W/ b* S' r2 h9 O
   move into Q_wait( @' q- \, i; D4 r+ ?
   move into nextof(Q_mA,Q_mB,Q_mC)  V8 W6 d* m3 q. Y
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
# L- M4 _1 w* [" I   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)- @$ c! l3 ^% o8 X4 n; }( |
   send to die; u& T! C6 |0 z! K" @+ ?
end

) W; {. `7 \; ~" D7 v% U $ e& V; T: r" t! x- l- l- x/ ?
begin P_mA_down arriving
. C7 p) x1 a" g  I; ?) f5 k# \   while 1=1 do % e6 I. ^: z, ]) [2 L7 v
   begin/ Y* R8 z% K) g: T) ]$ Q9 W+ E
   wait for e 110 min
% C* I' v: A. w# Y8 i& c5 u   take down R_mA
' Y- y: a* ]' d. [  ^2 _   wait for e 5 min
' o( Q( u" I( }: d# p  f) \7 V5 K   bring up R_mA2 L/ g* ^, Z8 i5 L# W  a  y9 Q
   end' g3 r5 b$ n; {% v
end

: S, Y$ ]- P$ t! h
. u0 w. U/ D8 kbegin P_mB_down arriving' C, }7 N. i- Q: Q* R- K: L0 T' v
   while 1=1 do
; c2 `) n) i1 h& p$ ~4 H* h   begin2 F6 s- j4 @7 A
   wait for e 170 min9 g. j( ?8 H* g5 S+ ~
   take down R_mB
' m& u2 `, ?) R5 }   wait for e 10 min. A7 E9 a) _5 O' h2 Z3 q; T
   bring up R_mB
5 b- J# q% z6 z/ F% e! o   end; w+ A, u" q/ D* J( u2 f! J
end
) [! Y2 N+ W! D: A* n7 J# w+ J
) I# i$ j' V5 D- w; r9 D1 T5 w  e8 H" ~
begin P_mC_down arriving2 W3 n& d2 m" R# U0 \  Y
   while 1=1 do
, x- h8 _) m2 s2 a- \: B6 S9 J   begin$ I0 @1 b2 F; N2 R+ w* z1 ?1 D
   wait for e 230 min
  R9 t* h+ _% ?9 G$ y! b: X9 Y   take down R_mC
1 B  I8 K# v; I& C9 A2 a   wait for e 10 min* d* }/ H; t" K+ b# f3 m: ~
   bring up R_mC
% M8 `( ^% `' y; W# w. K   end7 K  ~' {' }. k
end
/ J5 v% O6 M; `. B1 S  n9 A
* l5 |5 @) p7 f1 Q6 [3 n- \
begin P_mA_clean arriving
  |% o3 y: n: W5 I4 D2 i8 M   while 1=1 do
3 l4 g- u* [! ^/ T   begin" {% }$ r2 b: a5 Y
   wait for 90 min- ?( p$ X: v& E+ t* F
   take down R_mA- d' }) F5 a) q" P/ D: A
   wait for 5 min
9 y; X. ]1 a# ?  D. _   bring up R_mA5 u/ d4 b' x: q  e2 M: @
   end2 `+ X4 B3 O5 P4 q& a: Z5 g, E, i
end
, [; m2 p) `4 E8 q- W

: L$ a; ~# m7 l1 X! I8 l( p0 E: zbegin P_mB_clean arriving
- ^4 R; D0 g: c# V   while 1=1 do2 F& p. N2 k; K( R1 D+ E
   begin
: e, z6 O) y3 T. c/ _   wait for 90 min3 T6 @3 y( M8 i( a. r; ]2 P
   take down R_mB2 e# g. T0 U# c% @
   wait for 5 min
4 y1 Y1 v. [1 z   bring up R_mB3 f) F$ h& `0 O7 F0 e( m7 U
   end6 V  k; @5 W- x) c8 S& D8 r
end
# X# B8 Y, S# p, d. k0 a. P

" C! c0 v1 R0 y, X5 Gbegin P_mC_clean arriving
% W) [, u! ~. K& z% V. x3 n   while 1=1 do
0 e# |7 m6 V3 B1 P# G' O   begin3 l* ]9 z* y& ?% [) y6 L0 ~
   wait for 90 min
5 ?/ G" `4 j' q3 x   take down R_mC; V4 @: p: G$ m2 ^, J. |. T
   wait for 10 min
2 S& J8 T9 P) }+ e' M   bring up R_mC
' m4 _  u+ r* J/ x9 V, Q& V: X1 e   end( v% `1 X% ?5 }7 P
end
: H- }! }' [/ A: S( H
----------------------------------------* x! {/ Q; R7 ]

; s  t& @; k' H1 DExercise 5.9
4 f' X% V6 Y/ n& |6 w0 X- d! i/ V) B& U2 K) ~0 M4 M% Z
* ?5 G% w5 w$ {) z. X* V& y- k
Create a new model to simulate the following system:: e8 ~5 v! Q* T# w( ]
Loads are created with an interarrival time that is exponentially . e& x/ A# H( k
distributed with a mean of 20 minutes. Loads wait in an infinite-
7 l6 e9 j6 x0 W) {capacity queue to be processed by one of three single-capacity, 0 H5 `5 b5 l5 l. F
arrayed machines. Each machine has its own single-capacity queue ; k! B: m2 C& `9 `3 J: s
where loads are processed. Waiting loads move into one of the three
$ e0 m0 v( L2 a0 gqueues in round-robin order. Each machine has a normally $ d; K2 W7 H0 y9 A. U1 ]" |
distributed processing time with a mean of 48 minutes and a standard   X4 U8 w# j: d% B0 i- n. n* {+ D0 _
deviation of 5 minutes.
+ N, E- V: |3 ~, s5 R" [- ^The three machines were purchased at different times and have
, W6 s% y( i$ t. xdifferent failure rates. The failure and repair times are exponentially . a- K7 J' b9 y; y; u: }
distributed with means as shown in the following table: % P& H  F# }& X$ h( Y8 E
Note The solution for this assignment is required to complete
3 u6 Z6 [, K" v& zexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of   G4 V# B: z6 ?/ ]
your model.
. m; I" G* O0 w6 V9 ]7 t% Z+ y% R5 x4 o3 F9 X/ k% v
MachineMean time to failMean time to repair. S. ~: }* l- g# s/ S1 d6 T4 Z
A110 minutes      5 minutes/ r0 Y7 z2 \+ N( D- V
B 170 minutes     10 minutes
% t7 Q/ I* [4 s# W4 FC230 minutes      10 minutes2 S9 t# F, o* S3 g

1 e3 x  [) R4 rThe machines also must be cleaned according to the following
4 i) l/ z3 N8 i6 K4 B) K# _( ^1 `schedule. All times are constant: ! v) h1 o+ K+ ?) S( g. j& e' K7 w

* @; [2 S5 \# n% T6 r  ~MachineTime between cleanings Time to clean
' J: ^) G$ Z( A, ~A90 minutes        5 minutes0 J9 s% ]& P6 V& ]0 E
B 90 minutes       5 minutes# ?' e3 h) x8 C
C90 minutes        10 minutes& M1 w' `9 s, z* Z. ]7 ?4 S- ?4 E" C% H
/ R' O1 ^! [( V! a) q
Place the graphics for the queues and the resources. 7 Y6 c& b$ g% H9 _7 D% n
Run the simulation for 100 days.* i- {: X+ @. D" y. Z
Define all failure and cleaning times using logic (rather than resource + s. h8 F/ C, y% n% ~
cycles). Answer the following questions:5 Y% `' y$ l4 f+ a) I& @
a.What was the average number of loads in the waiting queue?
6 A& k# c: N+ y- m+ n8 |! hb.What were the current and average number of loads in Space?
9 [6 A4 h- g4 g; a# C, K4 pHow do you explain these values? 6 Z  a* Y, O5 q+ r9 F4 x

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉/ E3 K2 [! d" @
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
2 N9 {: {" E: o+ b这行好像也不太对,各位先进觉得如何呢?+ J1 ^& ]5 H/ U! B/ U
- d! U* _6 p3 U9 x" D. Q- W
begin P_something arriving
: P/ ^7 q+ O/ S$ `   move into Q_wait
5 C* Z# E4 {1 M; m6 a2 A   move into nextof(Q_mA,Q_mB,Q_mC)
) v% H" W6 {0 b- p   use nextof(R_mA,R_mB,R_mC) for n 48,5 min! E5 t" F4 V" B( f
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
: I7 z% J& j% o; H9 @. b8 Oend
" H& }$ J7 P3 ~+ V+ n$ R' U9 y" N" T$ U
begin P_mA_down arriving
  d: y  r& z0 K; R  n; s   wait for e 110 min' |+ c! K( U9 u& U( g
   take down R_mA
/ O7 T  |: V8 @: |   wait for e 5 min1 g( d% |0 q' N" }* G0 J: ?
   bring up R_mA4 Z! ?8 {) f6 \& K9 a
end
9 _8 h# r  B/ ~( y. h, ?: V: S  T3 _  C
begin P_mB_down arriving
, v. V1 N) X+ ^- s$ O8 j   wait for e 170 min
/ ~; R. p6 b3 t  X5 e' V   take down R_mB5 y/ c- `, ^# A2 I9 J" y
   wait for e 10 min; Q0 K* v  V- _: ]" z: ^; X+ O
   bring up R_mB
! n% |( z6 w. H' nend9 j- J7 ~+ Z" l, V; ]$ G5 ?2 T+ o
& N- J; _8 Y$ R7 Q* b- [5 h
begin P_mC_down arriving6 `9 |+ x5 g/ M3 i  ~4 ]
   wait for e 230 min
) X3 Y, V9 S4 Q5 x+ j   take down R_mC# _; d, X# V) U/ H, u
   wait for e 10 min
6 f  P$ N7 M' j/ f3 k   bring up R_mC
$ _! f/ v- @/ P# y+ }6 ^end/ t- s2 b0 K' Z' q( h. V

( T% N: Y, @3 Dbegin P_mA_clean arriving
" G1 a1 c$ a; t! O   wait for 90 min
/ j4 t7 J3 a8 X# a: m2 K1 X   take down R_mA  W  q0 K% X6 g* S
   wait for 5 min
/ ~8 E; B4 v6 `5 d   bring up R_mA) `; ^; l% D% e4 Y& p2 ?" o
end& o: l) t5 e: d8 o4 S

2 I# f/ A2 o4 M# f' Z9 ^) ^, Z2 vbegin P_mB_clean arriving
, S+ V  P" B8 X: |/ ]5 [) F   wait for 90 min  c# H6 D) W; b, ?& c
   take down R_mB
. R1 N) z/ |8 w4 k6 j5 c2 m   wait for 5 min
# A2 Q+ e" T8 `$ }2 u   bring up R_mB  v( t( {9 b# s  a4 D1 U
end- I/ H! [+ v  y6 X, r6 G
, o# \7 f( x: _$ k5 S) S- v
begin P_mC_clean arriving4 M- n; I" s2 t; \0 z7 W" D0 A) E
   wait for 90 min
* c8 i0 }2 p0 v" Q, F3 b. x+ J   take down R_mC
2 c0 }! y5 ]- |5 {$ }' |   wait for 10 min
6 e+ p+ P  `4 I4 X' q& u* L   bring up R_mC
7 A) `- C+ W2 k1 O6 o# F/ I  dend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving" n* q: [( @; i( C7 `- @. [
   move into Q_wait5 O: j+ V8 n6 R
   set A_q to nextof(Q_m1,Q_m2,Q_m3); b8 m9 V& @( R4 K2 Q; d
   move into A_w, H/ Y0 c. o, I3 \/ a, Y
   if A_w=Q_m1 then use R_m1 for u 48,5 min0 q4 f6 n6 k. n. l
   else if .....then use ....for u 48,5 min, g7 N& b: s4 C0 D6 u9 X: n" u
   else if .....then use ....for u 48,5 min  
4 N! @' s# l: N2 A0 y9 R   send to die
* M4 K  D" X6 n3 o! Lend# ?; o* m1 _; H, C5 {
" _" ?8 u' I# ?5 I* Y
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-8-27 12:57 , Processed in 0.013270 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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