设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7370|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
& A+ L5 [% O, f' j
* c* j: V4 z8 R, Z& i9 Z$ K底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去" S* D1 P% o- ?( e) S7 ]; [* \: R+ @$ {. }
6 r" p/ F. `/ ^  U
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
5 q2 i! l/ D* u4 E! @- k8 K6 ]9 d. D. a
--------------------------------------------
2 d6 I" U& i% \1 G/ r* Sbegin P_something arriving- z6 X/ [2 Z) M! U! P3 G) d
   move into Q_wait. J* I; r: J  t
   move into nextof(Q_mA,Q_mB,Q_mC)
6 r: _1 a8 P' M# G7 H" ]5 G# o2 h* j   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
/ |+ N2 S; Z2 c8 E   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
+ {2 W5 Y. B. \% Q3 {   send to die
% k% n5 C! `  u1 r( Fend
7 l. R# k8 x0 u* F+ ]
, q" c: q/ u5 }( a0 q- m7 J- s
begin P_mA_down arriving
# `( h3 F) [% l  E/ {   while 1=1 do
4 K4 g7 B5 W! {; y1 x. S, _; e   begin6 }  C* G$ a& B7 f
   wait for e 110 min
* g) `1 W( W- W4 J; q% H& o   take down R_mA
- E( T& }! y9 A! o% s, Q   wait for e 5 min
6 ~/ b$ _/ }# |9 N* r6 a7 L   bring up R_mA
: t$ s8 a% z; y9 X% @- L7 y& D) |   end
3 s, P7 I7 s/ |end
3 ~' E" ?9 [6 N: H6 G
6 m- h% f6 @/ E$ ]4 h: R- G
begin P_mB_down arriving
9 a7 Q8 r1 L/ ?   while 1=1 do
) ]# D6 _7 A/ X% ?1 P' q   begin1 [6 E! w. G# ~, g/ I$ w3 u
   wait for e 170 min/ d) x5 k8 S$ u/ h5 l
   take down R_mB
% \" E4 \+ C! B, w: i6 g/ M   wait for e 10 min
7 H/ v* Y0 l; E3 z" j( w4 U% ~   bring up R_mB! r, t& Y8 X/ ^9 v1 X( P
   end
; P0 T$ ~2 U( A. ?5 vend
( o! b9 S% ]8 `- t

' p. T+ t# V6 N" ]/ M- dbegin P_mC_down arriving; J6 @( B: J$ C8 E
   while 1=1 do
8 n3 S, _3 P) f; W   begin
, \* U) \- \; J0 L8 Y   wait for e 230 min
# A) ~) Q0 h- C2 x2 X) R: Z) X   take down R_mC
) N6 V( K3 e/ F   wait for e 10 min
2 ~2 k$ J4 G! x  O: T  ~   bring up R_mC0 _  a' y3 @$ d0 p* K2 j: E! t4 q
   end
( c5 D) |' A! g, v& J, S% ?6 Qend
9 {6 i! }$ J" l& z/ E

7 n( ^6 u8 f7 ^0 F: l. jbegin P_mA_clean arriving
) ?/ L1 A2 O9 d% n7 _( K   while 1=1 do
9 ]7 Q  r5 A2 @3 X3 Q   begin6 P: l$ p$ }4 }1 ^3 [  ~3 L
   wait for 90 min  {9 D, e0 e) C6 U% p7 [* Z
   take down R_mA
. F0 e5 x6 P% ]1 c: ~   wait for 5 min+ }+ N. k7 `% K) l5 t) U: o7 E
   bring up R_mA
- |& D: q/ l/ J8 P1 v1 N+ s. k   end( I/ G  D4 _; d
end
# g1 Q# {9 l% o' s' e
/ o" ]. w; k& l9 a( a
begin P_mB_clean arriving
; p: D# z/ Y& `$ z2 ^& J- S   while 1=1 do
: j( h. ]6 i& X. G$ }   begin
3 x. f1 p4 e( G, d& t   wait for 90 min2 i& L* w2 W( Y9 j  |* n
   take down R_mB
# d( {; T$ T5 J) x1 ^+ w   wait for 5 min
$ y/ ~" l! \! P, L, Z" k   bring up R_mB
' q. q3 Z3 ]% x   end1 T0 r% R9 D& i& x0 X! r$ M
end

! x3 K  y2 f6 s; A( y0 ^* m. q( a 7 x$ }. N% C5 @. H, q
begin P_mC_clean arriving) t$ o" ]( l' x+ |7 b# O
   while 1=1 do
+ ?$ X. N  h& C& t9 V$ ]   begin
" \. a" `( t8 y   wait for 90 min
/ @3 w: F( f! F# M- g/ H   take down R_mC" }- d. C' r7 U
   wait for 10 min
' ^7 ]$ p6 ?+ C8 |( }   bring up R_mC+ K  v4 }3 a: q" H7 a# n
   end
) a% F7 b5 t* J: A2 t0 ~) a) v& uend
0 B: @( E5 z1 N" z! E; {
----------------------------------------
8 o8 e2 J: t; q- J; j2 E: L
6 F4 q* n, _! T8 `) }$ vExercise 5.9
  c3 C5 Q6 I1 A, E" f7 q: L7 w4 o1 ]+ F3 o
6 A# A) v+ |9 V$ K& i2 W; W* `8 B* B% K( S
Create a new model to simulate the following system:, j- p% ~! D# V6 y' @4 Y
Loads are created with an interarrival time that is exponentially 6 g, Y' e0 X* G& ~; [2 x
distributed with a mean of 20 minutes. Loads wait in an infinite-: x* \4 [  j- G1 f# i+ m$ A
capacity queue to be processed by one of three single-capacity,
! Y$ n1 Z, G) K; Earrayed machines. Each machine has its own single-capacity queue
( [! J( r0 g0 L4 F# @8 v" ?where loads are processed. Waiting loads move into one of the three
9 C2 _" H) }! D5 Equeues in round-robin order. Each machine has a normally ; P! V* q6 l$ C, n: s( B# G* f
distributed processing time with a mean of 48 minutes and a standard 8 m  [6 r1 H4 g, x
deviation of 5 minutes./ {! k; h/ V! Q
The three machines were purchased at different times and have
+ d, T% _6 C. {9 ^different failure rates. The failure and repair times are exponentially
5 \- ~" I9 g( g' V0 r, Adistributed with means as shown in the following table: 2 s: c- C. N8 d5 G. _) e$ S5 g- a
Note The solution for this assignment is required to complete
# M6 Z: K' ]) R: s0 x! Hexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
- g& F% n% u( [) Z0 jyour model.   s& y( N8 m1 G1 R
5 ^5 R9 c. W0 V* ^* c  S) h
MachineMean time to failMean time to repair. j$ d2 ]' b* z  n- R1 T1 {! M  ~
A110 minutes      5 minutes
6 w3 {# r& z8 S6 a- [) A0 O( z! FB 170 minutes     10 minutes, e4 u& b4 e" v1 p, |  R$ W
C230 minutes      10 minutes8 ~, U7 h- z  }+ ^

4 r. ^1 @% W& i2 E1 W" @The machines also must be cleaned according to the following ' H2 O7 |- \# M, U' T8 v. Z9 u
schedule. All times are constant: - G, W4 v" }" ^$ W  K# h& U
, J* B& H0 a, Z! q! F
MachineTime between cleanings Time to clean
6 Z( v% ]+ ]- o  t1 m8 }A90 minutes        5 minutes
6 l! |$ A+ ]# E; c' ~) VB 90 minutes       5 minutes. s9 ]8 x# ^. r  {/ \4 ]
C90 minutes        10 minutes
. E; X* o5 x3 |6 n3 R+ }* b: q7 {1 C8 D2 L
Place the graphics for the queues and the resources. : U4 n. v# p8 H+ _* W
Run the simulation for 100 days.1 f+ q7 \5 J( @# s* t0 i5 |4 W
Define all failure and cleaning times using logic (rather than resource
$ V" q. B0 [6 R: Scycles). Answer the following questions:
" s# U- h# [% {; ma.What was the average number of loads in the waiting queue?
3 s" `: V- G. ~$ M4 E" b3 Mb.What were the current and average number of loads in Space? 1 b$ G" A/ v$ D9 O3 v- {  l& f) W
How do you explain these values?
- U- f8 g8 ?7 u- ]# m" G9 W; ^; _* P

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉/ h( y$ g2 I% w$ L; j- k$ P
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
) {( h. R( \) A7 H2 e6 B这行好像也不太对,各位先进觉得如何呢?+ N$ _2 \! B: r: y4 _9 u! f
  h$ V3 i( r5 P" _- B4 g4 t
begin P_something arriving* L! N4 J1 r* C9 d
   move into Q_wait
( l! ?4 P2 L! t, x% C. [0 L   move into nextof(Q_mA,Q_mB,Q_mC)
1 L3 i! b  F# U$ \* B7 m0 W5 R% c   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
  m3 S# e( m1 }7 }9 {; |0 |   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
/ r& }8 L, L$ G0 P# a/ f; N3 Eend5 ]- G/ z. _% v% G
( _1 Q! ?* B4 c  Q
begin P_mA_down arriving
  ?4 L4 f0 v5 \) v+ z. @" p3 o4 g   wait for e 110 min
0 [3 |+ r# v1 b/ [" n  ^   take down R_mA, H6 i2 q% f5 ~/ m. _
   wait for e 5 min
  F- P/ H$ x4 l1 d   bring up R_mA
0 x& l- i, w9 w$ {5 I, cend
( ^. r7 t9 y: i* Q) q5 j4 l8 k3 Q! s8 }/ y+ |! z
begin P_mB_down arriving
4 r. f6 \: K$ M( x. k' x   wait for e 170 min! v) D! M+ a2 i: F
   take down R_mB9 \4 _7 K7 Y# x( Y% a
   wait for e 10 min
2 a3 _8 u& x' l$ q+ N$ t& V% k$ A   bring up R_mB9 N- \/ D8 Q$ j5 J
end
* K* ^$ C/ y" O6 b* n( {0 o# b; X6 ~. V# z
begin P_mC_down arriving
' c& P8 |+ H, b   wait for e 230 min
: ?" f5 B, [! n# v+ ?4 I. k2 x' m   take down R_mC0 ^0 g' K# g8 O' t# E) i
   wait for e 10 min
3 `  L# J" z. W% f2 _# X9 J   bring up R_mC
3 C$ Z$ W' _* Y# Q% d# zend" U, t6 X( w) Z" [2 s# D4 ~" E
) K8 t. B- z* v. X7 s
begin P_mA_clean arriving/ ^( R0 }8 Q  Z9 M0 j% Q
   wait for 90 min! ]) x9 A5 {& S; Q2 i* x+ ~
   take down R_mA0 [' m) r' R( q
   wait for 5 min
4 r& H$ n8 p" ^7 }/ j8 Z   bring up R_mA' j5 P: A/ Z0 r, J, f, r, v! Q( G
end
2 [# @0 c/ b# r7 a; e+ j" \* C9 P  A- U) q( D7 Z3 L& o- X2 w
begin P_mB_clean arriving3 R3 H5 M  L% K5 ~4 K- n
   wait for 90 min
$ r% _; l  u  b# h# B7 y# F9 o( L$ x   take down R_mB/ {( r) j+ M7 l2 L$ J" ^3 M
   wait for 5 min+ ]4 P, I! k% W
   bring up R_mB0 \; M: c+ v$ f' e* Z: M/ @
end
9 Y# I" ^3 t0 `9 }9 v# }: v+ c  O- a; N/ S4 S1 B4 d( I5 j/ o7 s
begin P_mC_clean arriving
9 v+ Z9 H! j; D  L7 p3 j& @% g2 g' H   wait for 90 min6 e5 R1 e0 w0 J! |$ j3 A
   take down R_mC
. K# I2 T3 M1 [: V# G   wait for 10 min' K. O: c( |2 e. t6 i
   bring up R_mC8 z. ?% @; R/ M* Q" |
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
3 C: x; V* d  _/ X3 D   move into Q_wait- l9 {7 s& W9 J' C3 d( k
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
* T; m9 r5 }5 V8 T/ E" l; }   move into A_w
! l  ^# Q- t& @/ |   if A_w=Q_m1 then use R_m1 for u 48,5 min7 f) u+ U3 m: I) T3 E
   else if .....then use ....for u 48,5 min
% ]' T2 S8 b, q. c6 z9 h* r   else if .....then use ....for u 48,5 min  
) a7 P# x. t. \& A   send to die
* T' Z1 E  @1 [% q! j( xend  R1 O& ?6 W" T; C
, ~: P1 a6 v7 x5 w! l2 y
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-16 14:57 , Processed in 0.012311 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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