设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7362|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
8 E, i  S8 J' O# F5 p5 v) j5 e1 Q* T9 M- z, b: s1 C
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
5 a& Z/ z+ t. ~) \5 s- F& K; i% u% p" h7 Y
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
  K7 {" A/ l8 \& {4 S; J7 X# h# ]; ^) n: h1 a+ K
--------------------------------------------( {* M5 y) u3 z3 Q  T8 _; K3 W  L
begin P_something arriving
+ I+ |1 C2 h5 p/ U; n  [0 F   move into Q_wait% Q2 o* J, C+ I6 o( l
   move into nextof(Q_mA,Q_mB,Q_mC)
4 y1 _8 u  A# k3 B( y) N   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min: Q) @' }$ _- X. j  B
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)  r8 U2 n1 k1 X( P
   send to die
+ H% \1 ^6 H  O! ~end

8 ~4 \+ b) o7 g9 }
0 H8 X5 x( o) m6 N5 ebegin P_mA_down arriving
5 [" z# H; J2 o% o3 }1 G  Q- R. ?' t   while 1=1 do
, @; e  g1 ]3 v. A6 k   begin0 W5 U8 Z, u2 Q4 S
   wait for e 110 min
4 V- E% w! Z  c1 e8 D. y" m. v   take down R_mA
% ^7 }! |7 d1 o) H& |   wait for e 5 min
- m  w) R5 f# f  e+ _   bring up R_mA
& \5 }! R; ^( w& n( o( i* M; I   end
6 Q9 b! {! [/ {+ @9 D. Nend

, r  f! ?  y4 E' `9 w( P. ] ; B! H* p7 r, }2 Y6 A1 ~5 a& h$ U
begin P_mB_down arriving
5 A( u8 o3 O" z* q   while 1=1 do) e( J; \6 z. t) A; b% k
   begin) b; V) I! m8 P- C
   wait for e 170 min% j4 P+ \; }0 f3 ?8 D. N. [
   take down R_mB- a% g7 G9 F2 ]8 Q" \; N
   wait for e 10 min
  I9 D; [. o, v# J+ N' L   bring up R_mB
" R. ^( f7 O0 n+ s   end- a" N3 Y) ~" W% f$ I
end

5 ^# Y3 l7 A" C4 T# \' H3 O
( g9 ^: G5 U% ]' E$ [2 ~begin P_mC_down arriving
+ F  ?7 J& J8 A( {: n   while 1=1 do / `/ ~% l0 G( P5 U
   begin
' k" i( H2 s0 k8 S1 U4 n8 N! O   wait for e 230 min
/ e2 E; F  S9 M0 ~7 G   take down R_mC
' o+ e* P  l, |, s3 p/ O  x) w1 S   wait for e 10 min" M. K& D  }8 Q0 U. C& s; \
   bring up R_mC
/ `8 g( l; K6 T! q   end
3 [7 V! d+ g7 I& ?" aend

3 M, b! M0 F$ u1 J
6 L2 p- E7 m! n/ n+ l6 fbegin P_mA_clean arriving
/ s9 K9 O+ l7 s% y2 T, [   while 1=1 do
$ c4 B! M: T) [  O* ]   begin5 X; i8 f& g+ n$ z3 P3 f- b; U, j
   wait for 90 min
* q1 _$ j  Z' O' M: H6 p   take down R_mA
7 q% e( j. E9 V9 o) k4 Z' }   wait for 5 min
. I% ~2 g0 k3 k+ {: Q5 @. }   bring up R_mA
& U9 o# B: f' e5 F& S   end! j, Y7 \, F1 [+ @& i1 r
end
6 X3 ?8 i) p% r  G1 c) K; U$ Y
. X2 l+ p2 j8 Y% Y
begin P_mB_clean arriving( z( L1 @$ m  |0 o
   while 1=1 do+ X) k7 _3 |: ?6 |
   begin
' n; b2 g, @% K, \   wait for 90 min, o; @1 A! Y( w1 G1 j
   take down R_mB* h3 j2 M$ a" S+ p. |4 A
   wait for 5 min
- J* m9 L8 I) D# r) l7 h   bring up R_mB
! ?/ v5 }5 M5 ~) b   end
* {7 H/ Q! X8 \' Tend
% `  E: R' f- e
' H9 h9 c5 T- K
begin P_mC_clean arriving
# W* K8 C3 e+ B# a   while 1=1 do7 j- j7 u& [& ^( [- f9 l
   begin: @$ h% `( n! `0 I* _# u
   wait for 90 min+ Q: Z, }" A* f: N4 B6 g
   take down R_mC
2 ^+ T- v; P6 x   wait for 10 min
: b+ v* c9 r" y/ ^4 a   bring up R_mC0 u% q$ I! n# O. b0 x! ~
   end
! }7 A4 g$ Q' ~( m5 {" Aend
( z) X, G. c6 {
----------------------------------------$ S2 E% P0 A% N2 L1 c4 B
) U) {( A1 I; W9 ?" `( N
Exercise 5.94 t5 f$ g  _7 _# p5 V% S- L

( Y4 L- s0 r% h6 y7 s0 |5 q" e6 i: v9 T+ |* S2 h
Create a new model to simulate the following system:+ r1 x: y3 L3 ?3 {' Z
Loads are created with an interarrival time that is exponentially 2 G7 S0 P* [2 ^2 L+ w
distributed with a mean of 20 minutes. Loads wait in an infinite-, m4 \# `. z/ r% S& X3 c
capacity queue to be processed by one of three single-capacity,
" J3 `, V8 x' r/ {arrayed machines. Each machine has its own single-capacity queue 5 i6 a# T, \/ q- A* b1 c8 B3 ^
where loads are processed. Waiting loads move into one of the three % o; D3 d% ?" p+ k! x
queues in round-robin order. Each machine has a normally
% @8 S) [4 d! n# ?* X1 jdistributed processing time with a mean of 48 minutes and a standard
% e( s  a  C. |; _2 ]) |/ Z) ]) i4 ?deviation of 5 minutes.
- l7 g) V1 K4 F6 V5 E9 yThe three machines were purchased at different times and have 0 R6 u7 ~. F6 K4 `/ R
different failure rates. The failure and repair times are exponentially ( F# k5 h+ y2 S! V* @9 c7 S
distributed with means as shown in the following table:
% W% n# |) w) K  v' Y9 v( A# g+ XNote The solution for this assignment is required to complete : T4 G8 O( j4 \
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
8 W: i" g* Y1 ^your model. 4 D) t" _( t3 k& F& R

8 T5 ^* |: Z# D. dMachineMean time to failMean time to repair7 S7 }2 i! n) y$ }/ ]
A110 minutes      5 minutes" H& V9 R, }" R6 l# q5 y, S5 F
B 170 minutes     10 minutes9 O/ F$ u. b1 g2 d2 h, x
C230 minutes      10 minutes
; {4 d3 O6 {2 O6 ?% \# B+ Q0 i: Q& E4 F9 s; a( o* f; W# K  x8 D1 |- ]
The machines also must be cleaned according to the following 7 j+ D( }$ w, _: x
schedule. All times are constant: 3 {5 K+ K! I& Y
3 E" m' K( P4 G0 D" H/ o
MachineTime between cleanings Time to clean
0 Z' @# T8 P0 K. SA90 minutes        5 minutes7 V' X! [' W' N2 q0 h# X- d3 ~
B 90 minutes       5 minutes8 g+ _% u' y" I1 i$ z. ?
C90 minutes        10 minutes
) _/ I% Q8 B( `& r1 v- K5 \4 Q8 B$ E4 f! _( z2 ~
Place the graphics for the queues and the resources.
4 U1 f' O/ }. m) v9 iRun the simulation for 100 days.3 j: V6 h4 C8 k3 _' q/ ?( o
Define all failure and cleaning times using logic (rather than resource % _/ h, ?) n2 I9 l
cycles). Answer the following questions:
2 d5 E" m. o# L8 `2 c- P( _a.What was the average number of loads in the waiting queue?
5 j* r1 ]2 C8 w1 N& k( ]b.What were the current and average number of loads in Space? 0 L. \6 Q3 K8 C
How do you explain these values? $ J) [$ {  ?: ]# M7 V; ^  }

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
4 B8 n( n( e1 z) u* S: Hsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)% j' Q) k( Y  L  `
这行好像也不太对,各位先进觉得如何呢?
' S  ~4 J. c0 U/ k
& i0 X" ^. ~( bbegin P_something arriving+ m( t0 u% q3 m8 }  t" A
   move into Q_wait2 L+ s; r: M8 Y3 N
   move into nextof(Q_mA,Q_mB,Q_mC) 2 `. l3 w" t0 z5 _. R3 d
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min) A' P& O0 n) g. \% Y
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
! E5 I6 K; O7 b" P  J( b: pend
, f& L7 q. k& R7 c, X
& I. X( b8 \5 @2 A& x9 Tbegin P_mA_down arriving
* F" V% {3 g2 }2 @- I   wait for e 110 min# x. @, H8 a4 R2 S& T
   take down R_mA9 ~5 G3 S' Z" ]( t3 X
   wait for e 5 min
7 a: n  n+ D" t8 P) y   bring up R_mA
/ D3 j( R; j6 oend
6 v5 f2 ]9 P2 W! A& N4 _) m' s4 d7 X9 X- X( {, z- O8 t
begin P_mB_down arriving
5 v6 r$ }6 m9 U- k   wait for e 170 min) q* C; z4 D- h, w0 @
   take down R_mB' Q# \# m" a. G; A
   wait for e 10 min1 J/ T% o/ W: B; [, u  A3 k8 y( f
   bring up R_mB* v3 ?, o5 B0 E: v0 Z7 E
end
2 n: V/ S. F. {" b
7 {8 a$ I! I& [begin P_mC_down arriving
" m! }. A! u+ s# T, d( _: H. f/ [3 C   wait for e 230 min
6 ?( c+ }" q& ?! I5 z1 q9 ~   take down R_mC9 b; o3 \8 W8 }! M9 ]( I7 ^
   wait for e 10 min
. d& h# `2 g. D   bring up R_mC  G7 ^5 B& ]* \6 O0 b8 V; `5 ?
end" L& p) o6 b! X! n
! `  ?9 ?! D7 Q! W4 L$ v( Q
begin P_mA_clean arriving
2 s# d' {$ U, `9 I5 f% P   wait for 90 min$ a+ u6 K8 n  y. x6 X. v
   take down R_mA/ N. b' e/ V; b5 ?2 e* I8 B
   wait for 5 min
; x# P& B3 s0 Q5 ?   bring up R_mA. g1 M( Y8 e: k
end
$ o9 P3 e7 Y& z3 n& I% K6 E2 T/ c7 Z5 ~" E, L
begin P_mB_clean arriving* Y) i. y4 J" N5 ]$ _
   wait for 90 min* [$ r# _" t/ T; \8 E
   take down R_mB2 c/ k7 x( ]+ O3 B2 b7 J1 z
   wait for 5 min, t' f7 I! D0 i
   bring up R_mB
+ B! r% {* \5 Y; P" b; y" F6 Tend
' |( `; d. B- ~, F9 N5 U2 a  P# g' _
begin P_mC_clean arriving
3 u" w  O/ I) I$ ^% }   wait for 90 min
* s: H/ J$ w6 w( S1 j* B8 I   take down R_mC0 V+ y2 l) b  y& O6 U% D9 s, y
   wait for 10 min6 }$ L" v3 q2 f8 v8 w  e0 d
   bring up R_mC9 v3 X: q+ L- Y! _! _- X+ k
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
( n# S7 L2 b. c- J$ a4 B2 b  ?   move into Q_wait. r) C2 c- e. m  [) y# i7 G/ B- B
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
/ r5 N. N* i0 l9 r) j$ d  G+ ]   move into A_w* Q7 X: v% `& b( a, a$ I
   if A_w=Q_m1 then use R_m1 for u 48,5 min& J" t$ D, s5 W; J+ a
   else if .....then use ....for u 48,5 min
+ Y+ r* k' Y' P   else if .....then use ....for u 48,5 min    H7 B& }& I+ _8 V# Y
   send to die, v8 m/ {/ t2 A- }" O: r
end
& t* _9 F: n! }9 {
) A$ V) w+ ]1 y$ S& x/ _供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-15 11:56 , Processed in 0.013333 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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