设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6886|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 5 A, C3 Q8 t' }; E6 T3 r
# d/ K/ \5 ], L7 L% d1 G9 g; E
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
- |; ?- I* }, j2 C4 O
& \( Z& |, S  }3 C0 B不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
% p% L# ~9 n! v; V* r% Q# ~$ ~3 Z* f/ ~
; u% q- C. B$ T( r: S; z
--------------------------------------------5 N8 l* M- L7 B8 K. }( R+ D
begin P_something arriving
6 ~2 ^" E  r$ h* [. k* A$ t( }9 V1 a   move into Q_wait9 a9 F* y  N- S: s& ]
   move into nextof(Q_mA,Q_mB,Q_mC)& @6 D4 E. b  Z
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
0 G% i! u4 w/ f, Z1 |9 \: z   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 S4 L8 U3 y5 q6 Z8 j7 Y( ^. C   send to die
. ~9 S( P; E; L& j1 i" qend
% }: R7 a7 k5 s# m/ q1 }. N
- q; y; X# x7 ?! ~% J
begin P_mA_down arriving# o/ E9 Z' f, F; C; j* T) I8 s
   while 1=1 do 9 ]; ?- ~' ?/ S0 G; m) j) t) {
   begin- u$ v& C0 y8 m) Q3 H* ]! `: E8 ]
   wait for e 110 min
7 l2 i; O8 \. z. a8 C6 B$ T9 {& d$ H" X   take down R_mA* z' q" ]4 P$ \. \5 f* O# @, [8 p
   wait for e 5 min
) r3 U( x5 e  I0 G& r3 B" p   bring up R_mA
+ ~( C& Y+ l1 y' c# L  _2 @0 a4 f8 r   end* y( R: @4 `- R2 R
end

, N$ G" V% |% j5 h& h- O
* |1 y3 S7 [# }$ u8 B% W* }7 X9 dbegin P_mB_down arriving7 i: R, ?2 |3 s. w0 {
   while 1=1 do
/ A! w# i# P/ ?9 ~' A  `5 @% j, T   begin
9 u" \* L' E' \4 k; t   wait for e 170 min
8 X  n0 I: E9 R) E& B; t- k   take down R_mB. G% c0 j! m# u% T. B
   wait for e 10 min: @1 w6 I: [6 l: w' @+ R) [
   bring up R_mB
2 `" o: }1 {1 J) \4 E9 k   end: R( x& C/ j( m/ r4 y' L4 o
end
' y2 F- F9 d9 [! X) Q, R8 ]
0 n% V& [# L7 P% m9 T8 q3 E  f
begin P_mC_down arriving. }. F. P+ E( \) G* J
   while 1=1 do
0 u1 b0 T* i- }9 C7 N: _; u   begin$ J- \" ]0 G, x/ R9 B
   wait for e 230 min
, h, Y3 K& m0 b5 {$ C   take down R_mC
2 _4 o+ Q: A3 n4 F/ u: ]  T( O   wait for e 10 min
: W% j& Z9 ]0 K1 D- ~% K! {4 ~   bring up R_mC
7 D# f  N9 M8 `% d& A. j   end4 p9 R' |7 v2 L/ e9 W6 P; K
end
. P& @+ m3 x4 X) B; S

. }! ~$ o( X; kbegin P_mA_clean arriving  Z5 q5 E- k6 l  c+ p# K# x% t0 \
   while 1=1 do4 i0 h9 G! m5 ~
   begin; g& p, o' ^2 J; h4 k8 V
   wait for 90 min
6 k% z; W9 h" D   take down R_mA3 B7 f# O. j; N% @3 k% w$ G
   wait for 5 min
+ D& g5 W3 S, j8 I8 S( j   bring up R_mA/ B  ^4 `$ w  O0 _1 ~
   end; j; i2 W, a( a8 R
end

  X4 H* I6 I% L
1 E3 H6 B: J0 x  wbegin P_mB_clean arriving3 Y2 E1 M! x0 b3 o1 X
   while 1=1 do- ]& N- ~9 P+ c4 q; |+ G
   begin
8 Y) w  g, m  P   wait for 90 min
) i  l3 ?& z# Z! e3 {   take down R_mB
* x, w! H* U( D% h1 V   wait for 5 min
1 C6 k9 `5 E5 O* V6 d( w: O   bring up R_mB
4 A2 h* o. U' b2 p" q   end
! N, G/ g  Z, `  Q6 D6 ?( }. Mend
2 v( X1 @5 a5 B+ J0 I" F6 |- |
1 G4 F' p' k5 G& E
begin P_mC_clean arriving1 d3 q2 ?/ I# a. q4 r7 T9 W& d
   while 1=1 do6 A9 J* N" W& `: h. {( M
   begin- V+ G! y; |0 \" f  l9 `/ m
   wait for 90 min
0 @# W  i  {! e! B" e   take down R_mC7 b; f3 W9 o6 T
   wait for 10 min
% p! \5 o( Z5 _0 Q1 y) D: _4 h+ p   bring up R_mC9 p: E$ @3 k3 s( H9 Y/ t
   end9 \  {9 {7 W* X" h
end
* S6 i8 A' a+ Z! w
----------------------------------------
. N; @0 ]( T7 J1 M/ C
) g7 j6 u" B0 Z% n# A0 QExercise 5.9
8 f, ]* f  M+ u6 J  ~* c0 L8 f: P" P  |* w

4 m& u" t4 g0 D2 ^( s; qCreate a new model to simulate the following system:
( e  N! L% h7 U% Y' T6 PLoads are created with an interarrival time that is exponentially 9 T- U. A7 s2 Y% G; |9 e
distributed with a mean of 20 minutes. Loads wait in an infinite-! L" R- [, [, A& ~# l5 U
capacity queue to be processed by one of three single-capacity,
/ d3 R2 B, b7 ~( r* e5 Narrayed machines. Each machine has its own single-capacity queue
& l# u* J3 @. D3 r5 zwhere loads are processed. Waiting loads move into one of the three , L$ H- g5 W; k5 z6 R
queues in round-robin order. Each machine has a normally
# }' i3 i$ P4 t. q9 G( _$ c: @distributed processing time with a mean of 48 minutes and a standard " N( C8 h" K8 b7 H, Q
deviation of 5 minutes.
7 K) t! K- l- e. R% n2 _# tThe three machines were purchased at different times and have
6 S1 T0 u1 x% }different failure rates. The failure and repair times are exponentially
, ]  H7 O6 h; J6 `8 Ndistributed with means as shown in the following table:
9 `8 m; t; F" }1 f4 o1 ?+ Q7 X5 E8 k9 GNote The solution for this assignment is required to complete
7 V( z0 B0 g% V8 f9 Wexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
; d) u6 A0 m, k9 D* }4 H  \' ~) {6 Xyour model. % j5 a9 E. C" X5 C6 z! c# x& F) ]

" @& y$ H( B+ M+ Y  x: N3 Y: {MachineMean time to failMean time to repair
% I. i7 z# p* E3 {' G( }  a% j; P6 GA110 minutes      5 minutes
3 ?" P5 I% n; h1 m4 ?) n8 K5 bB 170 minutes     10 minutes
. }  m2 H6 d# HC230 minutes      10 minutes
! \" \. f/ i' _& f
5 p+ L3 f7 `* t- qThe machines also must be cleaned according to the following
+ Q& a9 j2 O4 dschedule. All times are constant: 9 ]4 O) ~% B8 Z) I  k6 ?& [

3 m  M1 L9 s1 ~" gMachineTime between cleanings Time to clean
- L* s1 H+ Y6 y- E$ o' xA90 minutes        5 minutes
$ S9 {& R1 H4 M% |' k6 B+ q& o" nB 90 minutes       5 minutes
1 T6 ~1 ?) T. O; @C90 minutes        10 minutes
1 i5 Q6 A  Z; z1 d: J- S5 I, `8 X- d/ W7 F6 M* h& I4 B
Place the graphics for the queues and the resources. 6 e7 Q. C  d! {9 \
Run the simulation for 100 days.2 ~9 x  R! o0 d* {3 w, R$ M3 |6 S& F
Define all failure and cleaning times using logic (rather than resource
  f8 P# G& s: V( P' ecycles). Answer the following questions:3 p. n' D; q4 u0 t
a.What was the average number of loads in the waiting queue?! m4 x0 N1 R( r4 k1 }
b.What were the current and average number of loads in Space? 5 r! v9 b/ n5 C6 @
How do you explain these values?
( g/ P; E  s2 I5 x9 s7 Z6 h

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
( }! D" [0 e9 Z/ }send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
2 j$ y  q* K) g* t( d4 D这行好像也不太对,各位先进觉得如何呢?1 T; j8 w( A/ u' v/ x& U

1 A5 A6 B* e! X3 [9 P; O# M! xbegin P_something arriving9 ?( |- N% d5 j/ f  P
   move into Q_wait/ Y6 e: B& v+ _3 S+ I' e
   move into nextof(Q_mA,Q_mB,Q_mC) ! d# @# u  e/ D, B1 S& R$ I
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
; I  B; T. ~# T8 j5 T   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) * _) u1 F$ x+ A  I
end
5 n( S0 }4 A0 n9 }
( [: v. H; Y0 N) D6 B0 n  y7 Tbegin P_mA_down arriving
, Q+ }. I7 U( H0 j! M$ P0 O  w   wait for e 110 min, T3 U7 q6 u. P/ C0 `  J% T
   take down R_mA
/ l% J4 r" F5 j0 K) j, D! V   wait for e 5 min  L3 ]/ s& p, p3 y8 d
   bring up R_mA
7 w0 ]3 c2 Y5 {7 h* M2 J; y$ R5 @end
3 W  A1 c' x4 t7 `% D! ]# ?! [1 d- {  _/ |8 B1 X5 H6 f7 s
begin P_mB_down arriving
7 t; i  Z: d$ ~0 ~  z   wait for e 170 min) s9 q. a3 |3 [5 W! O. U. g* b1 ?( b
   take down R_mB0 F# n1 Q" G0 J( V  U7 W
   wait for e 10 min9 ]) _. G: x2 O1 n
   bring up R_mB" |8 |0 Y- z* y3 Y0 b- b' j
end
* A0 ~8 l7 I# B  e# V
$ p, `, C& @( i% z& \begin P_mC_down arriving
9 I3 U- g# M/ A- _. y" q   wait for e 230 min
7 ]% I* \2 a; f/ `/ A' u8 Y   take down R_mC
0 `* y0 ?" A" \9 \! m- N) I, y* t   wait for e 10 min6 c" Q9 ^0 j3 j6 d4 r6 V
   bring up R_mC: L) r/ h! q' B! _9 P
end; {# R4 C( o9 Q
$ G0 }( @* n! I- S; n  d8 B# D
begin P_mA_clean arriving7 Q: g" o1 K0 ?1 L& O0 ^5 z; y
   wait for 90 min
1 h% P* M# p% c8 Q7 {   take down R_mA8 X* H* ?, p# p) J' D# b  E
   wait for 5 min: T6 ^1 |, X; `3 e  e" J" d/ T. n! Y! Z# g
   bring up R_mA$ D8 h& N' c* b3 ^+ e1 U$ ~
end
! l% h7 _9 m# T8 H! N% p7 Q" L" s/ A2 k$ w+ A
begin P_mB_clean arriving( u1 {( P, p, S7 s- l. Z
   wait for 90 min
, }+ y7 b: Z9 I6 A6 R( m0 P   take down R_mB- C3 {: p: @4 H) [: g# f3 [! j! ^9 F
   wait for 5 min
. i. R8 m( r( p& \8 _: b5 k7 X   bring up R_mB' Z6 I! i2 a7 E2 k$ x% i& n. g
end$ {  L4 u) z3 @$ @$ c

/ n# a- Z$ W6 @3 I" q. gbegin P_mC_clean arriving
; O5 F( @! Y) z) N& ^# z0 ]4 z  Z   wait for 90 min
' t, v3 e! t! x: c   take down R_mC; A0 [8 V& E; M6 B: u
   wait for 10 min$ ]* Q6 ]/ Y- G+ h$ i/ N
   bring up R_mC
7 m' K2 P6 `' k- O1 j1 p7 G8 Send
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving4 E2 A0 S! D/ w' b, F% ]
   move into Q_wait3 f0 Y& b: E# P: g& ^, x3 E8 a# H
   set A_q to nextof(Q_m1,Q_m2,Q_m3)5 F' V5 ]8 J' q8 i4 \2 q
   move into A_w! R- \! h3 Q: {1 J1 ]
   if A_w=Q_m1 then use R_m1 for u 48,5 min/ c) m: o8 w' S
   else if .....then use ....for u 48,5 min
9 L& u& g4 C4 v. k   else if .....then use ....for u 48,5 min  8 l9 ?5 T  J4 G0 H$ c
   send to die  S1 r" y9 H7 M6 f) U
end
$ U) v' T8 E/ Y* n# @
' F; H7 U, g/ n+ z8 R4 r; q) {8 D供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-9-16 19:22 , Processed in 0.014882 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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