设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7336|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ; w/ `2 B" R4 Q! N
# Z; O/ |% p0 h/ b2 T$ m
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去0 B. Y) K* ~$ W3 X& Z# c

" F5 }+ G/ w& _不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!* O6 a& L' s5 [' l+ Z3 i
# ^: B0 m5 Z- p6 b( \: {) I
--------------------------------------------
5 {8 \) m0 ^# n. ubegin P_something arriving, b! X- I9 z! q3 D
   move into Q_wait
9 \8 R: L7 s# F3 F- t4 ^% C4 ?   move into nextof(Q_mA,Q_mB,Q_mC)# D1 }; s. m4 c* M1 n1 Y
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min; a' b8 `$ v. {3 y
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
+ l* H, P1 w5 Y   send to die6 x: @. F  n! b" S/ R' B$ v. v7 ^
end

" ~/ W, U6 y. n0 I
5 `8 K5 ?# o3 L: U4 Z+ }begin P_mA_down arriving
- H8 K& i' ~* E   while 1=1 do $ I$ G( j+ X4 a# L/ q* E
   begin
0 @. ~* d( R  W' v  ]   wait for e 110 min7 {. ~/ G" X* s- z9 S
   take down R_mA
9 s2 d0 H1 Q4 t   wait for e 5 min2 K8 f; f3 r2 e2 h3 `3 p. \
   bring up R_mA
/ h0 F) N& @5 k' ~2 R2 z   end& F! p! M0 Q; X! ^: L: M0 h7 A
end
- m5 Z/ S6 J! L1 z. y
7 [3 t. X, T! U7 y
begin P_mB_down arriving" W5 n9 C' P8 H7 l/ r5 [
   while 1=1 do( a1 S$ U; @* }$ T4 c
   begin$ z# {' z9 E7 Z6 p8 |' ?
   wait for e 170 min% k- f) {7 G* |5 B: E
   take down R_mB
5 q, W7 S2 e2 v& @" A   wait for e 10 min. \3 |0 ?, S% j9 n) |. g4 o/ ?  a
   bring up R_mB( b" y3 y3 K' q" `' t  G
   end, e' L9 }1 p0 S6 a1 N3 g  P
end
' e2 |/ d3 |! J9 m7 j9 I
8 n& l  k  y" a5 F
begin P_mC_down arriving
% P. t7 R* k( y  x* M5 B% w   while 1=1 do ) F2 O, t  W+ {9 {6 J& M$ C. k
   begin
* m: }- b4 L- E. H2 c   wait for e 230 min1 Z9 H2 g, k! Y
   take down R_mC+ h0 m& R; r) g9 B* C7 @
   wait for e 10 min
  J" h$ Q0 _6 W6 J( Q; |; j   bring up R_mC8 h0 b9 h8 ?8 y( @8 f
   end8 O  x$ t% _; Q
end
& n  p: [- y/ j0 L/ [
- ^' ]3 s' A8 |4 l0 m% l
begin P_mA_clean arriving4 C3 j- }. C- |9 y( I
   while 1=1 do9 q" c* _8 b% `9 @4 q, k6 [
   begin1 r% i; Y9 N; F2 D
   wait for 90 min# G+ p. c8 c) r, ~$ g5 F
   take down R_mA7 F9 J3 G/ W6 j1 h; z' V" W# B
   wait for 5 min5 X6 t  w. w+ ?# M
   bring up R_mA
: M  \% M8 O2 J   end1 _# E8 C9 }$ ]  R4 Y# B
end
$ O9 Z" F& `, y2 N
3 s# e$ B4 i* C6 J& x/ L
begin P_mB_clean arriving
  P, D: V0 \7 s   while 1=1 do
; g0 y+ i7 p7 e! X- e8 H   begin' C% Y6 S* P2 S4 b# |4 ?8 |6 ]1 o! n9 m
   wait for 90 min
2 ~5 A2 d2 k+ ~' y: p& s   take down R_mB
* E1 O* x" M/ V0 A/ I0 m7 A   wait for 5 min; N" {+ W+ w. m8 n. ~
   bring up R_mB
- t; `; I7 r2 U7 s* ?   end
8 a4 @3 P. A5 dend
7 n: N' p" D7 g
/ X- F, D/ N2 P; |' T/ M( p& a
begin P_mC_clean arriving: U1 V0 H8 l9 Q5 q8 J
   while 1=1 do+ N# E* Z6 x* o6 ~: ~, T
   begin
* S" y2 G# O$ c% c   wait for 90 min2 g: l$ K5 e9 z4 K" l
   take down R_mC: ~0 N4 B* _$ _, f! C3 g9 P
   wait for 10 min% e6 v5 Y) @" ?8 J( Y
   bring up R_mC2 v% a6 J" v5 G' x  t# Z4 \6 D
   end
/ A3 K( b* T$ x* i) w* V6 [8 Jend

. Q7 b% x+ D2 ~" w7 A4 }  D. c5 }----------------------------------------
" K* @5 U) [1 W / i- a2 W& n* P3 U! `, m
Exercise 5.9
* A# [7 K* J! a( q5 G
& P0 `  g9 b+ ~9 R* u9 w) W3 |9 r$ E2 r# W# O
Create a new model to simulate the following system:4 G" m- {* a7 f8 v* c
Loads are created with an interarrival time that is exponentially
) \6 L* f5 p/ e; |* \4 _distributed with a mean of 20 minutes. Loads wait in an infinite-) a% W0 g+ p- ^% i  t
capacity queue to be processed by one of three single-capacity, . ^+ t. t9 C7 H6 a
arrayed machines. Each machine has its own single-capacity queue ' x* _8 g" ~2 V1 @- G
where loads are processed. Waiting loads move into one of the three - I3 ]* x# [& ^9 x2 Z
queues in round-robin order. Each machine has a normally + Y; {3 R: \6 g8 c8 T
distributed processing time with a mean of 48 minutes and a standard ) @+ ]& n9 f/ Y0 J& Z) W
deviation of 5 minutes.
  z0 e0 \. G  \( _) y5 w# hThe three machines were purchased at different times and have
4 Y! Q  W. x+ F' N0 hdifferent failure rates. The failure and repair times are exponentially 2 v* i& v$ B: t
distributed with means as shown in the following table:
/ v0 I& B; s) v# q: dNote The solution for this assignment is required to complete
5 T6 Z' h& x- k% Eexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
# a  c. ?1 m+ u" \% w) ?your model.
# U- I# x- R0 N: c. j' y( e3 t6 b2 n+ |. _' p
MachineMean time to failMean time to repair
( P& |8 [# j5 \- ]* E# k0 J! o. p! oA110 minutes      5 minutes% ]- l/ O* l' l9 d
B 170 minutes     10 minutes
* t5 ]) _; c. U8 U6 H0 pC230 minutes      10 minutes
5 I4 e9 W  g/ B! F( z+ F: t" L& f# G8 J( f
The machines also must be cleaned according to the following 5 o3 n; D' A# s, E: X+ C/ S
schedule. All times are constant: 7 _- U/ I+ b, F  d" c/ Y" p
% O5 ]# Z" c5 e8 f& I- z
MachineTime between cleanings Time to clean
, ~& d0 Q, `) D0 o/ j0 X9 cA90 minutes        5 minutes9 C1 H) R' k7 B- C- n
B 90 minutes       5 minutes/ g! E. q& S# }+ n+ ?0 ^0 X& Q
C90 minutes        10 minutes
9 Q8 C4 Q( u! J2 {4 w  A5 n6 k( u7 f  G- A  H) M$ t: x9 a
Place the graphics for the queues and the resources.
5 P% @) h4 K+ s7 m8 m. D& yRun the simulation for 100 days.& E& g. v% N5 Y
Define all failure and cleaning times using logic (rather than resource 0 i* ?# E! A, l) j) R3 W8 e2 A
cycles). Answer the following questions:
8 J/ S- ^7 i1 Y( L0 Ba.What was the average number of loads in the waiting queue?
- t; Y8 G% Z& X1 P- V" P5 }b.What were the current and average number of loads in Space? 2 X# |" B  H" h% _$ u$ W7 _
How do you explain these values?
7 N6 S6 U% N9 M8 A: U3 L

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉7 e& C# e6 R5 a. @' ~
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
' i2 U9 q6 g( e# p5 Y/ V这行好像也不太对,各位先进觉得如何呢?' j/ R2 y& H' |  L' ~& Q
# q8 R' v6 y; L; H- L
begin P_something arriving
  Q3 h" }3 P; G/ n. y+ `1 c7 W4 Z   move into Q_wait7 @$ i0 J3 _7 G" n
   move into nextof(Q_mA,Q_mB,Q_mC) $ |" Y% L7 S! V0 g7 r
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min! e9 ?, ~0 O6 y  ^7 X5 ~7 h3 e
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
( X* L( ~* _7 F- }3 u# n  Z& tend
/ n0 m, x( x, d1 C/ _% P; c+ b5 q7 ?) f- a; R8 P2 c9 ]+ U
begin P_mA_down arriving$ F3 [5 m7 |2 r; L* y+ O* S
   wait for e 110 min
+ ?+ d/ n, a% q   take down R_mA
  a4 }0 s. s" |9 Z; X   wait for e 5 min' s' _, G  c2 J8 C
   bring up R_mA3 {8 R/ l7 q3 f) h) t7 }
end7 U; y0 L4 e6 H7 y- k
3 I9 G& |# h$ g5 S: f) I
begin P_mB_down arriving( p. K; `" K2 y( Y# v
   wait for e 170 min0 g+ P! q/ ^2 p8 b  ]
   take down R_mB, J( p+ e" }+ Q! |! ~3 s: ~" Q
   wait for e 10 min' b# |/ u# R% f, \/ C% q9 z. N8 p
   bring up R_mB
; |2 ~& Q. e- Hend. I& A4 y- e" X" ]8 }1 z8 S) m, b

; t) I/ f- T- ~% _begin P_mC_down arriving! A1 o2 ~2 I: P$ R" B! [
   wait for e 230 min
! S6 w0 z) m8 j6 p) S. Y   take down R_mC% y: O- h7 ?8 f' K) z
   wait for e 10 min
7 M( ^- c) R, j4 ^/ v; w   bring up R_mC! D; j3 V: s; k2 B
end
8 e0 Z2 y9 i2 g) ]6 U/ T
( e- `; {! x1 v1 M# X1 @# V8 @' ibegin P_mA_clean arriving7 }$ W! G. T' Q: [8 O, \: l9 V& X; l
   wait for 90 min
) _3 h+ g5 L  E6 S8 P! |   take down R_mA4 b; l. |" G, J) m1 P9 z
   wait for 5 min
; _# Q, r& |7 I4 C! E- [   bring up R_mA. s  y8 M! V) e! [# f5 H4 }) B0 @2 D
end
- }' B; K) i$ |9 H$ J1 F8 J7 p* ~- Q3 G$ V0 d
begin P_mB_clean arriving
! I' @; G; D- X6 ?7 v, z   wait for 90 min0 \( V3 l& C$ q  ~; e( c! ~3 l
   take down R_mB0 l, k# x: t. Y, _" ?
   wait for 5 min
" \: X- v9 [$ x+ S" S" W" n. |3 K& X   bring up R_mB
2 D0 L  [, o4 \" V1 P$ [9 N* `end( o5 j3 |( @0 [9 m% ]: a$ F7 d

# s* `! G5 a- t( l1 o: c5 Cbegin P_mC_clean arriving1 q: @& N8 `1 k, `
   wait for 90 min* \8 y, p2 A# G9 m
   take down R_mC
* q* `* S+ m* C8 l0 A5 P) ?   wait for 10 min: i8 t1 r# g4 B1 q3 ?) D
   bring up R_mC
3 }( d. N" @9 u2 Aend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
( l' K: Z9 e) Z, b; a% V   move into Q_wait4 q+ n9 r$ p/ [( _7 Y% q1 X6 O
   set A_q to nextof(Q_m1,Q_m2,Q_m3), P5 J% w# W/ p; X& i
   move into A_w
! E. J8 B6 C$ w0 ~   if A_w=Q_m1 then use R_m1 for u 48,5 min
9 p( Q6 l/ g9 P/ J' K* Q   else if .....then use ....for u 48,5 min  M( q/ X: j3 L
   else if .....then use ....for u 48,5 min  4 o1 N' B8 ?6 c& I
   send to die
4 M! t/ E1 y8 O6 e' f# I2 c# Q0 o) W' Gend
/ d/ w# ?0 }8 u5 G8 a, H" M( x! D- N2 _! M
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-8 21:37 , Processed in 0.014624 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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