设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8314|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
7 h! c  w" m4 d9 s  g  h& e" |6 [% |4 ~5 [; o( f
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
! F3 n6 M9 t* {1 a* l' n
4 K; M0 k. I& r$ k0 z不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
* C" P+ {( j9 c( N8 S
5 v# w5 i/ H' n; W5 \
--------------------------------------------
9 Z( B3 M4 L4 a* n8 a; D( B7 @begin P_something arriving, M% A/ h0 I) Z2 g2 M$ p6 z6 z
   move into Q_wait  [1 v5 Y- V7 m+ C5 Q9 N! d) _
   move into nextof(Q_mA,Q_mB,Q_mC)- t, Q9 R) O. V: h: F+ k: P$ n
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
4 n& k! b- m0 [8 \' R' r   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
# A0 `+ J8 U& k' w- r: ^/ P   send to die
6 j* T/ A: \& H- @5 Kend
- Q' x  Z: K/ ]$ V
; o8 @8 Z& [, U7 ]2 X
begin P_mA_down arriving
# X, N' ]9 k  P) J   while 1=1 do 2 Y( W. K* B4 ?+ ^5 X* h! |
   begin
; X* z0 ?/ v' H+ c5 ]! m1 m   wait for e 110 min
4 _; }0 @; C. O) N$ Z   take down R_mA
* f# g/ h3 {0 t( d  Q& r+ {   wait for e 5 min0 }  F- d- i+ B% K7 }
   bring up R_mA. ~" x9 |. C6 R  Z7 i% s% S
   end: i& `$ B# Z9 h. I5 b
end

- q! R/ Z- [* o# Z# r. l   _( n6 _2 u/ z5 D& o2 b
begin P_mB_down arriving2 ?5 W7 {+ l5 O0 F% R7 r, E
   while 1=1 do
( F6 Y) S: H. `3 U# G) v! O   begin& X! ?" R% p+ |( J
   wait for e 170 min8 B- @8 P( u) j" B6 D5 j) h* {
   take down R_mB" t! H9 }8 ]% B. Q# E
   wait for e 10 min
0 d/ _8 n! ~  k) |   bring up R_mB
, }( P, r" c/ \* ^' L5 s/ u% B! l   end' u. I2 z. f; V9 V! T' A6 s
end

+ g$ D7 \. ?% f3 O2 Q& F9 ?
. z. t4 r- w, I8 [( `/ u( ?begin P_mC_down arriving
9 l3 z" }. X/ Y2 L+ @" t' Q% W   while 1=1 do " K  V7 _1 ?3 u5 ^7 j
   begin
2 u/ T) a' Z6 H! ^1 C5 m   wait for e 230 min; V! s$ t& P. m/ `
   take down R_mC
$ ]4 a' p4 K; @$ u& q+ T! r6 {: k   wait for e 10 min9 X6 g! w3 X! O6 k  O1 z" J; X. G
   bring up R_mC! @  ~" G4 l! K/ X! s+ G
   end0 O5 E& H! U- S* D
end
- j! f; K2 X5 V4 h" R! N

8 ~0 ]6 l- N5 x7 Z/ e- m) w: _begin P_mA_clean arriving
8 n. f8 u" u7 C- Z! m   while 1=1 do4 S) C0 ]& H* y
   begin# v6 F3 `, o. w& }! u  V) T. K
   wait for 90 min9 u, p) M5 n. s
   take down R_mA
; W& A: Q+ T% c2 i2 Q   wait for 5 min
6 z& p4 n- t* k# A8 N6 g   bring up R_mA' C! M1 A- x) M+ J" ~+ N" T% ?
   end% a3 a/ c! c) o9 @
end
' r4 Q! a- j# y" M2 N
+ @& Z/ _; A# H$ Y+ o7 I
begin P_mB_clean arriving$ W" i1 e2 D# L* L
   while 1=1 do
' N  w0 e- h8 P! M   begin
" v' g, e% U- N+ P3 B' N2 x   wait for 90 min
0 z4 C1 Q& Y4 S   take down R_mB1 n/ |0 T# X. W% y
   wait for 5 min. o6 _2 D, k; J
   bring up R_mB0 O7 w/ e* E  }& U4 G
   end1 Y$ Y- |& x8 M0 m/ E+ w3 |3 B! @
end

7 U3 M/ ^% s" z1 z# I- ]* t . E8 H" j9 z, E5 G2 j9 j) i$ Y0 W
begin P_mC_clean arriving
1 O8 i; M) Z0 G' r0 A   while 1=1 do3 U; t3 i7 X2 y  C- J, ]. F' x
   begin
( }4 G0 t0 Q2 V# w   wait for 90 min9 P0 P5 w  r" V& X
   take down R_mC
, D- R. g4 M  }7 B6 V- }   wait for 10 min
, \& v' x9 P( {: H# c7 R   bring up R_mC( \! \' d& h" B% ?: m
   end' p+ ]/ [; O# F6 j. X; ?
end
# C! X) R* ^9 U4 D+ K
----------------------------------------% x! M8 p% c' x* @1 r. U; c9 Y; ]: N$ A

' E# r6 I6 o7 }Exercise 5.9
6 |7 r( p( ?5 a5 p: L* w. P) ]7 b4 g/ A, ?8 P. N$ {6 W

) G$ J% A! L5 iCreate a new model to simulate the following system:
2 d: ?& }# Z/ w* \* Y' hLoads are created with an interarrival time that is exponentially
8 J2 R+ x/ J1 @" f  U" b$ Adistributed with a mean of 20 minutes. Loads wait in an infinite-
$ ?; P% d; k& k; K$ h4 e) Dcapacity queue to be processed by one of three single-capacity,
. Z9 ^5 s5 N4 j/ Karrayed machines. Each machine has its own single-capacity queue
; O, \2 V* S, _( W' |9 ~$ [where loads are processed. Waiting loads move into one of the three & K( }4 [/ i; [: {6 Z, a0 w
queues in round-robin order. Each machine has a normally " O4 V& D2 w) J# t* f
distributed processing time with a mean of 48 minutes and a standard
2 [9 [8 R3 G1 p: U* q9 Edeviation of 5 minutes.
3 J" W6 h2 E8 b( g. h: NThe three machines were purchased at different times and have
1 s9 j" W- a. |- d: |2 a- m; {different failure rates. The failure and repair times are exponentially
* y2 o' a5 H! _+ t7 @distributed with means as shown in the following table:
' L5 N  ?/ t! V! e" M- l* \. ^Note The solution for this assignment is required to complete - x0 f( Z  h$ X3 T/ o8 k1 b
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
+ {* B0 Y4 O, B, e2 t& |2 Tyour model.
$ O) O3 n+ Z5 @% l3 _
% i" S( ?: U2 |1 R& `' o2 v, FMachineMean time to failMean time to repair
0 I; m, V/ ^6 N, S+ Y5 N; wA110 minutes      5 minutes
9 I* E4 @0 ^- U: r5 M& KB 170 minutes     10 minutes
! j$ h% }& E7 r; y6 |0 z+ ]C230 minutes      10 minutes' d/ f( e9 g# Z! D( U$ r
  r/ `2 S0 g4 }% _/ C
The machines also must be cleaned according to the following
' q) w0 t9 e; jschedule. All times are constant: 7 ~8 W$ {  {$ N) A
: w! L" `9 i+ F) {7 B- b, y" a
MachineTime between cleanings Time to clean
6 K1 s: d$ n( i4 MA90 minutes        5 minutes
& f2 C. w: K4 Z% W8 |B 90 minutes       5 minutes
+ I6 o" P- k  `/ o1 W1 ^2 FC90 minutes        10 minutes
5 E0 d* w* b: K; _  c2 A. [0 {1 U* ]# U
Place the graphics for the queues and the resources. 2 p! O7 K9 N, q, b2 X* p! j" a* t
Run the simulation for 100 days.; Y: w4 m( i9 ~/ f1 J$ [2 N
Define all failure and cleaning times using logic (rather than resource
- ]1 |% r: k  ^' j. U. {cycles). Answer the following questions:0 G' g- Y, }/ Y6 l2 O1 {/ q3 l
a.What was the average number of loads in the waiting queue?
+ G# p9 v& v" s2 R1 Cb.What were the current and average number of loads in Space?
5 W6 i$ _! K! ^' W% n6 Y5 E/ n/ T- |How do you explain these values?
. |) J" e9 w: S& P" C% F

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
' Z" q# r& I( _( n) l) G$ usend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
+ Q: C7 E& _! z- ~这行好像也不太对,各位先进觉得如何呢?
1 @9 f( C' z& Z3 a  `: y* @' r+ |8 F. o. k1 B; {
begin P_something arriving  m6 e( P2 V. _2 M' w
   move into Q_wait) W; t( Q) S6 i' n$ @" J
   move into nextof(Q_mA,Q_mB,Q_mC) % R3 a4 j+ r5 U. R( u+ [  |. F% j
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
6 ^6 [$ M9 Z0 q6 u9 H% ?# h   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 2 Q' [; ~3 F4 }* J- j* B1 x) }
end9 ]( A* B) f* p1 m% O7 l, B' s
# y$ h! A& b( j' L
begin P_mA_down arriving
4 g6 Q0 z# ]( W. f2 d   wait for e 110 min
- d% ^6 a# D( z1 r- J: \/ ~* _# I   take down R_mA
! E" Y0 E9 j, Q6 ^( K' G   wait for e 5 min- W2 x0 ^. t  |7 Z" m, h% e
   bring up R_mA* p  j& Z  V& z
end. a' \+ q9 H3 s, r
0 c$ ~  h, S/ s
begin P_mB_down arriving& N1 i$ k2 I$ q9 S. M$ h, {$ [
   wait for e 170 min
( K1 e- h2 Z) j   take down R_mB
$ {) R4 l3 G5 n$ S3 T4 G. C   wait for e 10 min" v2 o. c8 K9 q# t; M% G9 L
   bring up R_mB
7 }, A* j2 n  }1 }" Send5 x7 F( W4 [+ I/ l! |+ o

3 Z0 R- J, t; b# Xbegin P_mC_down arriving  M: |$ X% `/ e, j! [
   wait for e 230 min' g' i( U3 ]! n8 J
   take down R_mC
3 G" i* A+ B$ H. R9 u; Q   wait for e 10 min$ s3 M( }1 A* t' a
   bring up R_mC
* T6 t- q$ I4 r* l" l/ send% x$ C, H' M6 ?" R, ^5 v: N
2 M# y( e( }4 _
begin P_mA_clean arriving
% H& r5 |0 K' Y" A1 q( y6 o. s   wait for 90 min
- Y: Q1 B# ?6 ^   take down R_mA3 o" x; o' C& N; E7 }+ k3 H
   wait for 5 min
, N/ D/ I& w  S7 Y0 f1 u! V3 H   bring up R_mA3 ]! F- b8 c" d( d
end
% x# X2 W2 R$ D7 q& {% N& W' i! h  q+ F* f4 l
begin P_mB_clean arriving
' r! _- u) ]  s' @3 p# W( L3 N: s   wait for 90 min2 o( }$ J- c' O( _
   take down R_mB
4 B+ P, q; Q  R- H  u* @/ h6 j   wait for 5 min
# V2 l/ Y: a3 k8 K7 x& ?   bring up R_mB2 |3 D1 }$ F+ P7 C
end
; y8 p4 X0 t, T8 P& M: E/ x3 h2 i
begin P_mC_clean arriving+ t% U6 p" j% i' @5 g) ^- d$ K
   wait for 90 min4 I, z9 A& e/ A' m5 ^% m
   take down R_mC
, O3 L' f' A. ?7 |- h' p. W+ S   wait for 10 min- \, n4 u+ E8 \
   bring up R_mC
( O8 ^" G% L* [3 iend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving( N- |1 f  U7 |
   move into Q_wait
. O$ Z2 Y" q& w: N   set A_q to nextof(Q_m1,Q_m2,Q_m3)5 _2 L, G3 B& S# j0 y
   move into A_w. Z4 H7 a. p- t9 v' F: `+ |
   if A_w=Q_m1 then use R_m1 for u 48,5 min: i1 a/ T! O9 O* `# w* E
   else if .....then use ....for u 48,5 min& E6 h- \3 \! ^. y
   else if .....then use ....for u 48,5 min  
7 M9 K8 E1 p- w( p) F" R   send to die
" e  K$ o8 h! hend# {: x8 w* l  P( C

3 f) i2 z8 s0 Z. _" j& j供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-12 09:23 , Processed in 0.013533 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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