设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6513|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
/ d! T! b! ^- O. d0 {
$ `/ L8 R1 w5 ?底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
* d: c0 O1 I3 `' G4 t) j1 @
- g+ D0 P" `+ J0 s不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!2 h  H4 }- g- K" h7 G0 Q
, t# D" s  E! v3 f
--------------------------------------------! k* K& W, _( F( m1 z3 d" g+ L
begin P_something arriving' {  _# e$ y" r4 a$ y9 R
   move into Q_wait
1 n( S+ G: W$ R; Z   move into nextof(Q_mA,Q_mB,Q_mC)( }( C/ |7 F+ q; C6 \" u. d$ l
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min9 k6 K& n: M- R; D) Q* J( u
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); q- X- k2 W' C. A, `" K1 }3 y' X
   send to die
+ m* |! D; X' i( K. M$ mend

$ U: V0 v; _1 C% ~, _
& ?! N! o8 h4 L1 M5 v# Fbegin P_mA_down arriving
  [0 Y0 i- L7 n* \1 p7 \   while 1=1 do
5 x5 n0 F' \; j% C, ]" D   begin
+ E, J! B' ?( H: d1 a   wait for e 110 min* n) [6 l. j4 c0 [; ]. @
   take down R_mA+ |* N. v6 r$ V2 e/ O/ s. u, `
   wait for e 5 min6 z" W6 `9 U. b" ]
   bring up R_mA- @: }6 T, M8 C: _) i4 n; l) H
   end- u5 X2 G; y5 [+ Y. z: t
end

, D" N5 m" n3 q$ o/ x7 b% w 5 a4 M9 x8 C3 _3 P7 J, ]4 ]
begin P_mB_down arriving
0 j; o1 {( w/ s1 A0 D: p% {8 M% n   while 1=1 do4 I0 o# c+ u9 B+ q' N
   begin8 D& n8 q$ Q% P
   wait for e 170 min
6 V' L) h, v$ h# y! I- X   take down R_mB
' h7 W8 w" V- I; Q( c- ?   wait for e 10 min; Z- L5 {; B. L- O
   bring up R_mB2 r+ B# V0 {* V# G
   end
8 o$ o& u* ]# m# uend
8 b0 W7 J* S; a/ i, L5 D/ Q
- ]3 \, i: r6 G+ z! K, g7 @
begin P_mC_down arriving: o! c4 J3 |7 z. K. N
   while 1=1 do - r) h" ^% Z. f0 T6 R0 t7 d
   begin7 a# f, G# C- A2 c5 M" }7 i
   wait for e 230 min
4 T$ I0 O6 c& o/ F0 W4 R   take down R_mC8 ]2 w- Q+ v4 A
   wait for e 10 min# }; [, p3 J6 I$ }1 R4 B, h1 c6 o
   bring up R_mC
% S5 s; w2 J* K   end) [3 @* n, l" v7 v
end
0 }9 [9 K7 y3 G) O

( |: r* A% y6 F, ]2 ?! Dbegin P_mA_clean arriving
9 r7 E6 \; M# Z$ ?% k* ]1 d: B/ d   while 1=1 do
$ N. u2 m7 Z$ ^, a/ J) j5 r% p" Y   begin
5 O1 g  E: }( w" i   wait for 90 min1 y0 Y8 L. ^2 Y& g) G
   take down R_mA1 {! W$ ~! P% {
   wait for 5 min
& m, Y1 k% g: f7 p   bring up R_mA* s" A: ]* u. f% [/ |3 [
   end& X% A4 d4 d# b2 l1 z
end

8 }7 @( `4 ]  Y
; `: O1 I. V1 l) q  c" s# Mbegin P_mB_clean arriving
1 `4 G1 e) t, W' ]8 _   while 1=1 do" }' V4 |% v) N. k, K& p! T
   begin8 r$ k, H( l4 ]. l% e
   wait for 90 min/ W+ ?  d) g/ W7 {" `+ U, M
   take down R_mB; |! T# i* m0 h7 c" j
   wait for 5 min* o7 h- J  r( F0 U6 q
   bring up R_mB/ F  h5 `/ B# U4 g
   end* |6 s5 f! S, X
end
; {8 x1 Z; z+ F# v3 e. Y9 Y
. `+ K, B8 W1 R, X& a
begin P_mC_clean arriving1 G) s9 Z, r8 L+ G$ i' Y
   while 1=1 do! G( }! t. x! P1 F9 ?( V4 ]( F
   begin
3 z* z) p. e$ n) k5 Y4 r& D2 J   wait for 90 min$ i# Y/ ^: s! S* J- c
   take down R_mC1 n- V, a0 i- H. O. c: ?# ^
   wait for 10 min
( E) _5 Z5 C* Z7 h) A/ a   bring up R_mC
6 n8 K& {1 O/ h/ V   end
" V' s' v3 r  U. S: \; Nend

& \0 R  G6 v) U# A7 }( R! N8 D, j----------------------------------------
: Z8 Y5 a# K8 p( c
4 o: |. @+ Y1 @8 ~+ k4 e5 TExercise 5.9
/ ~" ^3 Y5 P4 Y) f% j8 ?
/ h; E, E/ [) M7 M: S5 u* _9 o
& F, s" M- S; u( SCreate a new model to simulate the following system:
: x' H" f( Z* bLoads are created with an interarrival time that is exponentially
) _* W* c8 }2 Wdistributed with a mean of 20 minutes. Loads wait in an infinite-
% F- w% x1 f9 ?2 q, Q2 ocapacity queue to be processed by one of three single-capacity,
! g# T' A+ }) R( n: d& M8 Xarrayed machines. Each machine has its own single-capacity queue 5 D4 V$ Y' ]- ~% M6 W; n' o
where loads are processed. Waiting loads move into one of the three
7 v4 }5 Q; q* |' N# Squeues in round-robin order. Each machine has a normally
# a) P1 q2 s1 c# I$ ]# idistributed processing time with a mean of 48 minutes and a standard ! O: j  h, s7 p% a$ p
deviation of 5 minutes.- b2 f& E! Y) U; a( r* r& c
The three machines were purchased at different times and have - f& V2 w1 U* d( H4 V
different failure rates. The failure and repair times are exponentially 2 j9 R# [" v6 O, o1 c
distributed with means as shown in the following table: " n2 z3 y- {0 {& V, E$ Q2 ]% a" N
Note The solution for this assignment is required to complete # v& \5 z3 x# p* P2 T) {
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of   g% l. @: s! ^9 Q- r
your model.
5 s; b8 L& K3 t# z# h- |
& W7 R' I' e' y% D3 q% |MachineMean time to failMean time to repair
. G3 \, h) G, ~. C! ~A110 minutes      5 minutes: w9 M- g4 b7 m  B
B 170 minutes     10 minutes% ^- z- H/ W* c" S
C230 minutes      10 minutes% W% N* E$ f. o; B1 r; q' L

6 E: e: b% l3 w' k( UThe machines also must be cleaned according to the following / {  i5 J% \/ `8 E3 Q3 Q7 U
schedule. All times are constant:
% O2 o& k' Q' ]& ]. J  \7 }, g% t# Z8 R  z
MachineTime between cleanings Time to clean
( r) g1 X0 E" m3 P& IA90 minutes        5 minutes% ?# ~& j5 k1 y- S. O3 W2 h
B 90 minutes       5 minutes5 r% L5 ~( e4 m* }: _; _; |
C90 minutes        10 minutes
: r3 f7 a2 r1 o. v4 j. L
! J. v+ K. x5 j0 ^. Z( V( UPlace the graphics for the queues and the resources.
6 W, g; _: s* J7 S7 URun the simulation for 100 days.
) f! p% G8 W% W( q8 N5 x  q# RDefine all failure and cleaning times using logic (rather than resource
  }6 u5 q2 g8 E+ t/ Dcycles). Answer the following questions:- {# R' h2 v/ j0 v! k
a.What was the average number of loads in the waiting queue?
, p  C- Z! g5 w* |+ Rb.What were the current and average number of loads in Space?
5 |3 A' c' I$ Y4 }# c9 `2 AHow do you explain these values? 1 l1 V. V% Z- i

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉  l! X- n- L7 b: Q! _
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
: Q8 A) ?) ?. l6 X- r5 g这行好像也不太对,各位先进觉得如何呢?+ ~7 X( y4 ^' _$ y  K# U& i% Z0 N

, P: D9 a; ?: P" e2 C  Lbegin P_something arriving
9 W# o4 D' ~8 S9 I2 q; ]" @   move into Q_wait
) Z$ L. q, S( W- \; J* K   move into nextof(Q_mA,Q_mB,Q_mC)
! a# e$ Y0 m/ M) j6 F   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
; ]+ u4 W  v" M  y) U$ s; j   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) % m) E% T5 i/ E4 c/ X
end
$ J' z: v6 [4 B- f
6 y, Z: |- {8 _" Z9 m' Q0 ]% q' gbegin P_mA_down arriving
1 o* X9 {: l$ J0 ?  X- C8 P3 z+ f   wait for e 110 min1 h1 m8 P0 F$ g. V+ [0 J9 x2 M
   take down R_mA' X5 I2 t6 ?9 _5 v
   wait for e 5 min, d1 g: {. s$ W' c2 }) I
   bring up R_mA
. l% I0 E  o' N3 a+ q! p: u0 ?end+ x; h* V" G' G! x
4 M/ L1 j$ ]+ l, j& @# P8 U7 n# ]
begin P_mB_down arriving
! D* U7 a# t" h   wait for e 170 min2 o" V! `  e6 `+ R5 U; m2 C
   take down R_mB" Y" {3 d/ J8 c4 p
   wait for e 10 min0 z, J, l) b9 D& Y- }- R. D
   bring up R_mB# f8 R. w) F5 _6 X" x
end5 P+ x% L* W4 o5 J' l

* }! O* [1 Z8 |& n: H, Zbegin P_mC_down arriving
* m5 d! \$ H- Z+ `   wait for e 230 min1 M. }3 ?3 u* ^7 Q! ]% u/ H9 e( l
   take down R_mC
' k5 ~3 C- r+ G" m0 A) v   wait for e 10 min
8 F9 [3 M' y2 v2 Z1 O9 [, @. ?   bring up R_mC6 G8 q& u$ ~5 [& \( t) y+ V5 P' h
end
/ n; T3 H9 Q& n4 X! j- ^+ `5 J& m& s( x7 s! {/ P, T( P5 c, e3 T/ p
begin P_mA_clean arriving3 m( v3 z: T" L( ~. d
   wait for 90 min- [" x  V& @7 Y5 l* ?' O( }- Z+ \
   take down R_mA
; c, w/ ^0 A% o# Q  c. H1 {2 L   wait for 5 min
5 ~" I2 T2 x. S( s6 H7 M   bring up R_mA5 w1 [6 f* ]$ e6 E4 M9 s0 P- X
end
" N6 ]+ Q  {! a* t; |4 u, z5 s7 p) b7 `8 R4 Z
begin P_mB_clean arriving# \" f  b% C( v8 M/ o
   wait for 90 min- v- }( M2 G  W" @! k2 @
   take down R_mB, I# G2 K" D8 I3 F( L
   wait for 5 min
8 k3 o' ]; D/ _$ E/ U7 r9 ~$ s   bring up R_mB
/ N0 T- E- t! j; n  ^# Cend
1 z  o! q) T1 y3 [  W* l4 k8 P
& h; R& J2 X* r9 ]: a# Lbegin P_mC_clean arriving
, `2 x  l! x" \" W( p6 \' t   wait for 90 min% v; w* P& w, }5 B  ~" E
   take down R_mC
/ V; F* z; H4 M/ M. Y% N7 @   wait for 10 min
8 y& f  ^8 e. ~9 p* ^/ y+ `6 C   bring up R_mC: O( Q* d; b! I0 z5 B
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving3 E* N* K; d4 J' W' ]3 F
   move into Q_wait
5 Y/ r+ E! M- v9 w. m" ?) y( |, x   set A_q to nextof(Q_m1,Q_m2,Q_m3)
+ K/ P& n5 I! b2 E; J/ ~, Q( L9 }   move into A_w
; t/ z' x: T  f, u+ `2 K; g   if A_w=Q_m1 then use R_m1 for u 48,5 min
$ N5 Z, A# |+ J! `4 F$ X; Z0 d# ^   else if .....then use ....for u 48,5 min% d# \9 _0 I, ^6 f$ q4 m4 J
   else if .....then use ....for u 48,5 min  - i6 [# x. I8 o+ y( z
   send to die: M0 k5 {2 U' Y# T/ u" g
end! S* k6 g# ^  D0 F' `
, J* P* o. K# a2 v
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-6-2 13:13 , Processed in 0.016968 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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