设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7202|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 6 F0 b8 L) H8 X0 S. s, o  n

, Z( B9 q! s  M& [* p* ^底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
2 b% b9 t% F2 V0 C1 H# L
* x1 T/ f' w1 Y5 h) k8 `+ M不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!5 O/ i/ b+ Z0 g/ d; k9 C

8 Y  J8 f0 m. u: S/ `, e2 @6 b- M
--------------------------------------------
% B' I: i; d& N2 E. h6 nbegin P_something arriving
" x# r2 n' }/ u1 n* T/ Y( w   move into Q_wait
0 ~; a  X' Q1 R8 ?- q& \6 H   move into nextof(Q_mA,Q_mB,Q_mC)
0 L5 K* r6 Q* G1 [6 |( ^   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min6 K" Z8 e  V) [8 L
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)3 t4 E+ @8 K, ~9 `
   send to die6 R: c% l. t$ R4 N* g  V% j
end
5 ]: {1 K9 S0 H$ W, V- I0 y' r4 J* d, b
) c& `$ r" J0 B7 }/ Z: a
begin P_mA_down arriving
6 E/ N: Z, g0 e( \/ R4 U7 B   while 1=1 do 0 b6 |7 Q# R8 d/ @
   begin. U. |! q5 Q; [, V
   wait for e 110 min
9 }2 E( Z  W* p8 }. ?2 q# ~; d2 c   take down R_mA
) D" o+ J6 P6 `* s   wait for e 5 min
5 f) w( T5 t$ _' G3 _   bring up R_mA
! A& G0 O0 D% `( K5 V  |   end( X3 ^  Y5 H# ~! t& D
end
1 f2 J& [3 ]" G+ |

! W1 o* T7 [: K6 N* M. hbegin P_mB_down arriving
4 e& L3 t$ c/ u4 \' F, y+ X  q   while 1=1 do( b1 r$ ~! h1 J( ~
   begin
' W9 J8 ^+ R8 I. B' g( k8 f1 F  e6 N" i   wait for e 170 min! Z  J& a  n! s# L5 n2 S" w( {
   take down R_mB
+ C8 E; h& F: f/ r9 Y   wait for e 10 min$ e+ L- b  N4 z  n# q
   bring up R_mB
& l' \9 O& C5 }* ~% [* R  B$ e# g( ^   end
  ?# N5 k* s, S4 Y+ _4 l8 e: [end

, @: x1 P( y0 P" ~) T 0 g) u, F( A+ p8 K& l; N- m! \+ r
begin P_mC_down arriving
/ N, |( D( [$ Z# V9 c  ^! |   while 1=1 do
3 M& j1 C0 p6 f8 B   begin
% d  E+ D8 }/ k/ _: ~5 s   wait for e 230 min
$ L' r8 S/ |" T$ V2 S   take down R_mC0 \6 I8 J, a. x" ]' S
   wait for e 10 min
$ B$ m4 d5 d3 F; m  |   bring up R_mC* v. R, s/ Y) ?, E4 \
   end. X; l8 [5 @$ ^: }
end

# r* q% W) R" B
8 n" u; r/ m: r) ebegin P_mA_clean arriving
) @4 B4 L4 d- X3 d4 U/ a   while 1=1 do
4 z" R! m" g+ A2 R# D/ j   begin* ]; H, M3 n8 Q( H7 z. P  C# \
   wait for 90 min
- t( x* ]& }; F  k9 q9 ~6 p& \   take down R_mA- ~7 g6 ^9 @1 s# K
   wait for 5 min
0 V2 \9 A6 \% t, P8 e   bring up R_mA" f' S1 w& Q9 V1 w
   end
8 Q6 K& F9 l; b# I- G, Fend

, \3 i, F# X3 @% E6 w 9 n# a& J1 G; b6 y, b" ~
begin P_mB_clean arriving/ |) u! e& B7 w9 Y
   while 1=1 do8 Q. B& z3 Q; v
   begin
& ^! H" ]7 {1 |5 O   wait for 90 min
$ ?$ ~) O1 Q- \  l! c$ W   take down R_mB5 A2 P: a3 ^/ l( X0 l
   wait for 5 min
0 W+ h, ?# C9 @. C# @- Z# w2 T   bring up R_mB
; z5 M0 i4 K: T   end% h  m4 z" A, ?; O
end
, b9 R5 k& ]3 u& W
. D/ G/ b, n* P& ^) p- z8 y
begin P_mC_clean arriving- [0 f8 T/ L# c0 o" ~
   while 1=1 do
2 o$ H" V8 B/ H7 e# {   begin
' o* V  F9 i5 q2 a( [& a* ^$ w   wait for 90 min+ E( R4 s/ M. ^
   take down R_mC# l3 Y7 t/ s6 a3 B0 _# S, v! T
   wait for 10 min% ]3 K7 o# x% o8 m3 y' S( F
   bring up R_mC
/ ~2 ^, J6 V% t   end3 W* i7 i; V. K$ _$ s3 Y
end
+ S3 L- r5 I, U  P2 l; g
----------------------------------------# w5 c! w" r: X7 U
6 s, j- N3 }* r& Z. h$ v
Exercise 5.9& u; E* n0 [5 e9 z$ p0 }% r) t) _

/ C* B8 R9 S# W9 e# J6 t6 E$ i. Q4 Q' E- r, F8 {
Create a new model to simulate the following system:  O9 J: Z3 l" A, ?# }
Loads are created with an interarrival time that is exponentially 3 {( t  S8 B% `7 \2 }( F$ r1 K9 L  W
distributed with a mean of 20 minutes. Loads wait in an infinite-! @6 x9 e' x7 N5 t$ a+ a3 h
capacity queue to be processed by one of three single-capacity, " u5 G% x/ x# A" V
arrayed machines. Each machine has its own single-capacity queue
) O; Z8 p$ K. Awhere loads are processed. Waiting loads move into one of the three
9 G$ V% i( ?3 nqueues in round-robin order. Each machine has a normally
* J1 I# x; \4 N5 ?& Ndistributed processing time with a mean of 48 minutes and a standard 5 D4 f# A. q: c, [0 f0 g/ o
deviation of 5 minutes.
# j) J! g9 R3 E% `The three machines were purchased at different times and have
6 s% V# B# Z/ e0 bdifferent failure rates. The failure and repair times are exponentially
' ~9 s: T1 r# Edistributed with means as shown in the following table:   o( B8 @( }9 R% x( {, E. X* D) w
Note The solution for this assignment is required to complete
+ f! _9 s9 D4 T' }$ Zexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
) w2 Z" ]9 I8 u. I( i  Eyour model. ' f/ h5 A' l6 t1 Z, n3 r  }
! O9 }3 G' ~& Y5 s, d7 j5 w
MachineMean time to failMean time to repair5 }8 t' F1 ~. ]6 E9 j& a
A110 minutes      5 minutes/ |) c9 d: }2 s& x
B 170 minutes     10 minutes
$ S8 E. q4 w; I% uC230 minutes      10 minutes2 h* Z# S8 S+ E9 o3 V; G8 Z0 t
4 \% I4 }% J: {: x4 p1 L# J) ]
The machines also must be cleaned according to the following
8 _6 t6 h& x1 R0 M$ H8 Qschedule. All times are constant:
0 U3 O2 ~5 }7 ^9 S2 ]5 `4 t2 w2 S8 O. d
MachineTime between cleanings Time to clean7 N& A$ a) }: y) `
A90 minutes        5 minutes
- C, M  c* E; W/ I$ l1 xB 90 minutes       5 minutes. w1 @3 z7 P4 y8 _' b9 s
C90 minutes        10 minutes
& Y4 d4 I& O) M3 N" _8 s1 x, ]: |: H. r7 ?4 I5 J+ g
Place the graphics for the queues and the resources.
: Y) _  [- f3 U& n* |9 `- g0 ]Run the simulation for 100 days.
; A; N1 k4 y% }% W, c* j+ }Define all failure and cleaning times using logic (rather than resource 3 I8 k. N# i% z
cycles). Answer the following questions:
2 g6 C( Z. j( M3 o' Z3 ha.What was the average number of loads in the waiting queue?
" m8 i/ U/ Q+ Ub.What were the current and average number of loads in Space? 4 A7 u2 `) |! e! K3 M+ X, d
How do you explain these values?
& d  Q  q$ K: W, Q# g8 e- J! ?

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
  M2 U9 T3 z% W3 O3 O- l6 n: esend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
0 W% _" t6 h- e( i2 v. t" z这行好像也不太对,各位先进觉得如何呢?. S6 ~* l- k8 O" M; |9 G7 H: V

0 M& X/ b; J! }: s  nbegin P_something arriving
  U/ V" v; v, H! U   move into Q_wait
1 A4 {# S0 t& a0 F5 ~' v   move into nextof(Q_mA,Q_mB,Q_mC)
1 S( q: z  w- _" c8 F; f   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
% b# |. [8 F" Y1 i: _1 X" e8 W   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
! G! ]3 f# d  M, t1 n! ~4 k! ]end
( g) L/ @0 D+ [. R% V( G6 |
1 Z. q0 B; m# C, `8 k# F7 Bbegin P_mA_down arriving+ ]2 `7 h+ C4 t) R/ V
   wait for e 110 min
6 ~8 V4 H  A" o/ N   take down R_mA! M" z9 y( J1 Z# A/ |
   wait for e 5 min
9 m' B5 c+ y% L1 \   bring up R_mA  w- }2 \5 j9 }; [) c
end- E8 ?% _1 i6 n
7 b4 |& a, f- A/ R# G' L
begin P_mB_down arriving
/ h4 ]: u; D" a" O) ]" g" [   wait for e 170 min" K6 Y) ^1 F1 Q6 H) h
   take down R_mB9 g# a7 b; q6 q
   wait for e 10 min4 P# P5 J$ l: P' I+ t- V! c$ {
   bring up R_mB2 G: J# f! S7 ~; S/ t  N
end( b, J0 F: [- Q8 Z- h4 l
: w1 t6 z1 K" R$ m9 A% [
begin P_mC_down arriving5 i+ S+ b; V% o1 U' H% o. V" [+ a
   wait for e 230 min
! z9 l7 G- v/ S# |% h   take down R_mC
" K3 U& ?8 ^  g  M# }  u' p/ w* t   wait for e 10 min
. T2 a) H- `" o7 `   bring up R_mC- J3 }8 Y/ N/ Q% q1 m
end6 O! `6 m+ v% p) C4 d- y/ Z

; R6 X; b, @+ r3 gbegin P_mA_clean arriving( i+ p0 z; B% c! j9 {9 ]# r
   wait for 90 min  X9 _5 O1 l8 K) T8 ^. p* w
   take down R_mA0 e3 C  t' N; O( j, y7 l8 o- M
   wait for 5 min
% C9 s- v' }1 J$ q( s, E   bring up R_mA
( ~! L( i' b5 ~* R6 d, wend* {9 c# N4 r' i0 V
/ A2 `; R' F6 H" {. f
begin P_mB_clean arriving
) G9 _9 f6 H5 ]. u* @3 z) q* p   wait for 90 min
, I# G1 g: ]4 H3 Y; w5 l   take down R_mB
; J$ X% \( F0 ~% m7 C5 m5 b/ r   wait for 5 min1 d5 @$ q5 j; h$ n+ V- z7 ^9 g- I
   bring up R_mB
/ T8 k% F+ i7 f& n& r( Z: P0 A7 Aend
0 L; b: B0 p- o7 X( m- u- n
3 R: G. Z2 u' N5 @% ?  Z5 A7 nbegin P_mC_clean arriving6 K4 Y! R/ _1 f8 P
   wait for 90 min/ ]& H' L" y- D# W  j2 _0 h( B
   take down R_mC# F) l5 [. t3 Y+ `
   wait for 10 min
7 }1 K" |9 [8 s1 [( E   bring up R_mC& v/ G2 i/ h0 p5 z7 m' [
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
! v" r" b% z' E' f* J" J5 x0 g   move into Q_wait
7 {! o) u, m! S   set A_q to nextof(Q_m1,Q_m2,Q_m3)" u2 e3 }: ]" o4 h4 g
   move into A_w
0 h7 l  U# ~9 i9 O% [   if A_w=Q_m1 then use R_m1 for u 48,5 min
. u( D1 C: S) p4 A   else if .....then use ....for u 48,5 min, B* \/ h. d8 i+ I) }9 N/ _
   else if .....then use ....for u 48,5 min  2 u* d5 d2 K( R0 r; w, G
   send to die
0 z; M4 S' ?! y& o, H8 p5 fend
- n$ C! J4 i6 ^" E5 r1 [! T/ Z- q  ~; Z1 v* ^% Z
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-14 22:41 , Processed in 0.013428 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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