设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7989|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ( s+ k0 J6 D  n! c3 J
4 d+ F: z" u9 ^4 ?$ S- M
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去1 F# u; U, L( l- J/ g
; Q( Y* z7 N0 G& {& H5 d+ t
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!# q, R" U  B& c# s3 t
6 W# A+ m% c/ l/ x* c( S; {( r* w
--------------------------------------------
% X9 [( g' b9 g0 Z1 ?begin P_something arriving+ n: u3 _/ ^  w4 b' L6 V2 O
   move into Q_wait8 }5 u9 p/ j+ S/ _
   move into nextof(Q_mA,Q_mB,Q_mC)
( t' c  _* d4 H7 I+ I, g   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min, D6 G3 `0 E; d
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
) u7 t; b" ~2 D% F   send to die; c1 Z( d& W% u3 v2 q. @# @5 Z/ [4 ]
end
5 ?3 s  j. `5 b: Y6 o2 J
. Z! D# E) B7 k" O
begin P_mA_down arriving
7 I& p( @( r$ ]: G  Y   while 1=1 do / }) ]7 F  \: `: U( y
   begin6 Z4 K8 q+ E7 c+ E
   wait for e 110 min
7 i/ C( ~: V/ E9 S6 J! ~6 g   take down R_mA+ s6 n3 x. I4 e* d# H1 G/ h2 B# Y+ Y
   wait for e 5 min3 g# E$ }! z* ~
   bring up R_mA
4 ~* @! X# w0 \: l( e, I3 E   end
2 z; G) a0 @& _; X# Yend

, E0 T' _# s0 L4 Y, C 2 K) u' e1 B5 p# |; L0 b* Y
begin P_mB_down arriving
8 Q+ g9 {4 D3 T   while 1=1 do
, @7 Z. ?; t0 O) u, U7 ?5 o. f% k   begin
* [) L2 k0 s6 w, l/ q4 B  O   wait for e 170 min4 v: O, l% J5 A0 {  T9 n
   take down R_mB. G" O  E+ ^1 Y# ]7 m
   wait for e 10 min
& ^  }( M  i8 W8 X3 e0 I" Z   bring up R_mB
/ ?2 E9 v" w8 X3 a7 ~$ h" `: Z   end
  l& }/ K( w# F- z. Jend

' _: j- v" I0 j8 l4 Q" t5 P % z. F: k9 s2 X) G9 B" P5 Z' G. M; ^
begin P_mC_down arriving
/ @; ^; N6 ]5 X! U2 p# ~* _   while 1=1 do
9 I% k! g% Q& E) O   begin* w3 u5 W5 c- ~% u
   wait for e 230 min8 i' n' [4 f6 g. E' j
   take down R_mC
8 u& u8 r$ ^% G   wait for e 10 min
# ^. m5 a+ J! _! U0 I   bring up R_mC
: z" Z' \* j0 g- _0 ~   end4 v4 z# s1 B: P7 w
end

# R+ Q  W8 B; d, I / z5 X$ Q; o# A) c
begin P_mA_clean arriving5 T: x8 N' n1 h7 e" L# |
   while 1=1 do
9 L5 U$ ]# @- Z' I   begin
( c/ ]- n1 J3 D% P! `4 W* p* p7 ]   wait for 90 min
! r1 Z; Z9 H$ L, G2 S$ t% i   take down R_mA
/ m& ]* P" `/ m9 w! ]   wait for 5 min5 D. o! q2 R7 k3 `
   bring up R_mA
# E" D  K- l  k1 u( w, c   end
$ @1 z# l$ i6 Z2 x& Send
$ Z" S$ f5 v+ F% L' T! Q9 Q, k9 g1 d

. T; F9 [4 X0 I: ~begin P_mB_clean arriving
1 o" a: ^6 Y# [3 I' \, Y; W   while 1=1 do
: e+ E- M/ W: w   begin8 ?/ X/ w* B7 w, V& w
   wait for 90 min
( f6 ^+ ~4 _) o/ e# [5 {8 W   take down R_mB
" V1 L% {7 j; ^+ L- i$ k   wait for 5 min  G3 [: {7 j& |' a" K
   bring up R_mB$ F6 R  i5 g  n3 r7 q
   end. v4 m( L1 w7 M$ ?
end
: Q0 H6 H: n+ h6 E, E
* _9 u% Q1 V! T) N
begin P_mC_clean arriving, N$ y$ k/ b- m# E
   while 1=1 do
+ U6 T" q, ]2 x& \9 O4 f   begin
# P- Q+ ^, ^3 i3 H+ X5 x/ {   wait for 90 min! k, [" G5 k" O
   take down R_mC$ V( D; R: Z6 P% x9 r
   wait for 10 min9 S7 x! @3 U2 G/ I
   bring up R_mC' C2 [8 g% F  j; X7 P5 |% K* K" C! q
   end8 t5 A9 D7 d9 l' y' M; o& R! U0 \9 \
end
) G; x: _8 P! A* E2 _* ~$ V
----------------------------------------! K& B+ x1 I9 L- p& h4 l
( z" E2 C' x2 u+ A4 {
Exercise 5.9
7 m: ?: k! p# `# K$ I* _3 N$ b  T+ {- \+ t! C1 `1 `3 c$ K
0 p7 p& W% x) X7 m2 }' }
Create a new model to simulate the following system:/ `4 c6 y; \9 [& U  H
Loads are created with an interarrival time that is exponentially
: [( x- `# U1 b% ~# C2 n: ?; x: Bdistributed with a mean of 20 minutes. Loads wait in an infinite-9 E1 ?+ x# M+ a$ v* F8 ?/ n
capacity queue to be processed by one of three single-capacity,
( f8 d9 n1 L, I6 J+ sarrayed machines. Each machine has its own single-capacity queue
! z' ^: f6 f$ S: o+ i! |: e  E& wwhere loads are processed. Waiting loads move into one of the three 5 b. x0 P: M- |7 y. |3 D
queues in round-robin order. Each machine has a normally , }( M7 j' }9 @! s
distributed processing time with a mean of 48 minutes and a standard
# g, A; Z; e: I9 s, Odeviation of 5 minutes./ [* h0 s2 h7 X6 v4 o
The three machines were purchased at different times and have   c" |' }, [  w6 P" `7 z0 C% m
different failure rates. The failure and repair times are exponentially
2 B$ b7 D* k+ Z, Y6 Q3 sdistributed with means as shown in the following table: ' E* a9 h- W' ?* \  f; Q
Note The solution for this assignment is required to complete 9 p  }1 n+ l7 ?8 S
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 0 l3 @6 m5 L6 O5 j% K' N
your model. % H4 Q, _# K  Y# T: N
" o# S+ T" w8 M# k) i* w. E
MachineMean time to failMean time to repair
6 M# t, `* M$ N7 p; ~0 y2 \+ w2 yA110 minutes      5 minutes3 G$ o8 h: _( h. o$ ?' S1 n! I
B 170 minutes     10 minutes
0 k1 L/ x) O) E) z$ Y, lC230 minutes      10 minutes) A# n; G% o/ Y' y5 |  w

( C) l0 u; F% ]3 wThe machines also must be cleaned according to the following * V) e1 s' W4 n
schedule. All times are constant: - s! a' w6 ]6 i# e0 v
" p+ }- Q8 c& f- J9 e3 V4 s8 t; g2 e
MachineTime between cleanings Time to clean
! U# {' A3 A* W# VA90 minutes        5 minutes
6 Y8 Y8 w8 @+ o/ VB 90 minutes       5 minutes
5 n, l$ T! P0 {- F7 hC90 minutes        10 minutes( [. i) D) e$ A# c

& M  q  L* ~7 G/ z% c  oPlace the graphics for the queues and the resources.
8 O: s! E' k6 o! L+ i/ e& v4 ?Run the simulation for 100 days.
: X! r/ T+ R  Q4 z7 F( X1 W% PDefine all failure and cleaning times using logic (rather than resource
" @! }/ q/ a" m( V- E# Q( Ecycles). Answer the following questions:
9 G; ]1 B0 A, Z6 {7 a% {a.What was the average number of loads in the waiting queue?
9 B! g4 o2 i$ R5 w9 Hb.What were the current and average number of loads in Space? 3 v% V% r3 o# a4 ?+ \$ ^% a9 S% ^2 O
How do you explain these values?
: J# D! D/ ?. r+ Y) l7 Q6 S5 n7 x

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉! ]( J1 y. p4 C5 M* R6 v
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)7 O1 \( |6 h9 O0 p, }8 V* `
这行好像也不太对,各位先进觉得如何呢?6 p" g: v' @+ X: y+ n8 n3 A
+ e5 E1 F8 u5 M6 A& L
begin P_something arriving, M0 d( D+ k6 ?) A% ~
   move into Q_wait
2 h6 E& J! S; r, u   move into nextof(Q_mA,Q_mB,Q_mC)
" r% t6 _2 X8 s% J   use nextof(R_mA,R_mB,R_mC) for n 48,5 min6 P$ K4 \: w5 m' |; g
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
) r; X' e' h; j, g9 i( ]end
  ^' m- M# [% m$ Y9 }6 K$ o) }! v( i. v
begin P_mA_down arriving! ^) N" v' O0 O$ |
   wait for e 110 min
! U3 j0 i7 C- N; W8 t/ V   take down R_mA
' i) ?& d3 f/ E& r   wait for e 5 min
. I2 P% s% M! W3 I   bring up R_mA6 R7 d8 T+ u7 F* x, O) C% Q- ]5 b- }
end
; |8 W" K: ]' A
5 k8 }. i* g' B& ^5 U0 L/ ~; Ebegin P_mB_down arriving( T5 J* H* w/ B# ~, L7 u- O
   wait for e 170 min6 [5 }& ~  C' O  B/ l9 w0 X
   take down R_mB6 e9 G+ N# e2 T+ Y2 P' F( I) E
   wait for e 10 min
& V, V- O: d, Q6 S( z1 s' [; I6 [   bring up R_mB
, @$ V" ]# E& m. qend
6 O2 @$ w: M, V# @8 l% E/ b/ ~: A# \  n( i
begin P_mC_down arriving. E; }, M9 o( R4 W& b
   wait for e 230 min/ i! k9 e, y6 b+ K* R8 w" m2 I
   take down R_mC
, c) y2 f$ B' o5 f! p, T% U$ y' k   wait for e 10 min
+ `1 \8 H7 ]1 P2 x- T; ^   bring up R_mC! H# ^% p4 ~; l- x" j, m+ t9 L
end" X9 ]% z4 o7 S5 \( |

' X. i8 |# W% h- h. A& D: V: z1 @1 G; `/ Ubegin P_mA_clean arriving0 B" l& o$ ?3 L7 r3 ^. o0 p
   wait for 90 min
, p; _# A; r2 o2 @& ~0 E   take down R_mA
  O3 V, B; l$ h9 h9 m  R; I   wait for 5 min
. y; w7 I5 ?. ?3 j* m   bring up R_mA! @  g: u$ j, u+ c( S
end
& h1 R  r2 e3 m0 u+ M
0 {( h/ r& R+ S' M% |begin P_mB_clean arriving
, g4 v- n8 V( h7 ?  N   wait for 90 min8 I; N3 `6 a  |, }" _
   take down R_mB- I7 t* h' s, i! A, _  j3 I
   wait for 5 min0 ?* H# m% @; |5 ?& z/ B7 x
   bring up R_mB- N; ?- M6 s  o$ b  l1 X
end( y% R. L0 M* ]. T
7 t/ O+ w5 d& r  a* e  C3 _- Q8 o
begin P_mC_clean arriving# H; w- b/ F& J$ ^
   wait for 90 min$ q5 }4 o+ W5 Q; F5 d
   take down R_mC9 \1 K! u7 i* K8 K# u; [
   wait for 10 min
: Z2 b6 S9 D( H. g* H8 J: {6 ?* L5 Y   bring up R_mC' \4 V% n/ U0 ]
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
9 W' r4 T' s+ O8 v; Q/ p5 L   move into Q_wait5 C6 [& {0 \+ x# O
   set A_q to nextof(Q_m1,Q_m2,Q_m3): ?3 l3 N8 }. Z$ @9 ]
   move into A_w) `6 f1 Y% D& a/ n9 i) K* G6 t1 L( B
   if A_w=Q_m1 then use R_m1 for u 48,5 min; Z: e4 ]" q/ M+ s) \# a: X
   else if .....then use ....for u 48,5 min
  ?2 }8 l2 |; r5 u   else if .....then use ....for u 48,5 min  
; J( s. E3 d3 @4 m   send to die
1 q' L' ?8 d" v! |0 T4 qend
9 L# h0 F6 A5 x1 O
6 ~/ G( t; |( [( W供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-6 02:46 , Processed in 2.611000 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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