设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5075|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
5 }' ?5 @* g/ H$ u4 w
8 l/ M) z7 f4 [$ L. I/ @底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去1 g4 c, @, U8 X9 E
6 U" h1 Z2 ?$ D& U4 D! ?0 z9 ~
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!& C! {( I. l9 h- o, J! n$ r/ o5 D0 {
+ N; Q/ `& g, A8 W$ {# J
--------------------------------------------: Y: Z( l) Y8 _& d
begin P_something arriving( ?' e$ K  r7 U9 q7 y$ T+ {6 t# S& A9 f
   move into Q_wait
3 ^% ], e+ j9 v+ X  Y1 w   move into nextof(Q_mA,Q_mB,Q_mC)
/ [8 ]( f, d" v0 n( v, r' F   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min3 T7 f1 W! K' S+ T
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)+ k) @' g- S9 o. L) O, k
   send to die
& x  X+ z  ]7 D8 I7 K! H# u- Pend

2 I0 ^5 Q# s. ~2 Q2 ]
9 v- z% o6 q8 Y5 `8 q6 ybegin P_mA_down arriving
) L" x, z% u9 U8 H) [) T   while 1=1 do
- V1 k  O/ {; l" @& Y  D  @4 H   begin
* M1 d, o) c" a+ l8 q5 z3 b! z/ ]   wait for e 110 min
/ G- d% S; I* y0 F+ W* B   take down R_mA& b. ~. D$ a* Y+ Q  T
   wait for e 5 min
% d) P3 m0 t; y# h- P   bring up R_mA
( [0 R& c  @- G: ^   end- m9 K; z5 u4 C8 j( i) }
end
  f' K# L; B1 J( H4 @

3 K( p) S0 x) D* @9 b- sbegin P_mB_down arriving2 O" T+ Y" n! |: |
   while 1=1 do1 r- W7 E9 C4 E# {% ^6 S
   begin
* Y. g% q7 H! d7 N+ ?3 ^! J   wait for e 170 min* d, k( p6 I2 t
   take down R_mB8 Y2 J% D; [! w6 D
   wait for e 10 min
; }& h* _- o+ f& M( Y: c   bring up R_mB
5 y+ \4 m4 S4 x7 ~; o/ H   end- {+ U' c( w8 z6 h
end

; ?! _9 N, O# T$ Y) F! Y" R/ m" s
; O. x' L) ~% Q# P/ r3 L) m8 ]begin P_mC_down arriving
+ S0 b! f2 l2 M   while 1=1 do
' `8 x* L6 V& M, d+ q9 Y: [" X   begin& L* S+ m* D' m8 _% s# u! c
   wait for e 230 min7 q+ q; r1 s# v
   take down R_mC
& X- T3 W6 b: M* F& p6 g   wait for e 10 min' n* f+ k/ h0 y; }3 w9 [$ N
   bring up R_mC& y7 l/ \! T: g: h) k
   end
% B* f7 `- R" w/ h9 ]. bend

$ i6 j1 g, u# R# Z1 x / Q2 @" V1 z8 Y' L; J3 E
begin P_mA_clean arriving! d& x3 i0 A/ F; j/ K
   while 1=1 do
5 u7 \. p% k  d( k8 m. n3 {   begin. U% t3 v* C1 _
   wait for 90 min
5 ]4 K! G# H1 b5 B) g6 a+ ^$ w" B   take down R_mA
! z  N) p& T0 f   wait for 5 min
+ N3 `; i2 [. a& K5 g& d. D   bring up R_mA
6 v" H# F5 w( S3 g- N   end6 N) C  _, q3 a+ c& O! R
end
, M1 D5 t: t6 g  G
" r) ?9 J: j4 B- P5 `1 \
begin P_mB_clean arriving
2 O# e9 f- b: t5 }" H* H   while 1=1 do
2 W+ |8 B2 }$ h0 ^+ V$ J6 o   begin
8 M/ m% w' B3 X   wait for 90 min
# b) w4 P2 P9 k. B5 A* Q0 k  z* y   take down R_mB
4 Y. n2 `# V$ R6 M/ i   wait for 5 min
+ M  B$ q* I2 C& ?   bring up R_mB/ z8 o9 Q7 x' m8 N! o& D) s- C8 Z$ ^
   end2 U+ ^8 ~* w( J; T1 U
end
6 {1 x, ?$ b7 Y

0 n1 ~; H2 r; {1 U9 \( ^begin P_mC_clean arriving2 V! X& I- J" {, Y$ o0 b4 O
   while 1=1 do
# ?  r# z# i) o# q5 p- j2 g! K( j   begin
! M# m1 Q/ @" R# I" r   wait for 90 min! u% i, @: c+ v. @2 S. |
   take down R_mC
1 r8 u3 n) Z9 V' {" C# D   wait for 10 min
5 _& U! ~7 J& f! Y% F( b" A   bring up R_mC
$ g2 t+ H" I) u7 U, `   end5 w; F" f4 c4 [" g" K+ }) k" I; c
end
1 b  n* F  v- K( s8 B- v( j; n
----------------------------------------4 W5 p# H' y- F# [
' f# Y7 F% ^4 ]/ g0 ^
Exercise 5.9/ a5 T  m( W' h- r. @3 c1 |7 d
" D5 s5 ~# g1 O4 i
0 a6 r6 H2 E" C( W' ?! |
Create a new model to simulate the following system:
  R% c; p2 d8 O8 v+ M- f( }Loads are created with an interarrival time that is exponentially & y4 ^1 i. x- F  e% k
distributed with a mean of 20 minutes. Loads wait in an infinite-3 ?" I* R. v  j) r$ J$ l( |
capacity queue to be processed by one of three single-capacity,
4 T: w( i7 U4 C0 J3 Harrayed machines. Each machine has its own single-capacity queue 7 p, L6 B$ I4 G$ D) P# b
where loads are processed. Waiting loads move into one of the three : F, H8 C+ ]0 N6 m5 z
queues in round-robin order. Each machine has a normally . l& F2 o3 A( T9 M9 }( C1 l- j
distributed processing time with a mean of 48 minutes and a standard . [6 y( p+ C4 U0 Z0 k% O, W  B
deviation of 5 minutes.
; s' }6 h' m. ]! dThe three machines were purchased at different times and have 3 U! c7 t! H' I- x
different failure rates. The failure and repair times are exponentially
' v  q* O( J: x) ^# F. H) ~distributed with means as shown in the following table:
3 ^( l& M- [; ?5 g8 h; HNote The solution for this assignment is required to complete ! ?" `0 I5 u. B) H
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 5 _/ v  Q  I6 t4 p. H
your model.
( g' M! `2 s, y$ }4 H6 q
: r$ K. V+ ~7 Y9 }. aMachineMean time to failMean time to repair# y% j3 M. R1 _4 N, E4 I% R; D
A110 minutes      5 minutes
+ N0 x) [+ t6 A- {* b/ BB 170 minutes     10 minutes
. k4 g6 M( Q5 a5 x8 v3 ~. q- MC230 minutes      10 minutes
1 l( G8 `- J, D% ~. G) @, e2 s6 b) Q
The machines also must be cleaned according to the following
" t) W' M8 A* Fschedule. All times are constant:
" G- e! E; g9 y+ t1 X) I
4 z# ]- t2 n, m: OMachineTime between cleanings Time to clean
  ^: ~; b0 E) n0 H; ]: q! r; d9 i! JA90 minutes        5 minutes
. a3 N9 Q3 q9 y# i  Q5 IB 90 minutes       5 minutes: z! ?' d# U- \6 S) x7 N2 a
C90 minutes        10 minutes
0 I+ v# ^3 x7 G4 X/ [
! L: t8 }% W8 X" [7 pPlace the graphics for the queues and the resources. 5 D$ s, d3 k" t! M0 I
Run the simulation for 100 days.
# C( o( @% t" N  _3 P& o% i5 _Define all failure and cleaning times using logic (rather than resource
) e: m$ u  Y, `! _cycles). Answer the following questions:
- [: k# _0 `. \8 _: s; K0 p* |0 ~a.What was the average number of loads in the waiting queue?/ h+ P" @* F9 ]
b.What were the current and average number of loads in Space?
& Q) D2 i2 F. v* z; x7 {How do you explain these values?
  V% O% J; Z6 e3 K

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
6 S; A7 W5 |# F& h, E  Wsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)$ R& F% n. ^2 {+ U' g
这行好像也不太对,各位先进觉得如何呢?
* b' [9 L1 X/ ~8 p
4 l! m( U" m3 I4 O  @begin P_something arriving
) b0 d8 C2 K; i6 o$ }3 z& e: x& ^! W, {   move into Q_wait/ W7 M  b4 U+ e- K0 g4 d' I# E
   move into nextof(Q_mA,Q_mB,Q_mC)
# k- g4 `5 @' C# X6 ~& g   use nextof(R_mA,R_mB,R_mC) for n 48,5 min% Z" w6 h0 W2 @5 f
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) ; O$ T6 w9 {9 ]& M# c# E( m
end
& W3 w" L& x) a9 v  f; |9 \
4 \8 d# Q" v9 Z; g# @* \: G- Qbegin P_mA_down arriving7 e) S8 A( ^* T7 T& u
   wait for e 110 min* x: {. q' n  _( j: _; F
   take down R_mA
! `7 Q# S5 P6 j$ h   wait for e 5 min
* C' U6 m8 v0 s/ |5 M- B1 h   bring up R_mA( o+ w3 R" q. |7 M' Y/ P9 i+ e8 J
end
& d# T5 v8 d2 m# z4 ^* X9 E! V4 @- [! T1 Z- G1 J+ L( T
begin P_mB_down arriving
  l7 j, y& _2 {6 i! E+ ^   wait for e 170 min
1 L+ o; n6 c9 b  r2 t8 f   take down R_mB
; `! i7 s5 j3 n( x; h* |9 q9 g% D   wait for e 10 min! B, r, y9 H5 y1 g) n8 C6 e" z
   bring up R_mB6 Z" S2 a# G- S7 W& W
end- y' g6 h2 F- p3 J; J# f! E

7 s# D6 l4 d4 i' Abegin P_mC_down arriving
3 y# }. x2 F3 S" k9 I9 W   wait for e 230 min! J, k1 X. d, D/ ^
   take down R_mC
* e$ ~$ a6 F. {8 p9 R/ \2 v8 z   wait for e 10 min# q+ o/ q0 d+ I2 n! r: Z
   bring up R_mC
/ j6 {/ v# J3 \1 A% L1 I1 q. x* Kend
7 K& Q9 q* R" |/ t( M# j3 S$ n; Z. T8 ~! r9 K" u6 W
begin P_mA_clean arriving
" X6 q2 d: f9 j. D   wait for 90 min
  k9 C" r/ \  q3 \   take down R_mA
  m4 @- z9 M3 ?/ ?8 {   wait for 5 min
& {- J4 ^- |. q" u: z) c   bring up R_mA
) z: H0 g5 N3 w" l7 oend
# ~& }/ |2 M3 |( Q+ [+ |$ O2 y# B8 O
begin P_mB_clean arriving
6 a) G7 v, x0 q- ?  D' M8 Y   wait for 90 min
6 [: ?2 Q1 i; f   take down R_mB7 z2 O5 u9 A2 P$ v) u- ?
   wait for 5 min; ~; [- o9 r* l0 t3 Q
   bring up R_mB( w1 \% J# L2 ]) ^9 r
end6 r: X$ h& \5 t4 W2 [# c$ |! ~

, c9 C6 K/ o5 i  R0 Z( fbegin P_mC_clean arriving
# @% s2 P5 a3 C+ S. X  N6 @   wait for 90 min
3 O  l7 w0 t0 G, J- \   take down R_mC9 u2 I3 N% y5 ]. J8 u
   wait for 10 min/ C; X- O2 l% E- a
   bring up R_mC: H: m* Z5 W9 t8 |5 R7 N+ y& E/ F
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
" d0 {. p/ k% S; ~' k   move into Q_wait
& e" d6 T$ N* y+ z* _& s$ k   set A_q to nextof(Q_m1,Q_m2,Q_m3)
8 M# w' ], ?8 [) ^4 ^$ N   move into A_w
+ U% @0 d, Q6 @1 {: m1 K) q   if A_w=Q_m1 then use R_m1 for u 48,5 min7 T7 q" z! ~2 o$ i. R
   else if .....then use ....for u 48,5 min: R: |% t! ^9 Y9 Q' d( b
   else if .....then use ....for u 48,5 min  " p, ~7 g, g8 S9 G9 A
   send to die
9 v- G$ ^& c1 a  A0 X- bend
' }, M- S- U0 I* [3 M5 [! W* u/ p4 x% G
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-10 04:34 , Processed in 4.109288 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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