设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7255|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
3 T' l- d  m( r; y* l7 I4 s
8 A2 s1 m# }9 H) y6 B4 s底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去1 _, O7 ?/ N/ g2 @" F: z6 H" S! n
  y# L; e) u+ }" ~# B
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
3 I. w! \/ j' {' Z2 }" t  v  g6 {: `1 s0 R% A9 ^
--------------------------------------------) ?! {. K! x! r# @
begin P_something arriving+ X0 Z" a/ C  B( x
   move into Q_wait9 K7 Z: c: G+ S* E4 b- C7 `* j
   move into nextof(Q_mA,Q_mB,Q_mC)% B2 Q& \! F% |! |+ S. r7 \. j
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min& O/ ^" @! a- ]
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
6 Q- k4 Q/ K* s- u   send to die
# K& n' H* x2 N' X+ W3 h' a4 rend
! I& J2 V; m& l9 w
' K" h& J% Z8 \( ]
begin P_mA_down arriving
# Q4 B$ c* r: D2 ?   while 1=1 do ; o/ ?3 e; Q; l8 z1 p4 o
   begin7 Z0 Y- C# S# Y- i; _. Z
   wait for e 110 min
/ q4 X( Q8 |: O( B: K# ^+ t* g- e2 n   take down R_mA
& Q! n; G' @* y3 E1 }2 V! \   wait for e 5 min
" K* f+ g/ M# k# E2 C+ F- c& T" @   bring up R_mA* U; u4 C& s. I; C6 d4 R3 G+ E
   end
. v8 [4 t: h  ?0 K8 d" V7 Yend

; f0 s# H: B; `( W1 U
5 M$ G9 h0 \$ |begin P_mB_down arriving& n# e2 N. E# M; U; e
   while 1=1 do
- N- R0 {) H. l6 I8 k: B   begin2 j% _% y9 D$ P. c# x
   wait for e 170 min
+ I9 s9 {0 H  F' W3 {   take down R_mB- X; h: j8 ?1 k- s- L+ F2 G1 g5 X
   wait for e 10 min- `- P+ G3 h! V; p1 \3 v% b. y
   bring up R_mB% O5 l6 Y# d6 [4 @9 z  G
   end
( C/ k4 o5 k: {; bend

4 c$ u5 T7 A0 U. c
: x& e1 C# ?* l; E) Bbegin P_mC_down arriving
( y' D( x1 ^$ ?   while 1=1 do 2 t. z0 [# C, i% P' ^3 b% L% `
   begin" Q/ l; a" @; v) Q% Y& U
   wait for e 230 min# v4 H; ~% ?5 L# q+ K2 d4 X
   take down R_mC% s3 y  |: d  y! |; c8 c7 i5 |
   wait for e 10 min
- f; ~/ [2 A1 P1 [   bring up R_mC5 U4 {' J* |) D) O- q& Z- ]
   end
+ [: x/ D# b- a8 jend

8 c; W- l# D: o/ N
, ~  |) Z( N3 z8 A1 ]begin P_mA_clean arriving* @, J# Q8 S6 z+ S4 z3 }
   while 1=1 do# V5 N# [: }' `( A1 V7 \! _
   begin$ P. G1 D4 y/ N
   wait for 90 min. W" N* G: P  ?- ~" J' r$ C
   take down R_mA/ C- ^) n1 @+ i9 F
   wait for 5 min5 r* X. j! n5 Y: V6 H
   bring up R_mA2 J+ ]: ~) @1 v; @8 `& Q
   end* x# K! \% ~. e
end
# O9 m7 E- [9 q2 q- c" P

6 ?7 {# c/ g& I( q, c, Y1 Gbegin P_mB_clean arriving; l, l* v$ P0 U" d& O/ E) ~
   while 1=1 do
$ A! W6 n& ?' ?/ _9 s   begin6 z) h4 `' C% T2 P9 s  p1 b$ x
   wait for 90 min( W3 V4 v2 N! y1 h' d
   take down R_mB: l( t0 K3 i4 \
   wait for 5 min$ N" U' J+ y$ S# G& `5 T
   bring up R_mB; u: e6 @( u. G9 P; B
   end
4 p& A' G( C8 ]' @; Q4 @end
( A* O/ T* f; }; X! C- J# ], ~
1 u# @( t! w9 S% q
begin P_mC_clean arriving7 D& R3 S: f$ T* b" k6 r1 r
   while 1=1 do5 Z- c/ j1 K7 }$ h0 b) q
   begin& ^3 u. T9 t, Y: ?5 i8 W
   wait for 90 min
! B0 q/ `2 D# f3 z0 W5 L& r   take down R_mC
+ D1 B9 t2 |" c7 k/ G9 h+ ?; \   wait for 10 min
! J* m4 D; I$ y6 x2 Q9 z   bring up R_mC
, r# K, L7 _5 U; u( M   end
1 R- h# `! [# y9 [end
4 }5 b$ Q) H: w. v9 m4 w$ R
----------------------------------------
6 z6 q4 L" u) y0 |/ {9 W) [
5 v+ _; p1 [5 b- A  y) u$ ]Exercise 5.9+ N& `& ^$ T" y0 O/ r* D" O

0 s. k* u- `4 v( X2 p) I. @6 M8 ~9 F/ c+ H3 H
Create a new model to simulate the following system:5 e  E* {( k! @. K' c
Loads are created with an interarrival time that is exponentially
0 t# X1 ]5 ~9 v5 u0 A3 \distributed with a mean of 20 minutes. Loads wait in an infinite-3 a+ v6 V) Y" I0 X4 t
capacity queue to be processed by one of three single-capacity,
* V) V4 ?5 L1 U8 qarrayed machines. Each machine has its own single-capacity queue 5 r: ?* F9 e$ d/ F% c5 b3 n; d3 z
where loads are processed. Waiting loads move into one of the three
9 D2 P3 i0 M4 f& }5 dqueues in round-robin order. Each machine has a normally * G8 ]2 \. c/ \% o& d/ j
distributed processing time with a mean of 48 minutes and a standard $ C/ J1 P) w* J  i$ z4 q8 ~6 p6 A. o( x
deviation of 5 minutes.3 [2 {$ p" X5 {" ~3 C9 `8 a
The three machines were purchased at different times and have * T7 H9 O+ c! e2 {6 Z
different failure rates. The failure and repair times are exponentially
/ G8 e: w& F! f) i7 u! p7 Y6 [* Rdistributed with means as shown in the following table:
6 m1 p4 v- G8 o* ?Note The solution for this assignment is required to complete
5 k2 x" i0 ?4 O0 bexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of , ]9 f! ^9 k( D( p/ [! V
your model. 6 Q! [  o& t& Z; T. `* P" k$ v4 B
9 H, F# k# ^% X5 V8 }/ p4 |
MachineMean time to failMean time to repair
8 }4 H( _9 x& FA110 minutes      5 minutes) W9 z7 V* m* N  H
B 170 minutes     10 minutes
9 o) {5 J2 ^: I1 C0 I. _* f5 NC230 minutes      10 minutes+ k5 V0 p9 P! i& L% \: J& z% M. t6 H

& x2 B0 F- m0 uThe machines also must be cleaned according to the following
, j+ z" g( j+ Aschedule. All times are constant:
1 h9 k) M; a% d1 o6 k
3 z# N" d; Y% S( ]8 BMachineTime between cleanings Time to clean& l! a7 P! T7 D+ P" u1 t. B: C
A90 minutes        5 minutes
9 e" S5 g  B( \# ~0 J9 eB 90 minutes       5 minutes1 J) Q/ N# q9 B+ y; l# Z
C90 minutes        10 minutes
" R4 a! ~+ s  O) P" b
3 Y/ n& M1 Y; c6 S: e% r' u- FPlace the graphics for the queues and the resources.
: _( z+ f! w/ xRun the simulation for 100 days." O4 e' G+ a  u2 D: a
Define all failure and cleaning times using logic (rather than resource
" q  \, w) I/ E- s3 bcycles). Answer the following questions:
/ T- O  [  T5 n0 E" J+ ya.What was the average number of loads in the waiting queue?4 {3 ~5 [) Y: H: g
b.What were the current and average number of loads in Space? . W; s* ], M  b) e1 s, |3 r% s. z
How do you explain these values? $ ~4 U2 c& \) {8 f0 @

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
- S: Q/ M2 ~5 g% ]2 K$ A4 X( Qsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean). Z) f, v5 r( D% Q% }3 ]
这行好像也不太对,各位先进觉得如何呢?6 N) y; t9 P8 A; f$ u

/ ~9 ~: b2 C" m6 }/ e- c- Pbegin P_something arriving' F; K3 T; y& a; |
   move into Q_wait4 l1 D& y! K' p# K8 h8 a
   move into nextof(Q_mA,Q_mB,Q_mC) . C- w5 K% L8 P* K8 W
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min( `1 V; i# ^% W$ n) a
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% f: @" w2 c% ^" C$ o0 @) e5 D0 fend
8 C( L& ?  C8 e/ i! h. p4 @
4 i5 [& o/ F3 f( j( K# Pbegin P_mA_down arriving
, w7 Q* r" ]) s& _( b+ C   wait for e 110 min. x9 ^* R0 V  c+ [
   take down R_mA, ~2 H/ e$ K( s  N& R0 Z% e
   wait for e 5 min% C0 c4 {! h9 z2 l) U# T2 M
   bring up R_mA
. X, O/ D$ A! H% Qend
1 N" \; l, p7 r: ^
4 U1 Q; g9 F  ?- y- Mbegin P_mB_down arriving
  P! f0 f$ h$ n6 z0 w& \, {$ h   wait for e 170 min& w+ u3 z' [  Y  x5 O! j" s
   take down R_mB
( b- D8 K) \/ H2 D& x6 l' S   wait for e 10 min  y0 q3 Y+ A& x: q9 H5 U2 F6 W
   bring up R_mB' t! f( h2 O# D: |1 ?) O7 H
end! V" `% J8 x; Z. b/ H( |

9 i$ T! a1 b5 r; M$ ^begin P_mC_down arriving
0 y9 K8 n; B$ A3 C1 N' F" E9 o   wait for e 230 min
" W% N; u4 M  w: C! t5 p9 K   take down R_mC
+ n1 q% v. V) I  j: w' l   wait for e 10 min
. L- V; a# R* r  L# q% u   bring up R_mC% t" y  {3 f$ U( ^! i
end8 R$ ^- Y$ t9 M9 C. i( l( W& Z
6 x' N: C* t# [( U3 |  M! [
begin P_mA_clean arriving# w7 R/ j$ r4 S
   wait for 90 min! h( m2 s3 W0 J2 v. c- d) c& b
   take down R_mA8 l, Q4 I/ Z# O+ e' O, s
   wait for 5 min
1 F9 O( Y# X5 }  i   bring up R_mA. [3 I& b2 F. ~
end
9 Y5 y* n# H- g" A. S, ]7 M; E6 l6 S6 {. r/ K; P
begin P_mB_clean arriving' w8 o0 R2 X& l" x' Q
   wait for 90 min
, c/ A1 G8 g: h   take down R_mB
; }: s$ \7 X8 Z$ }$ y   wait for 5 min
( P' G: X% u3 J! Q/ y; v   bring up R_mB
7 v; O& _* ]! eend+ P% d& X1 O: I* w  y
' V- B2 K# L7 g# a  `! v1 J, E
begin P_mC_clean arriving
/ E$ a# V0 x5 E9 |0 x" H  e   wait for 90 min! Z  L# J! B2 g
   take down R_mC& A; V9 y9 r  F; }2 c
   wait for 10 min7 E& T+ u2 `4 A2 B( ?) z1 _6 b
   bring up R_mC
4 Q9 H8 v, N' F1 N- i! i5 ?end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving# q% ^% H) a5 x4 o
   move into Q_wait
: a: x, N0 q+ U# q" M1 o   set A_q to nextof(Q_m1,Q_m2,Q_m3)/ y! x: e, l  I1 r+ l6 |
   move into A_w1 K; ~- N, q+ |4 {' F. A
   if A_w=Q_m1 then use R_m1 for u 48,5 min6 l) N& f5 z" b; y7 b0 r
   else if .....then use ....for u 48,5 min
' h  Z1 |6 u4 L6 }" {   else if .....then use ....for u 48,5 min  ' |3 u5 L& \* q
   send to die, h. R$ v/ A$ H$ }+ Z  d4 q6 R
end6 {4 D8 ]2 d/ ~+ V! H
4 o, }2 [' s! ^8 Q
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-20 11:58 , Processed in 0.014721 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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