设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8072|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 - d; w" ]- I/ T3 T
! J! J/ J: _4 \1 E" P* s7 Q5 }
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
1 N7 @1 d  B5 E6 p
/ J( _! t+ d0 F* Y不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
0 R! v8 i! R* }( |# u7 \1 [& n3 N  |8 f4 h% @* B2 v
--------------------------------------------4 E, Q9 L0 n; k: f5 f
begin P_something arriving
1 Q0 B0 f/ g: N; ^6 G   move into Q_wait" g  `+ ]0 H# ]- |$ p
   move into nextof(Q_mA,Q_mB,Q_mC)
" C3 y0 w# v8 J& X: Y) v+ [" V0 B" }   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
8 ?0 I% N! l+ q6 F* [  ?! U* c   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)( m/ d! g8 i0 O, r8 S; v
   send to die' {8 n0 R; I  w3 p: q" l
end

9 o5 e5 V- }$ Q' O " _  Z% m2 d. U" Y5 K0 L0 O/ Z, E9 x
begin P_mA_down arriving5 l; n# @4 u! c1 p0 j
   while 1=1 do
8 I& s/ G$ ~: M6 H; F   begin4 K6 ?- {7 N$ h. j& N8 j
   wait for e 110 min
* R! K6 E6 [7 M- H* e& Z6 T0 g, m   take down R_mA, Z) m' V9 M8 W4 k
   wait for e 5 min5 c* a7 ]+ ~- i9 D! o
   bring up R_mA
5 ?/ l5 H. s! S- M   end2 @* N1 U7 m. D
end

" p# E" j; X/ i/ @1 D$ v   ?! E& J" Q. I0 w; D
begin P_mB_down arriving
6 _% D7 b- U( H+ ?  l" o   while 1=1 do
! z8 O. r- ]- t' R1 A. c; [   begin
$ c" @4 v5 q9 F2 M/ h( w/ R   wait for e 170 min
  {/ F0 z8 o% d; I* k   take down R_mB
4 z* X5 f$ M2 q; |- [   wait for e 10 min
9 }3 C  A, k6 K+ K' e! S   bring up R_mB
0 \/ y3 O0 b. e$ ~0 F/ Y   end0 a: \& \4 E' w) B  K, V0 k
end
) Z) }1 V' i2 f( i
1 f+ L7 z# I1 T1 ~5 o0 \
begin P_mC_down arriving
  @  [$ J3 ~6 |7 @' `2 Q* X& J   while 1=1 do
+ |' D3 n3 C; m  X5 r" i   begin
* j0 v( h2 F7 y, l" o   wait for e 230 min
; h. Q+ h0 Y% [& \' i- `' P& i, T' ~   take down R_mC
5 ]6 v: u3 i0 G2 p8 F' Y! p+ F, P   wait for e 10 min
; @4 N+ H7 D! t2 J, j6 f   bring up R_mC- [( P' s$ B$ t- C$ V  k
   end- @' `/ S- H2 s* `# f8 P4 j
end

  y8 Q4 t: f/ F, w
: i9 j0 m& j$ xbegin P_mA_clean arriving; a6 o/ C. m/ c- s3 l/ E
   while 1=1 do9 d# M' a7 d3 i: [! X6 z; o
   begin
6 V# X& r" L9 @1 }6 G: [' [% U   wait for 90 min$ s0 y5 _8 W/ ^+ }" y& X
   take down R_mA
: V, z; o. C& b5 T3 _- T   wait for 5 min
* Z  l% R0 @# U* r& `2 c   bring up R_mA2 Y1 d, W# d: U6 W6 ]
   end; B* F' A- d: K. K' |
end
5 V# I4 \7 N' G

/ N% L7 b1 W' s) W- `begin P_mB_clean arriving
  F4 z& S0 D: S( x$ m( n   while 1=1 do
+ w, R3 W; R% U! H0 J7 P   begin* j8 B7 K( p, p  O
   wait for 90 min& j, K8 D4 E, h6 w$ f9 ~# f) H
   take down R_mB0 ]' s% p$ @+ f2 H1 E2 \
   wait for 5 min* \8 z# |9 n- T  R' v; T; T% U
   bring up R_mB
% f* c9 ^: D$ s3 g  [6 p/ z% |  W   end/ e8 I& X. |6 l. B
end

' ?0 o" u5 Z  T- [
) v$ ?8 t$ y; K( J8 ybegin P_mC_clean arriving
: n( f7 z0 N) f1 u) q   while 1=1 do' m1 H/ e8 P/ P6 n
   begin6 ~' z" A  w% H2 D. I$ J$ n
   wait for 90 min0 B% M' w( D- p
   take down R_mC) B3 e6 R, N' u% B
   wait for 10 min* a% J$ C: X+ t# ~) f5 c) I$ `2 s
   bring up R_mC
9 `: _, g7 j. D7 V" {( R   end, N% D6 D. D  q7 X
end

2 _9 g7 v1 Q- ~; u5 z5 z! w----------------------------------------# l* |3 ~; g3 z2 A% i1 `$ ~
5 Z/ t9 o" N6 y1 D9 K- S% _$ q
Exercise 5.9
( H7 C- Q/ l2 B4 d; N7 ?
6 N! D% h8 n* c1 A: t$ O- A; e! ?# i
Create a new model to simulate the following system:
+ a* I$ r9 ~! b2 m, g* yLoads are created with an interarrival time that is exponentially 4 C+ A7 w7 V/ I* l* {+ P) s0 x
distributed with a mean of 20 minutes. Loads wait in an infinite-
- ^' Q4 q; E. K$ Zcapacity queue to be processed by one of three single-capacity,
6 r" p" ?; p+ `7 Tarrayed machines. Each machine has its own single-capacity queue 4 u5 q& T4 Y( m8 e5 Z
where loads are processed. Waiting loads move into one of the three 3 v  V9 |& V" a, T. ?# Z
queues in round-robin order. Each machine has a normally 7 w* y( f4 C8 S* |- M* f9 c% B
distributed processing time with a mean of 48 minutes and a standard , u! {) T6 m7 t! T6 V& r+ P
deviation of 5 minutes.
# H& W# I; X4 mThe three machines were purchased at different times and have / D: \$ V3 b7 P9 H# W4 B
different failure rates. The failure and repair times are exponentially / w5 K# N$ w5 A; U& W
distributed with means as shown in the following table:
# G2 m1 l6 A7 VNote The solution for this assignment is required to complete 1 O) b  G- Y7 z4 \
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
: o, ?& Y* w1 c' Kyour model.
$ |  w9 r% J0 I2 [6 c2 T3 `
. e# G: G! |% N3 k) {9 ^MachineMean time to failMean time to repair
( y4 v0 E3 q( b- |* dA110 minutes      5 minutes+ y. ?$ F- R6 ^, G: ]. v. P/ y
B 170 minutes     10 minutes
4 i5 x; @8 R; J1 T+ |9 ZC230 minutes      10 minutes+ Z0 y! t2 N3 D. h) O* n! o
1 {. A9 ~% Q5 a2 W' X2 l
The machines also must be cleaned according to the following
1 v0 T* P2 p2 {, P9 d3 V, G: vschedule. All times are constant: * `# O2 C( A( x) H/ [- a

# |6 h; K0 M% Z0 m* E6 ^2 ZMachineTime between cleanings Time to clean" z& a* y% k" R% f! m
A90 minutes        5 minutes: [; V& Y! p3 u  c
B 90 minutes       5 minutes  ^) ^  n) w5 U5 O2 Q6 P
C90 minutes        10 minutes1 p) \5 F( p2 x% F2 d- L
! n( u  k, s: D0 \5 `
Place the graphics for the queues and the resources.
* d5 d8 R9 d1 x) u, jRun the simulation for 100 days.' u( v9 t( z: h9 Z5 B! y
Define all failure and cleaning times using logic (rather than resource
/ U; B1 K# ?9 ~& }" ocycles). Answer the following questions:
: s1 d6 U& l% A% h5 @a.What was the average number of loads in the waiting queue?' M+ `- e, V& I7 {4 h  P
b.What were the current and average number of loads in Space?
2 d  g2 P9 w- o. H+ B3 B: AHow do you explain these values?
" ^- ~0 X5 Y  d

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉) F& K  O$ k8 |
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)  s: j' t% ?2 ]; r' v: J) w
这行好像也不太对,各位先进觉得如何呢?5 w3 f2 n$ ^) E2 X8 {! f3 ?+ ?/ O
  {$ g2 [8 B/ o! l( i( c
begin P_something arriving% N( g6 k+ Z5 L/ u3 H( U1 v+ N
   move into Q_wait9 X% b+ V) J! ?- M6 i3 r9 m
   move into nextof(Q_mA,Q_mB,Q_mC)
9 X7 h1 F6 Q- m7 @. D- J7 ]   use nextof(R_mA,R_mB,R_mC) for n 48,5 min4 L* S  u6 H  Z! d. ^; O$ [
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
; W0 e5 q0 D2 ~! v4 Oend3 w$ |) ]* H' M2 N5 M) _- n7 \

& `+ j7 `; U* D7 x: ]begin P_mA_down arriving- s* V3 C& B1 T  l9 ?, R
   wait for e 110 min/ o4 a3 X  G$ Q5 f9 `
   take down R_mA
1 w1 R6 ^* n. J6 |4 k8 _   wait for e 5 min! `- K& F7 `7 x1 K3 Q  F$ Q% e
   bring up R_mA' Y( A' e$ `) D) p6 o+ T7 Q- @
end
2 c: |4 y7 d* {! T: m% _; y+ h0 E; \: l
begin P_mB_down arriving
: L1 d9 ^5 w' C% U" ~   wait for e 170 min* ^6 G9 b& V, a' C
   take down R_mB
: V4 R7 {9 j# H$ L$ M   wait for e 10 min0 _1 q, ^# M; A% i* ?, S2 d$ D; ~
   bring up R_mB
/ }7 r6 {1 X+ ~% ]# l. pend
: \9 @/ m* \% W" B
1 f$ Q; c6 q9 Jbegin P_mC_down arriving
- x+ P7 Z4 Y. t7 p) L   wait for e 230 min
, I% z9 O% T7 V8 I: x$ |" k4 M5 L   take down R_mC! L1 |8 r/ S4 K$ o- m/ O
   wait for e 10 min: y+ ?; @5 G1 m! O( y
   bring up R_mC; J( k0 b" Z$ Y8 Y3 B2 ]9 p0 X* Z
end
9 H6 H( H4 Q$ C' w6 \6 t
; V7 ~9 W3 v1 c0 `; Bbegin P_mA_clean arriving
6 I3 J3 S$ R' t9 B   wait for 90 min
. V9 j0 u: [4 \; O   take down R_mA& R, H' ~' x1 C. ^; T9 k
   wait for 5 min
" _; |2 ?, ~) w/ ]. e6 h   bring up R_mA' P1 D& n. |6 N4 T# }% A$ c
end# \7 ]  x# T3 |/ i& L) M9 P
3 ^$ q/ l% T4 C6 T5 ~; s4 n
begin P_mB_clean arriving
/ F# s/ x2 g! y/ @( H3 B   wait for 90 min
) ~7 w, H# w2 j" V; O+ X% K   take down R_mB
! }6 ^$ j1 n/ C! j* y/ C1 L   wait for 5 min8 F# `/ z  _# }! @4 y! d
   bring up R_mB
0 z% D8 r& j5 O8 `, a2 Vend
$ h$ @$ X& F- b& i# F) k+ G' F, d3 z7 \( A
begin P_mC_clean arriving* i0 a3 [) l  r& \* T! ]( l
   wait for 90 min
" e. Q# G3 N( ^3 g, u4 W" z   take down R_mC# B) U8 t6 h& q8 J
   wait for 10 min
: m# f+ J. E- i8 R/ M" \; A   bring up R_mC
* a2 Z6 p# }, W5 m; c. dend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
& d# {3 N7 u' M0 I   move into Q_wait3 Y3 M1 ~4 K# C+ b+ R
   set A_q to nextof(Q_m1,Q_m2,Q_m3)/ k6 m6 }5 h& j  H
   move into A_w- P  Y, R6 ?. b' m# c3 j
   if A_w=Q_m1 then use R_m1 for u 48,5 min
5 r+ L% x5 S# i6 |   else if .....then use ....for u 48,5 min
. i, ~, _& g( O3 W% q   else if .....then use ....for u 48,5 min  ) F3 @2 d0 I6 q, O& \
   send to die
& p3 ~) M% Z3 H1 j& a% ^4 Lend  T3 L9 v6 C* J+ q
! D( ^% v- \  C& x
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-28 07:53 , Processed in 0.015266 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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