设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8041|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 2 X8 u0 A1 B1 `* R
% G6 m( k( g6 R& [2 i
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去( u6 j  j, u$ |) C1 i1 U1 s

; `1 b% Q& }* i9 j& o不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
- s* H/ t. a! o6 ^+ c) H5 g$ G! j! \
( n  d) T7 F, C9 S* d4 w! W: ]# I
--------------------------------------------
' n- `" F3 }) y3 D6 Q! P; ?7 }% Ubegin P_something arriving
: C( K! s3 l2 }( ~1 n& C% z   move into Q_wait7 T7 k' k; x+ t+ m* t) r. P
   move into nextof(Q_mA,Q_mB,Q_mC)
' C7 b& _8 n+ u' x   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min0 u; W/ u- |( J+ ]  n
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)0 L" Z  H/ v% D; N) a
   send to die( C) k0 S0 D% k
end

' j  z/ u- t2 A/ b% N
* T7 u' G& ]2 j. f/ v! F8 w3 ybegin P_mA_down arriving
/ Z7 e( `0 ~! i   while 1=1 do 8 s% B7 [/ L* Z' [, b
   begin
* i' S- G- l* N% Q1 z) L   wait for e 110 min- v& t6 _, W% G4 r0 g
   take down R_mA
9 Q/ g' f6 U- y0 X% B   wait for e 5 min
( k. p6 P3 z8 g. P4 Z   bring up R_mA% H6 @; q% d7 ^2 \: v' g
   end
- q( B& f5 ?1 \, i. X2 Kend

. B- @- s, N# m" V% G* L3 B 8 w2 {& v# ?7 K; }/ L
begin P_mB_down arriving1 z3 i& E5 q' f9 k
   while 1=1 do
- g5 z* S2 z- {   begin
" ^  q" f% _3 ^   wait for e 170 min& W! T! O! r3 |7 R# I+ j4 ^
   take down R_mB
- {) [+ L, M* ~   wait for e 10 min
& ]2 L. S( S" Q3 z. L& S   bring up R_mB
) M+ }0 w- F. p  p8 t9 Y: e   end5 l/ E  L, G! t2 y
end
4 V8 u& c- b5 Z9 w; l

; z4 M3 P2 \3 t; pbegin P_mC_down arriving" |: V* T  {! |' z+ K
   while 1=1 do
6 S* G# {, X+ Z1 f   begin
- s8 i0 A& X; @( _   wait for e 230 min
5 p9 ~5 v+ ], t0 \7 U   take down R_mC
% T( K8 e9 F: d   wait for e 10 min
1 P4 x/ d- J3 U   bring up R_mC
: g1 q! c$ e1 i) [   end
- e- y: c) j6 P, \: G+ ]: W+ send

* U+ U" P2 l' R  p  C1 @
8 h& ~$ D( T( [- U- |1 W7 w" f  `# fbegin P_mA_clean arriving
% L, O* C1 m7 ^+ M   while 1=1 do
3 W: {! d. T2 s1 Y7 d   begin& K1 A+ `1 M( F7 T! V
   wait for 90 min: h- A: F8 J+ z, T4 l, v, g
   take down R_mA
9 |! ^: c2 o3 r6 q  F: H) |. D1 Y   wait for 5 min
7 ]4 a9 v* `$ U. h$ w4 E4 p   bring up R_mA
& r  U, _6 U( P   end
7 b9 r5 b/ C5 N, eend
' [) L& m2 I/ B% F

- P  }  Y  {# abegin P_mB_clean arriving# o! I- y4 ]: Q; M7 o, u# s
   while 1=1 do% U& @! ?3 D  o9 m
   begin( ]" o* I+ G% Z$ b0 V' f) X  q
   wait for 90 min. |" X+ ]5 f$ D7 ?' P
   take down R_mB4 V. r; f3 Y& D8 z- ^
   wait for 5 min8 R/ R5 B' u" t2 w
   bring up R_mB
! R# c) y% o9 U   end# b% p$ {& G, G9 L
end
: c; Y% w# I- v4 k  i, _; k
9 M( k2 |5 o: ~; l% i# v. V9 \
begin P_mC_clean arriving
/ J# l3 F) N$ v/ t& o' z$ R3 j' ?. `   while 1=1 do
1 e) M3 b8 J# [- v0 [/ Y& R   begin2 J) Q9 _7 @2 n  ]5 n6 R# r
   wait for 90 min, }8 m$ w0 d0 G4 S& L
   take down R_mC
$ T- P' L+ d+ z4 `3 _: G5 ^   wait for 10 min
% Z5 p, Y3 e) {1 Z, _$ f. q   bring up R_mC& o3 b- D) i3 p+ |3 [4 n6 `8 P# K
   end
+ m1 h2 z: y* u" T' yend
6 t0 k: b9 W; z8 P3 z; }% q' U3 B
----------------------------------------
# k3 T4 J9 {, p% Z 6 J. ~/ n% k$ I- w
Exercise 5.9. Z0 _; k# b# U1 l3 S" I- ~  b
- a& t2 y8 E& [' L8 {% A3 @/ x
; x+ z# h6 y: b* L1 o
Create a new model to simulate the following system:
: D) F! U  i" T& i* U5 ]- QLoads are created with an interarrival time that is exponentially - h9 \( s8 Q# }5 N
distributed with a mean of 20 minutes. Loads wait in an infinite-
5 Z% O# i9 J( {# k) qcapacity queue to be processed by one of three single-capacity,
6 v/ \3 @  v9 M( iarrayed machines. Each machine has its own single-capacity queue
. y3 L/ D& G  W) P' n  G; h; l9 _where loads are processed. Waiting loads move into one of the three 2 n! Q# h$ [* p  \
queues in round-robin order. Each machine has a normally
4 J4 T4 q0 i% @6 G. {( Y$ p( ]distributed processing time with a mean of 48 minutes and a standard " W3 Q+ J( r: c  I) }% `! z
deviation of 5 minutes.
3 k8 p0 w( R$ mThe three machines were purchased at different times and have ; X6 |' M, G. F2 O0 r; E
different failure rates. The failure and repair times are exponentially
  u; y0 \& u+ @2 \0 W, cdistributed with means as shown in the following table:
4 d% [# i& c$ `' F$ n4 O/ _% D' y2 QNote The solution for this assignment is required to complete   [4 _: V* e( o) n) j5 `# G
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
/ G2 \2 R' @. O' D* Myour model.
* j. l6 K7 N- n0 U0 {
% Q7 O5 W  V$ y0 T( {: VMachineMean time to failMean time to repair
  ~+ ~+ l( Y! `5 Y1 O9 e+ D9 p4 ^A110 minutes      5 minutes
' ~, l" M& g! _  V8 zB 170 minutes     10 minutes* ]+ N9 L" y1 F
C230 minutes      10 minutes
0 m3 K! G* j) A: b  R$ K/ C5 f& |, F" C) L0 G5 _) R7 _
The machines also must be cleaned according to the following + V: ]* g( K! E+ T/ R$ m+ a5 u
schedule. All times are constant: 5 L5 P& w. s/ ~

2 N5 Z2 [0 s! @! f7 x' R# HMachineTime between cleanings Time to clean
: q# F8 @# [8 U+ i* iA90 minutes        5 minutes/ _$ I1 l/ i) B, ~! w
B 90 minutes       5 minutes  |) w$ r' {: u4 e* `3 X9 G; `
C90 minutes        10 minutes0 f) d# Y7 m) l3 h0 M# @
7 s, s0 a5 e: C; u; }6 n
Place the graphics for the queues and the resources. 1 y) o$ P9 ~4 s8 R
Run the simulation for 100 days.4 l6 Q, \! ?1 ]# g$ x: |% l/ {
Define all failure and cleaning times using logic (rather than resource 2 g3 b. ^$ A8 `9 d, b
cycles). Answer the following questions:: K' L6 z/ s+ ^( `; D  d  q: k
a.What was the average number of loads in the waiting queue?# H" ]' E# D8 H. O4 K" _, o
b.What were the current and average number of loads in Space? 8 e0 Q9 u+ ^8 W
How do you explain these values?
# e4 _3 ]# s3 u

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉0 l! C9 S) R' ]5 X8 ~% ^
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
2 Q6 i# _  y7 K7 F# E, f2 S/ V  X这行好像也不太对,各位先进觉得如何呢?
4 [, u% E$ e& Y
, C) [! J. ?& L0 y9 b9 }- i0 }begin P_something arriving2 c* v% B) W) p6 S( B2 E
   move into Q_wait& `( r! c7 N: W9 t
   move into nextof(Q_mA,Q_mB,Q_mC) 9 L' x. s7 @$ E- P: g
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
0 y. q+ `- N( `, O   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) ( r8 [0 l% W. G" A/ f
end
/ [7 f9 v" u5 n, N( Z* W! d8 p. `  ?. v
4 i! q' `! e4 Vbegin P_mA_down arriving
( c( D0 p! N% {% L; P5 O   wait for e 110 min
4 Y# L0 }4 q7 \6 A9 O3 y   take down R_mA
" Q  X$ h; I. t- [   wait for e 5 min
7 X5 |5 o8 P, @$ k4 q: l9 K6 u/ l! ^   bring up R_mA) k, b+ v4 W& Y* c; d0 ]
end
% C* J, t7 A3 m4 h' u7 ^
6 @% G+ E5 O5 Y; ybegin P_mB_down arriving+ w8 a( v7 E" Z6 _2 @* W6 M$ Q
   wait for e 170 min
& j0 ]; W6 r5 P- E# N" |$ S' L   take down R_mB
$ E6 q' q' E( v# F   wait for e 10 min
8 X% T& B' r! i6 ^. ~$ B* L   bring up R_mB% j/ m; i' O) U2 |/ S' H* |
end
# M4 h0 K  F* o, E/ F% ?: j
; q8 v  N# ^; J" ^begin P_mC_down arriving
; b) a! X: s1 d+ k, Z   wait for e 230 min
+ u( N2 U2 V0 t! C0 @$ z   take down R_mC
9 G' h/ {6 R& N5 M. c. D   wait for e 10 min
& I- E4 U  o& E; J1 X, O. \! |   bring up R_mC
6 u7 i# o4 F2 mend
6 K4 C9 E( H* F6 x% F
! E0 B. `: l+ D+ O; `( q/ ybegin P_mA_clean arriving5 F+ v5 N! u' Z* [* ^; O8 k/ V
   wait for 90 min
* d5 c1 @) }  i" T& K   take down R_mA. Z+ j$ K( u% [: j, N1 N
   wait for 5 min
5 o$ G; y* o$ K2 e5 }   bring up R_mA
3 w2 B/ L7 ^7 t- ?end. v. C; U" o0 Z' e& {, P4 ~
4 c+ ?/ ^8 g5 M3 f: J+ N2 e0 l
begin P_mB_clean arriving" `$ X5 o1 c5 b7 C- W
   wait for 90 min
* r# x- O; C2 I/ i9 u! V( g   take down R_mB: |& P2 x5 X4 \3 {! n
   wait for 5 min
# s& m# {* c% |4 j; ~$ e% u   bring up R_mB
5 Q% C2 |+ K' \$ ^end3 V/ B& c8 p. G% k6 }: _# |

; Z2 l! I9 @( e( i+ f8 U9 x$ M! ibegin P_mC_clean arriving
8 Z6 a0 P1 i8 R3 c, d& D9 H/ _   wait for 90 min
# L- }7 d! x6 A. g* Q   take down R_mC0 ]0 L( N# d7 t; G& k, X: H
   wait for 10 min: @3 w" n& N6 U$ x& U
   bring up R_mC3 p$ R0 L! L$ |3 r
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving. M1 O8 ^) S( @9 P
   move into Q_wait. p0 x% ]5 b* }: {; {% D
   set A_q to nextof(Q_m1,Q_m2,Q_m3)+ S9 Y8 [" g* ^1 g' ?4 w. ~* W
   move into A_w
$ S0 B+ S& K2 V9 V5 F# H  v; _! ^- P   if A_w=Q_m1 then use R_m1 for u 48,5 min
( `# l  K  P1 t5 g" n& R   else if .....then use ....for u 48,5 min' w0 j! p- v* S$ `) ?' X$ t2 x. N: A
   else if .....then use ....for u 48,5 min  
: c* i' Z4 V/ I   send to die
1 o. b- @: J0 ]/ w; I" ^end) c6 c- M2 \) C2 F, v8 N
8 g6 X9 F( i: _
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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