设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6732|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
1 ^( E" X' Z" z  Z# s# o
2 _  O, w: G. P# u底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
( `. e1 Q; T- V4 v, b
$ w% E% _# j3 r$ E4 Z  P' ]不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
/ ~0 e) n/ j; ?+ S+ s! b
& b# i( K% v; a/ q/ Z3 m! k: W
--------------------------------------------
, @0 j# ?* o+ z8 Dbegin P_something arriving
2 ]1 l9 L; Y8 K+ a   move into Q_wait  ?# }4 X6 a, I  O
   move into nextof(Q_mA,Q_mB,Q_mC)
' V( R+ w! {4 x1 e$ L- P. a4 r   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min3 V3 p& U/ Q# q4 h+ f" Q
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
  p2 ^- [3 |8 ^( y   send to die; \( ]7 {: p% |7 E% F3 @, D. [
end
8 p" o, _8 V, d7 J: F9 s
7 e, N7 r/ l: |- V: N2 c
begin P_mA_down arriving
1 Q+ y2 F& j8 G7 _0 @5 \5 [2 E! Y* m   while 1=1 do % ]" t+ X' J) `; C+ V1 X, P
   begin
7 r, |# {9 a, b   wait for e 110 min( L# X& I7 R4 a( p) u9 w0 ^( Y0 ^
   take down R_mA$ \- ]$ o* h/ F( ?& M$ e
   wait for e 5 min
* Q% i+ Q; K( w! B! H   bring up R_mA
9 ~0 ~- e9 b$ }5 T1 j7 a   end
9 ?( t7 ~. f& r, K+ N4 z  iend
3 N" D" I/ ?9 s% J2 I2 F) r

. g3 X! s9 x+ f& p$ Fbegin P_mB_down arriving& L" S1 p8 z9 U  ^8 u* L0 j* i
   while 1=1 do
5 x: W0 ]$ g( d5 o+ L   begin' j5 l4 G; v+ {
   wait for e 170 min2 T9 e+ e6 z3 K% E7 U; s
   take down R_mB3 C, g) s1 {/ d8 Q: B
   wait for e 10 min
3 [$ m( t5 Y- q5 u# h2 g   bring up R_mB4 ^5 T3 F) U" q2 g5 ?3 R
   end
6 ?! a: L, r$ K. z& Cend
+ d" c2 \* E& M! m
1 F1 c6 n9 {) k& }2 ^+ P/ Z
begin P_mC_down arriving) ?/ h- N$ n  ^8 b1 J
   while 1=1 do 4 o6 G! |: |; F2 s
   begin
* j9 P7 U" |. v; L   wait for e 230 min
# J! Q4 R  u& n1 |   take down R_mC5 T% L3 _0 i* X+ P( m9 s) m0 F
   wait for e 10 min
: d8 X- F1 C1 L, s8 G7 w   bring up R_mC9 j. H6 t  `' s
   end
7 i) b, ?# {' P$ g+ V  n  w% o! yend
( @: P9 D' q' v

2 }8 \  g# ~- y: N  I3 A) pbegin P_mA_clean arriving
# V2 o$ C6 k" C   while 1=1 do
2 s- y2 a2 h0 E- x* b. t' v   begin
! v' B4 Z; R* u* x1 G8 X" M% V- S   wait for 90 min0 ~1 {1 S1 ]: s
   take down R_mA" P: n& c8 p" i$ D6 q
   wait for 5 min- X8 e$ @' J! P$ c2 @3 ]
   bring up R_mA* H/ U5 t' X5 S! c+ J
   end
, S; k  y" F6 e5 Wend

* A- [4 S0 Q; E! j0 X& O
2 w) ~( b7 d& c* N/ a+ Q% wbegin P_mB_clean arriving
( O3 ~- M  T' K/ E( r   while 1=1 do
& t4 |3 E5 Y9 d$ g9 c2 |. J   begin
2 w2 E& G+ d  R4 V   wait for 90 min$ w* ]& ~  z& [/ {+ H9 h
   take down R_mB
4 ~0 W) u9 H$ w" A; }   wait for 5 min
: ~& r' |% B4 F" n   bring up R_mB
6 Q# L& O! j5 t# d- H  N   end
8 a& d- i0 L1 E5 B" e8 qend
1 [. a) {# y: ^  s/ p, K9 N8 N

8 @8 J' ~2 @8 z6 x1 xbegin P_mC_clean arriving* _8 E+ b8 l$ i: G. n, G# ^  b
   while 1=1 do
; o! F( ~; s: r% w# F; b# e: w   begin: X5 F& E$ m; s& Y& ^
   wait for 90 min
# v" z  {1 B3 X0 q/ \* a   take down R_mC
8 p6 _& T4 W- w   wait for 10 min
8 q' |/ \/ H0 p% |6 Z; X   bring up R_mC: q* C7 j4 N3 J) Y3 Z& {' p
   end
  R: v) F: l5 s4 Oend
7 ~  t& A" X* |3 g7 q
----------------------------------------
( t1 c9 b& J: b- D6 W% |( e7 O; v  C$ |
$ j7 h+ W! Y: F6 N8 n4 oExercise 5.9! M1 P& q+ ?% _" P2 N

1 L; o7 K% f' }9 H  |! ^- X0 B. A8 Y8 m
Create a new model to simulate the following system:1 Y! G; t1 Z- t# g% R2 N
Loads are created with an interarrival time that is exponentially
/ ?$ X; j& q% o+ xdistributed with a mean of 20 minutes. Loads wait in an infinite-
3 [, e  K* E* z9 C5 |- E/ @8 b( ucapacity queue to be processed by one of three single-capacity,
9 r4 C+ X0 b5 |: Q7 h: _1 f+ A4 P  Parrayed machines. Each machine has its own single-capacity queue
' K) K7 S8 {9 B2 Y8 \# cwhere loads are processed. Waiting loads move into one of the three * p" U% R0 f8 j, k
queues in round-robin order. Each machine has a normally
9 M: J, C4 O7 H* ]- Wdistributed processing time with a mean of 48 minutes and a standard 3 j1 k' i  M; n/ E( L% D
deviation of 5 minutes.
* ^5 M% D' x- J3 t7 [4 oThe three machines were purchased at different times and have
# ^. S( R/ Q. a3 P- Qdifferent failure rates. The failure and repair times are exponentially ( [7 I' Q9 ?' [9 k" r0 [0 y* R
distributed with means as shown in the following table:
" b, j$ Q9 ~! f6 R/ jNote The solution for this assignment is required to complete . [0 o% \3 i, I( S
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
. q6 X" Q) N1 {+ ~+ m! D+ Hyour model. * H' B% W! G1 Y' _2 t1 |2 o  E- N6 ~
1 O6 ]& J$ ]- o5 A0 j
MachineMean time to failMean time to repair; a7 w. L/ G- K( t, W$ g5 y
A110 minutes      5 minutes3 C; t+ Q% T, Z$ q( \3 |
B 170 minutes     10 minutes( K' I2 \3 f* M% t0 T4 W! g
C230 minutes      10 minutes
( t) N; L4 w6 u  c6 g$ |# F: L( V- Z9 e; D0 D  i; q/ ~6 P0 w! i
The machines also must be cleaned according to the following
2 L0 r  I$ R) Q9 Z  Lschedule. All times are constant: ; K' D3 \+ s; J

! i8 s1 _& `+ }' S7 _MachineTime between cleanings Time to clean
( u- V# h5 @8 W5 N0 nA90 minutes        5 minutes9 L/ W) H3 u8 H/ \' v
B 90 minutes       5 minutes: p- N# {; z- Y
C90 minutes        10 minutes
5 I) q$ R) t% }
! `6 [9 }- m; m1 qPlace the graphics for the queues and the resources.   `; r3 U0 Q, z( d5 O9 e* V# a4 k
Run the simulation for 100 days.: V% ~6 l7 I! \1 [  O! q
Define all failure and cleaning times using logic (rather than resource
& E* i1 U3 O* {cycles). Answer the following questions:
5 U( ]- P$ B+ o# R# ~5 u  Z  |a.What was the average number of loads in the waiting queue?
4 N& `) ?' S+ b1 X4 mb.What were the current and average number of loads in Space? , k. h& J6 G* H/ Q# w
How do you explain these values? 3 e  d; k' G6 h  L' M8 P

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉# D2 x' z" t1 g- ]4 P, Y6 Y
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
) S/ x% i7 F. W( M这行好像也不太对,各位先进觉得如何呢?
( T( e- _  q) j& Y( K9 {$ h' M( ?3 O$ j% l
begin P_something arriving; `( E  D5 F. Z) e
   move into Q_wait8 [; ~9 v4 n  ^( D& {5 B, _
   move into nextof(Q_mA,Q_mB,Q_mC) # U8 c; U- D* ]
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
# G' O$ @8 F( k, t   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) * C8 x: F: z& G& j/ f+ b
end
. Q  O% D9 C9 m/ C% D
( }: k- R3 _+ J+ d) Ibegin P_mA_down arriving
: @9 V% D% j7 N0 U8 \2 V, H   wait for e 110 min3 W/ M5 y! w% R7 ^% [
   take down R_mA
, ~# I8 \% h( v7 w. h   wait for e 5 min# ]" C* L# j" u$ W! g, d  P% Q7 P; z
   bring up R_mA1 I& h) ^1 b: }8 S5 I# F
end
  n3 A1 x% \" M% H2 b4 c5 W! C# u
. k1 R( d: h) v, f9 ?& Jbegin P_mB_down arriving6 h5 x. P5 P7 U7 c$ x
   wait for e 170 min
3 H7 M6 f( Q+ @7 P4 C( g   take down R_mB
  J1 s" g( A% q7 i$ \   wait for e 10 min
9 V+ s: f& C# L* J0 l7 f" M   bring up R_mB
1 t* Q' ]" l8 k: ~( Z; J4 Mend6 O$ c3 ^* Z( d  m
- Y/ r* Q& }2 \- t: U6 h* ~
begin P_mC_down arriving
: p3 t! Y' R* X   wait for e 230 min3 y/ r) v. E7 k: P
   take down R_mC
! U/ n5 b# C, ?5 l+ r0 O+ O, e3 G' {   wait for e 10 min3 q* r/ u% p9 X! @; a7 y
   bring up R_mC: Q$ G) m; F1 X1 S- y$ {8 I
end# A0 z" b3 N/ T) S
, W' h4 o5 r& U: z7 |# E6 r8 S
begin P_mA_clean arriving
4 w; m6 n1 g5 a: |& d1 a$ X+ l   wait for 90 min/ ~! \. U) r% O( R6 k
   take down R_mA
5 {. ~- j2 n4 f7 C   wait for 5 min
% B+ U7 x- r+ t* G   bring up R_mA' B& z4 @0 y9 A7 b- J
end, S0 H/ e& x0 S* J  p
  J* z" K+ G: G3 X3 p
begin P_mB_clean arriving
0 X! ?" X- G: D5 y, [& d   wait for 90 min, }3 a+ P) |! n: Y/ J4 s9 d
   take down R_mB
5 j+ L4 ?9 R/ L, ?6 k# P3 v   wait for 5 min3 D7 }, |* w# ]9 t* x& M
   bring up R_mB
+ a) e: Z% g) Iend
, \" Y" R9 l- r8 `* p% Y9 O% X/ K" E/ N: J( r0 O
begin P_mC_clean arriving0 j1 i0 p. v& `6 C
   wait for 90 min
5 C3 x! w' X/ P8 U3 w- I* p% Y5 t   take down R_mC4 A7 P* b8 P' d; ?
   wait for 10 min2 q3 t3 S" p+ T8 E9 ]2 C" t
   bring up R_mC$ b9 p2 g9 R, C6 {
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
4 a$ G5 o: N  L3 l7 p( ?% l! P9 z   move into Q_wait% D3 |! I5 K6 N" v% [- N
   set A_q to nextof(Q_m1,Q_m2,Q_m3)1 Y! v5 @" ]+ Z( O. n+ L  y5 X
   move into A_w
7 ~, ]  z, z3 {+ {   if A_w=Q_m1 then use R_m1 for u 48,5 min
  j* V  |- G3 |# @1 J  C+ T' {- X   else if .....then use ....for u 48,5 min
' c3 Y3 ^- D) f, `7 \; j- b  ]! m3 r   else if .....then use ....for u 48,5 min  3 ~* E! b- D" C
   send to die3 ~5 t; U7 ~) p7 \
end
1 ]0 Z/ [; w$ T& n6 {2 H! Q1 E! c8 i* H; D5 _# F
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-8-19 05:25 , Processed in 0.013089 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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