设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8073|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
0 M: C9 r0 ]8 V! V
1 ^: n' N. D4 w底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
; I/ L7 P2 ~; m4 B" [. A
* M5 M" Y+ l) o! P( j; o+ w9 \不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!  z. R7 u2 O! l# n$ b
7 m: _" M4 ^5 S& [1 ~
--------------------------------------------& B9 }6 W2 G0 Q
begin P_something arriving: v6 Q6 ~1 o5 a! T* W
   move into Q_wait/ J9 V% I) ~% A9 w: w$ ~
   move into nextof(Q_mA,Q_mB,Q_mC)' K2 u1 s0 s: v0 h+ l$ b* r
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min; i6 h( J  Q% P6 R9 b
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% O9 g& J4 P* W: V* a, O   send to die. e  [' T* X/ t8 B# R0 h% S4 A- d
end

+ E' t; u# `* o1 `) H/ E ' |6 u, Q' A* H2 r, K9 H" H/ m2 j
begin P_mA_down arriving- @; `: a# o1 c, z4 W. R6 T
   while 1=1 do
+ E3 l6 w. c4 d! f' U   begin
/ j4 P8 e6 {# R   wait for e 110 min% a8 n7 f) N$ W' O6 u& g5 y
   take down R_mA
4 y  D8 }; W) ^) A   wait for e 5 min- W- O. J% q5 ]- v: x2 h8 m
   bring up R_mA% I. e9 h0 y+ F  f4 ]
   end6 B; F, d2 e/ ]- l0 g& e
end
: c7 l9 M* b' B6 \! c
8 t0 `+ A  u* a- F
begin P_mB_down arriving- n" [* {1 M" c* x- ~' W2 G
   while 1=1 do
8 q% s. @" m! `; \) U8 ?0 |   begin
! d4 B; J5 ^' O& X   wait for e 170 min
" q7 ?- V# t% @7 E# a   take down R_mB% A' C, e3 G5 a+ B& l
   wait for e 10 min
3 E' }, b6 ^: x/ ^2 ^( H* P   bring up R_mB
) K+ Q3 F4 I$ [+ T1 z0 }& E0 d; ?" p   end
0 }5 u, F% H6 E& Z) cend
& G& W5 g( x- w
/ C' k% {2 O3 v) ]9 h# r
begin P_mC_down arriving3 Q7 N- C, |1 ~- R0 s2 B
   while 1=1 do ) @9 K# F: f& x7 i9 P9 ]
   begin
% B( t1 y: M" _2 F+ v+ r. s   wait for e 230 min
' e( N# y! I  G3 x, z6 Z5 S" ^# s. {   take down R_mC
+ S( [: n+ C" ]1 \1 n8 a   wait for e 10 min
+ X, h" b- i' A   bring up R_mC
# Q0 m# @* `3 e, Y   end- K( O4 {) v0 H/ v
end

; T$ E+ r# W0 f' |" w+ g+ a8 u; V $ F! V* j8 X+ s3 }' [
begin P_mA_clean arriving2 B0 f6 d* n6 Z( X9 O3 P* k8 R9 Z
   while 1=1 do5 a9 [" W9 t1 b, `! D
   begin
4 [- l1 U% ]% i8 ]) o9 B7 S   wait for 90 min
$ Z- v" k. L- v% B  i   take down R_mA9 D. |6 s9 G1 |0 T5 _0 X* C
   wait for 5 min. d6 V) m8 a# `/ _1 _* f$ x
   bring up R_mA: `0 L! u1 h( _
   end+ ^! s9 J1 y4 ^; l$ k, s/ [3 |. G
end

7 Q7 c  O6 D" R5 s/ y4 \
" N% d6 D+ D$ D" R# Q+ g9 hbegin P_mB_clean arriving5 B# N/ O9 E/ w# `
   while 1=1 do' t7 j" G' M0 N, Q, N
   begin
6 ?9 B' i- [6 d9 ]' v   wait for 90 min
' G$ p  C5 r& ~   take down R_mB0 K8 v& ~0 b/ L6 Z" y: [+ D% b
   wait for 5 min; d& O6 u7 s2 _' f& P* E
   bring up R_mB, S9 ^* _5 o, L3 R/ K! `" i6 [
   end
, W, c9 C5 s, `% C/ `- eend
3 |/ }" q& K; t& t2 e6 l, l: I; @% z
: r& s' j' F4 {6 c5 J
begin P_mC_clean arriving
6 r: x3 c2 e8 f! J1 {0 t   while 1=1 do1 P$ C" a5 f8 d7 g& |- K
   begin5 D; J& ?5 U$ K- W# Z
   wait for 90 min
; v& A+ H4 n% Z# Q& I( b4 i   take down R_mC1 a7 n- t$ |3 D  o* b/ _
   wait for 10 min: x/ a2 @! {& T6 E# h( Q$ y. f
   bring up R_mC& y( _9 i& \- v$ n
   end  B. r) K( y3 K
end

$ }. J. |# ]+ f( Z/ t----------------------------------------) T; {$ h2 D/ n* u- B$ C' I& _) ^
5 P# W$ M8 t2 D( z: D0 ]0 c
Exercise 5.9
6 X: Z' H5 i6 M$ b7 Y6 _: |0 ]3 X: U( Q
) P0 v$ f7 w/ ~7 z1 c8 Z% U( G/ t( b
Create a new model to simulate the following system:1 D5 G  t" N) o' t4 a
Loads are created with an interarrival time that is exponentially
! h& L+ K* \# |+ F5 R1 m' xdistributed with a mean of 20 minutes. Loads wait in an infinite-
3 X9 t- U+ n; `. Z0 t) scapacity queue to be processed by one of three single-capacity,
- o$ h% w1 w) ^/ o" P$ }arrayed machines. Each machine has its own single-capacity queue . L; u, |( V' m& ~+ n
where loads are processed. Waiting loads move into one of the three " G: ~2 X4 s3 W- }  s, @
queues in round-robin order. Each machine has a normally 7 \5 a4 m( R* k4 E$ g% g' K! m
distributed processing time with a mean of 48 minutes and a standard
  p6 H; G: K- J, A+ Wdeviation of 5 minutes.
9 q& R' z2 j% E7 CThe three machines were purchased at different times and have
  @" b7 w0 ~. q! T* e# R% _7 I3 {different failure rates. The failure and repair times are exponentially 8 l1 j3 h; Z) }
distributed with means as shown in the following table:
  M% M; ^0 b6 f( cNote The solution for this assignment is required to complete
+ T5 \' ], D: kexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of % `  J* v( ^2 p# ~) N7 y
your model.
1 x0 T( J- T8 ~2 r- u1 O. M$ O- t$ r& i* b8 X6 J# n! r
MachineMean time to failMean time to repair
4 X& I* G# _6 v' P# \7 B- nA110 minutes      5 minutes
% x. v" E5 j  F/ |( Y3 n1 g$ _B 170 minutes     10 minutes/ F; n- I" t- h; Z: J5 @& z
C230 minutes      10 minutes
. {; [$ t0 Q9 T6 W- B! x3 D. a, I9 w, [) N7 [+ h# x
The machines also must be cleaned according to the following
% a. Y: ]. S7 D9 _9 K4 c+ U- ]2 E3 Nschedule. All times are constant: , \4 A% T8 z. p( D/ P9 ?' t6 o$ Y

' v" ?1 ?+ |. i% KMachineTime between cleanings Time to clean) V5 x" S( Z& D. t6 h! Y# i! i( m
A90 minutes        5 minutes- o3 x3 R0 h6 m5 y6 Y: O* D' A: ?
B 90 minutes       5 minutes4 D# x7 a2 d1 N' [0 R) E* \$ q
C90 minutes        10 minutes% e- |6 l4 |! m1 Q

+ c1 I8 f( @9 j- N! n- IPlace the graphics for the queues and the resources. 1 }) w5 L7 m( d
Run the simulation for 100 days.# z3 ?& O, a2 U0 k) X! u
Define all failure and cleaning times using logic (rather than resource
3 S' c' g" Y% Gcycles). Answer the following questions:4 G3 _4 [3 a+ R, H; m4 ]
a.What was the average number of loads in the waiting queue?
+ S! B* L; r$ w! ~& E" K0 E  gb.What were the current and average number of loads in Space? 3 v: s. N- F+ D, U" V+ D4 A
How do you explain these values? 8 h  x: h: J0 G8 U

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉# @7 r) ^( z! x% W- p2 m8 o
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
9 c* ?% e4 \1 }. }9 D/ R这行好像也不太对,各位先进觉得如何呢?
$ I+ |: a  E" [( A
: p6 F2 z7 U5 H. @9 n6 R* F  m3 I& Abegin P_something arriving/ e2 T  y' ]- y% H* t9 T1 j
   move into Q_wait
  x" E$ h  u( [1 b: E4 r9 f   move into nextof(Q_mA,Q_mB,Q_mC) + M/ E9 x# `5 b( }+ V2 g
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min; h3 u# T& c6 t
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
1 o. |: @5 m5 f' g/ C$ j# i# Eend
8 U9 g) n' o- s7 x! Z% d1 B) K# o$ ?( M8 s
begin P_mA_down arriving3 t/ j2 I" G% s* b
   wait for e 110 min1 H9 K) q  L$ Y0 s* P; I$ I
   take down R_mA0 g5 t' R8 t6 W/ w, `/ c% e
   wait for e 5 min8 Y7 Z# z2 n0 Y8 w$ Y6 I+ ^) `
   bring up R_mA
% i' @. V* A1 k# c1 a3 y* uend3 |2 |) N6 E0 g. A; T

. ~3 ?2 |% B9 P# E; o2 `begin P_mB_down arriving
0 B. a8 F5 N4 K   wait for e 170 min
# u; V5 m0 w, H4 a6 P$ r' J  N9 J   take down R_mB- {: X' O9 L5 I' ?+ {. `9 k
   wait for e 10 min
: Q) X, J& d- n2 N* P2 R- u5 O: `; k$ a) \   bring up R_mB
8 u& `' g% v2 [5 G( [1 s7 B7 nend
2 }$ ?3 A6 W! q$ o7 ^7 t7 I, J, Y' S/ _
begin P_mC_down arriving
8 q7 B$ P1 l! s4 Y9 d   wait for e 230 min! z3 b: P6 `' n) A
   take down R_mC
% _  Q# U2 }( K   wait for e 10 min
: Y$ O9 w  U( x/ l' r- h   bring up R_mC! o0 G; c& c# c9 C
end. ^. F( B1 z" J+ F6 X2 @7 y0 P

* s8 e; c1 t# u9 M% Ibegin P_mA_clean arriving7 I0 }! F! [" I1 G
   wait for 90 min; i6 K; S7 O4 ~! A
   take down R_mA7 ^5 P; X2 t9 I8 Z3 B, `# L. Q
   wait for 5 min
/ G7 I- m+ Z. w8 W" g   bring up R_mA9 H/ [# ~5 W7 g% e* a8 H8 p- U
end* e$ Z0 U" W2 \6 O9 g4 e

3 u3 L8 A, W% j6 F$ Gbegin P_mB_clean arriving
! R( Y" q" p( \8 x$ M   wait for 90 min8 }+ b% c# u3 j
   take down R_mB
0 b9 ?( f! e% \# d' q. s2 S   wait for 5 min
' v# Z8 Q- y2 \' z: Y# `- Y   bring up R_mB
; q4 u: P% U7 S- C( pend( d0 _; t8 }( {! m8 [1 O' k

8 r3 J( c6 Q4 T# H  j+ K5 Q* xbegin P_mC_clean arriving
8 _$ J, a; i# P, c   wait for 90 min! {: B0 \6 _/ Y/ v; u
   take down R_mC5 i; t( Z  G4 I8 \+ U/ T
   wait for 10 min
( @' g  E, E0 s& j   bring up R_mC
3 s% l" w. G. m% ~% pend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving- J* M( v; o+ Q9 {/ k. \+ d
   move into Q_wait
4 ~" h' r; T; I1 R   set A_q to nextof(Q_m1,Q_m2,Q_m3). M7 E( I% \/ |7 V  P8 L5 u
   move into A_w2 e  F$ @4 N) ]* x5 {
   if A_w=Q_m1 then use R_m1 for u 48,5 min
- k, m" [3 m; t, }. b* v1 K   else if .....then use ....for u 48,5 min
8 ]9 T. p4 I1 @; r, t6 c1 o   else if .....then use ....for u 48,5 min  ; Q5 f0 {( g0 `5 f  p/ g
   send to die) k! d! S& Q% ?) e/ U
end
6 A/ _" x8 F+ _8 L- V8 r  v1 d) S- Z3 C$ W
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-28 09:27 , Processed in 0.014351 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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