设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7232|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 8 K8 C0 Q8 G. k9 ~3 z# `$ S
2 c+ ~7 b: a: K6 o
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
  D7 Q0 I8 G) A$ H' \' X& @! P
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!6 @5 y, t0 a5 f  q1 t
5 f  ~" _5 ]% G% U" m. k
--------------------------------------------1 \$ K: ]' u1 x: k0 `& ~
begin P_something arriving5 J" A1 w: t" J$ e0 M/ w' T
   move into Q_wait' {+ S3 ]( q7 p, T# w% d& L
   move into nextof(Q_mA,Q_mB,Q_mC)+ b. c8 C* P: C% h- |2 K' U
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
6 J! t( W2 l- x1 F   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
' U, b5 }/ U2 Z. r+ ?2 t' l: P   send to die
: I, }7 w# o9 V+ b4 `end

9 a# D4 e$ ?5 a' E" [% L2 m 4 ~$ U) C* Q$ P
begin P_mA_down arriving
* h) M5 V; g- |! L9 k   while 1=1 do . @; w9 D, b8 D+ I+ H# P
   begin. Z0 {1 v6 K( G7 S
   wait for e 110 min
6 X2 H* w6 Y- T5 X8 g4 Z   take down R_mA
9 [! L' t8 d0 R( C8 H+ D   wait for e 5 min4 u3 h! ~8 f- j! t: A$ X
   bring up R_mA
/ ]& r- e! U6 z. H% f   end
; S* X* |4 r2 Z9 n* ^3 p( Q* Send

& _$ h; J5 x$ ?4 m, c& O6 G 4 o; |- s6 x8 {; o* `
begin P_mB_down arriving
* I# J  t" i( k3 @   while 1=1 do1 q* J! Y, h, x+ b0 w
   begin1 q' y* C" U/ x5 \1 F4 a
   wait for e 170 min
' l4 G4 V* C8 T7 g   take down R_mB
9 D" U( d) F" h) B5 f& b& U$ ], f   wait for e 10 min# A" G6 ?" Z7 k
   bring up R_mB. D) T7 ]! k; Q. ^8 Y
   end7 x: h7 ?8 Q! D$ C& ]0 ~8 X
end

+ ]" Z' W$ r- n. N1 h. v4 N" E/ C 0 k: Q! C2 i% j1 N
begin P_mC_down arriving! e9 p! R% B) ?$ [7 f
   while 1=1 do 1 R6 ?3 R  E9 |2 w# ]
   begin4 T2 _) j, ^9 p
   wait for e 230 min
' Q+ V5 ?. ]! b% g   take down R_mC
/ F4 ^  p3 B% e/ n  i   wait for e 10 min
9 h, w; w+ @2 g; z/ H% H& k8 O! k2 S   bring up R_mC1 x6 G/ L3 O( G6 A% Q4 `
   end* ], ?) ~7 r# ~8 \* i
end

# P3 \# y0 R) [, B$ m% o5 V; v
! ~7 D4 D- `# j$ I9 `( Y, |begin P_mA_clean arriving5 Q( X8 d: g2 E5 I6 u  J! Q, [
   while 1=1 do
# m' Z4 t( v" [: Z6 G7 L$ n% Q   begin9 t  l8 G" W5 k' O: {5 a" c
   wait for 90 min4 X5 H9 _4 i2 `( Y
   take down R_mA
0 }2 C9 l/ m5 I! }2 r: j$ K   wait for 5 min0 U; p% P" y- j" W  q6 W
   bring up R_mA. M, O- T$ d1 y& @! u$ r- h
   end& z1 _. |5 q/ y7 \- `, k  U
end
1 T  I7 R' t. z* w

4 g! d! ]# f" m0 {begin P_mB_clean arriving
' k& ]6 k' m9 U$ ~1 d   while 1=1 do
5 j- x1 {5 H) C$ y- t# Z; c# l  [   begin
; f/ L% M0 N5 g: S) I   wait for 90 min1 t; k9 h+ N2 O- |4 A
   take down R_mB
  j# O( y/ M7 Z3 o& P' g; L   wait for 5 min7 ^# }( b5 o/ {' c4 M: R5 J
   bring up R_mB
/ B, V! J" t: F$ W# {   end
" K# b; m2 L$ Z" m5 yend
* t: i/ K+ x1 H1 w3 o

# [5 v5 N: T/ Y8 M" ~begin P_mC_clean arriving
5 P. ~9 P. C0 Y, K6 M, h   while 1=1 do
! j( |. y1 E$ s) f1 q9 g   begin
6 l3 K5 g8 v, V; ~0 ^% j6 x   wait for 90 min" O8 Z' K; \! F
   take down R_mC9 ~1 s( X0 j0 }
   wait for 10 min
9 j0 o$ c* ~. u   bring up R_mC
2 K6 x% {8 M3 p- f3 A   end' \( u* j) j% {  y6 b& x8 X
end
5 i1 w0 N3 G( b
----------------------------------------
6 R) s( u+ i3 ?& S* z
: }& v: ]0 T) ZExercise 5.9, S: w& O9 B2 o
" A% |. q5 b# v2 p+ q( k7 B

8 S2 w5 G$ k/ W" DCreate a new model to simulate the following system:
# U7 D- S4 h3 ?# u" @8 ]% ]Loads are created with an interarrival time that is exponentially
& I: ~5 O: V: E* U" J4 {$ U' @1 Zdistributed with a mean of 20 minutes. Loads wait in an infinite-
2 I. Q9 p& o$ I4 S; `% J+ gcapacity queue to be processed by one of three single-capacity,
# Y- ]+ C7 |3 T  parrayed machines. Each machine has its own single-capacity queue
8 M9 ?, e! C) rwhere loads are processed. Waiting loads move into one of the three 4 G% x$ E2 k9 P% d' l3 b8 Q6 d( H4 E
queues in round-robin order. Each machine has a normally 6 X9 \: y+ E! m
distributed processing time with a mean of 48 minutes and a standard
* b8 G' C4 a8 J  Pdeviation of 5 minutes.
, a: a+ Q$ |& `5 p5 g" P' G0 U) iThe three machines were purchased at different times and have ) s7 _7 X1 D) O3 D
different failure rates. The failure and repair times are exponentially
3 M# h5 }  H3 L! Zdistributed with means as shown in the following table: : P4 ~' l! Q! t( e! a' l8 K
Note The solution for this assignment is required to complete - s0 z. E8 d# k1 ?0 v
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of   D$ O; j/ ?- R& ~- i+ f
your model.
7 G: E& ^4 k) w/ t* r1 G) d) y
0 k) v; d- _, F8 @' JMachineMean time to failMean time to repair
# @: l/ a) X8 J  h; Z3 l, s9 MA110 minutes      5 minutes
  f' t7 b, m5 W& R7 ^: dB 170 minutes     10 minutes' D! ]2 M4 p/ i& Z6 l5 P
C230 minutes      10 minutes
1 m+ F  q) ^" ^+ w7 p
/ @# b( X  q* U# QThe machines also must be cleaned according to the following 9 Q+ q6 ^* j$ _% e6 y
schedule. All times are constant:
0 w; z- _' [" ?1 z$ Y% o! P; D2 d3 W3 B  M
MachineTime between cleanings Time to clean
9 j. j2 I# C0 a2 \A90 minutes        5 minutes; x$ V$ s3 d+ z
B 90 minutes       5 minutes
; B) ^% a9 z8 @( t! y) [C90 minutes        10 minutes8 Y4 b; f/ S2 V& i/ h6 W6 T
2 y# p9 p9 t4 R. Y
Place the graphics for the queues and the resources. ! p/ I: n, W: {6 a' W
Run the simulation for 100 days.
* w7 P! @0 W! g+ [! MDefine all failure and cleaning times using logic (rather than resource
$ J! C; C/ m5 Z! H/ Dcycles). Answer the following questions:' ]# U% V. X" \( u
a.What was the average number of loads in the waiting queue?
' S9 F2 C; y) u* I" e) ?, [/ Vb.What were the current and average number of loads in Space?
+ z1 `/ J. h5 y. m: R1 ?How do you explain these values?
( C8 c9 W) J& G, [3 m; d- Y. B' c

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉+ }' H4 H/ s0 a; y
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
! z% ]. q- `, F这行好像也不太对,各位先进觉得如何呢?
! e8 r. P5 b/ ?+ P
: S3 M& j0 s, z" a5 W( xbegin P_something arriving
  Y' D& o6 \3 W, x/ C9 b   move into Q_wait, J) f% A! W2 |4 A8 L- D
   move into nextof(Q_mA,Q_mB,Q_mC) 6 {2 C. L: p: i! M/ F  c$ A- v# H
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
- a9 i# J- _- ]   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) . R$ w6 A% O5 s( h/ {! k3 E* {& W
end
+ d8 p8 ^8 M) g1 e9 {2 M# }6 f- K  _+ E6 _  N6 ^! P! h
begin P_mA_down arriving
" }/ i, P6 E* @. c, R2 c/ r   wait for e 110 min
3 h& Z5 Y; H6 Q" R" K% M# I$ S   take down R_mA" m  j1 J" g3 E9 v6 ~
   wait for e 5 min
3 O. d* {, a# Z- k/ f- Z   bring up R_mA' D2 T; N# P8 h8 P7 b" U* Y
end4 ]" c" b( g2 o3 l) _5 i

+ w( G4 j% ^  \" cbegin P_mB_down arriving
2 ~! }3 b% k6 {  o( {   wait for e 170 min7 D# r* m, x1 c: K
   take down R_mB# w" N6 |  i  J7 Z
   wait for e 10 min9 `( F/ x- M, q  A8 U" y
   bring up R_mB
* T/ P9 j) W4 e; V9 Kend+ Q$ Z# H8 t3 X" }5 M$ X8 P3 o
9 r# M5 F  \; d% P# ~4 A: N
begin P_mC_down arriving
) a; N- S9 P2 p   wait for e 230 min+ M# [% g8 H4 \+ s, W: i
   take down R_mC. w- u' N, }$ _& ~& p# V  L
   wait for e 10 min% M: n+ ~$ f+ q& w, w  n
   bring up R_mC$ H( i# N3 f  S& O  h+ M4 |9 B. E
end
3 g. y3 s% F7 z3 W. U# r3 E
! ^7 }5 s& K' x  w( vbegin P_mA_clean arriving1 d$ `* Y- B8 p* C
   wait for 90 min5 L/ g+ v1 o0 n* D9 Y3 S: Q) q* t" s
   take down R_mA& E" w& u6 X* j
   wait for 5 min1 K4 H9 m) [1 ~% {
   bring up R_mA1 f9 R, T! o( V5 v/ X1 u
end: ^0 x  c  W+ O" \
4 r# O$ t) ?8 c- [
begin P_mB_clean arriving* \: ~5 N- g- H4 S
   wait for 90 min0 P$ c0 N" X# m3 F# y$ L
   take down R_mB# T+ E' c2 F; ?' g/ `9 ~
   wait for 5 min
# E3 D, T! o/ d  Z- q   bring up R_mB& T4 z# m9 ]. A5 w! X9 _" `/ m9 D/ C8 d
end8 g8 {- C* }5 @8 M

( x0 h2 K( L6 z$ W2 ^9 W8 ~7 Lbegin P_mC_clean arriving& d# h% r! H+ c, D
   wait for 90 min
, W: m9 {; L: g; l4 D1 o  |   take down R_mC4 a3 y/ @9 u7 V7 E6 m
   wait for 10 min3 I5 a' ?6 e# m, K% _6 X$ c& ^
   bring up R_mC
' I8 b' j( A, p" Kend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
- ?$ Q/ F/ o5 B0 C; U! s) y1 V   move into Q_wait
- B5 s% p/ o; j   set A_q to nextof(Q_m1,Q_m2,Q_m3)+ x9 `# y  ^8 `# D: G
   move into A_w0 X, c! x- i! s
   if A_w=Q_m1 then use R_m1 for u 48,5 min6 Y+ g$ w' C3 _- A
   else if .....then use ....for u 48,5 min$ O* a$ ]5 d( X& q  ^7 _
   else if .....then use ....for u 48,5 min  
/ D1 |. [( I- y) f# n- j   send to die
. _3 K' U0 e3 bend
3 s  r- ^& O7 o# b0 q& q
; H7 b7 S2 W4 k) M供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-17 07:42 , Processed in 0.017635 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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