设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5856|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
$ i# ^# {+ N4 F: E0 J; o8 I: T* C  G
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去! u" v: q. T: z
+ _# n4 p( @4 @3 f. R5 u
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!3 w. |6 |3 c7 [% i% r
/ x& c. Z6 |, E8 o, t! E  |. m
--------------------------------------------
: Z9 N3 c8 R4 ?+ k4 ^6 p0 W& Jbegin P_something arriving
% G; g% B% r: u: Z   move into Q_wait" {. [* t* K! b, I) [
   move into nextof(Q_mA,Q_mB,Q_mC)
6 N( y; i- P6 h6 b% n* d1 ~: S   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
- `, x; T# x0 V! B4 m   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)! [6 y) U0 b% `. Z. h; S
   send to die
6 D2 @8 P" P3 i  F% a1 U; bend
# T& Z" ?  ]. \* p8 J

& ]9 b# s, S0 i0 jbegin P_mA_down arriving
# v( G; I$ J# R1 N   while 1=1 do 4 g5 f# p' {! L0 u
   begin
, F7 u  t+ Q, D8 m   wait for e 110 min
% I5 n* q3 ^3 ]& {, m- G   take down R_mA
2 [- D! S: n: l$ ]/ W! _3 ]. h" Z   wait for e 5 min
: g% r& \4 j# C8 P: n* z   bring up R_mA
7 l& K  k9 T+ S& k' {. _+ e   end# M" B+ v/ V# E
end
; l7 |# x) @; o, v6 b' L

( r8 r5 P" h3 Ubegin P_mB_down arriving
+ o$ S6 N1 R6 B/ N( q   while 1=1 do' U9 y5 K& _, a1 }; m+ ]
   begin
4 F& P# v: i6 [. u   wait for e 170 min1 n- D& M% M4 D
   take down R_mB0 s/ c" \3 d3 h$ d7 W
   wait for e 10 min5 \% N1 i* ?, l# U6 t+ b
   bring up R_mB* i) k2 Z0 g9 M& U6 h* I  W
   end
3 C  \( j/ u" z' h- vend
$ V+ @0 `) N: D# [. L* R

( |$ Q3 ~5 K% ibegin P_mC_down arriving8 Z: e/ p! `9 F  c
   while 1=1 do . f1 ?9 d! A8 v: a
   begin
: x5 ~: |- i+ _+ Z: T0 M   wait for e 230 min
- d1 _; _/ d' z   take down R_mC
7 g( N, ~: v. u+ \) Y' {3 h   wait for e 10 min- S/ G! n/ {3 j. C+ p$ r
   bring up R_mC
# f  w8 G8 |7 m- }+ v   end
; X* r1 }+ a1 t: x) Z! R  ?( ?. C: Eend
8 t% @, r8 ?0 _" x
1 r$ }: i0 z  |% M3 h# x% V% Q
begin P_mA_clean arriving8 l+ p* P: J0 ], b2 b. Q
   while 1=1 do
5 X( U( Q6 {4 p2 ^3 c6 i* G   begin
% y# e" R$ f+ v8 E4 k+ _   wait for 90 min, ^) s  [$ p1 K/ l& p
   take down R_mA8 N' i8 s  x! B$ x0 j. R+ {
   wait for 5 min: A4 K$ [# N1 X. C' \& K" _
   bring up R_mA
: t& T9 k! L" W  q5 z/ E" p9 g   end) _/ W6 \( q) h* h
end
" W8 j! [/ H- _
, U/ O+ [: o/ f* v) p' h$ R$ w$ s
begin P_mB_clean arriving
+ @; }1 i- T$ K& S7 T6 Q   while 1=1 do
, _) W$ |) W6 d( r9 |/ x   begin4 q+ n* ^0 e, A' S1 l
   wait for 90 min( Z8 c' j9 |* k# k, d/ F
   take down R_mB% {$ F, h' k6 Y# T- D
   wait for 5 min
4 C2 O6 |" ]5 X! u" a4 i   bring up R_mB
; w- g# ^3 z3 P   end
7 B; n+ l% N! m' m6 Zend
9 M5 V% w+ v; f6 }

2 ^9 h, R5 h" i# Bbegin P_mC_clean arriving% T7 f! q3 V2 ?6 ?- k
   while 1=1 do
1 q; G9 ]' F- _1 x4 `   begin, ?# Y& L3 Z2 V$ \+ d% g
   wait for 90 min
- H  I! V0 W, Z9 G! H+ c   take down R_mC  Q  P0 u* O* Y3 N( l$ y8 v) l
   wait for 10 min& ~. ^; z  P8 V( \
   bring up R_mC
( d$ B& {7 M. |& O. _   end
# h5 f: b0 M- X  y7 `6 M3 Kend
4 D! w2 L" }9 q+ n& z
----------------------------------------
9 n9 c- o# f; _$ e7 p ( q3 |0 y2 c% \! L. E: N
Exercise 5.9, y' T$ P5 ]' G8 g  r' v2 L
+ m6 z0 t( _+ \! ^3 v6 K
: H. @' x. |7 {  O
Create a new model to simulate the following system:
: K0 [( b& f$ J) OLoads are created with an interarrival time that is exponentially
; A* M4 O( }( l) [, W( d, \distributed with a mean of 20 minutes. Loads wait in an infinite-
$ H: @4 }$ ^1 m8 Z2 Xcapacity queue to be processed by one of three single-capacity, / ~# @8 T+ I( w' {* p
arrayed machines. Each machine has its own single-capacity queue ' F" f1 v& k" W/ i) u
where loads are processed. Waiting loads move into one of the three
6 I' c8 c+ M3 N0 m$ _! @; \2 U1 mqueues in round-robin order. Each machine has a normally
' g- C* p; C) g$ [, N  }distributed processing time with a mean of 48 minutes and a standard
4 }+ P- ?; c. ?& O2 d- R) bdeviation of 5 minutes.
0 {( a% e! d' _9 Q9 _9 U6 {- JThe three machines were purchased at different times and have
; x5 c7 |) {1 q5 }1 h$ tdifferent failure rates. The failure and repair times are exponentially 6 T1 M) B! J, e" t2 u
distributed with means as shown in the following table:
. M' y& j* E* W* z, nNote The solution for this assignment is required to complete
. A) }  G( Z8 M! Q, k# Sexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
2 ]- S  m6 l+ s- K/ a. ~your model.
. ?/ S4 F' c; P1 M& l- T2 [
9 d$ ~4 T  s2 Z3 fMachineMean time to failMean time to repair. n+ |9 i2 W$ x: {6 T
A110 minutes      5 minutes( T4 u2 g% X4 N& s& j
B 170 minutes     10 minutes
) S( {; j- E3 K* {+ y# WC230 minutes      10 minutes
9 `- T# _! ?) G' S8 F. g  c* T4 c+ Z1 W* x* u' j
The machines also must be cleaned according to the following
$ P& X: Q$ e& v4 Y& dschedule. All times are constant: " J* h! g3 [# C5 C" a! g" e
; z7 b/ U  z9 r8 o
MachineTime between cleanings Time to clean
( L% W1 ?( i+ v6 d  x+ u& ~6 DA90 minutes        5 minutes
, |1 \6 B/ T" {1 w7 a1 DB 90 minutes       5 minutes' k+ ]4 E) [( g2 g$ U  X4 m
C90 minutes        10 minutes2 C5 q7 @  C3 D7 o% R
7 R% H) u8 F' |! g
Place the graphics for the queues and the resources. 0 X/ k9 ?% T/ a. A# [7 W
Run the simulation for 100 days.
2 Y# K. r' \1 {7 a+ j; s- |9 n8 i) T; `Define all failure and cleaning times using logic (rather than resource
7 n8 {/ H8 B4 \cycles). Answer the following questions:
- ^/ i" l  ^6 R8 u+ _a.What was the average number of loads in the waiting queue?
6 V, c6 H$ ^9 Z5 H! _, c# Nb.What were the current and average number of loads in Space?
  g. F* |! x5 G* D6 _4 lHow do you explain these values? $ q; N% }2 q9 n/ n8 _( ?4 ~% m

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
; X) R- A) T/ h  Csend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)7 I3 K3 p* N: }) M+ l! c2 g1 E$ w9 S
这行好像也不太对,各位先进觉得如何呢?
5 F" h) p& I2 p# f! @0 z7 m& y5 r) r5 H
begin P_something arriving
) Z5 o$ V' L3 q; W1 B6 v% X3 g3 J& b   move into Q_wait
/ M! z, x* O1 v   move into nextof(Q_mA,Q_mB,Q_mC) 0 |! w* `4 \) G& v
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min& I' L8 [0 i: b! z$ I  x
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 3 q. n/ ~3 V& q; \1 l- D% B
end! E) m0 Q2 e; L" Q/ s* U' P* }

, V; _" G- L6 p$ _4 qbegin P_mA_down arriving  [0 w# u0 C4 q* }2 ~+ n
   wait for e 110 min6 q) F2 G3 M; u& O7 i* N
   take down R_mA
2 L/ U- W- a% b' a. ^   wait for e 5 min
5 P3 Q7 a2 l9 @0 v3 C   bring up R_mA3 j/ u& B, f! f9 U
end
2 z& H3 t  r, P+ \' l( V$ C$ l) ]
begin P_mB_down arriving
7 E* B2 }# g7 ~! i' t   wait for e 170 min( j; @5 s: C5 K8 p' ?
   take down R_mB0 x; |! ~3 x: S
   wait for e 10 min7 J% b: _% G& }6 x
   bring up R_mB
  l+ m" j! L" Y. k; x. |& S: K( Iend. F: |$ S2 f, Q8 T+ [) @1 v
9 h, E& n" h6 r0 j
begin P_mC_down arriving
4 j# p& G( @) \7 ]/ p3 b   wait for e 230 min  Q* W6 b; {/ j1 t9 I  v
   take down R_mC
+ h9 U4 q2 ~6 |; y8 ~! b8 {   wait for e 10 min" g% Y2 s, S% o1 q* m% i) R) b
   bring up R_mC
* @# t* \) ]4 G+ A& c) ?  f% Pend/ Q; h2 f9 U0 t1 O, @& _: M
4 y' Y5 L2 A1 I$ c
begin P_mA_clean arriving
- {: A6 P: K. D: P   wait for 90 min. V, C6 a7 ^" p' [2 [5 s9 \
   take down R_mA
2 e& Y9 O" x. L+ T& V& P   wait for 5 min' [6 O# w3 M1 Y% _2 v
   bring up R_mA
7 O/ I$ g0 a$ B+ n8 @* Mend
, o9 I( c) h. I0 l$ a0 W0 c3 D$ h2 y1 b+ a; O4 I- R. n
begin P_mB_clean arriving* H8 l; ]3 x+ T5 a; v+ R
   wait for 90 min- j2 H; \- D% Q! E0 V# h% k6 e* E& I
   take down R_mB' C( V9 J  k5 l0 R
   wait for 5 min
  S& w7 s! j7 m* k- s   bring up R_mB
* v) O# P; o6 w/ q9 Wend
: l9 C6 W: }9 `# x& ^/ I; z6 B3 Q; ~
! P! R, l) d; S  f( Ubegin P_mC_clean arriving/ w9 I- W# y* m% h$ D! M; s, Q3 s1 K1 i
   wait for 90 min  q; o: N; c& T8 s' o* |- Z8 |. v
   take down R_mC9 [! r2 v$ D  b
   wait for 10 min
% O2 z5 I/ M8 q   bring up R_mC0 d* [1 {3 d0 b$ P/ [) p( ~
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving2 I: i3 W5 c- k/ g9 P+ D% L; Z- o
   move into Q_wait3 W) U, A6 l% B& }4 S
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
/ @* t. [2 v! Z4 [) c   move into A_w
* X- Y1 l$ }# Q   if A_w=Q_m1 then use R_m1 for u 48,5 min
3 U. E, E8 a; t) I4 _, x) n   else if .....then use ....for u 48,5 min5 P7 F9 y+ J- z$ _: D' \. @: Q
   else if .....then use ....for u 48,5 min  
, R$ y  ]$ l- Q* `- S  r# z7 {   send to die0 K. g8 E' n1 I# e# \. Z
end% M1 B6 r; m- d6 T
% V* p! q  {& d! ]
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-2-2 00:49 , Processed in 0.015912 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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