设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7073|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 4 Y1 u4 u' R; n3 L

( U! A; O2 o/ B3 x) R底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
6 L2 c# N1 W% y1 q/ g/ h3 y: y
8 T6 Q& [2 o. r不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!8 M' a  _. W' C! x5 u8 l. o
4 R& l: Q2 H8 Y& t9 ?9 B" G& }  {
--------------------------------------------
# m5 N6 Z" C/ ^, gbegin P_something arriving
; \& _( i: j& N- |! R' }( c" ]   move into Q_wait: Q6 G# `- `* X0 g8 v  ^+ R; u" ^6 `
   move into nextof(Q_mA,Q_mB,Q_mC)3 n6 a! ~. h- J& K4 g* F0 C) g
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min3 T7 D( u  k- {( l
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)  {  M) W% X# m: F, v) O2 [$ L1 M
   send to die( b% K6 |. l; @  P
end

( Y6 U, f; O2 j6 I- G  b
5 F" f; S: t+ b8 Y- M- d4 Ibegin P_mA_down arriving8 C: W8 d2 F$ y4 A8 c; b
   while 1=1 do 5 [4 d; o1 ?( t5 u. C% Q" u9 j) `
   begin
4 o4 z- s4 I2 o$ G$ C" \   wait for e 110 min
+ y7 E& K2 M# |& R" K) H   take down R_mA. f4 {- ~. h4 K  u' w; P& V& U
   wait for e 5 min
5 D, W0 {5 r! K; a: R4 w   bring up R_mA
" u; @" k* b7 J   end
0 @% J2 m. P+ ^0 M/ d8 k6 b+ uend
3 a* [1 d4 w& T0 q  k: @* v3 j

" ^( d5 z; U+ ?0 R' z+ B( _begin P_mB_down arriving
$ q3 A( z. l: o, T9 M3 L; Q   while 1=1 do
' G; P) y, _9 T( m& |$ l. x# \   begin/ L, |1 |7 E4 M- P/ `
   wait for e 170 min; \; x4 O9 l0 q
   take down R_mB
9 w; e. W" [7 d+ B& D7 s+ g* X6 d: G   wait for e 10 min" a4 y( l9 z+ b. j( ]
   bring up R_mB% W; a3 L' L/ {7 d: D) h3 V$ ?
   end
2 h8 B) v% M$ U- vend

  z" s2 b: R$ c3 W$ P9 Y  A
: w+ p+ L2 R$ z; ]: Z' Gbegin P_mC_down arriving3 p' i; C! ~9 E) A5 G7 _2 h9 Q, v- B3 g
   while 1=1 do
* P$ B1 M; R# n   begin1 r# L& z: v$ L7 U
   wait for e 230 min& g, c4 f6 G  x" u  \0 I. M
   take down R_mC7 q: x, a$ P% s8 o. M
   wait for e 10 min
) N7 u& b; c- a0 M   bring up R_mC( k5 R' C! E: H0 v$ b% i0 k
   end5 D4 E  Q) P$ c5 l/ B, _
end

/ z; V- _( o$ g5 F: G8 C 7 [  J- r4 q0 I; I
begin P_mA_clean arriving6 @5 V! ?& R, H
   while 1=1 do
8 ~5 y: o" g5 ?   begin: J0 a7 a, ~# x8 V
   wait for 90 min2 @, v8 L+ \) A, y( T
   take down R_mA3 [$ f( P8 q9 _# `( l
   wait for 5 min1 u: n2 [9 M, i. z; b- n8 S
   bring up R_mA
$ p  C' T% Q% J! [/ w6 [3 n   end$ D2 P9 R! F0 J; M5 [
end

7 R2 S% p% y8 ^/ y4 D 1 u0 u/ @0 F: L
begin P_mB_clean arriving& L( E) O+ F# [2 F
   while 1=1 do
6 b2 P/ e8 P9 M; w   begin! D' [  G( z! _- C& i+ G
   wait for 90 min) d' P7 d; Q, O0 H* B* ]
   take down R_mB9 H) u/ R+ P) o+ q; `5 _" L
   wait for 5 min, E- w: e2 w4 N$ O* ], ~9 j0 C
   bring up R_mB
, l% w/ E& n/ Z1 O: R( C   end; [4 Q; H6 K; U* }  q6 H0 N8 f
end

& Z8 S  M( i, [1 d , D' }# R4 ~# o+ u3 Z* M
begin P_mC_clean arriving
( }) c! S2 t& ?9 v   while 1=1 do
' N9 ~, t) F8 e1 E* D8 ?- s   begin. c8 d4 H; z" J/ M" D/ f. f
   wait for 90 min3 b$ A+ S9 r: q5 H6 z
   take down R_mC0 R  L% L* S! P! |, k
   wait for 10 min
" o# v! V0 n) c2 X# L   bring up R_mC
$ T, E& C( b1 b3 U" k0 O   end
- F( i$ r! C8 f" R, ^2 Qend

* j& G4 K+ X* x2 O1 L+ l----------------------------------------
) f+ R. @4 A- U2 T5 U# [# ]5 w
4 C8 v4 b% E6 |- I: kExercise 5.9% ]) S$ ^$ o) `! q+ i

, Z0 P( Z9 g: N+ }7 w
6 e: H& u: H% L# O, R: w" OCreate a new model to simulate the following system:- E2 p4 H' c! N& Q. t& b) a
Loads are created with an interarrival time that is exponentially 3 P) a+ S* a) S9 I  M& ]
distributed with a mean of 20 minutes. Loads wait in an infinite-
+ {1 W. p3 i% m- G5 ?capacity queue to be processed by one of three single-capacity, 5 D0 t% ^6 C, ^* H3 u# N3 Y
arrayed machines. Each machine has its own single-capacity queue ) _' @. W- t5 X3 ?7 `
where loads are processed. Waiting loads move into one of the three + t. y! p- D' p% P, Z: V: W2 l
queues in round-robin order. Each machine has a normally * ]  S4 k4 V) x1 u/ p2 X& k3 H% }
distributed processing time with a mean of 48 minutes and a standard 8 v' ?- R4 R3 V" R
deviation of 5 minutes.
! J/ }/ S& t$ ]; qThe three machines were purchased at different times and have
# G, d) r2 P! M+ ~different failure rates. The failure and repair times are exponentially 6 {/ Z4 \3 [; A$ |" {
distributed with means as shown in the following table:
2 y$ R- R' u' |. d5 W3 O0 I" K$ }7 ANote The solution for this assignment is required to complete
; ~4 A% p( b2 {4 a, B5 Vexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
$ g- s8 p1 K7 u8 _- X4 j3 Z! Y2 oyour model.
4 {6 H4 u' \9 X& i# ]. q" p8 k9 a9 Q. T/ x7 S. _7 S" c! q! C
MachineMean time to failMean time to repair) c( a' g1 L4 w, r- {  ~: _) Y
A110 minutes      5 minutes
& |; S8 x7 y+ m7 MB 170 minutes     10 minutes
) P* R% b) U" J; l" `0 B: kC230 minutes      10 minutes, A! A  K4 J& ~7 z3 d, B

& F- k" ~8 d( d$ RThe machines also must be cleaned according to the following ' J- ~2 |5 c9 N. H( i3 @, _
schedule. All times are constant: ( p9 ~, w* ^( s% s* V1 C
0 Z% r& C8 p! R3 q/ E- _  c) e
MachineTime between cleanings Time to clean' P; o# r7 f$ E3 m+ x/ h% f
A90 minutes        5 minutes
1 J4 O0 }5 A% ^$ ~4 o+ X1 x' o" s# jB 90 minutes       5 minutes8 [+ ~7 w8 r- _& K4 v) w1 |
C90 minutes        10 minutes
% W5 w! D! c: T( F; w
: k: E* o4 E* b7 q" {% Y6 ZPlace the graphics for the queues and the resources.
/ P0 i* Q0 d  KRun the simulation for 100 days.% s! D4 o) }' B9 R* z7 P1 a  S- P
Define all failure and cleaning times using logic (rather than resource 3 x; m  e( |+ \' p) U
cycles). Answer the following questions:
! |$ u* V& A0 Y" D8 C. G' E, }a.What was the average number of loads in the waiting queue?% F1 J2 N* {. M- p! X
b.What were the current and average number of loads in Space? - r. {" q) k3 U  a# K& M8 B
How do you explain these values? 3 r. X- l  I  x5 W

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉) C& Z/ e* l. }; \, d/ W
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)5 N  ^* W- _2 E. ^& [+ E# b2 \
这行好像也不太对,各位先进觉得如何呢?
! U, v, C6 S! S! ~5 q: g5 y0 l( O
/ Z( e9 H- V  \( gbegin P_something arriving
, `  M  ]) M7 y; D4 e   move into Q_wait
3 z  a/ `% j7 y5 c# M0 l   move into nextof(Q_mA,Q_mB,Q_mC) 2 S6 @2 Y/ I. |8 x8 O2 b- `% z% K
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
& c/ s8 e* P; i3 E   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) , d) j+ y7 V6 Q  E. ~
end
' M7 l& g5 v" x7 t' P& n0 {' z  y, K7 S5 @% v) Q% a2 S( x
begin P_mA_down arriving. W6 n+ j7 f$ ~4 |
   wait for e 110 min
) o) l& \  M( Q   take down R_mA
4 k1 c2 ^& d  l   wait for e 5 min
6 t+ v7 ^5 i5 r8 C# X   bring up R_mA6 ^8 `- v3 f! T% x: |  Q) o0 u
end- j4 h' K) t/ x' V6 Q2 M1 E; X

) B: u& [4 w  ^8 f  z6 |& Y% Gbegin P_mB_down arriving
+ h2 S5 r, B/ e) \2 v   wait for e 170 min9 s; s  @+ ^: _: P9 i1 G; }/ m
   take down R_mB! D* g8 G/ X" Q9 x4 d  U& d
   wait for e 10 min* o- V/ l0 j. D, ^% I  Z
   bring up R_mB
: n- R  l! X- q+ ~+ e) a  F/ C: \end  g) X: w) m. e

6 o7 M5 w3 T% m( V9 x' Lbegin P_mC_down arriving8 f0 x; G. j/ N' p
   wait for e 230 min8 K' [" j8 F  P$ K9 l3 q& K
   take down R_mC
; b5 L1 }; p+ z) R3 K! I' y   wait for e 10 min4 `3 M% p6 N- _' B6 m5 M8 J
   bring up R_mC# e: R+ J) d% S) w# \- [) T
end
* A) j0 w' l0 p) O' t
+ m/ n& _. a  J& R% @) H2 O' ybegin P_mA_clean arriving" d, J" d( B+ [3 `- l
   wait for 90 min" ]1 ]" [' i5 E. [2 k! c
   take down R_mA
2 R7 Y9 L  @5 W+ ?6 t   wait for 5 min
" n6 x9 [3 y" {0 g   bring up R_mA
* z. j& M+ }. P) c: @end3 t+ C: d( [. _& g( g7 j* U, Y5 p

# G0 X: o0 `/ _begin P_mB_clean arriving) C9 k3 w4 @! o, G( C5 m2 f) v
   wait for 90 min7 p9 U1 ]' i' ^, ]& U
   take down R_mB9 Q9 ], ~. u; o3 ~
   wait for 5 min
- G0 b) h+ R4 K7 Y/ b6 R   bring up R_mB! b1 j1 d: ?9 ?7 I) E& \
end! ]3 W+ N) x0 O& M! c" v- A

; H! X1 z0 l; Y3 s- \& Vbegin P_mC_clean arriving8 _8 o" a" b  L, W# N
   wait for 90 min$ H( r& s. M0 s' S' M3 c
   take down R_mC
4 o/ q& ^5 c* ?$ F! F* c   wait for 10 min
( G) _. s% v' |3 P) }) U   bring up R_mC9 b" j6 Y8 }/ U6 J+ l+ ^
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving2 }. P; X0 {( ~
   move into Q_wait
, y) `& \. Z4 i, O9 _1 j: t. C$ V   set A_q to nextof(Q_m1,Q_m2,Q_m3)
0 S  s* s% J& T  U  `. z  z   move into A_w8 j- f* j) k- j! o+ N% D
   if A_w=Q_m1 then use R_m1 for u 48,5 min
" v; [' P! Q# A& @# c) a   else if .....then use ....for u 48,5 min
8 K6 @% ^' G6 S8 |6 }# K4 T( r' X9 C   else if .....then use ....for u 48,5 min  
* w9 s- {; s9 {6 w   send to die8 F' D5 Y2 O% G- N9 x% k7 M4 U1 C) p* J
end
% R1 M/ Z' O+ u7 `9 g9 Y8 a
- b& t( t0 S2 e, w供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-10-24 11:06 , Processed in 0.019192 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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