设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8212|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
" I7 B0 Q3 p9 e' S/ l% |( X% v1 M
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去. f% I6 B" L, ~" V
* `. n8 _- A3 j0 x$ v& E2 I; E  z
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
. q, b6 y- N, o4 E: \; [; @5 X8 I7 `
5 ?4 f! s/ ]* d, ^- _. m
--------------------------------------------% h- Y$ R' z- T2 d" F
begin P_something arriving6 T! g' f  _9 C) [
   move into Q_wait
$ F0 v; ^$ s5 V5 C* A9 w   move into nextof(Q_mA,Q_mB,Q_mC)
' H, E" {9 m) d! S4 E9 e   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
3 o: Y4 o) V: x   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% L; D$ \4 a0 L3 m   send to die1 d1 t9 V7 I9 z+ A$ M
end

+ H8 W2 [& X. B7 N / F$ C$ E& ]$ q, _) k, T- O
begin P_mA_down arriving
& T9 t) [& k5 D8 l   while 1=1 do
6 s( X6 |6 \8 a3 V% f' P- u! O   begin
' F# k2 v5 |7 }: a( K( I   wait for e 110 min
1 s3 P0 L/ A9 S8 r- w# {; P   take down R_mA
0 `  G3 d/ z3 ~9 F9 |/ ^   wait for e 5 min
3 H9 F9 \2 [* ]" C   bring up R_mA
! p" U/ w& f7 `) j+ o# A" }( T- h   end' _3 z9 }/ F: n) V8 M  Z  v' u; N, Z
end

! M9 {$ J: n3 j" I( y
# [% l6 b5 `6 s9 M: ~7 obegin P_mB_down arriving
$ B* P! g3 a( R3 s7 K   while 1=1 do# c, ?% G7 t  ?
   begin6 @! b9 R" o4 @  T& i" K
   wait for e 170 min
! c, ?1 W& K0 k( o- B3 ?! r   take down R_mB
/ S) U6 s6 M" @0 A: `   wait for e 10 min
  E5 p; v) Z" W$ z, B" E   bring up R_mB
! C! s9 H3 P* ]+ p   end
7 @  W- B8 A6 Pend

% O4 T: w7 m5 E/ g' m6 ` 8 `/ V% P7 k( q8 u  L4 R( _
begin P_mC_down arriving
" F* i5 J: N& w7 C; x+ R   while 1=1 do 1 N; \" h1 n9 y3 d
   begin
1 o8 U; H5 k! O# @' f- |   wait for e 230 min
' u% k( ^9 Z+ H. ]1 D   take down R_mC
' m0 ]" G8 [! H5 T; l0 _   wait for e 10 min, |4 y$ H6 ~& G! K/ @. ~
   bring up R_mC
- M$ R- Q/ Q5 o) u6 P6 g7 W/ Z" [% n   end
5 A2 ~, V  W5 w9 E3 G. V" Nend

) K" S- r6 {! h: I; f4 e& ]* ]. h0 x6 p, c) C 0 `8 X9 p; x7 x
begin P_mA_clean arriving
' g; D1 _6 f2 G( }; l: [$ b/ [   while 1=1 do
$ R' `$ }9 v. [7 g   begin
1 L$ H: G9 Q: T- a* i8 g5 G9 u   wait for 90 min
' c  l& `1 ?# u$ X- Q/ @' `   take down R_mA7 x8 I1 H5 a7 V* B7 E2 a
   wait for 5 min
( Z8 ^$ P3 c  I   bring up R_mA; w3 v6 }- `$ Y" E
   end+ {' u, o$ p' {& ]. `, D9 F4 l3 {
end

/ ?, {3 Z  ]% d* z1 i% M ; Z- d5 H  B* a4 y$ G9 o6 j6 B
begin P_mB_clean arriving
% v9 E, S) n/ B$ t* {/ H4 x8 k   while 1=1 do
7 f4 Q: j2 J- y# ?' B   begin6 V- C% J, M9 y+ E# p2 n
   wait for 90 min& x" ~7 b) B7 q' X3 r4 U  S
   take down R_mB
4 O* ]; I- I) f' Q   wait for 5 min
$ w, g4 `* n! z: h   bring up R_mB' ~* M. ?# T6 y5 w6 T
   end
6 p# M0 s! f4 p' N4 p5 W7 Send

7 }$ \: r; I4 b" J" z; H; {+ `0 Z* r ' w+ Z3 w% A% n6 t8 @. K
begin P_mC_clean arriving
6 q* b4 ~7 ]1 `/ g, S* d. K   while 1=1 do2 U! V4 t* r7 R, `. J8 E0 t
   begin8 g  ~" W- }% B# S# b  m
   wait for 90 min) b3 r* M( K( i' W
   take down R_mC
. p( [3 m# e1 X7 G- e3 ^' x- o) a1 B1 d   wait for 10 min( t/ V6 B( Q" ^" D0 D$ q. c) d
   bring up R_mC
2 I' P. X* K* @. M0 X# @   end4 s( B3 p3 O2 _; l; d
end

. d3 f* A6 d) g3 p. `3 Z----------------------------------------  B2 G% O$ ~$ c6 G1 b) D: A( v

$ t# O. b4 K: U3 c- s7 u' kExercise 5.9
+ G% D" g4 H) B' L% v
/ _7 M% y" M1 Z( ]5 [. b0 P/ `7 ?! U( O1 q) u  I/ H0 k
Create a new model to simulate the following system:: U9 U9 ^5 ^  H1 P/ }) ?( L
Loads are created with an interarrival time that is exponentially ' S5 j) t2 p/ A; q5 U
distributed with a mean of 20 minutes. Loads wait in an infinite-
' N( ~* }, R& h/ Tcapacity queue to be processed by one of three single-capacity, 6 R( s* _6 s8 [$ C
arrayed machines. Each machine has its own single-capacity queue
) V/ ^$ g- o2 B9 r- H, s# i5 }. Ewhere loads are processed. Waiting loads move into one of the three ( K/ A) u9 ~" n! `; h1 [0 C
queues in round-robin order. Each machine has a normally 0 o: O4 b7 E0 m! q! U. _& D# n0 A
distributed processing time with a mean of 48 minutes and a standard
& T6 d3 U+ W! h  O" Odeviation of 5 minutes.% D  S7 G  b$ M7 s' I
The three machines were purchased at different times and have
, ?- e% ]$ g( B8 e0 S/ E4 ldifferent failure rates. The failure and repair times are exponentially * n/ \+ j% b2 W  x9 E- r( v/ L% K
distributed with means as shown in the following table:
( y8 L* ]2 v5 }) S6 sNote The solution for this assignment is required to complete
' G* S0 v) e8 {: nexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
. P: M0 A2 H  q/ Y: cyour model.
. U. ^! u5 s& E; [% w  ]
% b3 V5 [; U; b' n, m0 @" CMachineMean time to failMean time to repair
/ W! s1 p" t& J% P8 z/ D! bA110 minutes      5 minutes. G8 p9 O  C) y$ a
B 170 minutes     10 minutes* Z; F& [! R( e
C230 minutes      10 minutes; R0 _. w0 G. c8 b& w- c8 x; I0 A

( l* r* U1 R$ @The machines also must be cleaned according to the following * o3 e% h) ]1 }
schedule. All times are constant: 8 y% r( z! p8 N# [* L' f- `

% r  S: M- L0 JMachineTime between cleanings Time to clean
" J  F2 I/ T. \( x! K( YA90 minutes        5 minutes% `9 w/ e: @$ o% Q* ]5 N
B 90 minutes       5 minutes# x4 D2 B2 H( S4 R; g
C90 minutes        10 minutes# n+ d& U0 \/ s. I

' J6 I7 ]9 |, d$ n9 e, i: l6 BPlace the graphics for the queues and the resources. + V$ U* y" o; n; e" F& d
Run the simulation for 100 days.. ]) b+ L2 T: h, F! S
Define all failure and cleaning times using logic (rather than resource
; I( a7 f: a' O6 u' ccycles). Answer the following questions:# U$ W. O3 |: d
a.What was the average number of loads in the waiting queue?3 d  r- I7 a* a5 `) M! ], L+ r' p
b.What were the current and average number of loads in Space? 5 s7 k' g6 s3 R+ f! C+ w9 K& V
How do you explain these values?
8 u  f- a# F1 ]- ]

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉6 J: ?7 t* q! H
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)0 i8 T& A5 H9 C* j) n
这行好像也不太对,各位先进觉得如何呢?: G: x1 c2 X1 `# N
1 O; N: {3 G* {' ~; N. J
begin P_something arriving% a7 x$ ~, s7 J* h+ b- E; }
   move into Q_wait
5 b! i1 m7 Q' N/ q6 u   move into nextof(Q_mA,Q_mB,Q_mC)   o- o8 e1 |: N3 G: T8 \: Z9 B/ b
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min: ^& m, o- ]- O; @9 A& E
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
, a; w0 L' M" N- o* _9 V% I9 @end
9 y, M3 Y, b  @- P) q3 u
  Z; @4 f  d) h- Y; O6 [begin P_mA_down arriving. |) o$ R. [" Y9 @& ~0 Y0 [# w6 I
   wait for e 110 min# Q3 X, |* N; j$ l9 d7 e
   take down R_mA
  `* `0 m0 T, L, N+ Q# Z   wait for e 5 min( P0 C% ^% v$ a
   bring up R_mA' j# ?# \( `" n) s( m# n6 E$ f
end
# A5 a2 G( R8 ~, A# ~0 t
' B. ~. |. C$ V: E; z2 h3 t! `6 ]+ dbegin P_mB_down arriving5 b5 X3 [) j+ `
   wait for e 170 min+ D! b+ N- S, Z! i3 R4 K+ {, o0 t
   take down R_mB
& J# _5 Q2 W% v4 i6 v* y   wait for e 10 min
* B; L2 q/ b4 D$ _' U; t, `. u   bring up R_mB2 y4 Q; n- s) o. w* f5 M/ V/ {7 u
end* j0 F4 r% |* @# J+ w( Q

$ w0 ~  \1 j5 Q6 N3 jbegin P_mC_down arriving
! h+ I5 c7 I; u* P0 M# z. s   wait for e 230 min
* N" \9 y6 U/ l6 R4 q  W( M   take down R_mC
9 v" m/ w% l0 R   wait for e 10 min
$ l' N& Z) `7 I3 C! X   bring up R_mC, o. \1 x5 c9 p! j: _
end
% A9 W! ^8 o' c& r. d
% x0 C% v3 k$ @2 Ibegin P_mA_clean arriving
3 y+ _1 j/ d* I% n   wait for 90 min
5 N9 e& v1 B7 A7 }1 e& N   take down R_mA
7 G( S" s0 J; P  c" \( g   wait for 5 min
& Y8 y- o/ t  s/ e   bring up R_mA
- i# W: Z2 A' K9 g9 Gend
* G, X" E; o0 a4 k) K( T, j+ V& m
! i+ ~( s/ z- w- S. z" tbegin P_mB_clean arriving
% I7 ?- u4 |& |5 ^0 ]. ~. a0 {   wait for 90 min- ]. |: t) f0 S! e
   take down R_mB
/ o5 O; u- E' W4 M+ W1 T- @- ?4 x$ @   wait for 5 min1 U8 U; I3 t3 t; N
   bring up R_mB1 S$ U8 m% T" d/ \
end) x/ J/ |/ _0 q  s
+ D9 ~* f1 P. @! G0 v
begin P_mC_clean arriving
9 |/ P$ E! e; r; Z( Y% n8 V9 }   wait for 90 min8 h' [7 D* O" H/ t4 F# i- z
   take down R_mC
3 S/ ^( K) X& w, c$ D6 {& c& S   wait for 10 min: ]) F6 t( ~/ c- w. u
   bring up R_mC
( e7 M2 A5 V9 X7 e* k) Lend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
  Y" Q6 H7 F  U9 ]* P* A   move into Q_wait( E6 T+ ?$ i# G9 m: J, ?1 _4 c5 j
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
& F* z1 ~( w; N& W   move into A_w
+ A7 t$ G" e1 O* P' p, \   if A_w=Q_m1 then use R_m1 for u 48,5 min
% R6 r4 r1 t+ c* K8 L   else if .....then use ....for u 48,5 min7 [5 l% m( I5 h
   else if .....then use ....for u 48,5 min  ' T( K) x8 Q! p3 N9 s1 C2 O" y* W
   send to die
, a) j5 f# c1 ^" A1 V6 v- X  K- Uend2 D9 e$ D8 O$ C- V

6 h% F0 K0 |6 R+ Z  f+ t3 G供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-7-27 06:59 , Processed in 0.013214 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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