设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7216|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ) X- s8 T- F; Z# c% M
9 \" D, |5 R' W  W
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
. r% E* O& W5 |0 P+ T# D
5 p) n" B9 H% [/ q不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!2 t( T  C- E# S$ t1 P0 r3 p
7 y* T' r6 K5 W/ M, F9 Q( Y+ W: r
--------------------------------------------
5 m9 E' D3 _0 t4 u0 ]begin P_something arriving' k  E& w9 U) |) v% a' P
   move into Q_wait2 s' U/ w+ D8 c. `  s) M
   move into nextof(Q_mA,Q_mB,Q_mC)4 i! f! |9 n1 h4 J1 l  O9 L" u
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
1 L3 [5 F( L# j- V9 O  D# Z+ k   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
' r' G, ^1 i+ Z/ Q9 N   send to die
' V) j7 o. p9 [5 V6 Eend

4 A% V' ~4 X4 G
+ j6 z+ n1 Z2 ~: H/ `( Ibegin P_mA_down arriving5 L1 |- y6 v  y, ~0 _5 F* F
   while 1=1 do
9 T2 l# n" a* o" Z  ~- F0 \   begin! y! C  v# B" N8 W# k9 I
   wait for e 110 min- H2 u5 ?+ i+ ?/ x: g- e
   take down R_mA, |; @# D. F! ~8 V, a. }* t' v
   wait for e 5 min5 i0 ^) V6 M+ w7 f! p8 h
   bring up R_mA
9 K$ q7 O+ Q8 P! p/ e+ O4 D$ R* t   end- z% o# |' o3 e# ^
end

( B8 F. ^  a% @# i; Y
, A, L$ d( v- ~" ybegin P_mB_down arriving, V* p9 U4 R6 P; S
   while 1=1 do
/ a  ]# s. a; l8 R0 B" Y( f) q   begin
" N% z7 J# @" n: ]1 W   wait for e 170 min
$ T8 @" U1 P8 r/ A, w) b   take down R_mB& q5 }  q& Q9 ^6 {5 v
   wait for e 10 min
6 l+ d; P# N$ @, T( d7 \, r) g8 @   bring up R_mB: w5 J7 r- N( c0 Z  y! G+ `
   end  \6 l8 z. t- v
end

5 H6 @6 u- E$ {5 t9 l% L( c ' x- o- w9 i6 |& d9 q/ U" d
begin P_mC_down arriving  |) M( j9 I- q" G. @7 J9 P
   while 1=1 do
4 R4 t" X4 N7 t4 G   begin
0 V, G* l+ @, M, G- ?   wait for e 230 min. X' A7 r9 ^3 C5 g- c
   take down R_mC
$ c1 z" W% P5 e0 l7 }7 A   wait for e 10 min% L/ O. V) @* A' X9 N  P
   bring up R_mC9 l- `! x! j7 N! n9 k0 l- |
   end
. w& f7 S% V$ u/ i+ G; _end
2 z8 B6 H7 h+ W7 a

& y% q) n/ @: U0 qbegin P_mA_clean arriving1 M3 _1 M2 \- l- K- p0 U
   while 1=1 do
& b( q6 ]+ P9 Z8 x   begin. [! \* x2 p0 T; s6 _
   wait for 90 min
% s0 l( k, \* e# @   take down R_mA
6 Y3 z3 D9 G  {4 T3 x   wait for 5 min  S) j& Q5 n4 ~
   bring up R_mA
0 Q, }6 g5 s. K9 r   end9 U7 z  R4 T# ?  A
end

. A) ?$ \9 v6 n; n( {: {1 D& p$ S 0 Y, ^7 C8 _) Y) i' k
begin P_mB_clean arriving; B' t$ ?1 \& J  ?
   while 1=1 do' [) G+ T3 V3 d0 |) w( I
   begin
, P% L2 ?1 _& @+ g3 G8 _   wait for 90 min
3 |0 t0 ^+ B) y. h% y$ B+ O5 y   take down R_mB
+ G( |. f" K& e4 k: O   wait for 5 min- j% g& ?4 {, q: |
   bring up R_mB
: f" W" G% {+ J7 o   end
3 z/ G3 W* d: m$ ]) U5 cend
! ~$ p) _9 m* v4 u& V" |

# ?/ ?7 G9 Y, y& X( b/ s5 |begin P_mC_clean arriving
6 |* c& a- c) y' c7 X   while 1=1 do
9 Y' c+ a& g6 Z   begin
1 _6 T* Q+ e$ |/ M$ |# |, P   wait for 90 min% t9 N6 a2 E4 w, a; [* _
   take down R_mC& |' f' c% D5 f( ?0 n7 R
   wait for 10 min
3 n5 d1 o. E8 k+ R( b4 r   bring up R_mC9 G" g' p. T  \# |+ v5 w9 y% D7 _
   end) [( g/ {; q9 b& Z- N* h6 N
end
2 Z+ u( F: e' D+ A/ h1 b
----------------------------------------' N9 C+ F/ n2 k0 x
* j- @" ]  ?" _! ~
Exercise 5.9
+ J4 f: s5 l& ]
8 ?: t# _2 g1 O( o# L  t! i9 m
, y% W6 H  M. f2 O/ l, q9 r9 l8 FCreate a new model to simulate the following system:" F0 K. ]/ Z" e4 O  M
Loads are created with an interarrival time that is exponentially
  F% ^' O9 ?% z! C3 Pdistributed with a mean of 20 minutes. Loads wait in an infinite-& }( [8 ^3 z& f- I. i* w
capacity queue to be processed by one of three single-capacity, * @* v3 m2 ^6 I1 W7 z! t5 o
arrayed machines. Each machine has its own single-capacity queue
6 w* o0 K) w3 gwhere loads are processed. Waiting loads move into one of the three : u' @1 Z' o; C
queues in round-robin order. Each machine has a normally . _& k8 d0 S. ^1 j+ F: g; n. Z
distributed processing time with a mean of 48 minutes and a standard
2 h: M3 p$ e7 l: g# sdeviation of 5 minutes.
1 p. I, G6 e) N) SThe three machines were purchased at different times and have 8 d1 g2 D$ ]3 p% \8 m( j
different failure rates. The failure and repair times are exponentially
9 o* H/ I& h, g9 Odistributed with means as shown in the following table: " R% O) z4 z4 ]$ C5 K
Note The solution for this assignment is required to complete , W5 Q6 q5 @/ O& }: x
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
& x% f3 A* W* O# U  {0 Zyour model.
8 Q& I$ r. z7 U; F+ {" {% C+ Z
% z  I! x$ Y5 m- P/ v( a1 R3 JMachineMean time to failMean time to repair7 n/ y! L+ W" `9 i$ G1 \. l" L# x- Q
A110 minutes      5 minutes9 C5 C3 {5 @3 S1 D- H- _
B 170 minutes     10 minutes" z( D/ [* E+ f) F
C230 minutes      10 minutes% C# a/ R! }5 R# P9 b0 l

* w) q& o: D' ?# C, b2 d0 {The machines also must be cleaned according to the following ( i5 c3 C+ ]! s/ Y
schedule. All times are constant: : q' g9 p/ h3 g# o3 i. f
6 c+ A1 Z! {7 S! I/ |( s
MachineTime between cleanings Time to clean
1 x. {: J9 e7 i: NA90 minutes        5 minutes
1 h: Y0 }6 y+ ]& {: z7 ]B 90 minutes       5 minutes
, x# Y" X! p/ ^: ], FC90 minutes        10 minutes
. ?  W% i9 X1 E9 v8 k, P: d/ h4 O5 G9 g) M+ M4 Q" A
Place the graphics for the queues and the resources. ' A. ]% Y  ^% D; B2 ]# o$ F
Run the simulation for 100 days.6 n2 K. X0 i2 e. ^+ x3 i
Define all failure and cleaning times using logic (rather than resource 0 r3 O$ S4 h9 R% @( W. z; d% c
cycles). Answer the following questions:
; M- w) j/ |. w+ Ia.What was the average number of loads in the waiting queue?2 H, N. l/ j1 h  G7 P6 F+ x
b.What were the current and average number of loads in Space?
6 a0 N  ^) L( V; ]# z: YHow do you explain these values?
5 }' d1 n& n4 h3 o3 K" g4 V) B+ e

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
5 y; d+ f9 B. o" p& z# t" r6 N0 nsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
! N/ ^# N) X# d( m8 h这行好像也不太对,各位先进觉得如何呢?
: ]- E5 {1 s; ]4 N2 c0 J# s5 ?6 Z1 n0 {( P* L0 b. _- D
begin P_something arriving. d  ], Z! n& y
   move into Q_wait+ k9 _0 L4 T# ^; W+ r* h
   move into nextof(Q_mA,Q_mB,Q_mC)
2 Z5 K* X. P. H5 M: f   use nextof(R_mA,R_mB,R_mC) for n 48,5 min. `) e1 _% S; L1 b" |! }0 y9 \1 V. l, d
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
7 E& l7 q  B' u# y( Wend; g% `5 @; T1 p0 z$ `9 J; B
/ z/ c  Z3 s+ [* M$ v- T7 j1 H
begin P_mA_down arriving
. K7 c: a8 H0 F: j$ \. u9 _   wait for e 110 min. e4 j2 o) J$ }5 w# B7 L
   take down R_mA' e, s* k% n5 M4 ?5 f/ r
   wait for e 5 min( D) V' o; F8 H2 d% E% ]
   bring up R_mA: W2 R! i7 Q+ Y$ m
end, v- m& D% G/ o

" c% j! J, T# r% G4 ]6 H9 zbegin P_mB_down arriving# F9 L- d8 \/ a1 K# j
   wait for e 170 min
# C( [2 B0 f3 z& e1 U/ t5 }2 a   take down R_mB* d& ]  x0 M3 r% e" o7 z: d+ I: F* t
   wait for e 10 min6 ^* k5 a* d% ~( ^1 o% t  @: |
   bring up R_mB
- M- u+ V' O0 lend/ c6 Z0 [* U/ H, v

4 }& n5 `, G! Z* _- hbegin P_mC_down arriving
3 ^1 L! g1 {9 }! M- u   wait for e 230 min
' n7 i6 i* }8 B3 p1 L1 H. a   take down R_mC
& W, B1 d" D' y9 |   wait for e 10 min
6 u7 v* k7 L& U1 B& y   bring up R_mC
7 y+ G  V. i3 D, ?6 P4 yend
6 R. R9 M" k9 Q1 e$ d. Z  `7 p2 l
begin P_mA_clean arriving
5 }9 Z) o; L7 J$ G1 d0 T   wait for 90 min4 _, j( Q9 f  }! L9 S9 Y2 L1 c" P
   take down R_mA0 X8 ~. |7 _$ ~* r( \& U
   wait for 5 min
- V. k* _1 J; ?+ u5 a7 O   bring up R_mA% s9 s* f4 v( J4 n. s& @" `* O
end
' s4 }. H; y+ c" T. ~
* R+ P/ @, C7 ]5 [9 h( Zbegin P_mB_clean arriving, y6 O5 U0 E3 j5 I
   wait for 90 min
: j. a5 h: _% o   take down R_mB6 d% T3 H1 g. \4 N3 x/ a
   wait for 5 min
# C/ b( {; y0 j6 w- V) p   bring up R_mB, R) P- e+ x) Q7 J' [
end1 {% n$ t2 P" P( t0 m: n7 C
8 v: }  @1 Z' ^: S0 S/ ]7 T' V
begin P_mC_clean arriving
7 R; f7 d6 t" O% q. ~3 s   wait for 90 min. r' C  q& |7 ~
   take down R_mC$ @0 b1 }# ^1 I; J2 C
   wait for 10 min% A' y7 w$ h1 {2 w
   bring up R_mC
% v; K+ j7 w, f% uend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving% E2 J7 ^' Y& R& _7 X# E+ @; M
   move into Q_wait
6 J9 l* I9 ?! z5 _* U" b! S   set A_q to nextof(Q_m1,Q_m2,Q_m3)9 X9 Q& r! q" v+ j
   move into A_w0 x" G# I; B2 f% _2 K- a0 ?
   if A_w=Q_m1 then use R_m1 for u 48,5 min5 t* h2 c5 Y  s& G! x4 t; m
   else if .....then use ....for u 48,5 min1 r& S0 j* x# i& M( v* v' U
   else if .....then use ....for u 48,5 min  
/ `) g0 v' n$ \$ V2 F   send to die- Q* a1 P4 K9 ~7 v/ c$ n
end
# W1 w8 s/ Q5 H6 V- T) c! H4 D) [. S* S: f6 N2 ^  l
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-15 19:59 , Processed in 0.025042 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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