设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7392|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 . {% k5 u* F0 L8 q8 h
6 q) Y# Q; Y; N3 p) u+ F
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
4 j: N* l+ p2 Y' U$ s% l% k, @5 E
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!5 f+ t0 G" x$ S# {; M4 m

9 j" G8 \0 o6 I1 B0 y2 {
--------------------------------------------
; p3 W, [& S/ O/ e% d  M6 Obegin P_something arriving
$ \$ ^  t! U. _   move into Q_wait
5 P. Z# t4 |" X# T   move into nextof(Q_mA,Q_mB,Q_mC)9 P* Y' V* `' J
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
. f3 a! a7 g& m) E; A2 S# g   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)% x/ G2 b3 u6 m' B
   send to die
8 T$ M4 q2 V/ X' {% ^: p. Mend
! p/ D" U9 \8 E5 g  j/ {) p

; N4 O) ~) l5 q" D) S3 `. jbegin P_mA_down arriving- J3 q  L% S/ Q! F! h/ ?$ y
   while 1=1 do ) B& |6 u" m( ]) _% B6 d: {
   begin& m' ?- y. ^6 F9 G
   wait for e 110 min
9 G% G5 q) \$ X% X/ l3 z   take down R_mA0 s0 G  X+ @& K0 M+ f/ e, a
   wait for e 5 min" o1 M; R) t8 U* p# }, n( D
   bring up R_mA
0 \$ E/ e% a& L7 v0 D$ y5 q4 P   end
) A6 c: s/ |; N# ~end

) q  [" a5 }6 ]  Z2 s  T ! [$ J) v7 |3 H  z- A
begin P_mB_down arriving, i4 V7 m+ e% g1 o' G& L' i8 X
   while 1=1 do
9 }7 q! u6 j$ v( I3 d3 Y! G   begin
: c% r9 K5 g  G   wait for e 170 min
4 Z- }1 ?- e: }   take down R_mB
0 e6 c. {9 v" P  I  X0 P   wait for e 10 min" D6 V3 E0 t8 K3 n1 _2 r$ o
   bring up R_mB
! v: s5 L; p& ]+ g& g   end
* g* k( P3 w; h+ X' |5 Z2 v! oend

6 O6 ~2 O+ _/ p
/ ~0 L: w8 I2 x2 u) O0 A5 Obegin P_mC_down arriving
/ N* u: W' t/ ~0 t" t/ u" B* c   while 1=1 do
& p5 _; T, r2 ~   begin0 @) {3 S  s5 z! F! ]
   wait for e 230 min
+ o" {! T; E- i1 Z8 @8 E   take down R_mC- p  {1 b" I" [0 |% }
   wait for e 10 min
- ~/ v5 \; h- t, E% \. A   bring up R_mC
  |& f( [9 z5 ~   end$ c0 V! `! r- B
end
& u% K+ t& H; P& G3 z7 r
/ p8 Y- ~4 v: e+ X7 P
begin P_mA_clean arriving
5 N( Z1 I9 g0 L: t) h0 }$ W9 r, h   while 1=1 do$ _5 W3 Z$ W3 [7 d& g
   begin
9 K; w6 S* m7 z; I- M2 f! C6 I' N% {   wait for 90 min
* Q8 P1 `3 J) S* w   take down R_mA
" d+ _0 \  Z. I   wait for 5 min
3 @6 T. q0 N- P0 M! @" c. B   bring up R_mA# q: n3 o' F: `3 P4 o
   end- [* n* A" U" n) E2 b
end
0 D" O! H8 ?6 f( A6 P7 k
/ `* [2 h0 z  [" r
begin P_mB_clean arriving
8 V$ G5 S8 j9 x+ U/ ?# b  U* B   while 1=1 do
: p2 ?5 i+ I! T$ V- a   begin
5 r+ H/ ^% Z8 x" T2 {" r: i   wait for 90 min
9 H! W6 R4 `9 k$ K; w$ ^6 w" D   take down R_mB
2 T+ t1 |) |9 ?7 K9 ~   wait for 5 min# Q. y9 I8 u' I3 ?6 z$ H! r
   bring up R_mB! p$ y& g/ B' S% X; k: n, g$ d1 \
   end4 m5 Q2 d8 L3 `( r& }; T
end

$ q2 n1 k' T0 H$ U$ Z9 j - q' l) }5 [( }- {% [
begin P_mC_clean arriving
$ t8 P9 R$ a* h9 m: b# H   while 1=1 do
$ }+ A( P+ S3 [+ [; b: Y5 K   begin. {2 a0 e- Y9 Y( B5 I* M
   wait for 90 min9 B" v& \9 |" o; G# [* T* a6 q
   take down R_mC* f% `: _3 y1 ^, [$ O" O" `' ~. [
   wait for 10 min; \& Q6 w. c4 j) @9 Q
   bring up R_mC
; B+ i. d; O0 V8 l- i' O. V   end
6 O/ R$ d( `% \7 X( `+ dend
4 I8 J! P2 W+ `
----------------------------------------: s. a5 C! ^8 N' b5 k

2 w2 W" \( j2 H8 S/ HExercise 5.9
6 u" B# K5 X9 T$ p" e$ C* H- A5 r& t- j# w2 ~
5 h% H" P6 J' H# }9 a- W1 [
Create a new model to simulate the following system:
1 X. H. M: {$ v' iLoads are created with an interarrival time that is exponentially 6 b& ?2 F( f4 c" D, K& W" m
distributed with a mean of 20 minutes. Loads wait in an infinite-
' Y1 N2 C2 h  d: ?8 s# }capacity queue to be processed by one of three single-capacity, . B3 f6 [: @- B8 u
arrayed machines. Each machine has its own single-capacity queue
" [, |+ [% E, ^( L, [where loads are processed. Waiting loads move into one of the three * z5 I5 A" D; ^2 H" s
queues in round-robin order. Each machine has a normally
6 t- _5 u; R9 w8 ?distributed processing time with a mean of 48 minutes and a standard * ]' ^, ?8 U) q
deviation of 5 minutes.
! ]% X/ d0 i. a& SThe three machines were purchased at different times and have
1 S3 R1 @1 G' D( tdifferent failure rates. The failure and repair times are exponentially . M5 C/ q: W) O% [% `
distributed with means as shown in the following table: # P# _. @9 c6 z% ~# j
Note The solution for this assignment is required to complete 8 |; I9 c$ W% Y" {' e$ T+ e
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of & l9 W- Y0 p0 u2 E
your model.
9 A- ^% H( c* l1 _8 ~
" g% |7 u% K( j9 l* v- v9 g* WMachineMean time to failMean time to repair
, M! @4 z5 u# u! W- PA110 minutes      5 minutes& G, z6 A9 e3 R' s. G$ x
B 170 minutes     10 minutes* h, X% [) n" J' l5 |
C230 minutes      10 minutes& _  r* K3 p) e" j- l, e
, X. s$ |4 A# Y" a
The machines also must be cleaned according to the following 9 b. d* _! U4 v
schedule. All times are constant: # C, _/ w& b" _# p+ B8 g1 w7 L& [8 p

" f- O$ r: {& C$ E- `. A2 ]! aMachineTime between cleanings Time to clean1 W7 N( ^/ }# H
A90 minutes        5 minutes
; f! y6 n1 n( AB 90 minutes       5 minutes
. m6 F- D% i( q" c! O+ L' kC90 minutes        10 minutes
; E: \& e, @- M! a  ?9 R3 C, h2 T& A3 n  z5 e5 V/ F
Place the graphics for the queues and the resources. # s+ r2 ?% }7 h
Run the simulation for 100 days.& ]$ _- ^4 \2 `) n- z2 U1 t: y
Define all failure and cleaning times using logic (rather than resource
2 V4 Y2 K8 v5 P/ I: ^cycles). Answer the following questions:# S; ^2 h6 G7 z4 O: D7 d$ {8 E4 ?
a.What was the average number of loads in the waiting queue?
' D$ `/ f0 H( }% a6 hb.What were the current and average number of loads in Space?
7 n! v, v3 K( s: k( C! GHow do you explain these values?
0 M- U2 }" C( u" ?/ I$ c4 l0 {! |

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉2 `8 Y# ]& F9 z. Z7 T0 l
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean), h) `6 ~) z; ?7 l+ k: X
这行好像也不太对,各位先进觉得如何呢?
+ a5 M" Z" H& o& [4 ]  o9 L$ ?% @5 A: p5 }& Y
begin P_something arriving4 e! Q0 x* D+ f
   move into Q_wait
. ?7 t7 t: K8 m2 b- a   move into nextof(Q_mA,Q_mB,Q_mC) ; O! D& n+ p. B+ @
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min) I! |4 e6 h( I* p
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
3 a. K  H$ \% l, s! S: Kend
# y" W( d. d0 t) W( [1 ~" o! K8 m9 e% D# z
begin P_mA_down arriving
+ S0 l+ D" l3 z$ D' }   wait for e 110 min
5 v( d1 t+ D+ g7 n. o+ z2 R   take down R_mA
5 Q6 k- |1 A( I, R   wait for e 5 min  a4 G' C8 }2 m  |
   bring up R_mA' U# _" A% ]0 V" H8 d
end6 D  M. ~. F. g7 Z  ^+ Y

/ _5 ?+ z  g3 z* D. W; M2 @begin P_mB_down arriving& {0 {2 o6 r( a) I3 K  D, o! _6 n1 B
   wait for e 170 min
. ?! t, h( z; R! f9 q# S6 L: J! O   take down R_mB
1 M, j, l: }$ H   wait for e 10 min, l9 A" m: r3 e* h5 j
   bring up R_mB
6 b" L" W2 D- send0 o' z8 t! B5 j/ m: Q3 s  r& R
) L; S2 q  a# X9 p- Z
begin P_mC_down arriving
+ _) ~5 H2 s3 X& T9 C   wait for e 230 min
! w4 b* S) G8 X# ]% I: c   take down R_mC
% t3 k# J. R0 S+ _4 O   wait for e 10 min1 c' H+ ]8 ?/ F! S, F9 ?: J. X
   bring up R_mC
+ I& y; r( l: @1 q; ?end
# Q8 A  A  U, N0 M" w5 k: A' ?* U
3 u3 d. {$ F  J3 |/ I2 U, p1 C' lbegin P_mA_clean arriving
, n5 L/ v1 b; O   wait for 90 min
# U: ^# p& r$ X. }   take down R_mA. c  `1 J9 P! s
   wait for 5 min
( [7 Y" J: G, S# ^   bring up R_mA- n# b0 O5 Y6 l: ~$ q
end
( L; ~( X6 z" S, K& S( r' \, G
1 U4 a* K% S/ \; N5 S- J  k$ jbegin P_mB_clean arriving
% [" G# k, B' l$ `- `& a   wait for 90 min& H- o- r* b# ^6 P; W4 G, g' v
   take down R_mB3 Y, a* j% Z8 A. P/ F6 P
   wait for 5 min
6 @# g$ l; _1 S* P, I( T   bring up R_mB: P6 i- U% V+ k% X
end
6 z, R4 b9 F9 {0 X8 e( K/ j  ]- A# ^: ^) q
begin P_mC_clean arriving+ ~9 N2 P# r1 g/ Q
   wait for 90 min
, X/ K: `: J' F" u$ a) z   take down R_mC3 d3 |1 [2 Y, ~  i. c+ T
   wait for 10 min6 z5 W* ?9 X6 t1 \
   bring up R_mC; @/ v, g- E1 L0 I
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving$ h# v) Y5 t* B2 I8 k
   move into Q_wait# K. U; _  `/ V8 M& c7 y9 e+ p: A( z
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
( ]8 Z) M9 s, O5 k- ]   move into A_w0 b4 C" U5 R% l+ a  j6 M: A9 i
   if A_w=Q_m1 then use R_m1 for u 48,5 min! r: b2 T# H' T- C* L- h
   else if .....then use ....for u 48,5 min
6 X* w# S+ K3 V3 K% I   else if .....then use ....for u 48,5 min  9 i5 ~# ]- b9 J% F
   send to die
6 u. E" q4 _1 O0 \8 b4 t* L# {3 Cend3 x! T; Q/ e2 W+ l' t+ R1 R

. V: F# d5 I+ }' [* k& h8 v1 M1 A# [供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-19 01:43 , Processed in 0.014662 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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