设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7991|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
6 F' ?6 r  L& l: T# r7 F/ y
& P( E5 t; t" D3 Z. `' s底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去. i; H$ A; i4 {& [+ c

. B% |8 v% |  z% H# ~2 c7 b9 \; ^不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
" n8 d4 f& w# r" J
5 ~1 V% f6 n  l8 H3 N4 a% R# ?/ m- x9 ]
--------------------------------------------
& M+ U( R+ x- w7 \1 |. t+ c/ t+ dbegin P_something arriving
# j, b' k( y2 {2 B/ p   move into Q_wait; q; ^* L3 Y) M, J  j7 z" m
   move into nextof(Q_mA,Q_mB,Q_mC). i) [& `* h( z9 r9 x+ u5 B& `
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min7 C/ ]1 Y& Q& x1 c
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)' K& E& R9 X! j7 a+ V2 ?# g- s  D
   send to die
5 n+ s6 q$ n7 H3 J  N* wend
% W/ n+ U+ w5 J6 r$ U. y$ h
9 N! q4 s9 s7 f" {1 i; E/ t
begin P_mA_down arriving
) A4 d0 K+ d) ?' g   while 1=1 do ( S) |! k. Z0 w; L9 e2 M+ d% p& a1 Y
   begin
/ \- q7 O1 O" P( Q+ B7 s   wait for e 110 min
( A. P2 n% s' G3 C- s) ^3 G2 {7 H, \5 w   take down R_mA
* k) H4 k: @8 D* u   wait for e 5 min
. \, B7 m# N$ k1 L% m8 _- |   bring up R_mA& _7 H( m; w5 N1 n" e4 }) \9 _! d  ^
   end' [) S- U% V. T0 Y; e' l
end
  _4 b9 V- \$ R1 d* |" Q

. `" P+ z" c4 w% F9 ibegin P_mB_down arriving/ ^7 P* ~$ x/ r6 `. D# D
   while 1=1 do
; W8 q+ l' b( [( T1 J- Z8 S  S   begin
! ^, c8 g2 e2 Q" m0 P1 Q   wait for e 170 min6 _  w2 M& _9 g- A$ d
   take down R_mB
+ h' B' F( e" c: g3 u4 D+ M0 F1 A+ E   wait for e 10 min
! x  H5 L( h& F0 o- s   bring up R_mB$ B+ t+ R' K4 W* k+ z! C. W! t
   end+ r* P" ?; r! v5 f5 M( R) d
end

) ]! h8 _; J9 u, ?
+ C! G$ h/ x1 `8 r9 `begin P_mC_down arriving0 ?* ]8 G$ h& Y$ A" L
   while 1=1 do
, t) x2 D# m$ _& N( m: s   begin
) k7 P( w* {* D5 n; D  I   wait for e 230 min
4 N& P& P6 U0 K- ~; _   take down R_mC  c; ]* A8 F/ \* E- q/ J* A
   wait for e 10 min
) ?6 v) R& |- t3 m$ ?6 m   bring up R_mC
! |# k4 [) y( t/ R9 u  X   end
1 n' _. y+ ~% l+ R, iend

' g$ ~: z0 n) X+ r4 V' [; t
# r( }$ c1 i7 Q9 cbegin P_mA_clean arriving$ i. }7 Y3 V* |, a3 a0 C8 q
   while 1=1 do1 g; u7 ^6 F( M8 X2 ~' c7 q9 f
   begin& ^# }. F  g" j# N" f" x0 q! |, \7 c
   wait for 90 min+ G, Y7 a  G( z- Y! K: g
   take down R_mA$ T" {5 a) c# n* ], @3 {. |
   wait for 5 min
2 g6 m1 a+ N: m6 ?/ q9 j3 k( {   bring up R_mA
/ Z% j4 X5 C9 j1 `* U1 r   end3 f- M# S) A# P  `* ?% L) J
end

+ F) N! v0 `) }7 w& t 1 O9 v7 ~2 L6 _/ N
begin P_mB_clean arriving
  Z* q' z) _4 E* N2 s+ i   while 1=1 do' R) {/ d, \# W2 k4 P
   begin% X; C% }) P: m' C$ [2 A3 q5 I
   wait for 90 min  q( J: p# M3 Q1 \2 j
   take down R_mB
* t' w$ g0 u+ R) G8 ~% k. M; S( {6 y- D   wait for 5 min
* l1 I" X1 W$ V( A# @   bring up R_mB
8 j, ^  `: a  x6 t  K   end
, |9 y  E" B; I" [+ I. C" Aend

$ ~; f6 i1 i" W) A: ]+ D
* A+ Z" e* T5 W) I+ y" Kbegin P_mC_clean arriving
4 U& N  r2 D! h" f, D( C   while 1=1 do
; A' s8 L3 W' x( d  x2 L" C# A   begin
, [0 I" I& M% J" J$ A   wait for 90 min
: q; H8 C3 d5 D$ Q$ @! Q' V   take down R_mC& S" C; U& ~5 w9 J- \5 c
   wait for 10 min
+ F' E) a5 z! a" L$ l- D+ e   bring up R_mC
" x7 e+ M- L4 N- G# w6 f   end
3 W" O8 }  N# s7 O' bend
/ e* Z* |( A5 b( w6 u; K. J
----------------------------------------% Y: w# J/ B3 U9 l
! `7 W: Y; G9 F- W
Exercise 5.9. p/ K0 t5 ]- U' {
* L1 B. D: {: h0 t% `7 W2 d' z

9 H& _, g! V. k4 U9 PCreate a new model to simulate the following system:2 A9 P9 ?0 D; Q
Loads are created with an interarrival time that is exponentially ( M4 F. M& ^. b* V
distributed with a mean of 20 minutes. Loads wait in an infinite-; p- R8 y" Q4 G
capacity queue to be processed by one of three single-capacity,
, D2 w  _0 y0 z* varrayed machines. Each machine has its own single-capacity queue 7 Q! j8 J& E" {" N0 r
where loads are processed. Waiting loads move into one of the three 0 f! M" @4 d* q, M2 j& {
queues in round-robin order. Each machine has a normally
/ e# O( @& N% Y6 W/ M% N6 f+ k% y" Ydistributed processing time with a mean of 48 minutes and a standard " x1 d. p- C/ A3 {. J* p
deviation of 5 minutes.
# W3 h. X, i. j7 Z# B  T( IThe three machines were purchased at different times and have : Y8 c: u; A, Q0 B5 a% y
different failure rates. The failure and repair times are exponentially
8 K" n( J9 C5 F/ }; T* Hdistributed with means as shown in the following table: " J+ l2 }8 y/ o( \
Note The solution for this assignment is required to complete
! G5 X" p) b  J& ]- L# [exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ' K2 H1 u3 x2 [  b0 E3 J0 v
your model. ! Q! J! V7 G& }) u$ C8 b4 D" z  `) ~
$ Z6 W8 K/ @7 W
MachineMean time to failMean time to repair) {1 V  F' x, y  Y
A110 minutes      5 minutes
2 ^7 U" |; v1 o4 eB 170 minutes     10 minutes
$ R' z; A( @& qC230 minutes      10 minutes
- }3 c" U, ^; S; O- `6 p- t3 x* C
The machines also must be cleaned according to the following ! b) A  x& g9 d+ l; P1 S& E% A
schedule. All times are constant:
/ s1 m1 X1 A) y3 U7 j7 R& {- M5 v( d) ~& `# I$ P
MachineTime between cleanings Time to clean: `! u3 h/ p: C6 N+ G/ F* K
A90 minutes        5 minutes
8 W# l/ H  o$ H9 E" KB 90 minutes       5 minutes
. B' t5 ]1 l& @9 q3 F5 QC90 minutes        10 minutes
; d: q; K2 q4 Y4 S& J6 y9 D! F
6 S! t% I0 h; @" r9 S6 RPlace the graphics for the queues and the resources.
8 ]: g$ a* g+ @$ L- j& }* ~" Z& cRun the simulation for 100 days.% Z6 a3 d, M6 n, ~
Define all failure and cleaning times using logic (rather than resource
/ w- G. D1 W( Ycycles). Answer the following questions:; F& J3 L! k( ?2 C
a.What was the average number of loads in the waiting queue?1 u6 u+ Y* T- F! x' H# X  f
b.What were the current and average number of loads in Space? 7 L4 b8 P5 u; C  g5 \& a: v8 L
How do you explain these values? - d6 R( f6 t3 Q

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉" ]6 n. \' s" ^% k" [  t
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)/ B( ?% \$ M" F
这行好像也不太对,各位先进觉得如何呢?+ a4 a, r5 ?1 N: s7 W0 @2 s
. ]5 W: i1 j& ]( o6 i
begin P_something arriving
  u4 |( U2 J! \# _1 D   move into Q_wait
& j( r; V, `- n+ I0 y   move into nextof(Q_mA,Q_mB,Q_mC)
7 l, r" T( D7 \3 k: U; b; m1 q. n   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
8 z1 c6 ^  E, t/ l% {   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 1 ~! d' u* J6 t9 e. k( e; M: c
end4 F& _: j; a) n* d# [4 P

' a9 s1 g" Y9 |# f: {3 p3 Abegin P_mA_down arriving2 A8 \! d9 A5 }0 M% z. V- L* d* i
   wait for e 110 min( u" c) i) S# ^: j/ [6 o5 z
   take down R_mA) ]3 S/ y! U9 E( [6 A
   wait for e 5 min$ b' q4 P& f% X; g8 r9 i7 Q
   bring up R_mA) ^9 ~9 x) g4 ?6 H7 V. d( Y3 S
end/ A/ f# e7 D  P% c
) V/ I, L/ P7 S! [' j
begin P_mB_down arriving
6 n7 E3 u1 Z( O   wait for e 170 min
3 u$ t" k" ~: |" W" E   take down R_mB* l& E: ?8 E2 O) H+ p
   wait for e 10 min! @* c/ m, Q8 z7 e5 m5 Y5 J
   bring up R_mB1 {; G4 ?' ?3 `: o
end' O1 v# G+ ^" p  d
$ J7 y5 U" t' S) o
begin P_mC_down arriving5 `" K+ m( {' h$ X0 g9 b& e
   wait for e 230 min
0 r- v5 g6 A- T   take down R_mC
) ~) |6 x, n5 d7 \   wait for e 10 min
& s& }' ?$ O; ~/ S9 t) c3 m+ I8 o/ m   bring up R_mC! V% k) J3 h$ v% [8 J1 ]
end
9 a) z* S$ c& Z0 ~
0 H2 e; |% v% b) i+ P2 F& t$ Sbegin P_mA_clean arriving
, D/ h/ S6 A. L   wait for 90 min
# M- [+ s2 M( Z' Q. H! M   take down R_mA: U$ @1 m7 W; A, C# h! g$ \
   wait for 5 min
5 R6 U, s- J  T5 V! I   bring up R_mA) u& q3 Z* D: E$ Y. s9 I6 {6 Q
end$ `, o, r  G$ U

- p8 V9 _& _- p, _begin P_mB_clean arriving
: ~) d+ u% V3 A   wait for 90 min
/ U! Q, e6 `; K" \! I/ ~   take down R_mB
4 O; e2 o- e. q5 q- L   wait for 5 min4 o5 d7 [' ~( e) C" _+ i
   bring up R_mB
! t& N" d% y1 t9 h" l" @end' @9 s' a" g5 c. a1 s

" w8 x9 v: q% X5 a! R( Sbegin P_mC_clean arriving
. ?, O" T  {: x   wait for 90 min: P# `: \: h' v0 N$ ^
   take down R_mC1 q, T% y) v0 v" n
   wait for 10 min" w: @0 ?7 `! R0 n! B2 t  V
   bring up R_mC
- q# J- F. F* aend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
- a6 n( {3 U! o  M  b   move into Q_wait& B( Y: _$ P; ^  n
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
# ]  C; H! S, _/ V) w, R4 Z  G7 O   move into A_w
0 W7 x% m* u& E* S, \; c7 T   if A_w=Q_m1 then use R_m1 for u 48,5 min
5 h# R3 F$ ?3 H2 k' x2 `4 |! F   else if .....then use ....for u 48,5 min$ u. }/ G$ F. `- Q
   else if .....then use ....for u 48,5 min  
4 w1 x9 d) w% S( y0 R   send to die, D; v; l6 f; c
end0 L  s2 w& @4 e/ e1 F( F* o; s- ~$ E4 x' f
# Q7 D4 V' {8 }! h
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-6 05:19 , Processed in 0.015980 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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