设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6862|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 9 }0 a4 s7 [2 d; c
- u# B) Y  g# g) f7 |" d+ Q
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去4 Z$ f; c' p& e: i9 w# w
6 v9 u5 \6 D! ^" e, _, {
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
  Z9 D) e7 R/ ^* r( ~5 a
! K! O- _! y+ b
--------------------------------------------
" L! J5 }/ t$ a8 {begin P_something arriving( `# r, K& u3 I) H5 C' u
   move into Q_wait
0 K5 M( B/ C# L! S   move into nextof(Q_mA,Q_mB,Q_mC)& b2 w, d' ~1 q6 E* p
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
1 n8 b( G3 f+ l: G# [   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
2 C3 h8 }$ m9 Q6 ^3 ]/ E( |   send to die
' Z3 q/ N# ^0 c  dend

, o. l% r1 b+ { , w3 d: s' s) E! @. F# M
begin P_mA_down arriving
  g- i5 ]% \+ l- t" U! z0 E   while 1=1 do # U' u* Z% `5 E$ @' g4 c
   begin
% @5 a2 r7 `% a) S, m   wait for e 110 min
( C4 `( F- X6 Q4 p* G! Q0 z, ~   take down R_mA
8 l5 i& C& c8 S% a0 M) G9 T- l   wait for e 5 min6 b% N  o) q6 x! q1 U5 d8 x) u! G
   bring up R_mA
8 A' _( s: }; A4 k$ R  b* s: i   end
3 v( q3 I7 g; j6 J4 Yend

/ o$ u! y! D4 W5 g
% j* L- ?. N: obegin P_mB_down arriving* ]8 \% y5 P& S" X6 ?  ]( u
   while 1=1 do
. r  P! `6 N4 o" d7 P  j7 Y   begin$ s6 p1 {) L7 ?9 w) b7 d( J$ J% q/ H
   wait for e 170 min
0 [+ A+ _# \/ m/ m6 V! t7 n   take down R_mB
9 ~! o, |0 k* n! ]. n7 ^   wait for e 10 min" z0 J- {4 K/ _( d& z# E
   bring up R_mB! v) R5 [9 @; T
   end. P) }( K1 n$ s, _) _7 H& W& F
end
8 {4 `2 G" c( N/ o7 [6 m/ z
, s( j. h% l* _! J$ ]
begin P_mC_down arriving1 J" H5 s  v6 \7 e
   while 1=1 do , s- f" r5 H4 u  b% X
   begin
, T2 Q6 q& Y, }3 T   wait for e 230 min: N8 v+ I; e: P, I: v, M7 ^
   take down R_mC3 R  p- W5 i  l4 Q1 |" w" L
   wait for e 10 min
6 a5 N+ X9 l4 T8 L- w   bring up R_mC
3 P) R# w* ?4 v: y   end
$ r. L: K- |1 _% J# |, R% xend
0 K- v2 N: ?" x2 p: ?
9 G/ |# Y- ]4 E% F# u& D
begin P_mA_clean arriving
8 i( o, c7 r. V2 D& p   while 1=1 do. a, ]# E  B3 s/ j" J% J
   begin* ?$ x# S5 V, g3 |9 X1 o5 o1 U
   wait for 90 min
( `/ [- k' x& h: I& B* D   take down R_mA4 Z5 S" b4 h8 d+ g
   wait for 5 min
4 x+ R# K. k) C7 m2 j$ T   bring up R_mA
2 J5 \$ d5 O3 Z   end
) g- M  B- S) uend
3 ^7 x; L! Q) D( `2 r  \6 L
% a; z+ {* H0 f% z" I
begin P_mB_clean arriving; X, R! h4 N  ~$ H5 C4 x/ I7 b
   while 1=1 do2 h1 c/ O8 S9 A0 N- ]
   begin
1 P& q$ r- ]1 M6 Y$ A   wait for 90 min
# e3 B; v, T: |$ ^4 a5 {   take down R_mB
* K; t: h5 B6 {0 m4 L; P. }+ z   wait for 5 min
$ v5 |( t+ ~+ l   bring up R_mB$ \# N, Z) G# Y
   end6 D* C9 q" J9 q* }! S7 q5 ^) V
end

/ ^- [- Y+ L- {: A4 `0 {) i
: i5 b; B/ @  Q, Z( W, Qbegin P_mC_clean arriving
. i" I7 j8 `! p- @: T5 e   while 1=1 do+ C6 Y$ L3 w! p" X
   begin4 g' z. [! r% W7 C  V2 @6 ?
   wait for 90 min
! s6 D# [2 w, A3 i   take down R_mC
' e9 g# c" l  {# r8 T   wait for 10 min
- w4 W2 A5 n$ ~6 b; d   bring up R_mC$ }7 x  A2 |6 @7 y
   end
/ g: y. C& s0 o5 send

/ c& _; n! k# o3 m7 @0 g----------------------------------------
  ?* M# [9 d/ I; O' h + Y9 X1 Q9 n% h. c; n8 d: Q
Exercise 5.92 Q# C- T' J  m5 A) S
* n' ?% W5 \. _7 j$ T) ]3 ?
/ N" i8 z6 }4 b+ g  e6 k
Create a new model to simulate the following system:5 q9 b1 j$ w; y2 N5 M: l# a* H
Loads are created with an interarrival time that is exponentially
; M8 q7 e8 I- `& y/ Z. F0 x% Hdistributed with a mean of 20 minutes. Loads wait in an infinite-
( W6 N3 V& ]+ P; s' `capacity queue to be processed by one of three single-capacity,
7 U6 M% _( h! W* E! I5 H8 G" larrayed machines. Each machine has its own single-capacity queue
7 Y0 E* U  h. G" G- Fwhere loads are processed. Waiting loads move into one of the three
) x. H# x9 b3 f/ j( ^queues in round-robin order. Each machine has a normally ( [. U0 n1 ]& d/ R% }
distributed processing time with a mean of 48 minutes and a standard
0 r  O6 A" X0 w- ideviation of 5 minutes.
: U" s. K0 K6 p% jThe three machines were purchased at different times and have 5 I. |% D6 ?5 x
different failure rates. The failure and repair times are exponentially 0 X5 x# b1 }4 M  H  K
distributed with means as shown in the following table: % u7 w6 a$ L6 s8 z: ~3 b
Note The solution for this assignment is required to complete
' B) a3 L; B* Yexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ) D6 q$ `/ \" l4 g2 c
your model. / u# X5 m" B, G

1 H) ~+ w8 o6 ]* m/ F2 X8 F3 BMachineMean time to failMean time to repair" V+ o( G2 |1 j0 V: ~
A110 minutes      5 minutes- |' x  T  C( o- Q0 Q
B 170 minutes     10 minutes# A1 N* g2 h2 w% x5 s& n! J
C230 minutes      10 minutes
) z  w# L/ O9 o- H4 y
- J* h2 R  E+ b2 m( y% tThe machines also must be cleaned according to the following 9 @" ^( t1 H7 a4 n( u8 c1 Z
schedule. All times are constant: & I! g5 P- C7 y' b3 Z. }9 j

$ ]6 ~: t" _; e3 I- G* `MachineTime between cleanings Time to clean
& P- E, p2 h4 ?% jA90 minutes        5 minutes
/ D; C3 d9 @: Z1 PB 90 minutes       5 minutes
" n+ y: S: x; S9 V4 [" aC90 minutes        10 minutes
# N& T! M. r" q% V! I, Z
  |. ~/ I7 ?" [5 B" ]4 FPlace the graphics for the queues and the resources. 4 P9 ^8 O( B  r8 ?7 `' ~
Run the simulation for 100 days.
' N) ]6 }8 S; [# ?8 CDefine all failure and cleaning times using logic (rather than resource : H) ^* W- u! C: _/ \
cycles). Answer the following questions:* a% v. p$ `% x% H* V" V7 X* N
a.What was the average number of loads in the waiting queue?( }5 O9 G% }! q
b.What were the current and average number of loads in Space? ' ?; ]! o7 w5 ^5 e
How do you explain these values? " d% w( E0 T3 }+ x$ b( h

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉, p2 V0 ^* a: g$ a7 g, H4 O
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)! K: o9 Z* E9 d2 r, R' }
这行好像也不太对,各位先进觉得如何呢?
% y: G: F7 p1 h# h4 E5 ~0 A) k9 H0 Y. M& s3 l+ h2 d# U
begin P_something arriving: p3 g- F" s. P7 P# z5 J
   move into Q_wait  _+ ?: o2 p" `8 p0 `" j) c2 }1 L* V; p9 M
   move into nextof(Q_mA,Q_mB,Q_mC)
' M" R+ l/ h/ G7 r4 c5 F   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
/ e1 M8 s5 ]/ J5 j5 B3 A   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
) d/ l% R% Y' Tend
5 @- G5 F  Y; w/ J: E7 m
0 s- t. {; V( p  f3 bbegin P_mA_down arriving
& a& x; M' o# Y. _0 L) t1 B3 {   wait for e 110 min5 ?4 j+ K- T+ S
   take down R_mA: i9 p- t% ?0 g- _0 n
   wait for e 5 min" H+ X- i: m  B9 {5 K5 A$ e
   bring up R_mA
0 s( P3 V4 U/ `8 h# K4 Uend- V3 Y4 ~/ C+ m3 ?$ t4 N7 E: }! i
( R" N) N+ t) V$ l
begin P_mB_down arriving. J2 v' d% g  ~+ D! V0 t
   wait for e 170 min* r# \. T0 T& T( j
   take down R_mB7 x4 v* S. i* T; G5 m: t
   wait for e 10 min
& d; k9 l: ~/ |) P. i9 q   bring up R_mB
, G8 _& u; Q% b0 w% Gend; \. j( L4 T7 B& t& l0 o2 P+ _

7 n: S7 {# q% B' v% j% z# D- Rbegin P_mC_down arriving
) Q0 V* V. V! A8 S0 [$ f8 K6 u   wait for e 230 min
% U) o6 r; t# H+ w4 t   take down R_mC7 P: C/ h# X% U# f; {' G
   wait for e 10 min
! X$ ~+ e. e5 C% j" b* Q   bring up R_mC
0 ~$ c: E* {/ l0 |( mend1 C. ~/ ]8 Y$ {6 T
2 _  c7 _) m. w: N% P+ K
begin P_mA_clean arriving( S( y; H# b; ?, c* p
   wait for 90 min
' L. z5 }. p9 B( N# U9 i   take down R_mA6 n9 _" E+ s% n# y& X3 A, V
   wait for 5 min* p( X" y# }0 P! [6 h. g
   bring up R_mA
- j- Q9 S! z' S6 y& L) ~end4 y& n6 p: g2 S+ ]5 K0 G

$ h% a) N# T* ~( {begin P_mB_clean arriving
. D9 N. J+ _+ F. ~. G, j   wait for 90 min
% C$ t- C, i2 d: V6 `   take down R_mB% I6 U- `  p2 @' Z/ o. T; F
   wait for 5 min( v; ?6 M0 `0 U# A% h# `7 u8 `/ {
   bring up R_mB
( ?  c/ K' f' o9 Uend
+ O  W5 v. S8 n) ^4 \" o: {# u& b' `4 ^8 z( u
begin P_mC_clean arriving
$ f  Y" K# }( r' a( ?! w  [9 w   wait for 90 min
- u; R/ m( h5 D/ G5 t   take down R_mC
2 U) w. d$ i$ P4 i9 |: c& [   wait for 10 min& U' h" p+ }0 u
   bring up R_mC8 ~/ Y& A  e4 j# k( C& R* U
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving7 [: g: y4 y2 i
   move into Q_wait
5 d& h3 B! N# W- A* i# I   set A_q to nextof(Q_m1,Q_m2,Q_m3)( P8 J; L6 p1 ?, x8 Y4 g/ F
   move into A_w6 C2 }5 j: @: ]" X5 @" \/ f
   if A_w=Q_m1 then use R_m1 for u 48,5 min
) r5 b7 {+ H, b/ y   else if .....then use ....for u 48,5 min8 \6 i+ @- f( E1 t
   else if .....then use ....for u 48,5 min  
2 u& D& x9 h% ~4 P& b- C+ w   send to die
1 x2 v9 a' U, J* ^2 A. J* bend
9 S: `7 v1 o6 i1 b+ T/ V, x3 p2 S  L7 c& y" B% e
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-9-13 21:16 , Processed in 0.015926 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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