设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7295|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
- N0 P) i7 ]: z4 M' s2 o. N: N8 D6 v  D* G
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
0 P  o1 C: B' m. B: @' ^4 @2 |  k. G& D5 l$ B) l, Z
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!/ |3 }/ Q- j. K: e& J
/ I$ G! \4 e# m, N$ \
--------------------------------------------- D9 V" \( _- q$ v6 Y
begin P_something arriving
6 M" \5 M7 z' {   move into Q_wait! [2 y  r- [7 j& Y1 ]  ?' _
   move into nextof(Q_mA,Q_mB,Q_mC)
- j9 e; A5 Q7 l3 X) u; i   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
$ F% w. U; R- y8 A  [# `) F) D1 V   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
+ R/ q1 o: P; A  o7 w: M   send to die
2 V. J: ~" n: Bend

  z) ?, y- l3 |& o* c* X 4 x4 s2 z$ f2 }* D! b& H' E
begin P_mA_down arriving5 {) ?3 e, _/ j1 S) g9 W" F
   while 1=1 do
" V8 U$ [# f/ e   begin
+ \! E& }6 e) R/ C   wait for e 110 min5 v1 g7 @# {- ~3 C
   take down R_mA
6 q4 X# A2 A% ~9 f& `& g$ Q& e   wait for e 5 min! B. g& ?8 S8 e5 Z7 B
   bring up R_mA
# x0 w( x( ?, }- t   end
5 x: V  h/ R+ V7 xend
& I, h! h  w6 T8 Z
. s0 _% {: Q0 E4 R
begin P_mB_down arriving
8 r! s5 r( B7 O7 h+ W# R# G$ L) E   while 1=1 do1 B1 u7 B0 q, P8 T" Q. O
   begin+ S4 v$ }5 o! L4 `
   wait for e 170 min
! P6 d, z/ H  \$ e$ A6 A' W+ K( V   take down R_mB
4 f* ]$ V* v; y/ n; b" a   wait for e 10 min3 ]& |2 q5 C! Y7 h' `/ d) j
   bring up R_mB7 E+ W! T0 `% ^
   end- \# ]+ m' \7 k2 |# v
end
% l8 g0 y6 }; g5 A8 O, L9 I
. m, ?$ M" ~' J# P& W, A
begin P_mC_down arriving0 b# f6 U$ t7 e* ]( y$ ?) ~4 i& z
   while 1=1 do 2 z; Z  }  F4 D& @. V/ X1 `7 e2 y- \
   begin
& p% W! q! {/ I: c/ b$ x1 ]   wait for e 230 min
" A: Z9 E- h0 h$ p+ J   take down R_mC7 p% V9 E, @9 ~) j9 p1 y1 R
   wait for e 10 min; n9 z1 Y5 D! _% Z
   bring up R_mC& x8 m% ^! s- [7 U+ B9 {
   end
' z5 @% E' b7 T' v  u: Fend
$ f, Y9 l# X9 C: i) O& o- t

$ O4 N; I5 j* F5 |2 G1 t& c8 r5 ibegin P_mA_clean arriving
. v( x& y* d1 J/ |. D$ u   while 1=1 do
/ H7 D0 T. O* k. J# [   begin: [% e7 u/ O9 G2 W  D8 t! T
   wait for 90 min- _9 |$ O' Q0 L; `& C" I* z
   take down R_mA
5 |! [7 K4 j, x5 Q2 |2 y9 M, c" ?  {   wait for 5 min% F- `$ D8 [9 X
   bring up R_mA' e. h7 C- N0 o2 E
   end
& u6 r+ o6 i: z" N4 g( yend
6 I/ M& h% P8 O& y' W7 }) ?, h, R
5 e& E+ e! c) j: D1 ^" r
begin P_mB_clean arriving  \0 b* f: V8 y' ]9 h( n
   while 1=1 do& @  n/ k1 B  \. H+ g
   begin
% K, u' B. ^0 M# U( n  l   wait for 90 min$ Z5 b2 g! M0 {
   take down R_mB* _$ v: s7 l3 ]% n# }
   wait for 5 min( X: Q: E& ]6 r  t4 Y- x
   bring up R_mB
2 R7 Q8 h2 F. W9 [6 l$ _* N   end
3 O( L9 d5 T0 Q  Y& @0 B7 C% w2 ?end
5 d/ X+ g7 w: g( o

* a6 z& C# O7 ?begin P_mC_clean arriving
% Z, u0 |9 }! @% r) X" Y. o- [   while 1=1 do
8 [4 N) ^, h" d   begin4 A# `% W1 z5 I! W
   wait for 90 min. g( H$ Z0 _6 y1 ?- o2 s5 R: ]. ^& A
   take down R_mC+ R( i2 C) B3 ^% Q3 H
   wait for 10 min
, k2 V" \" e4 t" C; f2 }. g   bring up R_mC7 J+ t9 j1 l0 @2 ]
   end+ K, T; x4 i* ~3 I
end
) G; Y" k* Z/ V, B
----------------------------------------
, _2 w% Z2 Q2 ^% }! ?
; [( o/ V" M4 V# F- v$ T  d! rExercise 5.9) k0 m( ~' _4 J  a0 f0 V+ a9 m
# k* S/ T/ @4 M' H! e) j

% [, ?/ R4 P5 ZCreate a new model to simulate the following system:& c, F- @9 \4 g, e' L8 G  [7 }% T
Loads are created with an interarrival time that is exponentially 3 {* U9 k& C  ~$ t: A2 M8 `
distributed with a mean of 20 minutes. Loads wait in an infinite-
! c3 t" m0 D, K! j0 Ocapacity queue to be processed by one of three single-capacity, 8 }* J# R5 w  }  t' ^
arrayed machines. Each machine has its own single-capacity queue 2 x+ ~0 Y8 @0 y8 z, {
where loads are processed. Waiting loads move into one of the three 2 n$ t4 g( w9 r  p  [
queues in round-robin order. Each machine has a normally " n, P: L* Q. C- ~' ^
distributed processing time with a mean of 48 minutes and a standard * q  H/ f* K/ i0 K4 G
deviation of 5 minutes.6 M& W( P0 W7 e% Z
The three machines were purchased at different times and have
  T# m6 S; G; ?! g/ F5 \different failure rates. The failure and repair times are exponentially - ~- @' f6 @- @4 a& w+ X4 n' W
distributed with means as shown in the following table: # U" X2 b" u7 G. `8 x
Note The solution for this assignment is required to complete ; s8 w# }: ^) I
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of " s8 ]/ t, G% [6 b% e
your model. 0 }+ v8 E+ [' U# J- x

& e; e6 `2 F; n' U% S1 nMachineMean time to failMean time to repair
+ d1 |( }" W" r, U  y/ CA110 minutes      5 minutes: X7 U3 Q) |  S7 J) m; {! j. c8 D, u9 r
B 170 minutes     10 minutes6 K9 Y, ?* t  R8 o
C230 minutes      10 minutes5 D7 C1 S  b, z  p4 B+ B* [* Q

3 N9 m: y! l, ~. xThe machines also must be cleaned according to the following ' C" U$ P# s8 W+ D! {2 Z
schedule. All times are constant: # U3 q* B3 B9 v+ S
4 K* Q3 q! K8 m
MachineTime between cleanings Time to clean
7 N; C' n9 ?( S/ R/ m5 e$ wA90 minutes        5 minutes6 h% v! @2 E8 ?# L; o" c% u) u5 g
B 90 minutes       5 minutes
0 [4 T, {$ v4 k0 Q8 \+ b0 nC90 minutes        10 minutes
7 @# b# T$ e- m8 p3 h; O* ~1 w7 v, D$ y  u" t' X( ?
Place the graphics for the queues and the resources. * {( v! f& ]3 O* V( S  j1 Q" S
Run the simulation for 100 days.
" T/ e& I& N' H8 \6 RDefine all failure and cleaning times using logic (rather than resource 7 T3 B$ N" \1 g, J" F$ K
cycles). Answer the following questions:
7 X  P* h: W$ C/ r  ~a.What was the average number of loads in the waiting queue?! L: |7 ~; |/ A- {- s, Y
b.What were the current and average number of loads in Space?
! C0 w! Y) I8 Q" CHow do you explain these values?
2 E* H9 [3 {. R" R* H. s" }: ]

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉: a( c" B) w* ~( m5 e% l
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean): B1 X) u' D. N8 I6 ~: x% r
这行好像也不太对,各位先进觉得如何呢?
* @# c! p% _+ J& ~* j$ V; E* M% L4 I' `; w
begin P_something arriving1 X. m0 t  A) [, M1 ?
   move into Q_wait6 q* j6 @4 k. r- p9 U. t# l/ J
   move into nextof(Q_mA,Q_mB,Q_mC) $ r9 R% y" O; A7 n4 b! x6 n
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min( o$ v: H1 i6 n
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 5 a3 X" x4 O" M) k& n/ O2 ~
end) X1 l) o2 V9 R- ], e( z! w
6 z* f+ w# u( a. `0 a
begin P_mA_down arriving
* {. x; H9 ]' P2 B4 h& c0 z   wait for e 110 min% j! m. E/ d8 K; _" i/ {
   take down R_mA/ V+ P4 \, U+ u+ z5 ?' `9 U
   wait for e 5 min- V9 W, j# ^  f( d
   bring up R_mA2 {4 y/ c  w; u7 F8 c" m
end
+ b5 }% C: y- O! ~- L" Y/ a
. R; k6 o7 a7 O7 O; A/ ?begin P_mB_down arriving: Z1 ]& h3 @/ q+ J( Y/ H
   wait for e 170 min$ r. @' A  A0 V. j! f% J5 Y% ?- N
   take down R_mB
# _( k, h) @/ ~: C. E+ L   wait for e 10 min
3 O& c6 l" C2 h3 y   bring up R_mB
- k+ `! a4 R/ _3 Zend- `" c4 b. K$ I: [) f

# @! X, A$ U0 R* c5 ?5 M5 Dbegin P_mC_down arriving
/ f% P. U. X/ b1 Z2 z) H   wait for e 230 min6 E5 F- f9 a: c; ^9 `# w
   take down R_mC
7 W# u0 }$ E/ H& |2 h2 I+ [. G   wait for e 10 min
0 Y: F) }( C$ f6 E+ B5 R! w   bring up R_mC, l& o5 ]. m* ~1 ?9 S' Q' O
end- o  s2 m" @" h7 K& p( C9 c
$ t# t$ X0 s$ o7 s4 `9 p6 z/ o
begin P_mA_clean arriving
6 r& y2 u" s4 q) W% x% `, v6 c   wait for 90 min, B: Q7 L5 h. T8 l) l' o
   take down R_mA
: ]8 G8 L" b" P6 {' P   wait for 5 min$ e6 c2 o5 j. U
   bring up R_mA6 B; c$ g  T0 y0 _; s
end, p7 l, S/ O, a  L
( \4 |1 C( H, @
begin P_mB_clean arriving
" N0 ]1 k4 W. q) n2 X' u$ E   wait for 90 min5 ~4 y- t' \) p( \" y
   take down R_mB# W) a' {; h& o" E3 S& B% N
   wait for 5 min
) i9 I( G: O- R. C; J( m, U0 r' k( M   bring up R_mB& l# Z, J% l$ W1 @# [. p
end8 R- T+ ?! G5 ~4 R: @3 g: z

0 [# \" w$ y( r9 q: R& W1 }# Ibegin P_mC_clean arriving
' e$ D5 p; i7 }: b   wait for 90 min( [  k6 m0 b; _2 b: c! j* \
   take down R_mC$ V  Z$ {. L2 x" c: Q2 \1 e
   wait for 10 min. B# ]4 t4 {4 w) |% Y4 h; Q5 I
   bring up R_mC$ |7 D& P' v/ [6 R+ _# M7 }- b
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
; I5 R9 o4 L3 @2 w5 q   move into Q_wait1 [9 P: t* ]9 l7 {& v
   set A_q to nextof(Q_m1,Q_m2,Q_m3)+ K, a. L: A4 `7 X6 H
   move into A_w# j3 ^; L, u$ m
   if A_w=Q_m1 then use R_m1 for u 48,5 min0 Z  n3 `  [: r" h1 D
   else if .....then use ....for u 48,5 min2 {8 M1 M: U, ~4 i3 j
   else if .....then use ....for u 48,5 min  - k5 l6 @9 I1 }$ }9 o
   send to die  b9 S" z7 g7 Q- T4 L) `  M; O
end$ e, Z9 f" q  y! D$ M/ J6 @5 w0 K

4 D: C% Q, q2 w3 p# Q, E7 C供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-26 16:39 , Processed in 0.021517 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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