设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8394|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 5 _  e; G  Z6 H: S
- N0 j6 B$ Z+ I, v! ^# ]
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
! c1 [7 d* D3 ~
4 R1 }" o! ^/ V7 `不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!3 m' ~0 Y8 S: [" ]$ K# {7 \6 l

6 o& m# W2 h% F+ A5 w, `
--------------------------------------------; y# G9 j( l3 g9 |( T
begin P_something arriving
) P6 b& z0 y6 C: E   move into Q_wait6 Z2 K6 P3 b+ p5 g0 \
   move into nextof(Q_mA,Q_mB,Q_mC)  R! @  \3 t; [1 p
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
0 i: c1 g2 o4 Y6 t   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)% r1 J7 z6 P+ q
   send to die
! O4 h& ]4 f4 h' |+ }end
! v: p3 U7 o$ Z
& P) g0 [0 J5 E9 o( w
begin P_mA_down arriving: \5 d, O& m! w: U* `/ b
   while 1=1 do , \" m; y; |* V8 `
   begin
2 Q/ @7 w4 G% U' y; L) U  _& v& Y' U   wait for e 110 min
( p& Y) h2 L$ A" m  b4 Q' l  k   take down R_mA
% i, O5 @* D' U# m   wait for e 5 min
3 k8 _# u4 n9 v. {' \3 O- q+ @% \) ]0 L   bring up R_mA
7 J+ {+ i% s2 ]2 h( l  y% C   end
3 Q" s9 N0 f5 K& n/ I: B9 \end
# C* _( @9 Y  z4 W

) j) @" F! v8 L- Dbegin P_mB_down arriving
" d) j. r. H4 f0 p7 j! Z3 \   while 1=1 do& Y, H( b1 g9 b. y
   begin% u1 c. G6 m& q- u: E' V
   wait for e 170 min; R2 G3 |# `1 Y9 g6 ~: g
   take down R_mB
+ t9 @- b/ k: G2 V( Q   wait for e 10 min
5 k0 d# I' y8 P0 f# _   bring up R_mB/ c& j6 s: R) ?) [' p1 n9 i; `
   end
* E, t. A5 a; @  U% Nend
" \% X) V" b$ D$ @. Y
5 b1 g! f* S! _5 I( T7 y# B
begin P_mC_down arriving
/ k/ R3 T" |, M/ O* ?4 Y3 u   while 1=1 do
! i2 m3 n+ H4 X) X   begin
6 W- o/ k! Q' v' |( n& @  z   wait for e 230 min
" {" ^1 \, u0 X; r3 w   take down R_mC
( x$ k: l6 k2 ?1 i7 z$ g  w   wait for e 10 min
% N2 M) @3 r. ^( t   bring up R_mC* n! o: k- Z& j& q( E, A" Q
   end" w0 k) c, J, r* k5 [! ~
end

. T( F7 z8 T6 f  T+ X - @1 `6 b1 Y5 v: V
begin P_mA_clean arriving
0 `, U" m- _5 O$ E* s   while 1=1 do2 w  ?0 v% {& I$ ~
   begin. ?8 E. m  S. {1 x+ ^- O2 s
   wait for 90 min' |8 d/ Z  Z! S1 o
   take down R_mA
8 B% x( E% C5 |" f   wait for 5 min
; x& K6 }- m# y3 k( E  L: Z# h   bring up R_mA
: K, F# X2 v9 [2 Q$ d* V# v8 Z   end& g7 P+ y* h" l6 [
end

  S0 B* ~' K$ t8 p" h
, d" P4 s' m% x4 T$ j3 Gbegin P_mB_clean arriving6 ]  k. `) b: x% f8 t2 \" ]
   while 1=1 do! n6 X1 E/ O+ {0 d# l! k2 X# _
   begin- k4 s' r( G3 }6 q
   wait for 90 min
" w* r- @. Q; x   take down R_mB, E2 x1 a( i/ Y0 Z
   wait for 5 min8 F) C  F7 u, ~2 k* a
   bring up R_mB
( ^( Q) i5 E0 J4 A   end
9 J) a8 Q3 b5 Q! _end

" U! F9 @5 t' x0 x
0 K# `& G9 f) @. _9 W+ U) j  Mbegin P_mC_clean arriving
" _  z, H2 ]1 A1 B: R8 b+ L  ]/ C   while 1=1 do
0 ?! ?2 g( r2 H5 r3 i* _9 W3 M   begin
# [- z' v4 h/ S$ l  ~+ A' l7 `% J   wait for 90 min
! I8 Q9 H5 o8 s' L6 ~   take down R_mC! |" Z  H( [+ n( ]* m; M1 _
   wait for 10 min9 T7 P, o4 f6 l$ l% g5 |
   bring up R_mC
1 V8 Q% o0 m- @# V0 s   end
  C5 h% T9 R3 ~8 l1 c/ ]end

: b2 U& p( p5 P----------------------------------------
+ q; O0 |% O; f% y8 [/ j$ t
1 X" z! r& p  _3 ^Exercise 5.9$ k; a7 d* x  N
8 O$ R) z( j2 |* O

' J0 I/ ~7 y' OCreate a new model to simulate the following system:9 }' }$ s' x% o& ~, [* H8 D
Loads are created with an interarrival time that is exponentially
- {9 l, O7 O% \: A' k; Xdistributed with a mean of 20 minutes. Loads wait in an infinite-; ]9 g* I/ f0 W6 p8 |
capacity queue to be processed by one of three single-capacity, . c: F2 N4 a6 ?' S7 |/ f* h- C! O
arrayed machines. Each machine has its own single-capacity queue
7 J: h0 l+ @# Uwhere loads are processed. Waiting loads move into one of the three % }( E( i, G" P2 h
queues in round-robin order. Each machine has a normally
! V% z3 V$ a9 Ddistributed processing time with a mean of 48 minutes and a standard $ o3 P* L3 r! ^* w- O  S8 d3 [
deviation of 5 minutes.
7 ^2 e' w' F: z7 d0 N9 S; w5 MThe three machines were purchased at different times and have 4 ?, l/ s* K6 m% X8 ?
different failure rates. The failure and repair times are exponentially $ Y3 _1 s1 m5 c/ f- m, r+ ?
distributed with means as shown in the following table:   k) r" i9 I* B. M; c
Note The solution for this assignment is required to complete
: r, |' F+ Z0 E  ?( E+ \exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ! p0 I9 T: N+ P  W" _+ t) p
your model.
* }8 I) e7 e3 E, p8 M, v4 A
* A- ?, N2 J" V7 mMachineMean time to failMean time to repair% ]7 U. k' K2 Q) l2 f9 C
A110 minutes      5 minutes
$ P1 A- ^% I- h* uB 170 minutes     10 minutes! b8 O2 X( I; i+ Q' m5 B( h
C230 minutes      10 minutes/ s5 }) p/ N% w# q

  {5 d" v( t( o( N1 n* AThe machines also must be cleaned according to the following
4 j: e( I) T! C0 _- B5 r0 a) ^schedule. All times are constant:
* d) ^+ t6 h0 D& E8 z/ O4 C0 J* U- ]+ E5 L8 J; J) u' R; }# j
MachineTime between cleanings Time to clean
1 m# ?. Q- y; |% H" l- Q4 p* FA90 minutes        5 minutes! v+ r# R7 |- K$ w
B 90 minutes       5 minutes
4 t+ O, m) e* I2 \C90 minutes        10 minutes3 b3 O7 Z4 C2 F0 c; K
4 b: ]( G* d" U/ _# {4 }
Place the graphics for the queues and the resources.
. M) G. H/ x$ D% q! e* ORun the simulation for 100 days.
0 j) V# A6 m& o* _1 ]/ `Define all failure and cleaning times using logic (rather than resource 3 `3 t9 b* [) q
cycles). Answer the following questions:
; b* w% Y# ?5 i5 z8 ja.What was the average number of loads in the waiting queue?
* W* ~' L5 e2 a7 }2 Ib.What were the current and average number of loads in Space?
/ ^, \) s5 p$ _How do you explain these values?
3 n) ~+ X$ E& Z! q+ A, _% f# P

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
& e4 w8 I4 O  I, Q5 I& g1 zsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)5 d  K( W+ Y* d& a3 E' j# h! u
这行好像也不太对,各位先进觉得如何呢?9 I, E+ {$ |1 i1 N" M- @! _

: }$ _( U/ J( Y. i0 R: zbegin P_something arriving
" N7 a% ], w/ p2 T% ~: u, ]/ X9 O   move into Q_wait! Q* W* t/ s6 v$ |: C
   move into nextof(Q_mA,Q_mB,Q_mC) 1 `/ P0 L2 }- j& M1 f- e
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
# ]% p8 M+ r: |$ d   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
, Z( q4 B" r+ M& q" ^5 }end. l5 K1 m- t) W$ O
# P( J5 {) r, R8 b) ^
begin P_mA_down arriving* C, x$ w* D* a2 D
   wait for e 110 min
( j: f) ]( \# D) |# X   take down R_mA
+ Z6 Q8 I5 F/ ]7 u1 R- M+ k) d   wait for e 5 min6 `1 R( a5 M/ f2 p
   bring up R_mA: T1 d0 V( E( |& g
end; N& a: ?0 H& k" p% F, [

' V% L% n7 q1 B7 c  abegin P_mB_down arriving
4 r7 [+ n2 P) W+ s   wait for e 170 min4 b7 D: \6 h. p5 V
   take down R_mB8 B" ^. V& G9 S" k2 G8 J
   wait for e 10 min4 D6 i! L5 E( l  V/ x7 C8 [( t
   bring up R_mB
8 e( O; @* z+ S# ~" Zend2 P0 @' L! c9 q1 c# B
1 V" x/ _* ?/ q" L' p
begin P_mC_down arriving
( j5 c6 [; g- O' z4 Z   wait for e 230 min
* E5 C! F% t$ W5 P& V   take down R_mC; ]8 l! Y+ o/ W6 n2 M8 l
   wait for e 10 min% C" T. x) b. x; L: e- K% O
   bring up R_mC9 \: k1 I! n/ b8 |8 {2 }
end
) s5 f6 M( t5 e; V' G3 _/ f; h7 O, Z0 |* J& u! z
begin P_mA_clean arriving  h$ @4 f( G0 {( A
   wait for 90 min
0 f" a' y" U3 `* u   take down R_mA
4 f- i3 E+ u) B1 ]0 D& {" l, D   wait for 5 min
; A: o; i0 p5 P) ^# ?  t& r   bring up R_mA- t  f* h% T; A2 \, _. R7 U
end+ {) |! T) K6 s: M

' \2 S3 ^. w: q6 _1 R& wbegin P_mB_clean arriving
# @8 N$ w8 X; l   wait for 90 min
/ L, ^! Q) a8 R; d# A+ d/ A: F   take down R_mB
* w5 X( a3 v) K  k- j   wait for 5 min
8 M, t5 X  U+ |/ }- M4 O0 J   bring up R_mB- ^% i' w" V$ ~$ k
end
$ n' m* l. J1 e" t3 }+ c- h' v
2 b% i" ~8 o2 z2 @4 j% W5 `1 {0 Xbegin P_mC_clean arriving* `7 f( o% L6 N% q$ O* y: T4 e
   wait for 90 min' c+ w+ m  b2 \# S6 t( Y
   take down R_mC( T- o* v2 `0 j8 o* t. j7 t0 L) Y/ v
   wait for 10 min6 r2 F4 m. j3 \* x% P
   bring up R_mC; |; d5 k7 E" }; A
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
. f0 m$ L+ ^( B- o2 @; N6 h' G( b- S* p   move into Q_wait5 d: e3 Y+ C7 y" P; J
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
. e% h+ j5 X* g   move into A_w
% S6 @& K/ V, G4 V, p, r6 P   if A_w=Q_m1 then use R_m1 for u 48,5 min
1 u0 z* G( M$ o8 m0 C' H% ~   else if .....then use ....for u 48,5 min, o3 n/ M! Z( b' A
   else if .....then use ....for u 48,5 min  - h% z) [+ L. w, G
   send to die
% W4 H0 U: O, J- Rend
8 d  w' Z) P. l- H" e7 q+ Q
' H4 g2 f$ S* T7 w! R2 }供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-4 03:37 , Processed in 0.014055 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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