设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7226|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
. B- U: }# U' [& E. L) W7 q
. L2 Y" U8 n. Y8 H4 \底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去" `3 k7 A8 G2 @& q  ]0 M8 Z( Y
4 R( w, N$ f7 Z! I, m; d/ d
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!/ z4 D* Y+ f: g8 a

# b; M! V6 P/ f6 c
--------------------------------------------
. K, I; o8 ]& C6 ~/ M! ^begin P_something arriving3 x9 U4 y5 {; O' G7 e
   move into Q_wait
9 }' ^. l& H4 e   move into nextof(Q_mA,Q_mB,Q_mC)/ |. A/ H( [4 h3 q  P# V' n
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
. X+ K6 G; K& W, T6 ]2 d  Q. i' n/ {   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)0 e6 C7 _+ @/ G! f: Z
   send to die
2 }) Z+ ^) X7 Y+ `; [  g4 L! aend
' v7 {4 K' k' a6 K3 H

+ I# @. z  T5 Ebegin P_mA_down arriving
7 U- D( ?0 a9 I/ E; n, C* p   while 1=1 do ) X! O# v1 x7 |: I: d
   begin
3 U/ u7 w8 M0 |: R  w7 D3 _6 w! K   wait for e 110 min3 U, f8 ^8 ~1 n
   take down R_mA
0 b' u1 V! x/ M   wait for e 5 min1 l. N$ M! b6 K# b" N1 r1 }
   bring up R_mA
) c; v. T! ~: [8 ^; @/ v   end
# R: X2 L/ r3 J4 Y6 S6 H' Q; V% Iend

9 P( l7 A, C7 Y& z; V  b2 f & f3 ]# M5 ~6 [* h* ~
begin P_mB_down arriving; a1 f/ y- s% k! {. F+ e+ ^
   while 1=1 do
# u4 U  a" h( d! r5 H5 N" r   begin% v% I+ h9 \# ?% a
   wait for e 170 min
. A1 B9 v/ Y0 C) C* o( ^- e) L   take down R_mB
# C# m+ w# T6 o) l& b   wait for e 10 min7 W9 `+ \+ ?5 m$ s* F
   bring up R_mB
% t& ~* R( A7 w/ N+ d5 i* j9 a8 R   end
9 Q+ q* l7 \0 l) ^end

3 _$ [: [5 \' P1 O : @% P% ?/ x% F& H7 y
begin P_mC_down arriving
& o' X: A  r3 O5 S% D. i/ I* H/ W2 {   while 1=1 do + U1 ?4 h/ {  D
   begin5 [; G9 d6 D7 h! [5 ]
   wait for e 230 min% b$ t  A- X1 u' I
   take down R_mC$ w5 ]$ A, u! \5 Z& b
   wait for e 10 min& ?! z3 k% A$ u7 b
   bring up R_mC
2 P3 ?3 K9 ]/ t# Y8 o! H   end
7 u2 }$ b1 ~% q- c6 c" U5 p, }0 X% Mend

: t% j) ~" Y3 h; S 9 N& S% l7 h. I: S9 a8 `
begin P_mA_clean arriving! Q6 }, s7 R; T, ~( y) z6 t
   while 1=1 do7 j! O2 ]! e8 M/ I7 Z
   begin* C6 H+ X- I6 J& I; B# O* \
   wait for 90 min  ^# P& l2 T( h/ p* t
   take down R_mA8 U2 e' v5 S9 v( k; l
   wait for 5 min
  d; W5 @( @" l, f9 ]; ?   bring up R_mA
& q* M" T5 s* R3 T3 A+ y) l( _9 o+ \   end
$ F6 H% b% f- Y2 ?& zend
$ \9 t) u& T( h8 K

' e# J3 m0 D, ~begin P_mB_clean arriving
" [- f3 m+ Z* e) }9 o' X   while 1=1 do! @. k  e' \/ C
   begin/ b( U* ?+ S, W. S  F
   wait for 90 min- A7 J* {3 n/ e. C2 G) |
   take down R_mB
- S; A9 x" Q8 \, E/ X   wait for 5 min+ \- l. t+ P; S2 a
   bring up R_mB
! K3 o* n1 Z9 W3 p% e& \; r: W$ |; i   end6 n6 x6 L; L4 R7 _$ f1 j
end

: x: N; g( D5 ^( c# u6 e+ _
/ E$ c7 I7 I' Z' dbegin P_mC_clean arriving$ F# n1 k) `2 k( _: w
   while 1=1 do9 t) M0 {1 i3 ?* |8 {7 \
   begin
& g9 N4 c$ o5 E   wait for 90 min3 e4 d/ J5 _' |0 |) F- f: L
   take down R_mC
. R1 N& C( |7 x% `   wait for 10 min3 E9 R5 F" H, |% a% D5 ?
   bring up R_mC
  o! ~" W4 m8 T8 s. x   end; s+ R6 q/ [4 h/ c( q9 H0 z1 C' W
end
; I0 q) N1 f! q
----------------------------------------
: g) w  A5 A. g . O' p; l# A8 z' S- N* |' `& F
Exercise 5.9
0 Y: p+ C6 ]" k9 Q, ~6 D( d( a; X
4 `( r. U" j  E& Y  l+ }3 Q; N9 l
Create a new model to simulate the following system:
. A% c5 G. {1 t/ `7 jLoads are created with an interarrival time that is exponentially / z1 k7 e) A7 Q; `
distributed with a mean of 20 minutes. Loads wait in an infinite-
" u3 x# x( g7 }$ r) i* a/ w* N6 {capacity queue to be processed by one of three single-capacity,
/ D. \7 q4 ^3 v3 \: z) N  ?arrayed machines. Each machine has its own single-capacity queue
# d' j, T9 X5 z3 |' Vwhere loads are processed. Waiting loads move into one of the three
5 h: j5 Y. m4 wqueues in round-robin order. Each machine has a normally 0 q0 Y" V4 z8 v6 i% V! H1 ^
distributed processing time with a mean of 48 minutes and a standard 1 t# P) O$ m% T2 W; |
deviation of 5 minutes.2 b/ r( c% g, L( ~* C; c
The three machines were purchased at different times and have
. A* p2 ], j* C& r, ^* t$ wdifferent failure rates. The failure and repair times are exponentially
0 N# G+ a7 y7 H( F- E# |- [8 m% Odistributed with means as shown in the following table:
# K$ q  q/ q$ l) U" K3 INote The solution for this assignment is required to complete
( V, j' |' _; q2 ?exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ; {, _% e8 T$ h5 W, ^
your model. 6 z+ A5 p# c) |& v5 ]
7 F6 ?. T$ Q7 B) {
MachineMean time to failMean time to repair$ o! v" |3 v% n3 b4 M9 O
A110 minutes      5 minutes: P( g2 V( f* d# M
B 170 minutes     10 minutes  M5 e; c4 W- o( j  b  T
C230 minutes      10 minutes- G# L5 K4 {* n  H- D. K

& L: H2 j& L1 b- V  ^/ mThe machines also must be cleaned according to the following ) o% G" j" |+ j% M$ i( _2 y
schedule. All times are constant:
0 F  w8 r7 U1 {* f. |* Z
- ?0 v& _% b6 W) Q  t$ N( G4 C6 MMachineTime between cleanings Time to clean; \/ P/ N! V: L% j
A90 minutes        5 minutes4 x3 ?& y( N# I! @1 w5 ]
B 90 minutes       5 minutes- p5 p3 D2 z# q) T; M1 j; Q
C90 minutes        10 minutes; b' z& }- w, P& v( X9 i
7 x; n; U0 X$ I% y9 p
Place the graphics for the queues and the resources.
8 `- D6 I0 W, dRun the simulation for 100 days., e' B1 X  q& N5 v3 H
Define all failure and cleaning times using logic (rather than resource - A7 F7 n# B1 D3 H
cycles). Answer the following questions:, C# B* v1 h- T/ `
a.What was the average number of loads in the waiting queue?. s# \+ @, \$ p1 Y# f* e
b.What were the current and average number of loads in Space? 7 B9 b( V# L1 w# ^+ u5 h
How do you explain these values?
) \1 i; L1 K$ |1 S6 ~$ ?

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉+ q% H1 G+ S% y, P" [5 _
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
# }6 h- i- r' h/ c这行好像也不太对,各位先进觉得如何呢?
8 c9 F1 ~) [7 N' o
! [# D, H8 |7 A7 K9 K$ Lbegin P_something arriving8 c: C% V5 F: J8 f) g1 Z
   move into Q_wait+ L0 F+ `7 Z9 j7 b
   move into nextof(Q_mA,Q_mB,Q_mC) - V: U5 w% j# |9 S( g& p
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min6 m1 o" e; s8 c; o1 W
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) ! L2 U) j  k. B! `- {; A
end8 _! V; |8 Z+ @# f% K
- _: ~- r" N- I2 o% q4 b1 F
begin P_mA_down arriving
2 B% D- x# A6 j2 U   wait for e 110 min( g! B: D; i  Y3 g! c* g; y
   take down R_mA' [* i  F' c" W8 P7 M5 e8 @6 P  X
   wait for e 5 min
, W# l1 F& t# \5 C! z+ i5 b. ?8 x   bring up R_mA
2 g" N, _2 q1 l$ B7 a0 ^% qend) H- x% l" D  D3 q& t) l) ]
, r9 i/ v0 M+ J( ]  y% p8 Y
begin P_mB_down arriving
- ^" i% v: _- f$ z& {7 j   wait for e 170 min( |4 Y! B, k1 J5 T
   take down R_mB# v5 V4 ~9 A1 t! C+ T$ k6 n
   wait for e 10 min
6 D% T. W: v! F   bring up R_mB8 C+ I* \- ?; j6 W3 {0 H
end) S" c" J" F+ D  Y+ r5 }: F- B
7 v& D5 z& `# Y
begin P_mC_down arriving% ~9 {0 C0 [  k5 C
   wait for e 230 min1 Y. Y2 q! W. f- }2 K
   take down R_mC
/ W' T( E3 Z/ d& ]0 ~   wait for e 10 min5 K/ ]6 n5 D3 W9 T
   bring up R_mC6 ~7 v: `+ n& x5 @: k% k
end
# R0 K9 D( J  ~4 X* u' C2 U4 ]; Y
$ ?+ S# D$ s" H  M: [begin P_mA_clean arriving7 n8 s5 ~/ b% |  p8 K3 z8 d: u
   wait for 90 min
; C4 L, d- t; p( w   take down R_mA
6 n4 d  g% I2 P   wait for 5 min
* }/ x6 \: x3 P& x# X6 ~   bring up R_mA
- s- G0 ~$ o+ A; u, N+ @end
3 U0 H$ L( \' r2 s- D
0 P% ^) ^/ V  O, Sbegin P_mB_clean arriving0 B( o8 `+ I) u. `$ D2 s
   wait for 90 min
) u) M" I; H1 \   take down R_mB0 P3 r* n& x. S+ f" H- N! T
   wait for 5 min
6 Y# ]' c  G5 `; q   bring up R_mB9 C$ U+ H9 W# e; h8 D+ \8 S
end( _4 I( {" {' F

& U4 x2 y0 b  N. y& }begin P_mC_clean arriving
5 m6 g6 m. }6 \3 M7 E   wait for 90 min5 V( d7 e8 v6 K7 v- _* K/ I
   take down R_mC
& p) Y4 x' ^5 ~6 T/ q   wait for 10 min
; Y& m8 `2 @8 @6 b7 o. n   bring up R_mC  C9 G4 h3 J& [
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving8 c" Q4 q: O9 `) I# I4 N! S
   move into Q_wait
2 L1 ~+ g$ \9 {/ i# c6 c   set A_q to nextof(Q_m1,Q_m2,Q_m3)
  W  H! S% s! q" l   move into A_w
  s8 K- E2 X" l$ M8 A# k- d   if A_w=Q_m1 then use R_m1 for u 48,5 min
  B8 O8 R3 }5 W% }8 g% d) B+ S4 @   else if .....then use ....for u 48,5 min$ u0 ~' h( M" k9 L8 H
   else if .....then use ....for u 48,5 min  ( c# G2 g7 d0 g, K. W
   send to die7 e% n) w. ?, Q5 M5 _( c* z
end/ s* `. p. s) U+ y# r: o' V7 e

9 P4 g! N& T. d6 d& [# a! T0 w! W供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-16 12:27 , Processed in 0.016521 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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