设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7291|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
+ [& l0 @: b, b; P0 Z0 G4 d, ^+ V8 _+ R6 v
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去4 Q- C' n! F' U, \3 X
# ?+ B( w. o0 U
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
6 m+ S9 i$ m) C5 i( E, I9 V$ U$ ^: W( Q% a0 z& J% g
--------------------------------------------$ G- @' {, }& l
begin P_something arriving
" `& v1 d4 T; x- v# j7 f& E   move into Q_wait% W% e5 W, H0 F" i. ~
   move into nextof(Q_mA,Q_mB,Q_mC)
* r/ v0 j7 l3 V- U   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min  H2 @* }# b+ s4 v+ e( x
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 c! K8 v+ c1 M   send to die/ q& x- p4 t8 P9 c
end
% ?/ W% P$ H4 N2 M1 N

- [: A' n9 s; O5 @; w. ]( pbegin P_mA_down arriving
9 E. O9 m" A3 p2 j5 s   while 1=1 do : m6 f. ~/ d$ _  A
   begin, m% Y0 ^& x, d0 h! h- G
   wait for e 110 min: G! s  v6 m; \
   take down R_mA
9 ?4 q( [1 Z& D% i   wait for e 5 min8 L  J, j& _8 F# F6 e
   bring up R_mA
1 Z$ j8 R" y* v- Z) w( E   end
+ D- h$ z- {/ @; Wend

: y: K& [/ N$ H
; p' [+ |$ K3 |begin P_mB_down arriving8 J" A! }/ |. U1 J
   while 1=1 do- F5 p$ f4 t8 w. H! z6 Z
   begin' }$ |0 R3 m! @& ]0 l1 v
   wait for e 170 min) I& i  l5 L7 r
   take down R_mB1 X5 S( n  Q0 T8 D- G, S3 O
   wait for e 10 min1 T$ |9 p- [, y2 d; C+ L
   bring up R_mB* U2 }2 z7 l7 T9 O* @; H
   end
8 h" c! c/ ~* w& Xend
4 e* @, a; k7 D5 t. l; v, ?

1 N& z% M1 ?. F2 l' ]* a$ }2 qbegin P_mC_down arriving, Y' N. }4 k' n6 J: q
   while 1=1 do
% p7 u: j' b# L   begin7 ]/ ?4 C. g% ?/ w$ k  C
   wait for e 230 min
% R9 X$ h0 `& @) ?- c   take down R_mC5 i4 n5 P8 c/ _3 w, n
   wait for e 10 min
' {2 ]3 i1 ]+ }% s7 n   bring up R_mC
" [% ?; L' J& t8 @5 e  Q8 V& V   end; I' W) d8 c" K8 L  n  b6 y
end

/ @* I" |: Z  ?( m. a' C) T/ D9 T
$ f3 L# f+ R0 D6 k& O$ O" qbegin P_mA_clean arriving
! |# u0 T2 N! G2 x! `   while 1=1 do
, z4 B$ v  X( y2 y   begin
0 a) ^& @' Y  U$ Z   wait for 90 min
  B) Z% W8 p8 @9 p8 b   take down R_mA+ D, i7 |8 }0 |; \% s& W& C+ I) K- G
   wait for 5 min
/ m0 I( B4 v" j$ J/ n2 P0 B   bring up R_mA* x" B* @- B7 f& s. l- B' v- C0 |3 j
   end
; f7 n4 q% b1 _1 G& Z6 A3 w; L# _end
2 A( ^; q- }" b4 x3 d

3 b% f( ~+ W* |1 C( |! sbegin P_mB_clean arriving! R' X: z5 A) A2 ^0 U- q3 h
   while 1=1 do% n  z9 K7 e2 M3 `) {( A
   begin
/ C! q3 g) a. W0 j+ Z9 V. W   wait for 90 min3 @" N8 B+ N$ J7 @( k# T& L. v
   take down R_mB8 C' {) U9 h/ S
   wait for 5 min2 E+ x% H4 `, t5 A* C3 _  y- w
   bring up R_mB$ `2 t/ K4 d7 {+ ^8 M
   end
# F* Y! s$ O% W3 N6 k& aend
2 F* z0 E8 L! H( B
9 ^) z7 Z# ?2 j( K( U" N
begin P_mC_clean arriving1 Y) I5 `# u% X6 E* }
   while 1=1 do2 V, o5 b2 z. d  J% u8 \3 e
   begin: l4 a7 f, ?* V+ H+ {. Z6 u0 g: G
   wait for 90 min( S7 \: i8 m, t1 W& C1 p5 N; Y4 U
   take down R_mC  C4 |0 [* s/ W8 @5 {) z
   wait for 10 min& l1 s! t1 y3 c/ J2 V
   bring up R_mC
+ p+ S  v6 w# x6 l( D# @( T2 Z   end
/ }) |0 a9 J2 Fend
3 w# s2 W7 O6 N1 u, q  L
----------------------------------------& l6 M0 n. x' M2 ]; B; x

& e: }. Q; y; [, T9 C, X' rExercise 5.9& q! O: d6 T& C. U. P$ k* G
) q; g- _# I' g2 z, J( v2 \
$ ]# ]/ k1 b$ Q' S, R
Create a new model to simulate the following system:$ h: [' W' ^  s" g8 Q
Loads are created with an interarrival time that is exponentially : d! p/ _1 p# ?! m
distributed with a mean of 20 minutes. Loads wait in an infinite-
/ o0 T3 Q6 |! V: t: q) I& }7 M. pcapacity queue to be processed by one of three single-capacity, 4 w- B; h9 A1 I: K
arrayed machines. Each machine has its own single-capacity queue
( a1 b* l+ R. l1 n' }! a2 Xwhere loads are processed. Waiting loads move into one of the three + }4 r+ f" a% |) T$ t+ Q' B( N
queues in round-robin order. Each machine has a normally - Z0 H6 e* M. r; L3 E( D
distributed processing time with a mean of 48 minutes and a standard   i6 Y" H; t5 A8 {) N1 X
deviation of 5 minutes.
7 B- }+ |" J" O7 d1 Y) CThe three machines were purchased at different times and have
2 @  ~- C* l1 d. p$ ^& Vdifferent failure rates. The failure and repair times are exponentially
2 A, s- i: y( ydistributed with means as shown in the following table: + \- k7 o* P& h
Note The solution for this assignment is required to complete
  a- ~0 I% M2 `* C5 ~& q) Vexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 2 v- d2 ?" ?5 J9 m3 p1 ^
your model.
8 O5 H! ^" v7 H# R* d9 n7 C
$ o& H/ k5 x9 n' O5 HMachineMean time to failMean time to repair. Q6 x; ]$ d- y+ l9 b3 v/ p
A110 minutes      5 minutes- S& }! P  B6 e6 r* E" t
B 170 minutes     10 minutes
9 [+ ?# [6 F" F# DC230 minutes      10 minutes
$ x2 [# m* l. I# N: e8 R' D' h  z7 `- o+ H% y
The machines also must be cleaned according to the following
; c9 p( ^" C/ i+ O# j5 h4 B# [schedule. All times are constant:
! }9 {% d$ e; L5 t8 a. @9 _# Z4 E; H9 n8 x0 }) p
MachineTime between cleanings Time to clean0 I8 `9 k, }& y% j% I
A90 minutes        5 minutes
' z8 W/ p& V- I. J; ]) E) nB 90 minutes       5 minutes, B( }3 O0 h# f" U  p
C90 minutes        10 minutes
/ `) `1 i& t5 N& _  \9 l! E8 b, v+ F0 ~2 j8 i* A5 Y
Place the graphics for the queues and the resources.
4 J& p7 P% C' @* eRun the simulation for 100 days.) ]3 K9 J0 d7 Y6 F9 O2 K
Define all failure and cleaning times using logic (rather than resource 6 ?5 f& H) s; V
cycles). Answer the following questions:2 o" O5 f& y8 E, k9 T0 F  ]; H: m" j
a.What was the average number of loads in the waiting queue?
# g  t6 b6 M, k& [/ W8 v, f4 K7 s# db.What were the current and average number of loads in Space? & U! r$ N% d* @0 O: _. l# s0 Z
How do you explain these values? % R, x/ S1 I6 Z

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉! H3 ~: D5 f# l) n; e' u
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)" k8 l  H# K# z
这行好像也不太对,各位先进觉得如何呢?
: l2 `* f- X" K4 W$ i
0 a1 ], K$ e) I5 tbegin P_something arriving& I1 j3 [' {, y  G
   move into Q_wait
4 D9 x9 u7 k$ G   move into nextof(Q_mA,Q_mB,Q_mC)
9 ]; j" o( P* I& m: u+ H& p7 X   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
; G6 t, h! M4 b+ Y2 [; F   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
; o& d$ n0 Y7 T+ Pend
" d6 J$ F# v( }: }) B; x5 T) {) w' [5 i0 {0 [" S
begin P_mA_down arriving
7 t) j" B- M% |4 o8 ?   wait for e 110 min$ e+ R' ~+ I0 y% e2 v6 M
   take down R_mA
( d( j/ q/ V) l; h6 h8 Y; H: @   wait for e 5 min( A! R' S9 K5 [) E7 p2 w
   bring up R_mA4 ~- T6 h* \) M7 e; i0 o9 ]. p6 K
end
1 n0 I9 Z' E6 F2 k4 L. `( p) p3 [: G, Z$ y* ~5 J
begin P_mB_down arriving
4 C  L9 ]+ w7 Q8 q+ {9 S   wait for e 170 min
; k2 y5 r6 _: {  }- l   take down R_mB
+ K  s8 a- q3 z! ?/ d& B8 \   wait for e 10 min7 T4 j6 o4 S. J) l  ]! p
   bring up R_mB/ v" k& P; v1 S
end7 T8 k) M- s1 L# ~" M
# p6 p$ k' K, {2 e  `8 |
begin P_mC_down arriving
- j" b$ f* `, [* p( F# W) T   wait for e 230 min( v* g* D: M7 S' e+ J9 j3 `8 C1 [
   take down R_mC, H6 J2 @" _& P$ I% _: U/ [
   wait for e 10 min2 e3 `7 U6 {# {( e7 c% @/ W# v
   bring up R_mC4 l% ]6 g2 A. U
end# M3 T, W$ L: n/ G

$ a) V: m! z/ H1 J. R% U2 }  nbegin P_mA_clean arriving
/ \4 p. M. h  {9 m9 |  R- z   wait for 90 min- d. W4 c$ A' j% e
   take down R_mA: w% Z  ~2 Q, J' e9 S( J
   wait for 5 min
! m. T+ k7 R  T# {   bring up R_mA* T+ Y- e" r$ j/ a1 \
end
0 s  d+ a- A( h; R% C# r: l' L3 x
/ A  h: y9 u9 O, r* ]& l+ ^% Obegin P_mB_clean arriving
# `. b$ C2 L0 ]   wait for 90 min
0 @; O2 T1 E5 F2 t+ t" f   take down R_mB
9 ^9 T6 a# j  T* y1 d   wait for 5 min4 l# M! q5 n  P6 G0 h- S- @8 ?, c* V
   bring up R_mB
9 `4 _# E& ?* ]  h" nend
- P0 A' S9 ]/ K# S6 p5 b6 |6 I! `5 }; X7 l( P# A' S5 d( g0 [6 [( B, {
begin P_mC_clean arriving/ g( K7 Z: |# ]  l) Q; Z$ x0 g2 X, ]; a
   wait for 90 min
7 m8 i  q5 P5 R, {/ M   take down R_mC
3 e5 G+ {7 v" I; T: N+ |4 Q* c   wait for 10 min
) v( b$ C9 u' o5 A% ]8 I  v   bring up R_mC
; z5 v7 Y# r$ b. e4 ^( n6 r6 L. Cend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving: O4 M1 j0 D9 }& e  e
   move into Q_wait
4 t2 S8 e9 v: G   set A_q to nextof(Q_m1,Q_m2,Q_m3)8 ~3 f2 d! m9 x, f! ^+ z
   move into A_w% \4 B2 y1 U9 T5 ^  x9 J" {
   if A_w=Q_m1 then use R_m1 for u 48,5 min
" @9 q7 E4 j! F$ W   else if .....then use ....for u 48,5 min0 W! M/ w4 C8 {* }/ c
   else if .....then use ....for u 48,5 min  
/ [: L$ k, \1 R  D) Q# r  K   send to die& Y' \! E) d% n% d8 v/ r
end3 H( S1 W; D; H# E% [: H

# n+ p7 F, c" G  a供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-26 07:15 , Processed in 0.014132 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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