设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7091|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
7 G, r+ U. k, k5 \' p( e0 \
, |9 Y9 ?  v, X$ e) J# M底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去) I2 M8 P3 b" }2 [

7 m% J( Z3 t5 E/ _不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
+ Y0 }0 u7 u% k/ D5 @. W2 E
7 X  M  J3 j$ S8 @( h, J+ [) n
--------------------------------------------
8 y9 ]$ f7 N, L6 P  ibegin P_something arriving
) L/ D. E+ s4 A) y. D: P   move into Q_wait9 a; A' N% Q+ z" `
   move into nextof(Q_mA,Q_mB,Q_mC)& a5 y, P/ C# S; q1 s, j! ?
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
3 q! E& x- i1 m. N+ t9 S! t3 h   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)5 m5 \; |1 U+ ?0 w
   send to die
& k) ~! h9 z/ h( I/ o% Send
2 T0 n" r( G9 K

2 c% ]5 M' R4 G5 \; Mbegin P_mA_down arriving, [* Q" U/ ~% ^/ c. M, r
   while 1=1 do
# V, R3 k. m- K1 ?/ W- y( C   begin8 p1 Q# j1 Y0 F$ B! e& r! G! P
   wait for e 110 min" i, D9 N+ T. s8 q( K
   take down R_mA3 K4 k8 _5 Q: @9 i
   wait for e 5 min6 F4 _& Y  k' z; @8 B6 T: h3 g
   bring up R_mA
. V4 R" m- Y9 y   end
5 e! n  c7 R- m* p& }& z7 D5 Oend

/ \8 @; _7 \( {! ^7 | 1 V$ [& J) y' V. f7 C3 Q
begin P_mB_down arriving
9 T4 c3 o, @4 i; v# y! t( M   while 1=1 do
  x: U' h; m8 q   begin) ]# a5 t/ p( U. ]9 U: ~% I
   wait for e 170 min6 F; M: [) i% A$ z8 B6 Y  _; E
   take down R_mB
7 Y) ?( A1 B# I# y/ E' b: \   wait for e 10 min, F& ]$ G; R% G( D
   bring up R_mB' S9 R7 f6 O1 z0 f8 S2 X
   end9 t  W* o( g- ]0 b, Z0 B$ Z4 L
end
" r  `$ j4 q! D1 w6 h- w- O& r

: F8 R/ T+ U* @. w; H' \2 Abegin P_mC_down arriving
5 m" k1 k6 K+ e/ |5 \2 g8 ~   while 1=1 do ; z! i! l# n+ R  D, q+ u
   begin
8 \! Z3 t* @" N& _6 F5 H   wait for e 230 min' p5 P3 \# t! ~8 v" _, T5 |2 F  ]
   take down R_mC0 J) a; E: P' U1 ?/ B1 o0 S- y4 d5 p
   wait for e 10 min$ j6 @# E6 a0 o) f" e/ d
   bring up R_mC! b5 A% ?) h5 G/ h% t& F. y# M7 _  X% \
   end( [! e# F$ O7 g. R+ v. m( h! V
end

! R5 d; ]9 b9 N  q/ ?- B. q7 J . c( @6 ^# B3 |) q# w* W6 X! f  k
begin P_mA_clean arriving
6 ~# a; `' S" x   while 1=1 do7 k# `. t- B; B, }
   begin
5 x$ h- K! J( t; k4 P, i   wait for 90 min$ i: p+ V% y. R: C; }* s, E
   take down R_mA
; c  z  I: v& q% ^6 ~$ {   wait for 5 min
" B1 d# x- b) g1 v   bring up R_mA* Q2 Y5 C4 J: d7 M& i# Z
   end' D# h" H* C- l$ B
end

! b/ C6 x0 t& ~3 U& q! U8 c ; S; @& E( G4 v
begin P_mB_clean arriving( i7 G4 L3 N* ^9 I4 |. A' A# D: U" H) Z9 L
   while 1=1 do
0 L: f% N& w2 q5 E6 p/ `' p/ y   begin
* N; b4 F% f, _  X' L& m' Z1 n& j' R* g   wait for 90 min# o! ?# V: c+ D! R; t) I, z
   take down R_mB
8 d/ A$ R1 a* X4 i   wait for 5 min8 z. S( k- I* F* C2 r! i
   bring up R_mB6 _- Y' K0 k, C4 `9 A! u: h
   end7 U2 d- @% Z" C* W2 l
end
6 H% J0 U5 m# k. W+ V* C$ b
6 R$ _( w" n* c: U- ^0 K7 X
begin P_mC_clean arriving
& t& ]3 Q: g) @4 n5 y  V: }   while 1=1 do
5 W/ b( k* V& U& Z! u$ X   begin
" C! y6 D3 ^4 ?' p   wait for 90 min3 w$ P9 h5 _& c) C3 @
   take down R_mC
8 v/ u7 K! A% f& Q7 V4 \- e   wait for 10 min3 L( Z& `8 v* F
   bring up R_mC
4 L6 {- ]" }0 \% C6 W" c8 s1 e   end* q% Y7 s$ ^/ r
end

$ s' w, h! y( U----------------------------------------$ T6 d3 R, U0 W# ~* U+ _

1 V, }# Z. j* E5 cExercise 5.9
  G. W' G+ a3 P( b1 N
9 |: r+ d8 X9 k9 r2 v# g; j! \. |2 o1 Q- r9 l; ~& S5 A. \" H
Create a new model to simulate the following system:
0 e9 N, N" ^" W3 N7 V2 g- JLoads are created with an interarrival time that is exponentially
- y8 ^8 U: e4 O2 E$ I! I' N. {distributed with a mean of 20 minutes. Loads wait in an infinite-
% }/ }' b/ f) k% \& N" [capacity queue to be processed by one of three single-capacity, ) _6 H( I4 p/ ]& x1 N3 q6 K* P
arrayed machines. Each machine has its own single-capacity queue 9 y$ D+ c1 s# u* ?+ b! |" y7 A
where loads are processed. Waiting loads move into one of the three 2 K/ c9 G* I/ ^$ u/ b/ J
queues in round-robin order. Each machine has a normally % o4 R7 `. J% M% S0 ?
distributed processing time with a mean of 48 minutes and a standard 2 M; N3 s7 E7 ^: A. R4 `
deviation of 5 minutes.9 B6 Z1 h+ V3 G; a" j
The three machines were purchased at different times and have " u! s& Q1 f. s0 ]. K) J
different failure rates. The failure and repair times are exponentially . X! |* F9 S/ v
distributed with means as shown in the following table: 8 F$ v+ n, F! `/ z) i" L  M8 m2 K5 l
Note The solution for this assignment is required to complete ! A  }0 D1 E; i0 ^# y3 t4 Z
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 2 I% T, q% a# t. n0 A
your model.
+ [0 K" X6 j8 l7 A. X+ i/ E3 D: b6 B' ~6 `. T2 q
MachineMean time to failMean time to repair& k- N  [3 w% `
A110 minutes      5 minutes0 ^% j5 d  E  H! Q6 n
B 170 minutes     10 minutes
9 F9 r% b7 B/ ]0 c2 ~! j6 gC230 minutes      10 minutes
& p8 @3 p, X7 e+ `" ~0 p
& R1 R0 l4 e! W/ w. S; D  m0 yThe machines also must be cleaned according to the following
' Q! _% @& M' {9 lschedule. All times are constant: 7 T  W3 F1 k0 ~0 T
6 M5 _9 G2 l) ~7 X2 l1 t5 H* ^# e
MachineTime between cleanings Time to clean! r; @& n* Z" v- V+ D5 a
A90 minutes        5 minutes
4 p7 h1 d% a7 E6 ]2 bB 90 minutes       5 minutes
( C/ @  i$ Y. m" n( PC90 minutes        10 minutes- \& h) n& Z, D, e! P  {

: z$ W3 j3 w6 E3 \3 v8 xPlace the graphics for the queues and the resources.   I: N# [1 l9 B1 m) @3 O6 G6 \
Run the simulation for 100 days.
& d" y" [8 s' GDefine all failure and cleaning times using logic (rather than resource $ u  i. a6 c4 k6 ?& P( y7 D  _8 m
cycles). Answer the following questions:
9 A' v$ h% ?. ~5 B# sa.What was the average number of loads in the waiting queue?: E# o4 ]- C' S3 E) Z2 S
b.What were the current and average number of loads in Space? 9 y  i# e& K6 M0 m, y
How do you explain these values? . P$ I$ @6 i1 c& J! |) a5 w

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
3 `0 M  I, E% Ksend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)9 X/ \4 p* n6 ]% e
这行好像也不太对,各位先进觉得如何呢?
% r" }  M# J# b! c* a) o, R9 `; o$ P' Y8 n# s! J  u6 x, p* M' i
begin P_something arriving$ C8 N' l7 r: W5 [% h% ~
   move into Q_wait$ O) H% I2 j5 _7 B8 o8 \
   move into nextof(Q_mA,Q_mB,Q_mC) ! @( b6 e' }6 F# b! f
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
' n* w# O- O+ t) r   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 4 q. ?7 v- H5 \% Z+ X' N
end
. `- J. ^  V. }3 ?
, ^' |# l1 ~# g7 k/ }begin P_mA_down arriving6 F  P* F% g% V0 q% ^( m+ D; f
   wait for e 110 min. V: Z) `; a5 q* E1 K
   take down R_mA
' S: j7 ?, G) Q/ ]( v7 s, `   wait for e 5 min# v. \- t* k3 _! g5 q* a
   bring up R_mA8 ^( A5 p+ ~" W1 g! U
end
* H. R$ o  ~' i7 D% i. O" G4 ]
7 y5 K+ U- Z3 ]; Q4 Q* g! w1 x: D3 _begin P_mB_down arriving8 L$ }1 r: D3 P3 b5 {- O/ M
   wait for e 170 min
/ D; _, l5 M: b* K2 q7 V  i. o   take down R_mB, J6 P/ V/ n- e' K
   wait for e 10 min
. B2 _7 E3 C; h" r3 @1 ^' F   bring up R_mB' P  O3 _8 H- g% B
end. W, Z. E- L  v/ E# r! l4 R

0 M# s$ }- D7 W1 ?* q5 {begin P_mC_down arriving
1 D8 z3 M! t' u5 H" `. U   wait for e 230 min
4 L) ]/ Y. Y8 X$ f: t4 E( P   take down R_mC3 e, Y, I" R" p+ r' `  p
   wait for e 10 min4 M$ _7 h! z% V
   bring up R_mC* O) T& m6 w; k5 N8 f
end9 W, o$ Q7 _7 U, b

4 b5 X7 e' C* \& V. l* q7 N+ Ibegin P_mA_clean arriving
1 @1 a: X5 Q" C0 s   wait for 90 min
, w, c- i- h7 u2 @% H   take down R_mA4 o0 ~  ?+ }9 x# |
   wait for 5 min' U& A: G8 `9 W, z1 i
   bring up R_mA5 {0 q' J; n0 p, f# Y5 ?$ y
end& K/ M: g" B3 n
/ h+ z- p! ]2 T. |9 E
begin P_mB_clean arriving
* _: t0 C; I7 m: N; T, W   wait for 90 min
6 ?5 s: u0 u& P3 y! [* @- b   take down R_mB
# U+ E' e$ [  b! p   wait for 5 min# l5 }6 I0 o' Y7 d+ ^5 p5 q
   bring up R_mB/ U4 {+ i& E- w) K8 |( q9 P( o; T
end1 b! v' s3 x# _" v& U
  A4 Q! c( W: _" c" N
begin P_mC_clean arriving
2 l3 Z* v& i8 C$ J9 B2 }   wait for 90 min4 d9 z- L6 G% O: J6 y1 G. @
   take down R_mC: Z9 K% R* n2 w# y
   wait for 10 min
' D0 Q% d, {* D( ?- ~   bring up R_mC
2 E  X# q  w* o8 P  B/ `* pend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
9 A1 G1 M8 [' X6 d: h- Z   move into Q_wait1 j5 |6 o7 n6 o5 H) c4 U
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
6 j/ F- z! Y' r' M3 d& q   move into A_w: H8 ]$ N; ]* ]+ g. }
   if A_w=Q_m1 then use R_m1 for u 48,5 min1 e2 @$ \% u; r) F5 ~
   else if .....then use ....for u 48,5 min2 H6 M& e* `8 k- W
   else if .....then use ....for u 48,5 min  . S1 W% |; ?! O7 j
   send to die
) K8 s) o: E3 r9 E4 l$ |end
) M4 n0 W9 E" v# ]. ?6 _
1 o. a! ?% W0 `供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-10-29 11:23 , Processed in 0.013257 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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