设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8417|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
+ _) h" q) T, b" E0 Q5 y' d7 p/ ?4 X/ b2 j
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
; m. G" _' h( {- n( o. E) w1 T4 N( t" b; Z( r
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!" p6 s/ f$ H0 N$ C, _" q
7 F' A& S1 ?  w( I' W* C; j4 K1 b3 E
--------------------------------------------# H+ S2 t) `; O* j
begin P_something arriving
: j$ ?2 q: T7 `$ O: x   move into Q_wait  \! k; ]+ q8 Z  }$ z$ S" }* t
   move into nextof(Q_mA,Q_mB,Q_mC)" G. v2 l5 l8 ?+ u
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min3 T3 Z- x0 p. Y' N$ R& R7 h
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)1 y0 x5 A3 g( M0 n1 |& X
   send to die
' M0 P- \( O$ k- g2 K* W  }end

6 O& k8 ?9 a. }6 z# c, l6 {: W- V3 w 5 D, O0 @' O9 s6 O+ O
begin P_mA_down arriving2 U2 }; H  j3 ]
   while 1=1 do
% k: ]  u2 R  v* h   begin4 m% K9 ~- X6 }% x
   wait for e 110 min) p) l" A5 {0 W& V; b
   take down R_mA
, ~( D' s* T9 Z5 \& ~) ]" q   wait for e 5 min: P4 ]9 K1 J) x$ {) T
   bring up R_mA
+ Z  I9 R! i! r* Z; d* s   end4 Y: A7 G2 |0 q* c9 `
end

- T* R/ D$ {+ C+ }3 V  h. M4 C6 d 8 x, i+ u4 t) Z4 `) j
begin P_mB_down arriving) c1 H6 `6 e4 [  e
   while 1=1 do
' k( T& l0 }: i; q7 H# ?# {   begin. U5 o7 b6 t! f. N# B- f
   wait for e 170 min. L+ Q* Z1 Z, `
   take down R_mB
6 c$ M! T( {: x3 A   wait for e 10 min
# X6 \/ e- m0 Y# [3 m& U9 h. F   bring up R_mB3 c$ Y' M! z) B7 V
   end! k4 f4 C9 Y& d- j0 ?
end
' P1 [/ m# V  w$ A1 d' S

8 y/ g9 Y, i$ gbegin P_mC_down arriving# v7 S3 x" z  r
   while 1=1 do 4 E! f2 W" r/ U$ b/ ^
   begin4 S( ]9 ~) V8 [- G& x
   wait for e 230 min
8 ^& J( O# I; y6 d( F. w5 G   take down R_mC( i5 D) e3 e# d# J0 v' X. m
   wait for e 10 min# j  S- b+ j5 R" v7 Q7 j
   bring up R_mC
( p8 i2 h" N* r. ]2 B- b# s   end1 q# z- t. z6 F7 y+ [/ S7 K$ |& F
end
) e* Y2 f4 A' y6 s& I; i
$ q' G- {" W; S$ [* q. f
begin P_mA_clean arriving- b  P: G- L7 x9 G. O
   while 1=1 do3 a5 |6 x, ?' p7 K$ Y- K, ^  h- }0 u. x
   begin
9 ^2 b. C' Q( R$ O   wait for 90 min
% H& t' U: v3 G( L; K/ f   take down R_mA) j* a* V& m. [1 z$ V% C
   wait for 5 min! p7 S" w" O. U3 v0 I' V- n
   bring up R_mA
" G, _0 h3 C5 {2 m( F   end  m( o6 z" W; S' j
end

! [" Y6 U: W& E4 V) q2 a/ u! a / |. p: s: [, Y% A2 W6 v0 A
begin P_mB_clean arriving
1 K0 D" w0 ?; g7 \   while 1=1 do; r0 ]+ x; j4 e" X& m4 F# V6 @7 {
   begin- F2 V9 W/ p) d( H- F
   wait for 90 min6 [+ r9 v7 w8 Y( x+ J8 ^
   take down R_mB
1 o& x' @* N; Q+ s   wait for 5 min5 d" e+ u( \  U! h3 N) P: V
   bring up R_mB  X# a' |7 u+ p+ g# t
   end/ m9 @4 A" v3 l6 L/ m
end

7 B1 l. K+ s. W* d1 g$ ]! K7 X6 Q& s / `' L% z2 [. A: M
begin P_mC_clean arriving
4 {4 @* X1 v( ]2 B( J8 N( i6 P   while 1=1 do4 \% q8 F$ s/ i2 z% h* v
   begin
- k+ y# |9 j& G5 p! a: b5 R   wait for 90 min
6 b5 D* E" Z- N8 {! Z0 d   take down R_mC
* b0 W" E: D1 e' _4 V   wait for 10 min; M; ~* n) A' d, \# j1 S) T
   bring up R_mC. n$ R0 S+ N1 K% z8 d5 [' B# n. Z2 g
   end
6 R! E/ L- L$ _9 K# dend

, Y  I3 |/ P4 _" v----------------------------------------
4 |. r# L4 I! b( S) }1 S+ l( o . V" b$ K$ Y3 ~5 M1 U' t# {
Exercise 5.9% W; L1 t) Q- ^: i: ~( J

4 W' O4 ]: \1 F7 N# \7 I( Q+ R! Y: [2 {
Create a new model to simulate the following system:
) p& d8 b" F( G" R7 CLoads are created with an interarrival time that is exponentially 7 r! W- \0 s. X. `
distributed with a mean of 20 minutes. Loads wait in an infinite-
8 T" U1 x& E' l7 Ecapacity queue to be processed by one of three single-capacity,
! t. k7 e$ p0 D% @; `arrayed machines. Each machine has its own single-capacity queue
! D+ u! G0 y8 K' I- l/ M& W: _where loads are processed. Waiting loads move into one of the three # j+ j* Q* k% D" |* ]
queues in round-robin order. Each machine has a normally
- b1 a3 ?( S1 T) S  ?+ M& udistributed processing time with a mean of 48 minutes and a standard ' E; `  w( ~' M+ F/ A1 o, z! k1 ?) A
deviation of 5 minutes.9 F$ _; T5 J3 R; r1 Y, L# q' T
The three machines were purchased at different times and have 8 M. Q+ r& f+ j, ]7 k, d6 ^
different failure rates. The failure and repair times are exponentially
7 t- A% x/ s! b" X, zdistributed with means as shown in the following table: * w/ `+ a2 @2 Y* [" N
Note The solution for this assignment is required to complete
' I2 j8 j4 Q- G3 |3 u, G$ Y& x8 uexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
! q$ I! z: l3 p$ @) N- ^your model. - c. i7 u7 l* N  G) @& M

% o  b1 P: h: bMachineMean time to failMean time to repair
0 d: N: G0 b0 P, w6 s6 S: jA110 minutes      5 minutes9 s; ~+ J; H6 y# L! r3 W
B 170 minutes     10 minutes+ T' Y* R% C; Q, D7 B. n
C230 minutes      10 minutes
5 E) e1 u, O5 A+ n
$ l: p. U& ^5 i; Q$ X8 k/ j; oThe machines also must be cleaned according to the following
" [1 k' @9 [" D7 Kschedule. All times are constant: ! v! q! f, q7 }- C: [
2 D0 w6 w6 A4 Y6 |4 {4 n/ C* q* ?
MachineTime between cleanings Time to clean
! C/ T  E' }4 D2 @0 ^( K9 t  A+ XA90 minutes        5 minutes( E8 j7 h: D& V  f+ d
B 90 minutes       5 minutes
/ p. B& I! z2 {, WC90 minutes        10 minutes7 C0 x" l' t1 Z+ d
# X& t' J2 C* ]5 ^7 K
Place the graphics for the queues and the resources.
& z- l4 Q2 ^2 _( t4 _Run the simulation for 100 days." r: p' V4 w. g
Define all failure and cleaning times using logic (rather than resource
7 D2 L- N8 @& wcycles). Answer the following questions:
% w+ i, q) [; G9 [4 n2 a" S3 ka.What was the average number of loads in the waiting queue?1 w# F* {: ^* e, O! |
b.What were the current and average number of loads in Space?
  J: \$ }+ A+ [! u5 BHow do you explain these values? ; \# Q9 @7 R* c& W; R7 f7 O

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
+ k9 }8 I9 o8 h) nsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)* \! d# t8 _0 V- j5 l! N5 ]
这行好像也不太对,各位先进觉得如何呢?
' e" ?# V# b5 ~+ Y- `
7 L) K# A$ x! l8 L* g% X3 Gbegin P_something arriving, r+ ?! Q. D* r* G
   move into Q_wait& J/ W1 B/ K  B" X0 L7 B5 |5 K
   move into nextof(Q_mA,Q_mB,Q_mC)
8 y& ]' J- U2 C% U   use nextof(R_mA,R_mB,R_mC) for n 48,5 min5 X3 b4 k* v8 z4 E! M+ {
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
6 F' r# X$ C- V! e- z; Tend
/ N5 m  s' m  ~; A; U) K3 [6 N
" ?7 a. O% U; g, {$ n4 O* L9 sbegin P_mA_down arriving2 w! O4 n% P5 d- Q9 y
   wait for e 110 min
1 B6 R) [8 b' V( C3 m. k4 t   take down R_mA
& v3 `* `* W: x+ D   wait for e 5 min
8 }7 ]% G, ^3 }# S2 ]" C* F- Y! E  ~   bring up R_mA4 n; `0 S+ Q7 ]4 q7 f" {) M
end- R& A' r( M# K

1 \' u( O! I: s6 x; D7 F! Zbegin P_mB_down arriving- b  v% u' Z. }+ E  e
   wait for e 170 min
' l" I0 A. I& y8 p0 N   take down R_mB
3 e" f: n9 c3 g   wait for e 10 min8 @; @6 l  i9 Z
   bring up R_mB
; F& u; U0 m& A9 q' B% B( Send
. k! X$ A' s' R) Z$ G
) V5 c6 n; d1 i5 sbegin P_mC_down arriving
! ^6 s  R9 N* A   wait for e 230 min
( q1 Z( f8 |9 o9 K+ M0 a   take down R_mC
. g" Q) `5 {: w* k6 [   wait for e 10 min1 j1 O+ ?" Q1 w* w9 q9 h4 B( Q5 b
   bring up R_mC
: P2 @0 X+ L* m0 P6 E' lend
. C5 |: u& q* \0 w+ Q+ m
6 K7 E: _0 d/ @8 Kbegin P_mA_clean arriving
# s" e% M/ V6 S  S   wait for 90 min
8 w3 z" h- `& w( Z4 n7 C   take down R_mA
- p& Z* |8 u: r! B   wait for 5 min" e0 A* Q0 M# I6 j% I% y
   bring up R_mA
' B5 v: N1 w4 Z* |end2 `2 G0 s- @; m8 r/ A

* d) A  m+ R( a$ R3 L& gbegin P_mB_clean arriving) O8 D* l& J* z- i4 P4 W
   wait for 90 min
9 n8 |/ O/ Y9 ^( b7 o   take down R_mB+ o2 R2 a0 _% U5 _, s6 j
   wait for 5 min$ t  k! N! @! D; d) [
   bring up R_mB; U: M$ H) t/ \
end
* }" V6 F( x, F* H( d# y; ]( s! |1 o% Q
begin P_mC_clean arriving
2 g: [/ x3 c: c! K0 A   wait for 90 min
4 B* m: u6 e6 z- M- l, c   take down R_mC7 p3 H& o# a1 F4 d) k. ^
   wait for 10 min
0 r. I. m0 W3 Y, M2 B7 c( w1 ^   bring up R_mC' K% Q" x- z' j" g" j- s. \
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
' J" N1 l7 x: E1 O6 p   move into Q_wait
" |+ y, w, p2 X/ D' c  A$ [0 U   set A_q to nextof(Q_m1,Q_m2,Q_m3)
) E! O# b) ?" m& O2 V' [   move into A_w
. v. {" d* n8 ~+ u   if A_w=Q_m1 then use R_m1 for u 48,5 min
* w* @' M$ G, x0 s   else if .....then use ....for u 48,5 min$ P# C+ H7 D( O; X: X
   else if .....then use ....for u 48,5 min  
3 p) A2 B1 o& K   send to die( h2 g5 G8 ~" ?/ m- p! \
end) |/ O* x& q8 Q0 Z/ H

8 o" X3 _1 p- N$ z" e& s$ G* X: A供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-9-10 12:56 , Processed in 0.020379 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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