设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6812|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ) P- Q5 _* D, ]

0 p6 I( ?9 o3 M0 P8 h& B底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
# s$ s( C" d; y  V2 f" l9 X* M1 C2 P- W; N% V1 i
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
! w" N8 i# V/ ^3 l% d- N- `- r: X( d- |- w( }
--------------------------------------------
4 @' D, g( L' C9 xbegin P_something arriving7 z' d9 [2 U& M
   move into Q_wait
6 {% |) F! m8 \9 L3 x   move into nextof(Q_mA,Q_mB,Q_mC)9 B' q* T% R: q& t
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
/ m5 e& p) T( }' @$ J0 Z3 q   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)  h: d/ r. h. {: k9 B
   send to die
( d4 w) U2 I; U) dend

. \  V6 X9 I2 j* d2 V/ _" U: p
! ~2 Z9 u0 C! }4 b% [' i9 X& T# q1 Bbegin P_mA_down arriving0 h. a; A9 P. z% U
   while 1=1 do 7 M; x- M) \3 d
   begin) O7 |  c8 I. }3 n4 N
   wait for e 110 min
3 T4 f9 L5 P0 F: V/ P5 \  w6 Y   take down R_mA
# {# D; i( H. C# W, i4 a" H- A& T" L& {   wait for e 5 min& O4 e6 w% a. d" |% A+ D
   bring up R_mA0 E0 ?" Z. f& Q- Y4 ?+ Z1 f
   end
8 I* D, p8 l) e, D# Q# _  Yend

5 K: B9 \) i, h6 l( S ! b' b+ Q. ~" E5 C, [3 n, P9 ]
begin P_mB_down arriving
; l/ H  i. v) [) g7 J: H0 K! Q' [   while 1=1 do
' E; G/ v4 G2 i' `- `   begin
! J( T5 |+ [0 }# \( ]: f. \   wait for e 170 min
+ Y; |; s  z' o' E  N5 Z$ W   take down R_mB
' i8 e4 O. u  f2 f   wait for e 10 min- H# ^' L5 q# Q; S8 m1 X
   bring up R_mB& O) |! I& u6 A. y0 l& }8 N
   end# m+ P0 h/ d0 ]1 c  `; G1 W( N
end

+ w) G4 T* C1 G8 u: t. J( J 0 M2 C. d& a' K8 i+ k1 N
begin P_mC_down arriving
) h7 W: H1 @) k, `   while 1=1 do
! O# b: \% C* m2 R* C   begin
: [. k. G4 b& I: @( [+ X   wait for e 230 min
6 r4 u; G1 i. \1 q& Y% v   take down R_mC' h0 V; t3 @# J2 }  i" `7 V
   wait for e 10 min
" \1 P  L* N* Q2 y3 c4 v   bring up R_mC  @0 q8 c7 e" f8 g( k/ {
   end5 u) Z, [- v+ a
end
, R; U3 ~. ^8 e( _/ \+ V8 e

& D! A+ L, H5 `6 R2 C) m- Z0 U- I3 f! kbegin P_mA_clean arriving
& v" a; a" L# O/ D; }5 |5 N  A# [   while 1=1 do
8 \9 f; Y0 y2 U/ ]" J) H2 s0 ^   begin
. L! f0 z) S3 `, D   wait for 90 min7 Q% N$ \$ y; ]/ k+ {
   take down R_mA
% j2 q3 g: G/ d, g. l   wait for 5 min
3 k+ G+ w% Q+ e1 D' I9 |' u* g' y   bring up R_mA
$ g+ j% z  m. f( _   end
( L7 F# k% E, r, K! K: h" Oend

( t) K2 H+ I% L# r& ~
- @: O6 H& y0 |- R$ Lbegin P_mB_clean arriving
. C! c, I0 ^0 M2 ]5 A   while 1=1 do
2 Z) f4 n9 }& {8 |7 J  J5 P   begin/ }& b( X: P% w8 ]
   wait for 90 min
$ z$ ^7 z- S1 M; v2 A   take down R_mB- u. q3 W: q5 P8 k: g! O
   wait for 5 min
* v2 G, Q; d1 J- K3 z/ H   bring up R_mB$ E0 j* j# c  [" T1 Q
   end  Y& n4 K/ `  m
end
$ T0 X' P2 v& q$ x4 {* ^* z
4 ]! M& J0 a3 L. ^) T
begin P_mC_clean arriving
  a1 `# M6 S1 L   while 1=1 do
* R( z8 B! Q- Q; W   begin
7 C5 Q2 u. d) s# B! q   wait for 90 min0 j+ e# b# y8 a- b6 M+ x* ]
   take down R_mC
6 N$ g( C) m% z. ^3 o: h" I" F   wait for 10 min
0 A% \1 v4 B& P* f" L  ?* f; W   bring up R_mC
+ `9 Y: k- i/ P! q) ]/ ?   end- B" Y2 _- q; e$ B6 b
end
9 T% K9 S0 A0 A: x8 f
----------------------------------------' s+ u+ W, m% w3 e7 E9 y$ f" P: x
3 V5 C' }7 s* o. Q1 F
Exercise 5.9
/ I# w' ]0 h# _4 _+ L2 H8 m' i/ @/ T/ o
. i7 J% G* i6 P" A  o3 F, n3 }3 V- |. O5 J% B6 I. {
Create a new model to simulate the following system:
' `. ]% [% U' P0 CLoads are created with an interarrival time that is exponentially ! U0 u* B2 S+ ]& @1 }
distributed with a mean of 20 minutes. Loads wait in an infinite-
3 r% S8 b. O7 |& w. L! U! }capacity queue to be processed by one of three single-capacity,
/ r# {" T* ~8 l- Marrayed machines. Each machine has its own single-capacity queue
7 \+ U; W: X& B( J+ @/ \, P" Uwhere loads are processed. Waiting loads move into one of the three
+ G" K/ @5 z" c; w# S& `queues in round-robin order. Each machine has a normally
+ }; L9 G  E- Y* _6 cdistributed processing time with a mean of 48 minutes and a standard 8 d+ O% i2 e$ W7 a1 N) D
deviation of 5 minutes.
- U, a4 m! G( M: u5 WThe three machines were purchased at different times and have
& P* D8 }3 F& U0 X5 G0 ?: q$ Sdifferent failure rates. The failure and repair times are exponentially 0 G; J! G& {8 [9 B  j- V3 ?  J. _
distributed with means as shown in the following table: ( v/ O: `7 P7 [- f
Note The solution for this assignment is required to complete
. d5 m: p) y) j* }exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ! e- W" G( J) E3 @
your model. / ^  V7 `; o# Y( g) @0 @

& Y* s" I0 g- |: b7 vMachineMean time to failMean time to repair3 A& @: s# Z3 u6 \' y# |
A110 minutes      5 minutes
# {: q8 e. y+ C2 xB 170 minutes     10 minutes3 `! R8 K* y& S$ R0 z& _/ K
C230 minutes      10 minutes
, G: m$ |" f) v! }1 r) \- ?- ?: U) G8 E( ^! C6 @
The machines also must be cleaned according to the following 6 T/ |# R4 h  W. G1 p: p* |
schedule. All times are constant:
; H$ w$ c# a2 f" q
5 z% G4 G/ I, D5 w5 n  B; ?. RMachineTime between cleanings Time to clean/ j" }2 I2 w1 E( p# h# ^% _& v
A90 minutes        5 minutes
2 `" D4 a2 ~( V) l4 Q2 DB 90 minutes       5 minutes
( `4 v  k: X! O' f+ e& Q; B+ DC90 minutes        10 minutes/ Y! f! }$ [% k  M
7 i/ G/ ?1 I) v0 v* l) t
Place the graphics for the queues and the resources. , S1 }) r7 O! M9 g6 \5 t1 G$ G- E. l
Run the simulation for 100 days.5 r+ `" E+ Z! P2 H4 M+ z. j) s% p% o
Define all failure and cleaning times using logic (rather than resource 4 v- j* P& x! g- L( E' f$ Y) e
cycles). Answer the following questions:
5 F1 t8 R% l$ d2 Aa.What was the average number of loads in the waiting queue?, i1 B3 l& u+ d  M* E* u: ]' p4 [% l
b.What were the current and average number of loads in Space?
8 c" F% U9 {1 v' V' s2 BHow do you explain these values? % V$ F$ U# r7 G0 l: ]/ G. j$ t

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
9 O0 W; P7 X" t6 ]8 S" [& U# Asend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)/ C$ R# W: ]* A& |! c7 }
这行好像也不太对,各位先进觉得如何呢?( E* u2 A) t# \& V- J
( Z4 \; j, P6 i7 c$ ^+ u# f
begin P_something arriving
! E* j6 N8 s% W7 x* g   move into Q_wait
3 N8 Q% r% ^+ ], D   move into nextof(Q_mA,Q_mB,Q_mC) ( g! x* }( k- K' E. }; w* o1 h
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
( n- }- y7 E( b8 A; K5 X2 N7 R   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) # A/ T- {3 I! e! ^5 s- S
end# W' c& F+ W0 Z3 U. h" m9 L) U
3 W, U, B% c+ S; Z5 k" e
begin P_mA_down arriving7 V3 M5 G% {3 O' [
   wait for e 110 min, P3 }$ T2 \9 B7 G6 X# [3 Z
   take down R_mA4 r% A9 k/ t2 }  y" i  F0 L/ c
   wait for e 5 min
1 r! \. K1 k0 a   bring up R_mA
. S* \! _' |  U4 Y% n$ P& z( xend* y7 F+ c! H+ x

  q; P7 t: j0 v. e& fbegin P_mB_down arriving% C6 J1 D9 {3 A2 l' q& |1 O% R; Q
   wait for e 170 min  H3 ?, N% P/ k- H
   take down R_mB
$ t; w3 f: X/ |& k  W+ Z. }: H   wait for e 10 min
& _6 d. V3 i) ?) i   bring up R_mB9 U- b* i! r* m/ }/ q* A
end( n6 k5 \! E8 }2 }

1 p: n; H, d# y2 @begin P_mC_down arriving
' d% [6 r0 n2 B) _3 J+ [2 O   wait for e 230 min
$ V3 A# B! k- ^7 o3 d' Y   take down R_mC
" y- ?/ [2 O8 m8 q) K# d$ K" N$ U   wait for e 10 min8 t6 r  U7 ^- b, z
   bring up R_mC, x1 C8 u" D4 H( ?9 i. ^5 b. v2 D1 G
end  O: H3 {" V' [6 D. ^

/ ^/ s1 }6 o2 Xbegin P_mA_clean arriving3 F3 |' }9 X- M/ {+ Z' ]8 p
   wait for 90 min7 Q& e0 A0 G, Q
   take down R_mA1 Y1 K' C; K2 ?, [  L
   wait for 5 min
4 N" D$ n* Q9 x( Q  T! z   bring up R_mA
8 I( \; ^3 P% g( r4 [& Uend8 z4 {+ L6 C3 Q' m/ o! t, `
! J$ O1 t9 I, D3 a
begin P_mB_clean arriving- p! D) y+ m- Q$ V4 A3 z+ N" D
   wait for 90 min/ l0 L0 a  E- O
   take down R_mB/ R: d% K# I4 x* E
   wait for 5 min$ [: Z* }. {# Z' n; G6 z
   bring up R_mB
% x  G  }2 K7 H. v: Hend
: Q+ V* u' h7 C& ^. X6 r8 P1 a9 q6 }' G2 }- w
begin P_mC_clean arriving
$ e. @" A# J# d1 y# E6 H   wait for 90 min
& y6 c: A# S( H1 I   take down R_mC. B1 @, k# f% q8 `
   wait for 10 min  D- e7 k; c0 W: H) X# l
   bring up R_mC
- J% Z! P. k0 X  w6 z- Qend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving* {- G' D% t! u
   move into Q_wait
) A5 R6 v' |1 t, [$ r   set A_q to nextof(Q_m1,Q_m2,Q_m3). \- _' `# P6 B& F& u
   move into A_w
8 ~* a, Q- ^" M1 D9 W6 }3 ~& U- K   if A_w=Q_m1 then use R_m1 for u 48,5 min$ u( `; h9 x3 `$ S& ^, U
   else if .....then use ....for u 48,5 min* W4 k* b9 K2 \
   else if .....then use ....for u 48,5 min  / I. Z0 b1 \: a9 k
   send to die
6 `( U0 ]' Z2 Y0 s# i  fend7 B4 w+ p2 u+ b. P+ p% Q. O

( z6 o7 e/ B1 Q$ ?: ~供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-9-3 12:53 , Processed in 0.013113 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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