设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7853|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 % f" N6 s/ B& i: T7 u! |$ x/ n

- L- ?9 F" f* s8 O! t) O3 P底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
# }- e  e2 p, X7 g* E9 \- b4 u* K; W, [3 X# _: w
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!5 I2 p* M7 G7 T6 f% `# }' ~# J

* }- V/ k6 o- m
--------------------------------------------2 V0 P4 V4 U% i
begin P_something arriving
2 K- m1 U: z: |" d" I   move into Q_wait) t8 G: s+ Y$ A
   move into nextof(Q_mA,Q_mB,Q_mC)
+ e: m3 v# O$ h: Q0 }; A   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min6 |# m, M- \! d- p' Y
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
: f% n$ f/ Q. z5 s( [/ F# X4 e* M. F   send to die( r% O8 {+ [8 I6 E7 I* J
end
: b8 m9 h! r* ^0 p

+ a5 {: j( _& o- e( W& ]begin P_mA_down arriving
- i3 Y  R) S" G1 W   while 1=1 do 1 U. t% X4 _- m' H
   begin1 ]+ l8 ~. l7 {0 U8 b" Q
   wait for e 110 min
1 s( Y2 I- Q2 R( M6 q4 @& `   take down R_mA. N; f' j7 k# s& U
   wait for e 5 min- I# A: y, D2 j. t: U* u
   bring up R_mA
8 H6 p8 D2 @. n. I6 ~, c  w7 h4 O   end
0 e/ k6 i' L. U1 `end
' S5 ^4 p+ r$ g  m
9 _& p/ G% c! [5 s+ s" d1 d
begin P_mB_down arriving
5 ]2 U# D- Q  P( q2 z   while 1=1 do
% `" H3 J9 [/ W# F5 |   begin1 E# \" D2 Q& f
   wait for e 170 min0 P# O! P8 B1 ]4 S
   take down R_mB
, X4 c/ j/ r9 d- X* ^   wait for e 10 min8 U) f+ }) n6 k, \
   bring up R_mB. b4 F% @) z& L) \( `8 b
   end  i3 z0 J9 |2 ]3 M
end
* P+ ]- |' A( d' `5 H2 e5 B6 o" [

" q4 x, o, c6 Y) c' Jbegin P_mC_down arriving
" X% [3 h8 u, I, t" Y4 c   while 1=1 do 0 C' _3 ^7 M- y* Z  u9 b5 y- X
   begin" P9 ~8 |& H8 G( u: h8 ]! \( b
   wait for e 230 min/ \- i8 C5 H$ E
   take down R_mC) J% W! E* v# g) e1 ?
   wait for e 10 min
0 {, L1 n: h) E) b   bring up R_mC" s) X/ x1 t7 s5 b
   end- e8 U, t5 p" N( v
end

7 X. @8 U0 t" M# { , z$ p$ S  s8 |! v* O. F
begin P_mA_clean arriving
$ r: a, F0 h- V8 U: Z; z$ L( Y   while 1=1 do
0 H, B) C- ?  }   begin
  h' C+ |/ e3 K; ^   wait for 90 min
5 H. c, Q: C& S4 g0 g' x9 E   take down R_mA* x* P, J. [' C6 S; {  n
   wait for 5 min
7 E! @8 D* ]2 n: r, j   bring up R_mA
1 L6 ^0 E: c* s1 C   end4 ?6 [( _( w# u* J4 P* Q4 d6 g
end

9 v1 u: q4 i7 k* M, j2 @% t ( z( k3 K" j( K3 s6 }4 x9 X
begin P_mB_clean arriving  X$ H3 D7 j' L  Q1 Z
   while 1=1 do
5 M* R8 n5 N( Z   begin
6 j$ C, b; y2 n8 A   wait for 90 min8 Y7 F3 p' t4 J" x' P0 x+ y
   take down R_mB: s4 Y3 Q) C+ t+ O) p
   wait for 5 min1 i$ c3 ?+ p  z4 b
   bring up R_mB' q- Y; [5 o# j) m7 D
   end. G4 R, m. ~% I5 j) U, N/ U
end

) ?7 y4 e$ q4 J! I; i
" a. E: m% y* p% F% N6 w# ~begin P_mC_clean arriving
# M9 }1 u- ^0 P3 U   while 1=1 do( z' D' w% @* E8 @% \5 L3 J7 r: z
   begin, \& f9 P7 ?& E; @. e, V4 ]
   wait for 90 min' q9 I, H. Q3 C3 z- z* S
   take down R_mC
0 p- z* H, y3 @* v0 f" |8 T   wait for 10 min
7 s+ {. n# N  D% P) R( B/ |   bring up R_mC0 \4 B+ S6 G) X6 I, S! G* o
   end7 \$ v8 |$ Q# N( {8 o/ G6 s9 ^; x
end
. w6 s9 p# \* ~2 Z! k: z9 m
----------------------------------------
) M/ z1 Z4 D: V: c 8 _' l$ \6 g5 I0 F( D
Exercise 5.99 [3 h6 g1 H8 o8 `
' }8 ~; v( P0 o! x, U6 ]# A

8 b+ j& l8 r- u* v* n: y# ^Create a new model to simulate the following system:* p3 o! r1 M* b
Loads are created with an interarrival time that is exponentially
4 T1 [' B5 e  s* f" L" r* N+ v: Rdistributed with a mean of 20 minutes. Loads wait in an infinite-4 o, V" z- u1 a" O7 t: H2 k+ p
capacity queue to be processed by one of three single-capacity, 1 [: d  \' s9 g( m8 E* o
arrayed machines. Each machine has its own single-capacity queue
4 x' n( M. J+ k5 b5 i& c  Iwhere loads are processed. Waiting loads move into one of the three
4 q, F6 D0 |9 ]1 Wqueues in round-robin order. Each machine has a normally 6 T3 j, {  N# w6 |& G. h
distributed processing time with a mean of 48 minutes and a standard 4 I" |. W: U! c2 G! U( a
deviation of 5 minutes.
9 n2 D3 [( e  {) l0 I' Z6 i4 k, K2 aThe three machines were purchased at different times and have 7 `6 b, J! d/ _, G& r7 T
different failure rates. The failure and repair times are exponentially ; A3 s7 f6 y9 P3 L1 k0 i6 F
distributed with means as shown in the following table:
. x! h( G3 \, p5 nNote The solution for this assignment is required to complete
9 c+ i6 Z3 O6 q, O/ V) A/ W; Cexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
+ m! s  |6 U8 O: oyour model.
: B+ u, K% F( J  m' V. z9 t
+ b5 m8 F( G7 s* e% ~2 MMachineMean time to failMean time to repair
( P1 U0 @1 o# ]  ]$ yA110 minutes      5 minutes
9 D8 {8 c1 `  ~! L9 l  L9 h; _B 170 minutes     10 minutes# Z4 s) l4 g* Y3 W4 H+ o
C230 minutes      10 minutes5 [; R/ {8 u* h5 \) L; t1 a" b
: A) K4 g/ e4 u6 T6 L1 R( S8 \
The machines also must be cleaned according to the following
3 |* M% A- Y- e4 n9 m' {6 Yschedule. All times are constant: * n; [/ N7 b. ]1 Z

3 q4 j! ?2 J( c9 u7 H* @MachineTime between cleanings Time to clean
4 p& I' l8 M# O+ ~( T9 jA90 minutes        5 minutes" R1 U" d) m5 u  k" `0 W+ A' i7 D
B 90 minutes       5 minutes
3 D) n- ~) O8 l# F/ [) oC90 minutes        10 minutes
5 L: c  a& b/ j9 u; A
& c( J6 j! x7 `. i! k- qPlace the graphics for the queues and the resources.
2 ~% D( D; o' URun the simulation for 100 days.
* a, U$ x" g/ i. dDefine all failure and cleaning times using logic (rather than resource
/ E6 O  t$ i- x0 b2 ~$ k. \cycles). Answer the following questions:9 J  k+ A1 v/ l& _, Q2 l/ v9 C
a.What was the average number of loads in the waiting queue?+ E) l' M- R; n, `. t* I
b.What were the current and average number of loads in Space? : M' r& w0 O8 R
How do you explain these values? - T- B3 F2 z4 |2 p$ M

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
8 Z# ^7 i+ R2 b( a: x; lsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)3 y% @4 L+ F* c
这行好像也不太对,各位先进觉得如何呢?7 t: d" j1 ?/ p" R& o, s

# ]4 L* ~6 \- \+ p0 [1 m( X9 B- gbegin P_something arriving& `' Y$ b9 {3 `7 ?
   move into Q_wait
5 @1 Q- f# V$ o* r   move into nextof(Q_mA,Q_mB,Q_mC) : f+ T+ _# @6 t! g7 Z! R5 @
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min+ {4 ~0 [; B  g9 K8 @% g1 w" N9 S
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) / D) e7 P2 K3 Y; D5 x4 Q% }1 A
end
0 W# U, p5 H4 C9 w6 f% S8 D( R3 g0 k1 e' c. v$ A
begin P_mA_down arriving6 H3 a" d' K0 b5 E4 U
   wait for e 110 min9 @9 M4 Z. x" ?+ B4 ^& i
   take down R_mA0 f  M1 A( ~& d, N
   wait for e 5 min9 ]# h9 A: @5 F: |
   bring up R_mA
3 a2 c% W0 A0 s5 _8 G/ ?/ cend  j0 ?4 z# R1 }( |+ Q, @

- ?. f2 s" E# Tbegin P_mB_down arriving
6 n9 U6 r2 r. S' [( d, c7 V   wait for e 170 min
0 {& M- ?+ v- K7 `7 n8 v+ S   take down R_mB% Z0 k$ Z* H2 d; ]
   wait for e 10 min, D+ t0 G7 v- z( C- J, V- z
   bring up R_mB
- E8 G" C; O/ n+ @/ X2 C8 Tend
9 m) \% v3 v0 D3 {; Z2 n( k1 I+ Z
begin P_mC_down arriving- g4 W9 O. b5 v4 v
   wait for e 230 min1 V' T) z$ [7 }# s3 }
   take down R_mC
/ q4 _( p9 c: X1 A7 j: u5 f   wait for e 10 min5 V) a) R/ |" S$ X$ N& [3 v
   bring up R_mC+ Q0 j6 K# E0 }- K
end1 d9 j5 l& N% b$ H. x8 l' n

0 s/ }" z' B4 Bbegin P_mA_clean arriving3 W4 i) m8 Q0 v# P5 d# \
   wait for 90 min/ j) o$ ]6 P6 ?1 V& r* \4 @
   take down R_mA# K9 k" A- q- j& L# `/ p! N* B
   wait for 5 min: i, G* X- E( A; I( i
   bring up R_mA0 g; a# D0 Z& {; j+ T
end8 \8 [. R6 y# r( C0 Q

; Z- d9 `5 [4 m# kbegin P_mB_clean arriving
: s0 b! m9 F4 q- a$ s   wait for 90 min2 u4 C7 I. T7 G
   take down R_mB  P: u! N( C+ I' j! z* d
   wait for 5 min7 M) _5 W9 ]5 t; ~; d7 I
   bring up R_mB
0 B5 ^8 [4 W$ M9 |: @4 ~end4 i2 {/ o0 r& c# h6 |

! w2 r1 {! d" z  C! nbegin P_mC_clean arriving% @5 X, u# m6 q9 f5 g: K" _; _3 c
   wait for 90 min* R4 ~3 j0 S$ I' n+ ?$ Z
   take down R_mC  }, }% b; _2 \( _$ H; k9 I6 g
   wait for 10 min+ r. `9 U5 H% e; s
   bring up R_mC6 I' f8 ^5 }( H
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
" f. D8 N1 P* P5 ^$ S' }   move into Q_wait2 ^' }; W( f% [) n: [' z4 u
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
; v/ D& ?0 M# r   move into A_w6 ?. |8 K% j9 w+ a- Y# e' L2 m/ K# N
   if A_w=Q_m1 then use R_m1 for u 48,5 min0 Y2 n1 G  q% A/ U' H
   else if .....then use ....for u 48,5 min
9 A' A. j$ b! H/ @. F2 S% r$ z   else if .....then use ....for u 48,5 min  0 F' s( I. }( P+ h
   send to die
  s# C3 m5 \) M. y( gend
' h; Z0 x5 N& r3 F6 h! y4 |5 J" D7 C- s- U- b9 q
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-27 21:54 , Processed in 0.015875 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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