设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7851|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑   P) T% |9 q/ l, f$ g
1 q9 w/ V2 S% O5 c1 m) j
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去* a4 e9 b2 u! G8 ~1 s
+ ?' n" }. [% \' O5 s9 p
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!$ T3 u+ z+ e# [4 w

* K! l, t& a5 L8 A; @
--------------------------------------------$ {7 k& C. ]' z/ d4 M1 d1 l
begin P_something arriving
2 p" M9 b/ ]; x) t5 d   move into Q_wait
: Q6 u6 l$ o: e$ L9 H   move into nextof(Q_mA,Q_mB,Q_mC)4 k6 C+ |- L, g$ n2 y% `' G
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min/ z4 C4 G6 G2 [! E+ m2 f
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)- l! m$ _, y" }( q8 G& b3 p
   send to die5 Q6 d5 _  _: Z# X: C1 Y
end

- V2 E/ R% g7 ]& A1 J3 u0 a6 v) a 7 q3 v: W  K6 C/ v
begin P_mA_down arriving! t& F0 `. Q" Z# g
   while 1=1 do ( t4 L) l. z, L$ p! x6 F
   begin+ o: k* P7 G5 s$ [$ y8 A+ j4 u1 l
   wait for e 110 min! ^+ D5 w7 o/ j5 o1 _; {% ~1 }
   take down R_mA
0 x+ G1 X! w5 f1 }- Y   wait for e 5 min1 e0 a- C! Q" m8 u! i
   bring up R_mA
# n) v/ E! _. m   end
. d$ l0 w- |# x7 m" K$ C! d% zend
0 K0 O3 O3 D+ w& R
$ q& n) J; ]" L/ ~
begin P_mB_down arriving
( }' ?1 ?1 q* w% ?9 Y+ Q& g5 o: r   while 1=1 do
6 P+ K9 L" R2 v$ z! n; g   begin
9 q: }5 w; t/ |% z. m   wait for e 170 min3 m  T* W$ x' Z9 G" A3 ?
   take down R_mB
0 [( p* |: M. X" e3 Q   wait for e 10 min2 G) c$ [: z% h; P
   bring up R_mB
8 I7 @9 |- Y% U# v   end
( [2 W! q& n# P. M. V5 Send

7 ?/ q' P% m7 X$ ^  J! A  M! y
: k8 _, ^6 r, @# [- U( @begin P_mC_down arriving
% W& c$ @* I1 t: R5 I" y1 a   while 1=1 do 7 ^, y$ V) ~& Z) ^1 A
   begin* f/ r) H. S1 u5 T5 r5 z5 J3 K0 x
   wait for e 230 min& @) b9 y! G* p7 @. F3 ?8 x
   take down R_mC( J+ ^8 |4 W! f2 w$ g3 r
   wait for e 10 min
  \) H; n' x- y* t; c; e# ?   bring up R_mC1 w$ F! w/ C( M- V# y
   end
& ]6 x1 E; w5 H; i5 s) _end

, A! e0 R; P5 ]9 |5 h- R
; R" H( X+ `" L3 _$ g( B  @# I1 [begin P_mA_clean arriving
5 |$ R8 _) C2 C" o/ s   while 1=1 do
/ s9 H- s$ U# T8 U- A   begin
/ s8 A4 k! s' }$ u+ @   wait for 90 min
# ^! z0 Q4 j+ I5 _6 L0 L   take down R_mA8 x' Q# K# M$ @4 Q9 T2 i9 W5 _# S+ E
   wait for 5 min
' s. F+ h% w2 _: U  V# C   bring up R_mA
' c7 {! `% H, |7 {2 p   end
! D: g$ U' C8 x8 b  T0 k2 yend

8 w$ R+ F9 [% a& C, O, g" Q. z9 i # ^" x3 ^% [* |  k
begin P_mB_clean arriving! N. @, ~6 u  {. S7 ~2 R7 H
   while 1=1 do
  h; ?2 l9 A" G& ^4 D1 @7 U' E   begin
' _$ F1 V9 u. y/ E# Q2 ?0 g   wait for 90 min  C, r, E: s$ I. ]% _3 e/ Y; f( ]
   take down R_mB
2 \* G5 B  E7 K/ h0 P( K   wait for 5 min
: [1 C% R7 y" D   bring up R_mB
- Q7 f6 Y5 S9 ?3 X% K2 m4 c4 [   end8 M( k3 _/ @, E) }
end

$ l- n) O1 }3 D5 o- k ! c0 o5 v9 X$ l+ @0 C, n
begin P_mC_clean arriving
' N; T. S& w' Z4 @0 X% D   while 1=1 do
7 h7 u% D9 c. |  Q+ u& e% m   begin7 X3 S! u3 Q- r0 K9 i! @9 w
   wait for 90 min
7 h. l/ r" k" j$ V/ @+ P   take down R_mC" ?0 b( H( [4 C6 w
   wait for 10 min
3 H0 d9 Q. C6 ]# D4 u& z   bring up R_mC: Y$ M+ _, B( P) n: y$ t4 [
   end& f8 h/ C$ t$ P: O2 w
end
8 L; s' I' G* `' B9 i9 s
----------------------------------------
( B3 h% P7 W1 @- M
+ a0 |% R; A' n$ f7 K! N1 \( Y. \Exercise 5.9
0 g4 m' k1 v3 B
; g, k3 _0 U4 I% ?: o3 j9 }) ?' q7 l  v" p# I
Create a new model to simulate the following system:$ r% \9 V' j1 F. P7 ~
Loads are created with an interarrival time that is exponentially
) f( r' N- T, ~5 adistributed with a mean of 20 minutes. Loads wait in an infinite-' j9 k( G( ^( A0 [' p
capacity queue to be processed by one of three single-capacity, , q- |! K5 P) I- [
arrayed machines. Each machine has its own single-capacity queue
5 T- {7 L' g' wwhere loads are processed. Waiting loads move into one of the three ) m) Z9 e$ g7 I0 F" F
queues in round-robin order. Each machine has a normally ; p0 i  }; d( y+ s% f! D8 O3 ~2 r
distributed processing time with a mean of 48 minutes and a standard
4 O% p  E5 N& O! d! adeviation of 5 minutes.
; m! s3 y, D* `" Q# ], b6 g/ F+ `The three machines were purchased at different times and have
, v9 x) m0 M5 b  R- O6 Ddifferent failure rates. The failure and repair times are exponentially , h: Q! Y7 o9 z5 e4 p% z# @$ C1 n
distributed with means as shown in the following table:
9 }  z& i% ^0 m$ Z  ]" [& @Note The solution for this assignment is required to complete
- l5 ?( P) i/ u4 s' Sexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of . ]( f/ [" G) S$ X
your model.
8 Z9 a/ |' u" L; v! a0 `3 U- e
9 R! C6 N3 G$ x% d  R: {. qMachineMean time to failMean time to repair
& `8 K9 ?5 t% W5 e+ X( v: G* AA110 minutes      5 minutes6 c" @! @) I+ N7 `" ^+ d4 p3 w. Z
B 170 minutes     10 minutes* ~5 r$ g$ F" ?5 I  ?! k
C230 minutes      10 minutes
8 l9 A5 R7 q; N: n0 ]$ j4 N' t4 t8 z
. Z+ E1 D# H1 v) h% PThe machines also must be cleaned according to the following ) ?) ?& {2 d8 \: A; K& x
schedule. All times are constant: ' w7 \+ G) {7 n  Q" \

$ p3 s) v' d& _MachineTime between cleanings Time to clean0 z0 o( Y( s4 @7 L
A90 minutes        5 minutes
5 D+ l# L9 z- x! v( ?" |" P7 L' W9 gB 90 minutes       5 minutes3 B4 y  |6 `: y
C90 minutes        10 minutes
! a4 J1 p) d) t) Q" J" D4 Z* f; Z8 f3 w2 |& j3 j  x+ }
Place the graphics for the queues and the resources. ' o; p; c4 c2 o- U9 y
Run the simulation for 100 days.4 c; J4 X! f3 f$ O6 N
Define all failure and cleaning times using logic (rather than resource
) @& q9 s9 i2 a' gcycles). Answer the following questions:
- y9 ^# `# s& ~9 I# Ha.What was the average number of loads in the waiting queue?8 f! X- h& I7 m) X8 v# `' c
b.What were the current and average number of loads in Space?
( d: J7 Q8 [5 L% ZHow do you explain these values?
. ^  }# _! ]5 G8 y1 L. Y6 _7 `) Q

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
9 U# ^3 w' y! x- csend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
3 n; O: ^' T, E这行好像也不太对,各位先进觉得如何呢?0 F4 v' O# x9 }1 T" A
/ Q; x; l5 h* j; k, h! c+ ^
begin P_something arriving
2 g1 c, r3 i) {5 s+ l5 A/ i   move into Q_wait
: ?" {# O9 s- l! ?* V' C1 u. ^% A3 N   move into nextof(Q_mA,Q_mB,Q_mC)
8 h3 m- t$ _8 `1 c7 a   use nextof(R_mA,R_mB,R_mC) for n 48,5 min' J$ t) W+ Y4 C  f2 G2 ~
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
$ x8 H# S1 \0 u  Oend
; A, ?2 w; x/ c1 s& X" v6 ^$ M! z2 g1 O) f; R# M: d6 d
begin P_mA_down arriving! I/ m; ~  w" |# l# @0 I9 G
   wait for e 110 min
+ i+ z$ G% d; h" g1 m3 [   take down R_mA
  v/ J' f& Q. H5 F" M   wait for e 5 min7 X0 o# I" @" Q9 p! ]3 t' Y
   bring up R_mA
# `0 g8 F6 L  p; ~end
. i* t1 g2 X! ]0 m. [# q( E( x8 }7 f+ N) }8 _; a8 Q+ S# Z
begin P_mB_down arriving
5 Q8 l5 `' K" n" r. h   wait for e 170 min/ I' s3 ^) r4 j( {( W1 y( C
   take down R_mB+ H0 i3 ~3 V$ V9 r* i
   wait for e 10 min/ c" g0 U5 G1 V) g
   bring up R_mB
7 ^1 Z) ]2 o. H& W# m( D4 a$ Cend, T; V2 E8 M/ v0 N2 ^

. ]5 T! x: y: g+ k9 Nbegin P_mC_down arriving
' u  `, g2 r8 a# S" t   wait for e 230 min
5 i: _5 o* d/ _( R# _- w: O   take down R_mC9 V; F( b2 {$ x! @
   wait for e 10 min  E, _# T, H4 g0 X+ P: A
   bring up R_mC6 {7 W, H5 s+ o- g
end
6 y: Y7 j& z! k. N4 D) @/ R! C* y4 u
begin P_mA_clean arriving
. B; B2 f* C3 A) {( w+ |1 H% E   wait for 90 min0 M/ T1 w3 c/ B" h* w% U+ S. w( A1 Q2 O/ t
   take down R_mA
' @. m3 h" z/ V8 U/ l   wait for 5 min
* h8 O* H. Z) m8 F# a1 M0 a% U   bring up R_mA& \5 Z  j# r' _  ]$ u; d
end
* R- C: e3 `% [0 _. R7 H! D. r* X* k5 s6 a! ?3 S
begin P_mB_clean arriving
/ z" t& e" R1 R5 a- H9 L   wait for 90 min$ r- R0 c6 F6 C# c# k6 N0 j
   take down R_mB1 T- ^1 b' ]" g( H' Q% z0 P
   wait for 5 min3 `& D# x* L. T1 ?8 p
   bring up R_mB
1 ~& a: n) ~# q! y# W, Oend
" z/ N' |& c, ]. C( t: q/ d# k7 ^* w7 W
begin P_mC_clean arriving
7 c9 ]7 o( \' n$ |' @   wait for 90 min' N; Z/ Y: G: F) z+ S, l
   take down R_mC
8 Y+ s6 T+ e  Y2 \# B   wait for 10 min& e2 Y# R5 }/ n3 `2 {3 a4 v
   bring up R_mC0 o% X. v. C  N: V+ a8 G
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
- D' d# m. \( D7 G4 M   move into Q_wait. o4 D2 s' y$ k6 N: x, ?
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
. F. s) N; n8 b/ a   move into A_w
5 {+ z' `. {. g  W* W9 k4 _" e  s   if A_w=Q_m1 then use R_m1 for u 48,5 min8 `, i1 n* h( Y9 P3 j
   else if .....then use ....for u 48,5 min; U+ V) ^# Z$ i) P+ _# U
   else if .....then use ....for u 48,5 min  ( u  q! w! b9 _$ f
   send to die" ^& `; `/ q, ~0 G2 ?& ~
end) K" ?. I. i4 f
# c8 p5 p" R6 d, b
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-27 20:12 , Processed in 0.014377 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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