设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7676|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
2 t7 ]# z- y. ?9 E' ~" p/ O: G; t0 j+ k5 a! X# D
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
9 p/ f, L) M8 J5 ]! `. \
6 }& [  ~. N2 ^4 w9 `, p不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
& T4 n$ S+ D: I2 t: f$ n3 z' D/ \1 f- U0 W  g
--------------------------------------------
, ]* u5 Q! R# U( ]) c+ Sbegin P_something arriving+ L  [9 Y7 A! K6 c. K+ Y9 J4 Y
   move into Q_wait
8 g9 ?6 c/ K) q   move into nextof(Q_mA,Q_mB,Q_mC)" X  D  k9 x) z" F9 V! v8 f; b
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
- G/ K2 w& e2 @) g: C2 P   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)" k$ a3 J1 O0 m0 W. _, b
   send to die0 ^# }1 A" Y" f9 Q  h1 _  Z0 l
end
0 m  {9 X$ |% @+ W5 ?7 h

1 y! _% O% j# y* Qbegin P_mA_down arriving
- @2 K$ a7 ^. P4 O2 F   while 1=1 do 7 t# N2 F2 e6 k& R
   begin* b' y1 A+ T# t* V
   wait for e 110 min
# [9 S3 O) Z# L2 x6 K. i' A   take down R_mA
+ B* X$ w# K( |3 w4 k3 g4 [4 }/ Z   wait for e 5 min5 @4 W0 e9 K/ @& ?
   bring up R_mA7 s- K7 `% a# q5 v$ [
   end1 x3 c5 t6 B6 m- p2 w2 z% e
end

( V) t* R, S; z/ p 4 k# |: F' |& @' c, I' N
begin P_mB_down arriving: K& d. [: }+ z5 ?
   while 1=1 do( V/ q5 s) Z- d" }
   begin" m+ ~9 s9 A" q! {' @
   wait for e 170 min
. v6 |" m" f4 k, d   take down R_mB  i" q  @* G5 N" N& p0 X1 X; t
   wait for e 10 min
8 X; y, k1 g# a$ d   bring up R_mB# Z7 t9 \$ y" B+ ^* x/ Y
   end4 `. D+ r: C% ?
end

* g# _/ y" w3 _3 X4 A
' ]# }2 i- x" t9 [) F6 ^9 }* sbegin P_mC_down arriving; l2 S2 J5 j; i1 @" \& D8 T
   while 1=1 do
5 t2 S( q4 d, D   begin3 t9 _; n8 S/ s( f- h$ v/ p3 {1 ?5 x
   wait for e 230 min
2 d1 p2 E" G2 A: B+ Y5 V/ n) A* J   take down R_mC4 x1 f7 m$ C6 Z! u
   wait for e 10 min
' U, {, z4 [$ |8 ]/ o4 G8 P   bring up R_mC
/ H3 N  x. D1 o- x6 h   end
" T. U9 ^  k4 P# i) v. J# p& C0 tend

9 E, M2 {" p% N
( h- L7 @/ A9 y* ^0 Z/ ^: kbegin P_mA_clean arriving
) }& L. r/ c7 J8 M9 u   while 1=1 do5 `2 F. K$ b. s6 x* [
   begin, \- A5 n1 C7 I
   wait for 90 min
! v: D2 K- B6 L3 n6 t' C   take down R_mA
* @$ d$ n6 i/ g( z9 u  ^* O   wait for 5 min5 _% u+ x7 I. T
   bring up R_mA
- h$ q: W# J! \' _   end9 {. V' B* X; f+ n1 J
end

! v1 G- G( I% n* T3 q. n. r
7 g- b' ?; r! D( J8 ^7 Cbegin P_mB_clean arriving' l5 y; C  X" s6 D3 o! \7 Y" j
   while 1=1 do
0 K$ U/ i. t: B   begin% R6 N5 Q! h- h% H. C2 Z: ~' J
   wait for 90 min
! a1 F. V8 I$ {$ ~3 r( h. g4 [   take down R_mB" p0 o6 Q7 i# q. C, Y  L, m7 _
   wait for 5 min
2 O  b0 f/ U. w5 X0 B   bring up R_mB: I6 j# g3 j0 X( w
   end* l" k" `3 f/ K& l* y1 J$ i
end
4 |, q4 K& t! k% ]+ U  R! N
5 w: Q/ s3 L$ H7 q4 n
begin P_mC_clean arriving
$ k" p% I2 B* E7 ?' Y7 N* i   while 1=1 do- q- @) N: M/ _& }
   begin. L/ d  F: E) F" r; F
   wait for 90 min
4 h: N! w# c; p  m0 K) T  S) Y   take down R_mC
+ l6 i% O( t- w0 B   wait for 10 min: Z6 @# ]( C2 ^; a. U, ]
   bring up R_mC0 Z$ Y( R1 e7 x1 j) q8 `1 j( e
   end. j- q+ [( a6 c0 T3 ]- `3 E% E
end

* J1 }) L- l, W5 d) @, T----------------------------------------. A9 X* }+ t# v0 K- Y6 g+ b/ ^

# i) y! C! q# g0 ]6 G, [Exercise 5.9
: _6 |, h6 l9 ]
- ~" t8 s6 s1 q9 K+ P8 G6 ~4 A
! c. `9 }$ ?  v) z2 ECreate a new model to simulate the following system:3 o$ c- {6 p( }8 g2 A! y! T
Loads are created with an interarrival time that is exponentially
; c, i4 ?3 V3 E7 Xdistributed with a mean of 20 minutes. Loads wait in an infinite-: V. q$ l4 P3 S& z! Q
capacity queue to be processed by one of three single-capacity,
6 k: D7 k! t6 ]  l3 `# B0 K1 R# |  K- qarrayed machines. Each machine has its own single-capacity queue
: b" z: u+ V- O% B" y3 b9 `# Dwhere loads are processed. Waiting loads move into one of the three 8 ~& [/ O  t4 P4 l9 o, s, t% O
queues in round-robin order. Each machine has a normally
2 E" @& R$ J, I; ]& Z  W/ |0 N- ~distributed processing time with a mean of 48 minutes and a standard
- x4 s9 N' {! y. ~/ E/ Gdeviation of 5 minutes.
5 n1 H! F. B+ b  @( l  x# w9 X: TThe three machines were purchased at different times and have ) [4 ^9 p: N! N! \4 r
different failure rates. The failure and repair times are exponentially 7 [; ?2 u! i+ k9 v- J
distributed with means as shown in the following table:
8 f; F0 z. x; l, b( ~7 c0 ?+ sNote The solution for this assignment is required to complete   g6 P9 j* t0 u3 g" v
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
1 \0 U. ^2 C6 b! wyour model.
! ^7 @3 w' K# J( M( S. F. v
5 U+ z8 H. e0 U$ A& R1 q! gMachineMean time to failMean time to repair
/ @) s6 E; R, [$ }. S4 \7 bA110 minutes      5 minutes7 W5 p% i4 Q! B& e; M4 I
B 170 minutes     10 minutes1 N- k) f4 I  m' _# t( P, C
C230 minutes      10 minutes) u6 N$ E- D/ f0 ?2 B- R" K; q" u1 A

; ^9 q( ?! q% GThe machines also must be cleaned according to the following . z; ~- Y* \- D) B- p1 M, C, g; C
schedule. All times are constant:
1 U! n( i! r/ X7 [4 O: C7 p4 a7 \4 ~0 k6 T3 h0 a. _9 g6 C
MachineTime between cleanings Time to clean3 P1 n$ \; d, R% a/ r5 x0 R# m
A90 minutes        5 minutes
& a  g8 ~0 @) _* {7 cB 90 minutes       5 minutes
  ]- J! r# M# S9 A* l7 RC90 minutes        10 minutes/ x% h1 l; ], ^, _: R1 B2 `4 e
) r  P1 Y2 t4 K, {( T
Place the graphics for the queues and the resources.
% }  |6 v/ w  wRun the simulation for 100 days./ a" l' M# B' s0 z4 ^7 [- X
Define all failure and cleaning times using logic (rather than resource $ v5 v. @' a1 X/ l* N! u. k# c
cycles). Answer the following questions:- p$ M, d' ?1 ?0 G/ F
a.What was the average number of loads in the waiting queue?
+ c2 X. X- B$ ]; m8 h' l: `: bb.What were the current and average number of loads in Space?
4 c$ ?; {' n. }How do you explain these values?
3 C4 f! t  X& Q* ?- l

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉7 Q; z8 U8 ], K- q- S. I$ M
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
  z: t' n' P" b这行好像也不太对,各位先进觉得如何呢?6 D; [9 ^  H$ l+ p

8 N+ g7 G4 z3 Z( E1 U' hbegin P_something arriving
- a' H! o9 l4 `0 {5 ~' |   move into Q_wait
4 C5 m0 _9 A& ]( W   move into nextof(Q_mA,Q_mB,Q_mC)
, p& b& a# S( H9 r! B/ P% H   use nextof(R_mA,R_mB,R_mC) for n 48,5 min5 x6 k/ [4 C5 o1 v0 m5 Z
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 \6 S! C8 m" jend
7 c" n( V% _$ W* t
4 f% C: d7 z5 Z4 x4 t$ tbegin P_mA_down arriving
0 }4 e2 H; d" V0 h  r  f1 R- E   wait for e 110 min6 ]. h* U, R* z! D% g* W
   take down R_mA
# X' z$ q7 i0 v- u! h* ]. b   wait for e 5 min
: b0 K# s$ Y3 X6 y% r, H# @7 C- O7 r& y   bring up R_mA
3 z& |* `) J9 `% ?2 q* t) J' A) aend
% O+ R' a8 I: O' V1 s! i' x8 @4 }, O* g  b2 L
begin P_mB_down arriving
; Q) H5 v1 S2 ^2 {   wait for e 170 min
" N4 x: m6 ]; u/ s# r% e* n   take down R_mB
( J& p8 C, m: u  [8 N   wait for e 10 min: I. Z$ E, c: B3 F3 C9 \
   bring up R_mB
- h  M) |5 o2 h/ Z& w) \end
8 P$ S7 H; b7 ?& g6 M  h" A2 p& ^9 W! K( Z, X" h3 |8 X, ]
begin P_mC_down arriving
% f, w1 y# b- p' p   wait for e 230 min
' }# N+ a; F& N- b9 Z* Y   take down R_mC
' u2 z* W) m( D0 M' X7 z7 Y   wait for e 10 min: ~/ ]) S2 n" x8 a  y9 _
   bring up R_mC; V% ]7 d; K* G6 l- [3 ^
end3 V# V0 J- s/ W
4 R! Z! }7 I+ P3 V. e
begin P_mA_clean arriving
( ?( g' L& F  z- e   wait for 90 min6 \( w$ @$ A. R4 e9 ~' \6 W' e
   take down R_mA8 f6 R$ a* U' @5 f3 W: ?
   wait for 5 min
2 {3 A6 `# e- R# q9 [   bring up R_mA; g: q, m, K8 q* w/ N
end. R! E6 ?2 B& _. Q

5 z. U/ j, U. y: {4 g2 l9 Rbegin P_mB_clean arriving3 [6 s0 m4 z* m6 \3 A
   wait for 90 min& W8 b8 S1 o# V2 N6 t
   take down R_mB
- X, x, d2 E. ^, c   wait for 5 min' ^1 M; U' V0 d) K( S, g7 v" r
   bring up R_mB% h" k5 {4 i# i) a) j( a; s2 H6 H* p
end
2 z* \9 f' s7 `# \4 c/ w1 ?! b+ m2 o& p% t+ ?0 ]% @) |1 Z
begin P_mC_clean arriving& x* p) H5 |4 y* V9 n, q
   wait for 90 min; N5 s+ i$ q" v
   take down R_mC
, n2 h9 D( J- ~3 m   wait for 10 min
2 t% d2 l( u. w, P0 K2 S   bring up R_mC
3 E; }9 x2 n) g* n) k: ]end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
9 h) m0 Z7 \, K! |2 e   move into Q_wait6 L# _, s* D3 a9 e) a: ^7 C
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
' k; Q6 E- \6 C* S. D   move into A_w
7 `* [  C' \6 k" R/ {4 \) }   if A_w=Q_m1 then use R_m1 for u 48,5 min
. R' z& c& y. S$ [; P   else if .....then use ....for u 48,5 min
! v+ [2 M& v3 r' \% M   else if .....then use ....for u 48,5 min  
% M; V+ D" n7 w% A   send to die: n" V* c8 w( i" \
end. Y, D2 P; _( Z8 E: A6 x4 p
6 y0 {4 I8 f% y+ [! B/ ?) \, z
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-23 23:35 , Processed in 0.018422 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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