设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7640|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
+ I3 ]/ \4 n, d' X; D! W1 t; x! n
( e3 A# f4 T' h  }% E! x底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
" Q' V$ E* r7 p5 U4 A7 t4 x  a0 F3 m
# d+ k( B) E7 w7 `不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
6 y$ L2 A9 v0 d2 R2 [1 m
. G" K, X. h. i9 N* A
--------------------------------------------5 l2 ?! B' j% ]9 g) C
begin P_something arriving
0 Y/ i* O! x6 E   move into Q_wait2 f7 m, O3 h! J$ d
   move into nextof(Q_mA,Q_mB,Q_mC). z+ d, X! H/ m. N2 U  P
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
$ p2 `7 |7 x/ ^1 p* H9 k/ y$ Y   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)' M& k3 v/ K: v3 o0 L0 E( l3 L
   send to die8 h5 M; M9 P$ Z6 ^1 P" W
end
( Q6 f' e) a+ N; ^, Y  A8 t

  R+ K$ D6 b1 E% qbegin P_mA_down arriving
1 }6 u) ~  \. s" P- o" ]   while 1=1 do 6 I# x3 x; o8 i2 e, S8 q9 Q( `
   begin
6 W) I) l  `/ u) K& u9 R. ^   wait for e 110 min
. d7 W( X) v" j# O: y: s$ }' @   take down R_mA
" H  C9 T6 ?8 s* e/ T& h( U/ D4 u   wait for e 5 min# A4 V9 N( a- U* N. H: i+ f
   bring up R_mA' @( r: [+ f0 C+ a% ?
   end$ B9 M- Z) W! H/ P0 P' l: ]
end

& @" S+ T  |1 I8 D- n) U( K$ L
9 L' Y! n1 m6 ?7 a9 [8 \0 g1 Tbegin P_mB_down arriving5 g* |" ]" R. o3 Z
   while 1=1 do
. w, J2 G, h, @6 I: k: O   begin3 n' N: q$ i, D! [4 K- Z" i! \
   wait for e 170 min: U$ m( `% y% k$ x5 Z4 C( Q% m
   take down R_mB
. @# D+ ?3 S5 X7 K& x1 Q   wait for e 10 min
: _3 X# p9 E3 e/ D, U   bring up R_mB& g0 `) E, C( w( M) y6 r8 w. [
   end
, L' [1 u( e, Send
1 n& ]9 k0 w) `+ _) T
( \, H( `( L7 p' w+ k# c
begin P_mC_down arriving9 H8 o8 t& X, Z1 ^1 @
   while 1=1 do
* G( g  q- f! }$ `8 X   begin
. y% P: O. j+ E   wait for e 230 min# d7 ]. v- `' J# h
   take down R_mC
* U& S0 N: K6 M7 R, R   wait for e 10 min
5 {) ]3 G2 Z8 p; V+ P/ M, E   bring up R_mC
, P) G3 \* D. _   end
% U1 g% i: @' `7 @" qend
3 d1 ~% ]/ p1 |: l8 V
; t2 y! G" z9 R- M9 E
begin P_mA_clean arriving
. J- [4 t' {0 s: {# Q1 t   while 1=1 do
! b+ l$ z" F% x; j   begin
5 r$ e; Q4 C) j# U" h   wait for 90 min4 r* G' M" c. d$ w. B8 ~3 }8 b
   take down R_mA5 h/ y. P: _5 a# O  r9 s
   wait for 5 min7 X& S* P- v2 h/ J
   bring up R_mA& |3 v+ }; \% x: u) H$ B
   end
7 H9 v" q* @6 X: P6 vend

) q; N& v6 p5 u& G0 N
6 x; a/ y+ \; i( y8 Y% i* Ubegin P_mB_clean arriving
! S4 G0 L$ ^. G" I& e$ J' e   while 1=1 do
! \' G3 m$ P) _* ^! H$ g: B# N" f   begin- l; x0 Z( ~6 U
   wait for 90 min
$ W% i0 B5 P" M8 s+ F) F- E   take down R_mB8 Q3 _4 `3 A& k) J1 |! w* a
   wait for 5 min
; Y* e! P5 S, v/ g   bring up R_mB
5 k3 O# _, A/ [   end
- A+ K) Z1 ?6 ]+ {end
+ T# O" Y  ]3 }
  D2 l$ p6 s9 B5 D! K
begin P_mC_clean arriving/ w1 C6 C/ B/ D
   while 1=1 do9 f8 Q. ?" F- y+ K) M
   begin
8 D) v2 O& q) \   wait for 90 min, j) c. H: D- @- a- Q
   take down R_mC6 X/ S) l) |1 O) l% B0 ~$ \
   wait for 10 min) _% b3 l. R; e! P) B
   bring up R_mC
+ a; H5 n$ g* x, ?& @; B   end
  A4 p2 n2 E8 j  Fend

1 [( G$ c% b6 y/ h( M. D, x----------------------------------------
% T4 X  e; v* n4 b) Y. L & Q* B; t4 L: H+ I9 b; p
Exercise 5.9
9 U. d, b2 {( Y. ]2 d& i' G6 ^2 Z

9 f, Q9 P7 R' L# s  Y# G+ w) lCreate a new model to simulate the following system:
, _" S) e, \: n9 I: E7 _% I8 ILoads are created with an interarrival time that is exponentially
/ p& F; b( ~, e, C* z! g( i: Qdistributed with a mean of 20 minutes. Loads wait in an infinite-
: M6 ~5 ]: b3 F  T1 {capacity queue to be processed by one of three single-capacity,
+ ]" G+ B  A6 ?& L; Z. Xarrayed machines. Each machine has its own single-capacity queue 8 m5 ?. ]& M1 V, `* c# s8 e5 A
where loads are processed. Waiting loads move into one of the three ( U" O; \; _" {* [+ C& @2 O
queues in round-robin order. Each machine has a normally , k0 y4 y( y5 Z2 x) t$ a" H
distributed processing time with a mean of 48 minutes and a standard # S( @  X& d6 M# _: [
deviation of 5 minutes.6 e" e3 \) w- v& d
The three machines were purchased at different times and have
( P. e' L; ], ?# Gdifferent failure rates. The failure and repair times are exponentially
& W# k3 N# Y; |* y$ Ldistributed with means as shown in the following table:
; U  x; a/ A* u$ [* r/ M9 HNote The solution for this assignment is required to complete
7 `* t1 h1 D7 w, `9 Texercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of & Y' e6 p- f6 y% M
your model. + r2 q" M" ]8 K, E* p8 ?
0 W" }/ [" B$ l$ i
MachineMean time to failMean time to repair. u+ [! d0 O7 R. T! U" A( B/ J" `
A110 minutes      5 minutes
& M7 d. t' B* e/ N" R; EB 170 minutes     10 minutes; A6 b) d9 r/ k$ j
C230 minutes      10 minutes# K1 n/ [4 O9 c' ~
8 N+ J3 f; k( K% P- }* r
The machines also must be cleaned according to the following ! l, r9 i$ D0 J$ ~* s
schedule. All times are constant:
- v  {* \  i$ }, x! K; b' P% P# K6 b3 [& d) _+ t6 T
MachineTime between cleanings Time to clean# a9 a( k0 ~* u6 \# R9 r/ h
A90 minutes        5 minutes8 x6 ^0 T4 o& |$ B6 }& U  n
B 90 minutes       5 minutes% F8 Z9 P+ W& U8 p5 H. p0 W9 H
C90 minutes        10 minutes
0 K  W( P5 J/ ~* X+ B
) b# w% u* `% {! |6 h5 u7 p6 u* rPlace the graphics for the queues and the resources. # \# G! f% o' R$ u
Run the simulation for 100 days.
" h9 Y2 e' L/ j7 C- r/ }0 uDefine all failure and cleaning times using logic (rather than resource
5 C4 R7 u7 C1 r0 h, U. Vcycles). Answer the following questions:
, V0 B4 U# @( ?& n0 l) ua.What was the average number of loads in the waiting queue?
' \7 c9 e: U+ U0 Jb.What were the current and average number of loads in Space? 2 f1 X$ n9 N7 w9 Q6 d; X" o" I
How do you explain these values? 4 T+ @5 |% ~" w+ }% F

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
. M' h) k6 ]2 C. i+ ]send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)% l% d1 T  m# W  N4 I8 h6 t
这行好像也不太对,各位先进觉得如何呢?0 d- D( j: U9 E8 N- E, H2 L
" E# k1 L+ \( M: C# I+ ]: B
begin P_something arriving" a, w& {. L: g! K$ v! Q
   move into Q_wait
* ]( ?" F3 U* R4 [9 [. t" C   move into nextof(Q_mA,Q_mB,Q_mC)
$ E: k$ z* s; B; X   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
- V% z' h& |/ m- a! Q4 e   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
- o: C) @2 @, p$ u: I' r! Qend; n- w$ j7 q( T3 r; q( _9 ?

. s* k: l* @7 p  m4 R6 R( V1 Ibegin P_mA_down arriving8 W. f6 S9 v7 A: R# D( u7 k
   wait for e 110 min  `" ?7 e1 @9 D* e
   take down R_mA' F) h* g+ h6 b" U! q! i
   wait for e 5 min
7 Y0 @  w# M( M  O$ l$ Y   bring up R_mA
" _- [9 v, y! h8 m6 q% j- d2 Qend" b) l. O( Z' M+ y+ j
5 `( W0 C" ^$ ^+ v
begin P_mB_down arriving; T6 V& w/ {: t
   wait for e 170 min# O2 P# G8 B4 b+ S9 t& B
   take down R_mB
8 H8 d4 L6 Z1 p: B/ X- t) Z   wait for e 10 min% F1 ^* p6 J! |) W. Z
   bring up R_mB
* p  h# N8 k1 J% _  S: x) \1 Pend
4 @! l/ Z. h6 R) w8 [9 `! j
- V+ q: b8 c4 W! n, q$ ?4 ^; Fbegin P_mC_down arriving7 O0 S- }9 H* \- ~0 E+ z
   wait for e 230 min, q# ^  p3 o1 R& a: Y8 w  l
   take down R_mC
( ~6 k; D4 a+ f8 G9 d$ M   wait for e 10 min
' j! S4 u+ s7 e0 _5 d   bring up R_mC. t( q& t3 u0 T3 Y, F7 H
end, E( S: ~% D8 L$ m% f

. @4 i  }7 Y: v8 U6 ebegin P_mA_clean arriving2 z: U( B( |. C/ {& W& ]
   wait for 90 min
' k( v1 Z1 Z3 j. s8 h+ q   take down R_mA  |1 A: H* A( }# s
   wait for 5 min% L( l' D4 a8 g6 }, J( X: N
   bring up R_mA4 y" s, @* x! `
end) w0 {0 M. \' r  E4 R

) E: V" ^2 k# x9 Ibegin P_mB_clean arriving( }3 X. e6 P9 p
   wait for 90 min2 C6 ]: s- {7 f5 x/ n* J6 d
   take down R_mB
* l/ k- I7 _+ ~7 r( ]2 Q   wait for 5 min
% y% p$ B% a1 v7 \( y$ |& x; r   bring up R_mB0 a& i; G6 _( n9 W+ R
end
( u. }. o$ T3 K8 V; c, ?% ~# b2 J/ E- }
begin P_mC_clean arriving/ @! H# C! c& ~, M
   wait for 90 min
9 {( p% g2 V; [& \   take down R_mC
3 \; B5 }# Q7 G( J3 z   wait for 10 min: O, I, \8 l8 ]5 o: G
   bring up R_mC7 w8 `0 e. E/ a( @$ t& z- R
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving0 t* ]2 h# U' w" F1 Z% }5 U& b
   move into Q_wait
( s+ E9 Z+ X3 s% X& k5 B/ q+ C   set A_q to nextof(Q_m1,Q_m2,Q_m3)
0 A* k& Q" X/ n   move into A_w
( H6 {6 f% v# v) b, X   if A_w=Q_m1 then use R_m1 for u 48,5 min
$ ^: [3 \9 e$ [2 K. x6 {5 M   else if .....then use ....for u 48,5 min
* B) \$ K, `9 b& ^" ^! `# ^( k; D6 B   else if .....then use ....for u 48,5 min  
+ z* B+ {' O4 w+ ~2 v( ?   send to die; z+ @# _- Q. n* k/ P5 J+ x# I2 C( A
end
+ L1 Z2 X$ H) b  J; z0 u8 L3 ]- a1 R, f  w
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-13 18:57 , Processed in 0.020083 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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