设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7264|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 7 z1 l7 Y: p. u7 q- j! O" Z, A- p0 k
6 i& V+ h4 C* V& W" s$ ^& c( X
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去6 q* g; s) a, L8 F, h$ D
. A) G3 i/ r; C# c+ G
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
5 a' R! e! \  X& ?0 h5 z7 F( a2 g
4 [+ S3 o8 B7 R9 g- b3 r$ I% _9 m
--------------------------------------------
* z5 H+ |8 R' `7 Bbegin P_something arriving5 o2 R' P, z* x- L7 }9 V5 e( }
   move into Q_wait
9 M9 N! ]" P# B5 z   move into nextof(Q_mA,Q_mB,Q_mC)
$ b( B: ^4 d; J* y8 k0 ^   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min% Q6 J: d+ }' _/ r
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 z+ J6 b2 x1 o7 z* v1 q- X3 h   send to die/ t1 W8 _4 M! }5 P- }
end

1 M; R. [2 f7 ~) E/ a2 C  S3 F3 k
; h* A7 W& C0 q& ?$ |) }begin P_mA_down arriving5 q. x; i6 N8 L& v8 x) F. h
   while 1=1 do
# Y" r3 Y) ^; A6 N# g4 {" l   begin
6 m$ g: m0 u/ J- [) S! q5 u5 _7 Z1 d) @   wait for e 110 min$ L0 i0 Q$ s2 W/ @. Z9 o
   take down R_mA. _0 Y+ e  @7 ?+ h1 p
   wait for e 5 min
4 i* u; m3 D  T& {   bring up R_mA  O2 Z. f/ _5 G* h; U( ?0 @
   end0 f7 f8 X5 D! I# p% h
end
! n! p7 }* d2 Y; ?' g  g+ g& c
$ H# h( x, T4 `0 N! C8 u
begin P_mB_down arriving
( A+ t1 M* G+ L2 Y  ?% _2 l* ~   while 1=1 do
* |3 Y9 o9 Q9 r' [& d# V" Y   begin
6 O9 R( B- c% R% v   wait for e 170 min
5 x6 l5 d7 }* c4 u& a8 b   take down R_mB$ e! x  M7 Z# [+ q$ {3 i9 b' z  g
   wait for e 10 min/ H6 O+ ^  c' I
   bring up R_mB
( S8 i3 V' ]8 Y/ w$ @3 u   end6 {& b0 w% D  f
end

5 g) S/ {. H" d) g ; P) V* Q- h) t/ B" Z/ c, D% q  d
begin P_mC_down arriving
: x3 A2 ]% a+ }5 C  m2 l; P5 t   while 1=1 do . m+ R6 K: ^( I. K
   begin7 z) s. X0 o9 W; L
   wait for e 230 min
3 _/ y' \4 @/ \) \   take down R_mC# K' s0 H6 V' s" @  J
   wait for e 10 min
" m) B4 }, v, g0 z' O   bring up R_mC
9 Z; Q8 r5 ?- C( c! ?3 m1 A   end( a. Z8 R$ W9 C) \/ y# Z8 u
end

5 F3 ]. r$ F% N/ K1 ?; |
  ?5 U+ T, r1 gbegin P_mA_clean arriving
: _0 _1 r: B3 q% S8 q   while 1=1 do
2 O: ^9 B/ Q9 a2 u9 q: d1 C   begin& H( q( ~( C; m; G/ I6 e0 d0 Y
   wait for 90 min& G9 I2 w; u0 ^" G" S7 O" O9 b
   take down R_mA& E/ l  k* X9 d4 `- M+ Z) X8 n
   wait for 5 min
: R" ~1 R7 K9 G" G   bring up R_mA
4 c% {, \3 _9 [1 @3 O  h! c" ~2 g   end( v0 v8 o5 o2 l( B1 s1 g) `
end
5 X: p3 f+ f+ j  ^+ Y. v
* Q6 C1 }* c% h+ V
begin P_mB_clean arriving
" Q- L( n- x  g8 L   while 1=1 do
, L. [( ?& k" A0 N- Y   begin, X) b$ w* k- p" X8 \8 u
   wait for 90 min
4 z' J, Q  l( B! B* K. |! _/ F   take down R_mB4 s  @; S- y$ ^7 ?2 m
   wait for 5 min
9 J% c$ t" ]) a6 r: W6 K8 c0 J   bring up R_mB
( F: u, [8 T! d$ {   end5 L7 X% q- \, e& Q) u
end
; S$ H% {. J4 e
/ G0 `& l/ c$ `
begin P_mC_clean arriving  B9 f  D4 }% V$ h) }+ _# K4 T
   while 1=1 do. s9 {. L8 q$ @5 Z
   begin
' p  [& m( V: i: _9 O   wait for 90 min
3 C2 B, o( Q1 x) e/ @9 m. A; I   take down R_mC5 s# \- B7 X: g8 x
   wait for 10 min
0 {& r  ]& K: v8 ?) v/ s1 c   bring up R_mC6 i, N  R) P" A; ^4 K9 e7 @! q+ L' r
   end
" ]# d. M! N1 A. ~end
! l6 T+ h3 F$ i9 {7 R7 G0 T$ ^
----------------------------------------
3 h6 p$ V  r8 p( \- _
5 L- ?! `% x. u$ PExercise 5.9
! [+ o# y* w, m% K' k# \# I$ `
6 f! @9 n1 v' D+ x+ z' i7 |) m/ w5 c3 O: j8 d! {# ^
Create a new model to simulate the following system:* f% ~$ P+ N5 Q  Y' S
Loads are created with an interarrival time that is exponentially
: R" q$ s! g- k& ^0 X8 R+ }distributed with a mean of 20 minutes. Loads wait in an infinite-; m, U/ C" y3 M) `6 G
capacity queue to be processed by one of three single-capacity, * S, H9 Z/ b5 q1 j9 m) T6 S
arrayed machines. Each machine has its own single-capacity queue ) K' V% Q- Y" Q) G% s
where loads are processed. Waiting loads move into one of the three 1 V; Z( ^' W4 L9 x( s! n
queues in round-robin order. Each machine has a normally
5 H$ K' k( m3 l$ x$ P( y- h% udistributed processing time with a mean of 48 minutes and a standard
3 H. j  U3 Z* j* `$ [: gdeviation of 5 minutes.
; n, T$ `% ~7 X2 f/ O- ]& AThe three machines were purchased at different times and have
" s3 y" |  d: B/ }0 a( I. Ldifferent failure rates. The failure and repair times are exponentially 8 U5 O/ p2 ?6 Q0 _( s6 p8 u
distributed with means as shown in the following table:
/ U9 V/ ]. I( i8 v4 T5 DNote The solution for this assignment is required to complete
, d+ e: K! x4 ]8 l0 L# r, Z7 jexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
4 b) ]" D5 `. Lyour model.
2 g6 R: D5 _* ~1 v/ b  \- Y" J+ ~, t* z& H0 Y: D5 e* O% j8 w
MachineMean time to failMean time to repair: |# r! n/ T$ i8 W" p) L0 Y7 l1 v6 ?. J
A110 minutes      5 minutes
- M; q$ C/ i% z) K2 S* CB 170 minutes     10 minutes
( n, t% y6 o0 z* Z2 [+ l& iC230 minutes      10 minutes
* [9 i) ~: f0 x: v5 _
% s5 M2 d, r# l- U" F  zThe machines also must be cleaned according to the following : H( d% g( P% N  B5 I# u7 V
schedule. All times are constant: ; G# R9 R/ o2 {
! T6 g' k/ z" b* B- w9 o' X
MachineTime between cleanings Time to clean
# c# B8 C, }; _, ]: x" Y" l8 ]0 DA90 minutes        5 minutes, M+ W6 ^- n' r. k  z
B 90 minutes       5 minutes
6 }9 w9 R8 E8 ~% d! H/ f4 m+ SC90 minutes        10 minutes
+ ]* Z2 b6 j9 a, N0 H  z. O' S  {9 o  E& Q
Place the graphics for the queues and the resources.
, V7 Y- I* {* \! H' K! wRun the simulation for 100 days.4 h3 j8 g/ Y3 P- J# B  o3 b; g! _
Define all failure and cleaning times using logic (rather than resource 0 I. O. g* I: w( \# h8 l
cycles). Answer the following questions:) i4 H  E5 U& q# m
a.What was the average number of loads in the waiting queue?
  W0 ^. `0 b( hb.What were the current and average number of loads in Space?
# O0 o9 L3 [3 g: W. K0 {/ ?How do you explain these values?
9 C4 A; v: k# v3 {3 w0 G- X/ _7 t4 H

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉. j: s& v: H% ~! @/ _( \  Y, W( e
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)' f, ~$ d- D; y. X; T3 H* G
这行好像也不太对,各位先进觉得如何呢?0 Q( {: v% @$ K7 k# ~2 Q- `; }

& Z- R+ L4 X- `7 \/ x& ]; d1 x) jbegin P_something arriving8 i& h* D9 H( N+ Y
   move into Q_wait
+ A) {5 V1 {3 d. N* w5 ~   move into nextof(Q_mA,Q_mB,Q_mC)
2 R' n% B* k/ E) ?5 }: I* _   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
( w* v3 X- W5 c  N6 Z   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 7 c; z! U' V6 a; X. m, b
end
9 r& j+ o9 L7 [
' r* c+ v" z# k  t. w& p2 a2 gbegin P_mA_down arriving
; z( |; v& u1 H& I' d   wait for e 110 min
# N3 M9 Q1 _+ m/ C0 k   take down R_mA3 ~( K5 a! |% H* S
   wait for e 5 min% V2 k2 Z* b. O8 y1 V+ n
   bring up R_mA
, a/ v( r/ Q1 o* k* W- c5 ~end; U2 O! ]0 Z& B; s3 F- U

$ s  m) F( N  d' B  nbegin P_mB_down arriving( ?: P" |& Q, N/ i  F7 j  t
   wait for e 170 min( U/ e  l9 P! l' o1 R
   take down R_mB0 T; i, E8 a7 p+ Z6 q
   wait for e 10 min
4 I7 C. d* I( s0 `# G   bring up R_mB
  ^2 J1 _' \, @# Zend
6 G) y& x1 _" u3 R! E* C5 T) C. c& b
begin P_mC_down arriving6 M: U: e8 s7 w+ p2 g! W( u* o' w
   wait for e 230 min
, b0 C! M0 a4 u/ K: d0 o, c   take down R_mC2 Y% c/ V% s3 b$ _& y$ p% r
   wait for e 10 min
6 ^- K+ k) S" d3 x! y& c   bring up R_mC$ d$ J0 X# W, D/ v0 L
end
( G6 Q, ?# _! b% d0 b9 W7 V( u! _1 n0 E4 \, Q
begin P_mA_clean arriving$ D1 f$ f$ W% S0 e' U8 Z9 U
   wait for 90 min
: A  F3 |5 F4 v. N0 p* x( g   take down R_mA2 B& {8 Y9 I6 E- i: u/ _3 e* b5 @% S
   wait for 5 min
9 K; i5 y# m( J6 j: ~   bring up R_mA7 k* X7 T0 E8 u# H( B& c1 }5 i
end! [' E- U/ l4 f
' e4 {1 @& Z" l4 \1 C
begin P_mB_clean arriving
! L4 K8 E' [  ?9 i  L   wait for 90 min
+ @1 a( `# t2 q/ w2 R: x3 o9 S+ f- L   take down R_mB* [1 v7 m9 C6 y
   wait for 5 min8 C; i6 F  x& N0 n' w7 n
   bring up R_mB
' }0 f3 ]% _* ^! Oend
" \9 B9 ~& u$ K: k, l1 v4 |5 E. Z1 N! C. S
+ U3 W& f2 m  i5 I) D9 Kbegin P_mC_clean arriving
0 [# {+ w6 m  q" m  X   wait for 90 min
0 m$ o2 g  T% L4 S+ y   take down R_mC
* @: y! ?9 l8 B  i' K   wait for 10 min
; j) A+ B; Q4 @6 S$ N9 u' r- ~   bring up R_mC' Z7 h8 Q, T2 ]7 g: f; X6 C$ \
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
! t( y  ]* g. H5 j   move into Q_wait2 t% L/ `, C2 e
   set A_q to nextof(Q_m1,Q_m2,Q_m3)0 O- v( z* v% z$ C" e
   move into A_w
; A0 [) p. [+ f' M( d   if A_w=Q_m1 then use R_m1 for u 48,5 min" Z2 q+ P- i9 ]9 |+ e( b
   else if .....then use ....for u 48,5 min
" K$ k$ |3 P  I+ b   else if .....then use ....for u 48,5 min  
# ?! x7 o6 A8 U   send to die
5 b2 i% N+ h$ T* Vend
: T4 X6 L- C- w; v" J, g" u' y; K. _
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-22 04:55 , Processed in 0.241358 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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