设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7610|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
# {+ g0 V( f& T$ [6 z! t. P# C4 ?' o1 x5 F6 L7 `: Z7 D
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
  {& p* `0 [4 x
6 g. U( a7 l/ {不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
( b: X% X6 g- @, U. B% Y4 S1 V$ K+ n! D* L8 }# B& q. ?
--------------------------------------------
1 f/ z7 J" X! F: I9 _2 O' j2 Ebegin P_something arriving0 A( B8 A/ O' }2 t
   move into Q_wait; i5 E3 {1 m, a% [* E% @8 y5 }: u
   move into nextof(Q_mA,Q_mB,Q_mC)% p5 Q" [0 e+ V. A7 a" ^, w- ?
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min# ]. T. m3 Q4 p! X% b
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean), m/ z- v: k; D
   send to die' `; e6 _4 k: r
end

/ M8 @% c) @- p0 P5 ]( t
1 w- @2 o% |$ ?: Z& ?, D9 u+ L* K& _begin P_mA_down arriving0 m8 [$ @& c% x; l( N
   while 1=1 do 0 z6 Q: |: m$ p9 n- j
   begin
) ?" k4 n0 G# Y   wait for e 110 min
+ \7 Q9 Y$ K) r* u' Z4 F: F$ S7 v/ Q   take down R_mA
8 {3 z& w; [" }: k( C   wait for e 5 min9 V* k  c. F  S7 D7 M. Y) ~
   bring up R_mA
. _6 Y% x5 m$ c   end+ p: T% C. Y0 q. F$ r; J
end
  w  G0 C. Z& B- f

9 Z" o8 f5 v- b: \begin P_mB_down arriving$ l5 o9 X+ `, l
   while 1=1 do
+ i, \' u# j, }0 K   begin
/ J! O9 {( |$ u   wait for e 170 min% G  P- U6 Y- }! n
   take down R_mB+ _: [: c0 s+ E# R; U7 W$ y$ n
   wait for e 10 min# ], F1 P8 v: V
   bring up R_mB
6 ], a; K. m) s   end- ^7 Y4 T7 _# o0 @( C* R" d8 A0 u
end
3 Q( }  H5 D$ F6 o
  C0 J1 z; P5 n( k, V
begin P_mC_down arriving' k9 `/ m& K8 Q; `
   while 1=1 do
; r' |. F6 W! ]# \5 w   begin0 Y0 ~* z8 z5 ]$ J
   wait for e 230 min
& p* @# {: ~$ F, f( d0 ~   take down R_mC
. Z/ c8 l2 Z" \$ \9 k7 R2 H   wait for e 10 min
6 m5 R+ O9 J. s% F# D   bring up R_mC
0 U! n9 w% ]& Z0 e9 @" w   end- |4 V6 A9 L$ o+ t* G5 m' w3 }
end
: ^- t9 k, \$ |* E' p  t, [8 X) ^
6 }9 y3 n7 o+ Q& u' {# Q
begin P_mA_clean arriving- |0 ]+ L5 E! U# u/ U* \8 R
   while 1=1 do
4 x/ ~# D8 ~5 ^. g4 x   begin1 W; N: n; t( G% ^9 g
   wait for 90 min
7 B# [! j/ z5 U1 r/ o$ H7 W3 H   take down R_mA: e. C/ A' Z$ G2 h
   wait for 5 min2 W) D' t) e# Y/ e8 d' W% G
   bring up R_mA
9 I4 @. v6 `6 _/ s8 s   end
3 B& x$ O  \* |4 h, I& W5 R& X. ~end
" Q* ]9 H; \4 y5 o  }1 o  W- t6 g
+ w& ~5 V# t/ J
begin P_mB_clean arriving
4 ]; l. |% ^. H/ E" h4 \' s! j   while 1=1 do
6 c, e7 @1 C; ^6 ]2 Z- b   begin
# u: [8 J! D- i) w   wait for 90 min
4 B6 j$ _. H5 T9 E* d0 _, q   take down R_mB
" e# U' {$ u, K( O+ g' m& C) h   wait for 5 min
, Q- ~1 w6 q% k' I   bring up R_mB! l8 E  y( W5 m
   end
2 Z/ z" y! u+ G0 b' }+ zend

( Z( W4 i( ~! A8 U
5 U" b, Q. K9 A9 r% ~) K' t# Abegin P_mC_clean arriving
) C" P- O( b7 R& k2 S* e3 h   while 1=1 do' _. J; |5 U- |" R# S8 J* E$ X( n8 B
   begin
1 \2 b9 ]8 h4 R   wait for 90 min7 D" G! a$ C( ]% H6 S- i1 L
   take down R_mC" a' j9 m' f0 S4 f$ {* ^
   wait for 10 min: K. a9 @! a* V3 W8 O
   bring up R_mC+ [# s4 O6 v: a
   end
) ^# D% ?* d% X7 B9 `1 Z$ g8 hend
$ F7 i, T: Y$ {6 v
----------------------------------------
0 h1 H6 Y- P9 f" A* x- ~ + G; ^' N2 s2 U) m; e1 W
Exercise 5.9
& H4 J, X/ G& Z6 H+ K  t4 ^
4 v% l9 H5 i) S" L) j* y# _8 P6 f9 p( X5 P! |/ \. O
Create a new model to simulate the following system:
: J% b" W+ f: v1 z0 J5 dLoads are created with an interarrival time that is exponentially
7 a5 v" L/ n7 F& |% F$ T/ gdistributed with a mean of 20 minutes. Loads wait in an infinite-
3 O- y% @1 h8 W3 mcapacity queue to be processed by one of three single-capacity, ( |, Z/ ^5 }5 E) @( G8 b  Q
arrayed machines. Each machine has its own single-capacity queue % w/ _: f2 }1 Y" ~5 A$ B- ?4 A
where loads are processed. Waiting loads move into one of the three
8 }4 i7 F2 }/ c9 Y% e1 t( lqueues in round-robin order. Each machine has a normally ' T* k& T% r2 H# G' i+ a- @# H
distributed processing time with a mean of 48 minutes and a standard " {* ~! {% [1 O2 y
deviation of 5 minutes.
: ?& n3 P% C" a5 K: m2 W& vThe three machines were purchased at different times and have
: L) A$ V5 @$ m6 [different failure rates. The failure and repair times are exponentially
4 i6 V2 ^6 r( z6 e! P' hdistributed with means as shown in the following table:
% j# i( c6 Y! T- z( R1 `5 [Note The solution for this assignment is required to complete + C- E6 _$ Y( D" t4 j9 F( q
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of % Y' |6 X" j0 r" @- ?* P9 @4 v
your model.
. j; @  M3 K) s! K* r! E& O) Y- u) P/ z. {
MachineMean time to failMean time to repair
7 x! }' c8 i2 h2 M9 t$ ]/ iA110 minutes      5 minutes
8 ]# d& _: n9 K5 Y8 b  zB 170 minutes     10 minutes. q! P) g. v/ w. Z
C230 minutes      10 minutes' _8 ~- V; u2 w1 q+ F& `; L; F5 n
; ^, C9 E/ a. z9 ]
The machines also must be cleaned according to the following * i$ J8 Z. P2 v6 O4 I
schedule. All times are constant: 0 n" F- Z1 D6 u6 @+ p. l
: U" K8 ?7 k# E1 ?8 O, i0 [
MachineTime between cleanings Time to clean
$ B5 q3 A$ ~# m# i8 V+ lA90 minutes        5 minutes+ C9 r: B. X3 z8 c/ M' B
B 90 minutes       5 minutes
1 o# `7 {: k- ^( NC90 minutes        10 minutes
) e& N7 m8 M* q5 R& Y' H$ h- @. b4 g( M$ g5 [
Place the graphics for the queues and the resources.
! n3 z+ |/ M6 `Run the simulation for 100 days., z8 X* ~7 n; p
Define all failure and cleaning times using logic (rather than resource
: G- e: z$ o( r$ }8 ?  C9 Y7 bcycles). Answer the following questions:
" G+ c; J- E. V* c0 V0 E% `; {2 Aa.What was the average number of loads in the waiting queue?+ z0 f4 h0 }9 N$ n' X2 @# c7 D
b.What were the current and average number of loads in Space? - f' [' G+ c  L, K5 S( j( w
How do you explain these values? * s# S2 R& g# s( u- N9 M/ ~. `' j

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
  T. l* n/ S, S# g  g' jsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)% B2 r( Y! Z1 J5 d- f
这行好像也不太对,各位先进觉得如何呢?
# v8 }/ {1 y) r. |7 t! k. D" q, O& n7 z
begin P_something arriving: U1 C+ L& M7 k5 J6 O" c
   move into Q_wait
) s; Y, P2 e. _" V* ^$ T, }! q% s/ s   move into nextof(Q_mA,Q_mB,Q_mC)
& H2 p. B  v) Y8 w- ?. k   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
) Z9 G; o  h2 {& \4 z3 Y1 c   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) " w) Q0 k9 w3 `' l; \
end
$ J4 ~+ I; f, g) o1 c$ @# I, _  D, t
/ |4 Q" H4 [) ~* ebegin P_mA_down arriving
" C+ w6 Y& k3 p0 T   wait for e 110 min
; ?5 d' ~! F' m% `6 w8 O0 r# f' ^   take down R_mA
; Y* ]" b% ~( x' Z. ^   wait for e 5 min
3 z9 S) H' K0 p1 C5 `5 j( Y   bring up R_mA
" g1 `3 p: j: Y& s$ i* hend
/ W: y5 F0 U+ h0 H* \# d& N$ Q7 r; d
begin P_mB_down arriving" X# V) u% V0 l- Z" a
   wait for e 170 min" h: l! ]4 M/ W1 I+ D
   take down R_mB/ t2 ^* r$ ^$ j5 F
   wait for e 10 min: M, @. I% v; |/ C5 f
   bring up R_mB
+ j* O8 ]9 @( n6 k; \( G: y1 Gend+ D' n; m6 G. [, I7 t

1 f: ?: q3 g! ?; ibegin P_mC_down arriving
& q! _4 A8 N( _( ~0 o( ^; T) C   wait for e 230 min
. K  J0 x/ {! H' s- T9 U   take down R_mC: Z% F9 G: f8 y6 C- g6 ?9 }
   wait for e 10 min5 Y6 `$ d, z  d# N+ Q  R
   bring up R_mC3 `$ @& o- b1 W
end
, h+ a! Q" h& d9 I8 n+ g/ x3 @% {3 P  X, w& J0 l+ O* A0 G% p
begin P_mA_clean arriving
$ y+ ~$ y1 |" t$ v& ?6 [7 b  {8 @   wait for 90 min& c, w% d+ x8 X) L- J
   take down R_mA
. R! B- [. z: |. f: g   wait for 5 min5 [! j. H# u  h/ Y7 [
   bring up R_mA9 u. c1 z. p. v/ w% A
end& n6 ]; T: n+ l& x2 ?$ c
( L* I# H8 i& D6 l3 z' r
begin P_mB_clean arriving
2 L7 G  O( {7 Y9 c4 `% y  \$ U- I5 c   wait for 90 min
  Y& s( {! P) b) J9 L   take down R_mB2 m' M7 [7 @  a/ A# n# Y& K5 Z+ x
   wait for 5 min
# ~8 A. C# W  y# X: Y, ], _   bring up R_mB/ z4 c: l& }8 }4 Y+ C: P  }
end' T" v% I/ ?$ I

3 b6 O2 s! F- d- e5 n8 dbegin P_mC_clean arriving
7 u0 D4 j2 s9 U9 T   wait for 90 min
, l/ M/ C6 O3 o+ S! c; d4 r. Z   take down R_mC  S6 F2 P+ V% g- ~
   wait for 10 min
. t3 @3 _: v% d   bring up R_mC4 _: t* n: X6 _% J3 i) T. P/ b
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
2 L5 C2 v. w* A9 ]% d4 u" U4 U" F   move into Q_wait% V+ S7 v' W, h1 a) B6 D6 _
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
8 g& T# B; Y. F: G3 N   move into A_w4 h! V/ m0 m% }" L; D
   if A_w=Q_m1 then use R_m1 for u 48,5 min, U, j, P4 _& e
   else if .....then use ....for u 48,5 min+ m& @# S( K+ b% J% t; B: f
   else if .....then use ....for u 48,5 min  ' V: o6 P# _% W8 }" i
   send to die8 ~1 }, P8 @( o. K8 @: [
end  K* b4 L( F" d( w
" N* x6 B2 ~4 y5 }
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-4 12:35 , Processed in 0.015891 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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