设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7058|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
% w9 E& u& M6 _6 L, q; j
1 A, d0 x: X" Y4 Z底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
/ k+ V5 I' l& l. k* P! v* Q
$ [- X' y& w% D5 O不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
3 X, {( H; C$ B7 b( l0 O
7 ^0 A, {& ~7 Q
--------------------------------------------+ P$ {. D% T6 S- e
begin P_something arriving
: T9 r1 U4 X  n$ R1 @9 a   move into Q_wait9 }4 r; A7 _* G4 p- t" W
   move into nextof(Q_mA,Q_mB,Q_mC)
1 H4 y+ h' n# c4 A   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
% m3 H( [3 w8 ^+ |  ]: Y! g3 p   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
' p  R! U! R: ~   send to die5 L0 t  O- c) u4 F
end
' `, _! i/ x0 ~6 }. O0 E8 ~! q
: J, c/ F! g0 E) Q/ K7 [
begin P_mA_down arriving3 f, M. ~+ `( s  l
   while 1=1 do
2 d2 `+ }( M5 [( d5 ?& h! t( A8 Z   begin1 u* r" W& C* G
   wait for e 110 min
2 r) d$ y* E+ S# c( W' {7 P/ T) x   take down R_mA
# H; E! @6 @/ E) [( X1 s   wait for e 5 min( l' B# }: }# }$ h4 f" C
   bring up R_mA
) P8 D0 m2 `7 @" i) |  N   end& B( n  F' p0 |  t9 i
end

) S# @1 {* ~3 u6 m
  t: M% {, |. z9 h, [. z: ubegin P_mB_down arriving
/ S$ i+ J% F' o0 D   while 1=1 do" ]8 {4 s' v( j' u+ C
   begin+ h6 P( T  Q* r
   wait for e 170 min
  L  {( R' h. I6 q; U8 c0 r   take down R_mB
+ Y4 a$ H3 R9 C; Y, \   wait for e 10 min" n; |( K( V/ y4 l4 K8 c% Q
   bring up R_mB- y$ v& X$ @8 A1 ?
   end
3 ?6 g$ E0 x0 o! L# i5 a6 Cend
. _, ~* l2 l# F
$ ^4 U: h* s" D; Z3 I
begin P_mC_down arriving1 g7 A# \) m2 w" m+ Z5 f; y
   while 1=1 do # S( h2 h, b- J0 ?1 w4 e, X/ M
   begin
1 q3 C6 r" D% j9 h( N   wait for e 230 min3 O" q* q8 c+ H3 ~
   take down R_mC
/ X& q1 c/ Y+ [$ [& Z: b+ B   wait for e 10 min9 }; ^% D& d6 E* d' @2 H
   bring up R_mC
. L2 C# ~' A3 r7 ?   end. j4 X' e# H7 n+ O
end
0 k+ ~1 ?. w8 j
7 e# _- d- C; ?; e  S
begin P_mA_clean arriving
0 n& L% Q- Y& C   while 1=1 do
. A' T1 l  W5 o7 _) A" O8 i   begin
: Y+ M0 _% ^( ]/ `0 X3 Z   wait for 90 min
( K/ [) z7 ~6 q3 U" k   take down R_mA/ T% m  U6 ~3 ^
   wait for 5 min+ |: ^1 M" o& W" x8 l& I( r
   bring up R_mA
9 ~1 {% P& S' @; s5 t  f   end
9 D# l2 q8 a- Y7 ?end

$ C; n. A, f* {) \; }! c 3 t2 k9 M; Y+ V
begin P_mB_clean arriving
; r: U7 t& n" J   while 1=1 do
; M+ G- A9 ?# R2 {5 j   begin
% s5 A' t* R4 K& r2 C# ?, H4 G   wait for 90 min
2 M1 d; m# Q+ V0 Y( U2 C' D3 R4 h   take down R_mB6 R4 N5 w) A0 i" e  d( e" a  J
   wait for 5 min
7 ~7 T6 I% {  l& u   bring up R_mB  b+ ]( |! M, M
   end+ ]7 P5 N5 b8 l8 H
end
: }- c* Y: A$ p, z; t8 n

# O  i3 d/ g( a1 N2 hbegin P_mC_clean arriving
; I0 J! b& r. Y8 v   while 1=1 do
3 n5 C3 B# G, \$ K& Z   begin; P9 ^& {/ P( e$ ^5 I
   wait for 90 min
( y7 ]. C$ o6 a& Y  x6 [   take down R_mC' L# _9 S; c* ^; e+ ]
   wait for 10 min/ w# w  s) l; i  |& s
   bring up R_mC  |$ H$ V9 i2 ^& G) z. t2 r
   end
3 e" [: q8 {( t* D; Oend
( c# |$ v6 Y- |8 }
----------------------------------------
' Q$ W9 y7 [7 j3 i7 H
3 k: ?; a" p  I- }Exercise 5.9
, s; w8 y5 i# u. [
+ ?' Y  l: g( {8 {) H2 e& k6 ]# q7 ^- a) g- z0 E0 B
Create a new model to simulate the following system:
# c' s( l( P: M& ~4 FLoads are created with an interarrival time that is exponentially 5 s4 H% W2 I1 K# h6 s! b2 b5 B
distributed with a mean of 20 minutes. Loads wait in an infinite-
6 i" ~2 g% V+ ?8 ]0 J9 o; L2 Xcapacity queue to be processed by one of three single-capacity, 3 f5 D' m* s! Y
arrayed machines. Each machine has its own single-capacity queue
5 |3 [, [: y& x: h' Mwhere loads are processed. Waiting loads move into one of the three 9 j9 K1 w( W8 i! R+ D8 r
queues in round-robin order. Each machine has a normally
9 f+ y) R; c. T5 Y  O$ edistributed processing time with a mean of 48 minutes and a standard & N; l# x# Q! c3 x/ N
deviation of 5 minutes.
4 N+ j! |+ a& D) }' [" u! \& vThe three machines were purchased at different times and have
/ Z* n" E; D0 t) Hdifferent failure rates. The failure and repair times are exponentially
6 q' K( ?7 c( H5 edistributed with means as shown in the following table: # s& ]4 F: ~& v5 H! E3 M( I
Note The solution for this assignment is required to complete
8 J: Y1 O, |7 W, i( d9 |exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
3 [" ~0 i& u  P( zyour model. - l% H6 j% z- d* C8 W% b- Q
  S0 ]+ ~- ]% J6 r3 O
MachineMean time to failMean time to repair; w, |" f- T3 u4 e* j6 v
A110 minutes      5 minutes* b" e9 G! K% g
B 170 minutes     10 minutes4 i1 q2 G# D! S
C230 minutes      10 minutes, m3 r. `7 I  X, c

" }* ]7 Y9 _) j& ~6 C0 PThe machines also must be cleaned according to the following
9 H( F% M1 J  u: y; P1 m0 m+ fschedule. All times are constant: * z3 T, C& i; p* l1 m  p4 F

7 P. p& B8 R& c( xMachineTime between cleanings Time to clean
' w) _8 a( T( b7 j+ zA90 minutes        5 minutes
2 C3 `! ?' u3 [B 90 minutes       5 minutes1 n5 U) F) R6 \( y) b
C90 minutes        10 minutes
/ ~' ]9 A* Q& y' Z# ]: {& V$ M
$ l* @4 b5 x/ z  B8 gPlace the graphics for the queues and the resources. / H+ b7 m) ]0 _* ~& W" j# p
Run the simulation for 100 days.* U9 I6 M/ A  i+ N% D
Define all failure and cleaning times using logic (rather than resource
% Y4 ~) @, b& C. U# `; i$ `cycles). Answer the following questions:
4 {' [1 D; `1 `9 W7 D2 v1 Ga.What was the average number of loads in the waiting queue?
( m; w% x1 i( j" v9 ]6 P4 Fb.What were the current and average number of loads in Space? + Z: \4 H; s: ~) h' ?
How do you explain these values?
* T* A$ H" f' i0 O& x2 ~" o

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉$ p) y% W" c) v; w/ _
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
3 H7 a$ O, V2 s8 [3 E8 j5 O6 h这行好像也不太对,各位先进觉得如何呢?/ U2 [* ]9 [! T5 F: R. p$ T

  U0 R, L1 U0 Vbegin P_something arriving
# C' p) G. \0 F0 u! E   move into Q_wait
% U! v3 t: ?# ?   move into nextof(Q_mA,Q_mB,Q_mC) 7 D( m# `/ j- S
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
( T& i+ n  G9 P   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 9 s6 }! y$ ~; d. p* }( V$ Q
end  C0 S6 @, H) d' s' D

# n0 e% n0 f9 h3 ybegin P_mA_down arriving1 ~; u+ u9 C" h* z" N
   wait for e 110 min, ^3 |3 ?1 M+ ~/ N
   take down R_mA
( \; G9 f; [6 t5 \3 J5 d   wait for e 5 min4 h$ g0 [6 i- T4 j6 o/ J. I
   bring up R_mA
( Y$ M( n1 |# K: l+ ^6 O# ?' G7 ^end8 _: {* V9 K; M4 m

: k7 R5 ~$ g% Q; F& Abegin P_mB_down arriving1 K) R: o& z7 \8 k
   wait for e 170 min
% N; [6 M7 h1 Z' w1 r! `1 q   take down R_mB( V5 x7 }1 X. N# P
   wait for e 10 min
. D' u- ]7 Y5 O% d   bring up R_mB' s! ^, \* B+ `( ?5 D
end  m# n/ V3 p& e( u
6 U" _1 y. }. v6 i9 A
begin P_mC_down arriving
! L7 z9 B. i/ A. Q! g* q6 D   wait for e 230 min$ Q+ S! R3 [1 ?1 R7 V  ~
   take down R_mC
5 }* m' X1 p# d8 _% {% [   wait for e 10 min
+ O& \4 W+ H1 P  U" ?   bring up R_mC4 O  a' L3 w$ q0 r( T8 v; {
end
8 \2 l( |7 `% Z
8 E: T( N6 R0 H) n0 E8 kbegin P_mA_clean arriving  P9 N# i3 _# @
   wait for 90 min  N4 B- [+ j  {" f3 u
   take down R_mA
. ?+ J2 N1 ~2 P7 q4 P% M   wait for 5 min
% N' m* Z2 q+ ^" L8 a/ v) M   bring up R_mA
7 y. M! G' ], a- qend
4 u, D% U. E" ]
# G3 D' G5 b- v& H/ I) G, L  Nbegin P_mB_clean arriving
) _4 M: W2 F0 ^1 [   wait for 90 min7 L: i4 ]' p1 z
   take down R_mB
  P, u, F. H& D/ J   wait for 5 min
( [; Q* T5 d/ f* }   bring up R_mB& d& L. d6 Y$ ?" Y
end
( W3 i4 V7 r( j0 V
! `" F% x) a8 E. `begin P_mC_clean arriving
) `. u; E( |9 Z8 F  n. r   wait for 90 min9 V- g. h9 p+ i+ Z$ q6 H, P/ T, Y
   take down R_mC
" N7 F$ r) E& |* c" k   wait for 10 min
( T+ b: ]6 g8 T4 |6 v" I   bring up R_mC. j9 I8 i# }3 j% J1 F9 s
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
4 ~9 E- Z9 z4 E7 M- j   move into Q_wait
' \$ Q2 h, h! R" |% @" F8 S6 G$ D5 |   set A_q to nextof(Q_m1,Q_m2,Q_m3)
3 ^; G$ k1 K0 M* |$ b/ A" d  v# }   move into A_w& ~" N3 H9 n3 v& N
   if A_w=Q_m1 then use R_m1 for u 48,5 min
0 x1 f" ^: Z* j6 @3 E   else if .....then use ....for u 48,5 min8 i. ]% B* v- z: Z# J8 F- k' W
   else if .....then use ....for u 48,5 min  
8 f' _+ S7 K. K0 y   send to die0 d) L4 t. H5 ^; P5 b( J
end) h0 N3 l8 ]) I$ d' S8 w$ m% o% H, z

- t0 A; p- S- u5 C/ b4 z/ k+ y供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-10-19 12:07 , Processed in 0.013433 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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