设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7678|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
# l; |4 s+ C8 @2 o$ a! R. f& C$ @; |
3 T- \; n: A# X, C底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
) \8 T: u) G6 b8 @7 i* X( S7 s, u
& B+ c: V. C1 k6 y5 J. c% h不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
1 i* Z% u& ]4 Q, i8 Z8 [2 ]# Q0 c" e' o) z" p
--------------------------------------------+ s" v. z" u$ |
begin P_something arriving
  \4 u. f0 p, ~   move into Q_wait
2 H8 b/ P( v! h1 w   move into nextof(Q_mA,Q_mB,Q_mC)
6 s0 w# V# {$ _* p1 }   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
: |$ ]* E* L& U, S1 i' [   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)+ w9 N# h$ q. }; t1 [* m/ x
   send to die4 P: r0 K  J" o# G0 k4 m4 ]
end

, i$ n; U6 q$ g# m. `4 a 9 U: U% L1 u3 `0 ?
begin P_mA_down arriving( q% U9 R4 Z" U# K; @
   while 1=1 do
/ }1 Y; |9 s! e5 ?- r   begin
, }  L$ }- T! k- O' e# e: o   wait for e 110 min: S- A( N9 v  J, D3 ]7 Y; U
   take down R_mA
+ }7 v% O" r. c! l$ j; Y   wait for e 5 min
3 t" Y3 q6 l) {+ \' N, T, W; ]   bring up R_mA/ P# Q9 Q8 E* U- W$ [; R! P( Z
   end6 j1 ~2 ?& [. g' O
end
' U) q3 E2 L" r( r7 c

  ~( a, ~) T6 g( \5 ]begin P_mB_down arriving4 P% @- x7 @7 u& ~! }
   while 1=1 do
' J9 b- K1 v' X   begin) u5 ?: d6 P# [
   wait for e 170 min
+ p( _' ~1 _2 u, P  Z% D   take down R_mB
, f) T, ^/ \0 @( L   wait for e 10 min  ]) l2 f! q3 d3 b( N
   bring up R_mB
6 u% G$ m3 _# o   end- m$ C2 C) U( k$ U; q
end
0 Z3 c$ N; b( t8 C+ }: P2 k
: H. K" k5 M+ U0 _; l* L
begin P_mC_down arriving3 e, `6 o2 ?) o' }  \
   while 1=1 do ' O& E' D2 R4 e2 V$ |$ U" @
   begin
4 G) k5 w3 }( d+ u& r( H- x2 A7 P   wait for e 230 min
6 |& G9 Q$ A! S4 J0 r7 p   take down R_mC
% D, y1 H: ]) [9 d- F& T   wait for e 10 min
" e7 c# ?; C2 m' E( R4 _   bring up R_mC
( E. `4 m# g# }; }# L' J6 L+ ^   end1 X9 m! ?! r& }  t
end
& n1 J  K" K- z7 k- s- D! D

/ T2 [0 g1 N+ D4 ?5 k- Hbegin P_mA_clean arriving
- w0 M. G& q: u7 u+ m" Q   while 1=1 do
2 u, v8 k/ p; b& H- M6 i' G3 ?   begin
5 S  x! {' v. K6 v6 g0 g   wait for 90 min6 P' F" I+ Z: d" Q7 W$ ^6 l, m
   take down R_mA( |/ W3 q$ J- ~. X; x
   wait for 5 min
! l3 L$ l4 Q; D0 q' U   bring up R_mA7 x2 _2 C, l1 r( t( \8 W7 C
   end/ T/ A) ?) d4 J: Z7 V- c
end
: K8 X: z8 k+ Y& a

2 P0 b2 O  G- x8 @5 L4 x4 ?begin P_mB_clean arriving
$ l- z& k- t1 N8 |) ~   while 1=1 do; p) [9 y# G$ x8 Z6 |
   begin
" d2 P9 Q' Z5 D$ B% M, n3 }   wait for 90 min( l" V' p8 C0 t3 f! H' K0 t( R
   take down R_mB
0 [! @' M& K3 W% Y* Y" O   wait for 5 min: x+ w* z9 G4 g4 p
   bring up R_mB
- p, n! o0 d8 l1 |7 a   end
6 R; {% o! U" l$ wend

  F/ A) B" M- [$ S  z
  \( w$ {1 O" t9 V1 X$ `9 \begin P_mC_clean arriving
6 d9 f+ Z, [9 ^7 V$ Q1 C1 r' x   while 1=1 do
+ L. i5 l3 y& E0 k8 r! l$ A   begin" K( O8 S+ ?* q# V6 j3 r
   wait for 90 min
+ ]; z& `! i# s9 |" n   take down R_mC" j6 L/ P' w/ b/ p3 o
   wait for 10 min
6 b5 c. ~, b7 p4 o5 y- U   bring up R_mC
' Y1 U  t8 {# k; {* r3 v3 s# S   end
' Y8 k4 P( G9 t+ R2 c, Rend

; V/ z7 D* Q  S----------------------------------------; ?' r$ i1 N+ d0 u. `8 x$ V. e
/ s# H1 V6 F8 W, ^; n
Exercise 5.9
) W# y0 g8 ]6 v/ x& k
0 s  G9 x8 z$ F9 N2 p, V6 D; O, E
7 `9 R: z- |; W0 F8 ~  S8 nCreate a new model to simulate the following system:/ y8 k0 B! p( p- K
Loads are created with an interarrival time that is exponentially
2 o( g" v9 M- i( j# E1 Vdistributed with a mean of 20 minutes. Loads wait in an infinite-% v0 U1 M* Q0 B8 O$ R
capacity queue to be processed by one of three single-capacity,
- ~. ]: m: f; f) carrayed machines. Each machine has its own single-capacity queue 4 z3 E7 C" _" o5 Z3 K
where loads are processed. Waiting loads move into one of the three . W5 P6 A- m; v3 [- ?0 o+ ]
queues in round-robin order. Each machine has a normally . |" X7 }2 U/ }8 ?; S/ F0 t$ S0 F
distributed processing time with a mean of 48 minutes and a standard & w& [8 S3 _9 f- O% r9 M6 e( i/ Q  N
deviation of 5 minutes.! f6 {" o0 U+ L9 ^5 r, g
The three machines were purchased at different times and have ' F  j0 M6 O; q# g; |# g0 j
different failure rates. The failure and repair times are exponentially 6 o' w: |4 \) u& t4 C
distributed with means as shown in the following table: 6 U3 E, n- r. ~7 p
Note The solution for this assignment is required to complete ' F$ n% G; f& U& L+ P* J, ]
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 0 o% u+ e4 s( I5 }' ~1 l" }1 C
your model. 5 a$ }4 [0 t# A
- P9 O! L& G7 F& W. c
MachineMean time to failMean time to repair
: W$ P/ G5 a4 m& L4 AA110 minutes      5 minutes* u0 n; w& C& Y% R- n& Y& t& t3 e
B 170 minutes     10 minutes
5 Y/ K9 o6 C5 Y+ uC230 minutes      10 minutes, l1 ^* I1 C8 H) J- o0 ?
4 V+ b& }' X0 v  N; t
The machines also must be cleaned according to the following
) @+ R) D& w  H0 [; mschedule. All times are constant: + O$ F8 F& N9 W1 ?9 L( N: t+ C
, l# H& N" a2 a/ ^+ Z7 c# F
MachineTime between cleanings Time to clean
' `( W: T4 q& D4 c% l7 E) q# QA90 minutes        5 minutes. \" T. z- `0 c+ Q9 O
B 90 minutes       5 minutes7 A/ d6 M" W4 m0 d8 t
C90 minutes        10 minutes7 V; ?2 X7 L8 j# x5 }  r' i
1 k: w; Z2 L  u4 Y7 O- K
Place the graphics for the queues and the resources.
4 f/ i+ k* j* b# Q6 v* QRun the simulation for 100 days.! ?8 J) s; Y0 c, p+ H
Define all failure and cleaning times using logic (rather than resource 7 h) R$ V( B" W' A. ^  j
cycles). Answer the following questions:
5 `$ m) }: M8 X! z& sa.What was the average number of loads in the waiting queue?
! y4 @: B) E0 z4 H- A; tb.What were the current and average number of loads in Space?
8 ^8 H/ P5 i6 A* z" KHow do you explain these values? 4 e) j$ `, c6 D$ T* A

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉+ o3 \+ B$ u8 \& u* @! U9 o( R, O0 _( i
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)1 k. A" o4 j" ^4 N' {) i
这行好像也不太对,各位先进觉得如何呢?! X' _1 I9 x" I* |
2 e( @8 ?4 |  U+ r3 H1 o3 E! K7 ]
begin P_something arriving
  J. M* d# W+ x' q6 [/ ?  k! {   move into Q_wait" H( q4 z% p$ h
   move into nextof(Q_mA,Q_mB,Q_mC) 0 t4 U7 p% u+ ^
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min" [) E9 ]& K' l  p& A+ f/ _* `7 Y
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% y! G6 K- X7 A6 }% Bend
" R$ D( C) p5 w6 [) T% T4 k4 T  h0 [+ j
begin P_mA_down arriving
" N% G- x# ^1 Z) I- t. q   wait for e 110 min
0 `! R, D6 t) k4 D' p& M$ V# f   take down R_mA
4 A; R3 z8 ^# P7 k- t' d1 H' M. ^   wait for e 5 min
% H. f* E  n* \! g( k. b3 Z2 s   bring up R_mA
0 J: D0 d8 i3 \5 [end
1 @/ m4 H, i! ]+ B8 a9 c
- `: J3 F  k1 [7 W1 Ibegin P_mB_down arriving& T2 C( z7 @3 h
   wait for e 170 min
/ j! _3 B# q, w+ W: }- B6 }% m/ \4 s   take down R_mB* D) y$ Q; t3 A8 F, w* }& o
   wait for e 10 min
* C8 `! h) c; Q) L9 D   bring up R_mB
! Q6 n; |( A% I, ]! ^1 kend  y& y4 ?1 j! U% T

& b" Y& Y, L' L2 ubegin P_mC_down arriving6 [% E- J- @: v. Y" L8 h0 D( y
   wait for e 230 min
  G; ?8 J1 n9 U$ N6 G" @   take down R_mC
# @6 O. C6 ]% x   wait for e 10 min6 w/ E: W: ]3 `9 W
   bring up R_mC+ p' o8 C# R% l/ T1 r: R
end
; t8 j; ]: _8 }$ K6 P0 Y$ Q8 J
6 F+ w. V$ @' F8 Abegin P_mA_clean arriving
6 X& S& _% |$ _- l% b* @9 r   wait for 90 min$ _, o8 B- i7 V2 g1 D, r# H
   take down R_mA
9 O; p; b8 p. d3 W8 C, S( B0 L- c   wait for 5 min
/ G, U& a( B0 R+ \4 u   bring up R_mA& O- X6 v% V/ f9 O4 X% E' h+ p
end
3 Z0 \$ ^  E0 q4 H: {3 K& n' k/ b; H9 q; C% f
begin P_mB_clean arriving
! @/ k; p! N, n, R5 u- x5 p   wait for 90 min
, @$ d- u$ D% @: S( \   take down R_mB! g* i/ o  n1 W, ], b
   wait for 5 min! S5 t3 N! c, T9 C" K# G
   bring up R_mB
; p* \$ t) ~4 y7 N/ t: q0 Uend
& D  h* e9 G5 x0 J/ u6 u/ Z' b' R8 P0 Q3 x2 G- K
begin P_mC_clean arriving
8 X% _1 ^! q, Y( B  m2 Q   wait for 90 min. \: x: m" t/ r2 A
   take down R_mC2 e% N6 b: F; C6 x- B0 {. k8 u
   wait for 10 min
# c4 R6 e: Q# A3 L   bring up R_mC
1 h; O, c& i/ t. W+ L3 d8 |end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
! _( X0 u+ x, A4 P# E7 e) ?   move into Q_wait
# @. Q8 i/ p- e. Y% F+ @# z9 k   set A_q to nextof(Q_m1,Q_m2,Q_m3)
6 V$ |# Q; C. ^& Y   move into A_w: C( m" u1 R/ W- c" e3 G8 d
   if A_w=Q_m1 then use R_m1 for u 48,5 min
7 b3 C! R" I7 E4 h# Q+ j   else if .....then use ....for u 48,5 min6 S$ G' q6 d1 x" r2 ^  W: p) h
   else if .....then use ....for u 48,5 min  - x- z, `  c6 Q' {- V
   send to die
2 w3 M  h6 Z  p9 Y2 R0 W( K, rend
7 l4 r: g2 n# k# o5 R. m0 i
; X' Z* Z) d" D. @4 G2 T供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-24 02:26 , Processed in 0.021101 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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