设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8042|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
+ r6 t: r2 l, }& R8 r8 T* J! B+ t+ b4 W1 j6 I. \
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
* I, T2 e9 k2 z  B
7 O2 C" ?9 c* {不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
/ p, z3 G; P. z: O/ T& P! x5 X' h
3 W/ B; A/ l& B$ B5 I" @
--------------------------------------------1 d) t/ Y, Y- |2 G( `
begin P_something arriving
& s: P0 u3 q* f# t. e# j% G   move into Q_wait
  h3 ^3 _  w* N, ]# J1 E0 {   move into nextof(Q_mA,Q_mB,Q_mC); r1 h" h% ]8 J3 B
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min9 X+ d! s0 H5 ~% V- [& E
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
- y+ a+ [/ X) C$ a$ O   send to die
1 e7 q$ V2 Z& [: ]9 t6 qend
# `& n  \& d# p' l  j. l
( ~( T- s5 n: i
begin P_mA_down arriving
  _7 {: u6 J. U4 u9 ?( c  X   while 1=1 do
( E- \1 ~- U1 S) @   begin) K6 K$ {7 c) w+ T- `. s2 [9 ]2 A- V
   wait for e 110 min
* ^; K8 w8 p6 C8 M  q0 G9 K- y   take down R_mA! r; x! b: C; B3 s
   wait for e 5 min
0 N3 t; e/ c4 F; U1 g8 K) t1 V' v   bring up R_mA
5 {! T: T- n0 v3 Z; k3 T" u   end
% S! `" |8 o5 U( a" {7 @- Send

, J, {- E& `, Z: Z, E / `4 G- q9 }7 t- x
begin P_mB_down arriving! o1 W( d  \1 W
   while 1=1 do
1 ]( R/ E2 g* W1 o* E! [( ^   begin
5 ^" e, _. p$ Y$ X2 I/ C( g6 _   wait for e 170 min
+ `7 c* s' D& k2 j7 \4 a   take down R_mB" u" r1 d: j" d+ {& }8 n' ~
   wait for e 10 min9 y: L1 e) I) y2 B, I
   bring up R_mB3 J& }, l/ i( E! z! ?: \6 c) R
   end
2 a6 N, p4 S" \( vend
4 Z% j. a* z8 Z2 d" b$ l
) p1 E. o" O2 F) t' o
begin P_mC_down arriving& r0 @. i  |, h5 w
   while 1=1 do 5 H4 `# m* m1 [8 a; r, n
   begin
  b- T9 T- _  ^  K1 J   wait for e 230 min
+ u& l2 \9 U+ J( x   take down R_mC
. u+ ~- ]: M" v' o. g   wait for e 10 min1 n1 L/ L  ?& |5 y8 F
   bring up R_mC9 c# ?4 v( C9 l, M6 ^
   end
4 }( K5 b! |; B; ~end
/ p1 [& A, B0 \1 s1 ]; H0 t! W
5 e- p! i: F1 b2 g2 z8 r1 {
begin P_mA_clean arriving
  e2 r- K& [- P; N7 J   while 1=1 do( W- j6 H3 V0 W( G
   begin
. c2 J% e, O. |$ s( I0 R+ {   wait for 90 min
* ?: G& y9 ~  H: T   take down R_mA
9 k; p3 k7 \6 F4 z   wait for 5 min
( ]$ m1 F7 B, [2 [   bring up R_mA0 _/ W0 R/ o" `( X( n
   end9 V6 Y7 b  z8 h9 j* j2 g' D. h) r4 @
end

4 o1 M( H) P+ t. N/ P$ M3 V( J
/ B+ D* G0 T7 R% O/ X, n# ~/ mbegin P_mB_clean arriving
# U4 [9 Q2 G! {) U   while 1=1 do- P! O2 x; [/ p) J) R
   begin
! s( |; ?8 B' F+ y  k   wait for 90 min; q4 g: ^% u8 [% L
   take down R_mB
* y2 @/ [% U( a( R2 v) y4 U. E   wait for 5 min' l( T; D0 E% `/ z
   bring up R_mB
; B& V+ B* e) g$ U- D   end$ V+ O. _8 G& i( }5 c
end

. \. b$ C% }( h1 w' s, f# C. f # ]4 c$ `7 N' m1 k" [, U
begin P_mC_clean arriving/ F( J+ g0 N8 N5 o7 d- f  D* q
   while 1=1 do
; b7 `  B, E( c4 L' _8 `2 A   begin
+ |1 r5 }6 L* r" @) n   wait for 90 min
5 O- e% b0 C2 _( b: H   take down R_mC
5 a% w& y. a/ c5 e+ A0 s- H2 d   wait for 10 min8 O' H  d( a6 {- k$ h+ t7 B
   bring up R_mC) Q2 O1 v' I; s- i" B+ E  r
   end
' ^! ~( O$ b; i8 _9 mend

) _9 |7 ~8 U" G4 l# J. L----------------------------------------& k3 H$ V3 w1 Z3 T
  C& a! L- f$ y. E: f
Exercise 5.9$ w( z9 _, s9 ]: \+ y* f

! {& r3 M: h! r8 [$ ^4 C# d$ c- a, ^! z2 t1 D: w  M+ ~
Create a new model to simulate the following system:% V3 G% A# L5 R' O& e
Loads are created with an interarrival time that is exponentially
& K0 y0 W0 @" @; K4 [4 e! qdistributed with a mean of 20 minutes. Loads wait in an infinite-
3 k+ J# Z0 a$ c; f1 n) M/ B" hcapacity queue to be processed by one of three single-capacity,
/ c  [' G1 o5 B8 x+ @+ X( h1 ^arrayed machines. Each machine has its own single-capacity queue ; A) _  r. ~/ p- o2 {' f. h# ?7 L
where loads are processed. Waiting loads move into one of the three   C, _) d8 ^! z8 h- O1 ?
queues in round-robin order. Each machine has a normally : t, x7 @5 N+ h
distributed processing time with a mean of 48 minutes and a standard & d4 M- C4 g* C4 S
deviation of 5 minutes., ~: g) W$ H. M/ ^& Q( Y" Z# Q
The three machines were purchased at different times and have ( W# _1 }* s7 w7 s& v4 X- H4 E2 Y5 I, m
different failure rates. The failure and repair times are exponentially
: l* x  B1 [2 V6 ?3 Q% E+ mdistributed with means as shown in the following table:
* ]) \3 k- E% x$ z3 V! _Note The solution for this assignment is required to complete 1 S3 K6 V7 t% u. r! u+ v0 T1 A7 s  v
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
! i0 x2 a; t7 u+ `  \4 l0 n* f8 syour model.   [7 Z$ u6 l, ^
$ j3 h  @7 Y" d4 y' N1 }( c+ ?
MachineMean time to failMean time to repair9 X, r$ m0 Y/ S' t4 j  l& v) J
A110 minutes      5 minutes
, S1 H+ b; ~* o" PB 170 minutes     10 minutes
; q/ ^3 n- h7 N0 UC230 minutes      10 minutes$ x$ h$ E7 ^0 h3 o# W, M6 Q) M7 z* O
) N( g/ t- E; W$ s
The machines also must be cleaned according to the following ! y4 F, t% A+ c6 L  W+ K2 z
schedule. All times are constant:
/ b1 q  S* ?- ^0 ^
) O! h$ @) u  E0 R2 M7 d9 @MachineTime between cleanings Time to clean
8 \# N# @$ b1 F9 `A90 minutes        5 minutes
* g: b& w- B" c4 K1 VB 90 minutes       5 minutes9 x( g% @4 _. g6 n! U. z8 U* Q
C90 minutes        10 minutes. |5 J7 L% R& |
# A( S6 M& [: R4 r
Place the graphics for the queues and the resources.
* T+ J1 m2 y, I0 \0 n) Y+ Y  LRun the simulation for 100 days.* [* b: f# W. Y$ k. V) `
Define all failure and cleaning times using logic (rather than resource 9 `4 V5 ~; f) z! U2 X% t  f( J6 s$ P
cycles). Answer the following questions:' e1 }) z4 ?. }' d( y
a.What was the average number of loads in the waiting queue?, G. Z# V2 E4 w0 C6 K* }
b.What were the current and average number of loads in Space? " {/ S. v3 q# K, |" E# K
How do you explain these values?
3 I9 _- O0 f6 ~/ L  H5 |

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉( U; E' V* f  Z  `* e9 Y0 E" u. Y0 f
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)2 _0 r: v& b; \/ M8 W1 g$ H
这行好像也不太对,各位先进觉得如何呢?  k) }2 l& t. U' n  b0 Y
$ q& \* p1 y+ L: B8 t' z
begin P_something arriving5 G8 o) }+ n6 H& g4 ?
   move into Q_wait' E$ K  r) T8 e( b- r, M
   move into nextof(Q_mA,Q_mB,Q_mC) 1 H0 v& z3 Z! I
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
, H% s, c7 q1 f& z   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) - [* a+ J" @4 e" k, Z- _! E1 p
end
9 c6 [; g' w8 T- w; W) \6 a1 Q* x+ s, _% A! l
begin P_mA_down arriving2 L0 b9 g5 L4 F  e3 d6 e/ v
   wait for e 110 min
1 |$ w3 z/ c4 I% p; Z) i6 q2 ^8 L6 k   take down R_mA* F3 }' Y: `: h& M
   wait for e 5 min
; f/ b. m& K+ l( X   bring up R_mA
0 s  U4 f6 w* Z3 Bend5 Z' A9 r% B3 ]2 |

2 u, I& ^% ^; s0 t6 g* i* R. pbegin P_mB_down arriving5 Y: L/ B+ H; c" U7 j9 j0 a; ]4 N
   wait for e 170 min1 H  d& f! |. c
   take down R_mB% Q# d7 c& P! E7 R  T" e
   wait for e 10 min) N8 A6 `; o3 }- j& d: p
   bring up R_mB
8 g0 h6 z" O$ m5 v8 Z; G& a. \% Aend  @4 b0 U% K% L6 \( f, Q; |
, l4 O& ?9 n; b; P9 I
begin P_mC_down arriving
& r/ J8 v* ~2 ]9 q- u   wait for e 230 min
2 d/ x0 ]7 k3 g; |! J. r$ l+ e   take down R_mC1 G3 d: B( s$ W/ D# r, ~* C
   wait for e 10 min
" k/ Z8 B, X: H2 d3 h3 U. b   bring up R_mC4 z# B6 ~6 Q- J( v% k4 g  ?
end
- ?/ H' _( q' ^) O, ]9 @( `" ?
& s4 |0 ?5 o: t: ibegin P_mA_clean arriving0 v% P/ u% X, \1 N
   wait for 90 min' n* i0 @2 Q7 H4 C& N& {+ C- v
   take down R_mA- u( A& V( o2 s0 N, C0 ]9 T' [! }
   wait for 5 min
2 ?( M4 u1 y7 Q4 Q3 j6 ?6 B. M   bring up R_mA
% ?" Y5 g* A: r6 rend3 @, ^0 Z) G# b) V
* X9 o; `. g, v, N6 E
begin P_mB_clean arriving
- M' ?0 M7 ~+ m- \& D) T   wait for 90 min4 `+ \. ^3 p: n0 U+ H7 O$ H
   take down R_mB8 l& }$ n/ {* r: y" z- i' ?
   wait for 5 min: h7 K& ^; L2 }
   bring up R_mB/ F% e. E) A% _
end) x" r5 @, U$ V4 l) K% A$ a0 x
" q+ F  `. |  j3 }" @' Z
begin P_mC_clean arriving* Q8 X2 D* s: N3 g0 b
   wait for 90 min
, j' |( f/ j, Z* K+ z6 ]   take down R_mC( B+ V: x5 w. C# i$ B' m# d- Y
   wait for 10 min* _; K0 t: r2 e+ g( Q3 _
   bring up R_mC) S2 G5 e# c  L9 h- S5 {
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
( }) ]4 Y: [$ K) A+ R   move into Q_wait
: o+ I! f* ?& l+ j# s% O   set A_q to nextof(Q_m1,Q_m2,Q_m3)
2 ?4 R5 p) s. s* R6 n6 Q# E   move into A_w3 O2 Q: l- j  B4 D* w1 @
   if A_w=Q_m1 then use R_m1 for u 48,5 min' W! l# ]: w% e3 e' c* r
   else if .....then use ....for u 48,5 min
& A2 o2 \( R% r! {! O   else if .....then use ....for u 48,5 min  - R7 }/ s' V0 q1 ?, L" x
   send to die  J) }4 E  e7 X# b: n
end, i+ h6 @/ J& ^: j# `

" e% A4 S" d" A/ R5 l, }0 R7 R" P供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-22 21:35 , Processed in 0.011581 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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