设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6597|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
" ~* R' K6 G8 i1 F& x, G7 c
7 P% N; g( c) q- @; x8 U底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
: v# G! \! n5 X: w  D7 P( R4 `: S* B
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
- A6 i$ G) A0 J( u+ {8 i* e& O/ w; B6 N! V  d3 o" Q& ]- c
--------------------------------------------* x) q# P' u! l/ L9 |8 q$ \% q/ {
begin P_something arriving
4 s: N" q% D! v1 X# j   move into Q_wait
" d6 y# B4 N3 _( \4 t# K   move into nextof(Q_mA,Q_mB,Q_mC)" n  N- a+ X- P0 W, [# {! ?8 Z
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
+ K7 r4 ^3 ?1 [5 V9 q   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
6 N' r8 A+ Z2 `% ^; G! L7 `   send to die
+ d9 j* r6 ^% e; ]end
# O/ }3 H# Z$ n

5 X  o' E5 T& {9 h  L( hbegin P_mA_down arriving3 U! k' W; w5 ?1 n; h2 c8 {/ ^
   while 1=1 do 0 P. b" K) ~4 y. q6 }! p  u$ ~
   begin
/ ^3 K+ h  Q$ a6 k   wait for e 110 min/ k0 j" {' g% r" y. l0 `5 t1 y6 d
   take down R_mA& R# C2 l0 r% h, a
   wait for e 5 min
+ R3 i/ ]2 p4 {& `8 K   bring up R_mA$ U- C: e8 h4 B+ J
   end9 S! u+ l" k1 c6 q% k% c5 z/ x2 z
end
1 [1 r/ u+ s( _. l. ]+ w( y! g
* l: {0 h) t- a6 z, n% z5 P
begin P_mB_down arriving0 w& E  B' ?4 C+ F
   while 1=1 do
4 i! Z/ J& s1 l   begin8 d" ~9 s: [" M( F
   wait for e 170 min
8 k0 m. U. [. \% I   take down R_mB
& x: W2 \+ q4 _- ^9 C1 u   wait for e 10 min
# q- Z5 V. f) o" _7 }; s, `; A0 O   bring up R_mB1 y) M3 d7 b" H6 i/ [
   end
# Z. N+ ?# p+ p# J: k' K% x6 r% {end
4 a8 K  x9 I: [* Y$ @, M4 J

/ R5 T3 K6 T% U: p, u: {* ?begin P_mC_down arriving
7 s8 y7 H. ]/ a. s* E   while 1=1 do 9 b4 |# p: @) y) O1 w
   begin. j9 D! D( ^% V  I* H# k
   wait for e 230 min5 S+ \1 x, P. V
   take down R_mC
" ]# L, e. m( G3 q% D; V7 c   wait for e 10 min; T! T  {2 c' K: V% \+ ^2 U; b
   bring up R_mC
; V' Z1 e" C9 {4 ?4 N   end! L$ {  I# @+ J, |; s
end

) A+ h+ z, x% a/ W3 _7 L" c
: R. M2 ]$ e9 o! e4 m' Obegin P_mA_clean arriving
* V- q* N$ R" d1 Q; k. J6 s, B, H   while 1=1 do
* v+ s6 y' {0 @$ S, n/ B* o   begin
$ |# b  D, Z+ v6 n   wait for 90 min# g; ^; L' ~; ~) B
   take down R_mA
1 s/ @' I$ U4 e8 H0 |; n$ _) c   wait for 5 min
5 ~% h. |* l9 b, o/ N5 F9 p( i   bring up R_mA
- Y+ X  M4 ?, O' s3 t$ q   end
% x  {$ H6 K, A* I/ Cend

$ C* M1 C/ c& P- y8 d ' O7 w! w- e1 T' U8 i/ K, O; e2 ~
begin P_mB_clean arriving. r/ }6 l) F; o- j7 N: j
   while 1=1 do6 D6 S, n; {# n; _
   begin
' u6 D& R: r& s4 c+ `9 E- Z! {   wait for 90 min
/ k' {3 d) Y. X   take down R_mB: a! y, J3 o+ j' ^' m$ d" L! e" b  R
   wait for 5 min
/ j3 E( H- ?2 @   bring up R_mB) U! c+ @8 D8 G3 z
   end$ E$ |$ f$ V8 P" Y3 h1 a3 [8 s
end
4 A% H* M: o- F' T* ]2 v! T) p

0 ~) m& |- `0 gbegin P_mC_clean arriving
* e- A* |: \/ Z) b   while 1=1 do/ B) i! A3 D  h  q  s# t
   begin
1 h! ?$ p1 s2 ~% D   wait for 90 min0 |; H# u3 ]% ]* W' {  `
   take down R_mC
; g3 w, C5 B1 W   wait for 10 min
* [- E3 O* F" ~+ d7 r' S   bring up R_mC
+ Q) t% l7 G7 I   end
: ]1 t- y8 ~( @% t0 t% H2 zend
  A' i1 \, E) {3 a" S
----------------------------------------
3 H4 g2 Y, e. U# a " \6 f- O; w) l7 C  i5 C
Exercise 5.96 Y3 d! A7 l) z9 b6 Z
4 q  ?6 S  {" c; H1 p$ F  y6 F

  }5 j' {" a# s  A, q+ `Create a new model to simulate the following system:
3 C8 ~' f+ o8 @& D, x# `+ @5 eLoads are created with an interarrival time that is exponentially 9 q. x" p8 N7 L4 J2 d
distributed with a mean of 20 minutes. Loads wait in an infinite-4 ^8 |  [' O2 T
capacity queue to be processed by one of three single-capacity,
" }7 ?1 q% d' o! \0 Karrayed machines. Each machine has its own single-capacity queue ( M7 t9 a/ W: i# T
where loads are processed. Waiting loads move into one of the three 5 b% f6 I+ }8 z8 Y% G
queues in round-robin order. Each machine has a normally
6 d. y: v/ o, L0 o/ o! Ddistributed processing time with a mean of 48 minutes and a standard
) B% l3 q) g: r; ~' }deviation of 5 minutes.
; J5 y" Z* h$ ZThe three machines were purchased at different times and have 0 `$ `( T9 k) d4 R' z1 q
different failure rates. The failure and repair times are exponentially
0 l% S5 W" N7 W9 Qdistributed with means as shown in the following table: ; L- l& G. A# `9 |2 D
Note The solution for this assignment is required to complete ) e9 b, ]5 {7 U) g
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
- h; A' @  H: s" g8 myour model. * Y0 m& E( l- ], F1 r1 [
1 B0 G: R% H8 G
MachineMean time to failMean time to repair
* b4 o" R5 S3 q* mA110 minutes      5 minutes
5 i* J- I3 D" Q" C, m7 l3 TB 170 minutes     10 minutes
2 A6 g6 H/ G+ Y7 F' m8 C! p% AC230 minutes      10 minutes- w) V. n6 m3 e4 P) l/ n

5 S: ?/ ~" D4 k$ P1 ]The machines also must be cleaned according to the following
6 ?/ g3 s) z9 u+ ~$ Q9 T( lschedule. All times are constant:
8 `4 _4 \* L8 a0 k6 d, E& T' V& |. u/ {" W
MachineTime between cleanings Time to clean$ @4 ?$ j5 K  t
A90 minutes        5 minutes
: B8 l) v: r- ?4 F% R1 s* lB 90 minutes       5 minutes
% \5 F+ B; _: oC90 minutes        10 minutes% N8 e9 J% N- i. ?9 u
0 \. L( Y2 u1 j, i" _
Place the graphics for the queues and the resources. - S$ V5 w' {; A1 Y
Run the simulation for 100 days.
% V5 U$ Y' k+ K; PDefine all failure and cleaning times using logic (rather than resource
0 Q' g% F( F$ Ecycles). Answer the following questions:
% f. |( Y1 y) W4 Z! I( @a.What was the average number of loads in the waiting queue?
1 m2 u% D, K; u! ~% Q; u- mb.What were the current and average number of loads in Space?
( e# V! `4 ~& y) }1 M: kHow do you explain these values?
. J" ^; G; |4 T" M

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉, _4 a; W9 z1 D" T
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
) a& A6 ?+ g) ~! f这行好像也不太对,各位先进觉得如何呢?
5 q/ _+ J2 r  Q
* u6 S8 L5 F! W4 C4 vbegin P_something arriving  Y( |0 U6 o9 M
   move into Q_wait
$ Q  A! Z* s* t- H- x+ M" {   move into nextof(Q_mA,Q_mB,Q_mC) + M! h( y" G  ]! j
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min( ]$ x1 H' u1 |- o$ m% u! t
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
7 V3 x- c8 b0 W$ A9 D" D7 Zend
- \2 `1 _* ]0 _1 i$ q7 s( A- [
8 M% l8 d" I9 V* C6 t2 l8 v8 abegin P_mA_down arriving
* c/ a, P* ^5 q* t6 N: u   wait for e 110 min
0 p$ C! q  b/ C( {. B$ I   take down R_mA% o* O( G) A) Y( F; w
   wait for e 5 min6 a: w7 i* j. y0 ]3 M
   bring up R_mA5 M. w% J9 M# |) M6 }
end
: \) F: V6 @9 t' s& E1 m+ L8 a) ]. Y% X1 i& o3 M2 ]' {, }. J
begin P_mB_down arriving
; q. S' y- Y( C   wait for e 170 min. U5 Q1 C% L8 t
   take down R_mB+ B  X0 a: s' d1 [  b* K
   wait for e 10 min
9 H1 J4 s' S$ o) D   bring up R_mB/ C& Q( Y6 n; `, Z8 f/ A
end" g/ P% T6 O! `* L" h' u
  }" i; h' g3 l* E- V  P
begin P_mC_down arriving
; d% D) j6 y# h  K% ]8 P" S  f   wait for e 230 min
  Y) C7 G! m) \* i9 R) D   take down R_mC
, U1 W- A& w! e! \   wait for e 10 min
6 L  @" X& P5 t/ `   bring up R_mC$ b. z4 N+ z( `' J# z2 q, j
end, i; m, m7 Z3 P) p; A

8 f1 J2 T) Y" x* l6 Wbegin P_mA_clean arriving1 `9 A' }1 Z2 B& G
   wait for 90 min; \+ |. d. b3 G; A2 |9 j. e
   take down R_mA! \! _& C, p6 C6 b7 s# n- G+ w
   wait for 5 min
0 Q) b9 q% U8 `+ G/ l   bring up R_mA
+ [* ~8 ^- W% }; J  [" B9 S9 |end- i$ y  W, z. i9 F
0 {; y! _6 G- ]) q
begin P_mB_clean arriving; m- F* B" U. _5 E
   wait for 90 min) t7 z, T8 C& w7 J& n3 s, l; I" @
   take down R_mB+ o4 ?7 r* I( f+ B) n
   wait for 5 min0 N% B/ z: _6 D' e+ ~: \
   bring up R_mB; k! {1 g! z& l0 A6 D
end4 ]3 }0 x+ R4 e6 U5 @% j

$ R8 b& x1 u& t! p7 hbegin P_mC_clean arriving
/ |( ^$ e( a( y  C* F   wait for 90 min
3 F  \) E7 ?% }. Q0 k   take down R_mC! D8 G1 v6 U3 p0 h- ]1 x: x, n
   wait for 10 min- z  w7 g0 \5 B. {6 e+ T3 b+ \
   bring up R_mC8 }! Y+ U! X; ]
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving/ v1 p( a' i( S& u9 o
   move into Q_wait& Z/ Q1 `! P0 J8 f( t+ x  B( J' j" r
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
& q# X; G4 q" D0 ^, {) E   move into A_w
9 A) T6 u$ E. O+ y7 C% H   if A_w=Q_m1 then use R_m1 for u 48,5 min( A2 i! k1 X  B7 t
   else if .....then use ....for u 48,5 min
. g$ l# Q' r( ~$ Y2 U   else if .....then use ....for u 48,5 min  
* o; F# U1 f; G) ?* e6 m) C1 k   send to die
" T$ K3 O# P$ P# O) G* k- Tend6 o0 K5 n  e) `( e% D
4 C! x  o2 U* k& e  s( `4 ~
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-6-27 01:18 , Processed in 0.013981 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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