设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7642|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
% N/ q" `0 I6 \$ O9 D" _. p5 O3 Y& Q6 E9 l
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去/ D9 C/ O! O. R' \: l* ]7 Z6 J
( b! b4 }4 e9 q  c3 d- A6 l( M6 |
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
5 U  j+ E2 d& ]- d8 K3 A: \% L. a' j
--------------------------------------------& @7 i" X- C5 ]2 j! R
begin P_something arriving% u$ o, q; I* e( i9 g3 K
   move into Q_wait( F; E# N- B/ x# f$ C
   move into nextof(Q_mA,Q_mB,Q_mC). R1 X; }; ?- R: c7 N1 N
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
) o. @0 K/ _; ]- _   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
" i' w) R5 p8 |* @$ x9 W) G  g   send to die; G( W- h& R- j' g8 K) h/ G
end
/ u  k) |; _' r0 x

* r# ]3 T1 K$ N7 hbegin P_mA_down arriving6 \' f/ _: i% |3 h! d
   while 1=1 do ! j( m; J  V7 U, X: C) j
   begin
$ J3 r0 M& L( {7 @) Z   wait for e 110 min
- U8 H& D3 W0 }9 y5 P  l7 Q   take down R_mA, @' i2 j+ ]  i2 ^* _5 v( i- J1 Z/ y0 r
   wait for e 5 min
2 y7 R  `9 N/ o) n   bring up R_mA. m8 b! d/ ^) R0 \1 [! J
   end$ m* l9 t7 O" J
end

+ `0 S# J* y, B2 v0 y0 X
9 Q1 f% v: f# T" L) S0 Y8 @begin P_mB_down arriving5 }4 U4 }; z* A/ Y& n
   while 1=1 do
8 W9 m$ _% x* l. }' O$ `   begin3 m8 r; @1 i% l& G6 J8 Y
   wait for e 170 min
+ S7 K' n" Z0 K- ]: }7 C   take down R_mB
  X  C4 \& Q8 a- }+ r' E   wait for e 10 min7 m" S/ A5 U' J3 |$ d$ b" T* _6 O
   bring up R_mB
' C3 t8 r/ Z' Z   end8 |9 i/ \7 B6 V' D
end

5 O& b! n- z1 \% m1 I6 _) O 4 f6 d% W- @: n) U, r
begin P_mC_down arriving
6 D$ d6 m8 b/ E+ n7 W/ i   while 1=1 do
. g8 Z5 w" [0 L- \, _# @: F   begin5 v$ T/ y* n6 ^0 _7 K2 H; M
   wait for e 230 min
2 {* x, ]) D! p' ?   take down R_mC
/ Y* r# X6 v' c   wait for e 10 min9 `+ y. z2 O0 Q- d% U( w
   bring up R_mC
, Y5 Q# _% g- u$ O   end
/ y1 {: a; d" P* mend
' ]; E& @5 _( ?8 U: s; s1 r

4 ^7 ]2 Y; e# y# w" I8 Mbegin P_mA_clean arriving
& _; f! i6 x* d   while 1=1 do8 Z/ n/ i' [1 Z( n
   begin1 c) R6 s0 V# a: w  ]
   wait for 90 min
$ ]4 I& ]4 c$ k' r- I! A# N   take down R_mA
8 V+ ~2 i/ I+ ^8 {/ s% Q2 g# W   wait for 5 min
) Y: \/ C6 B4 d, j   bring up R_mA. @% W3 ~% ^: R; p( P# U" P
   end
  Q- [& e/ |) x4 x2 Uend

; K" u( Y+ K) g$ w+ r% n+ G
; }& Y; E( g7 v; H" s8 Pbegin P_mB_clean arriving% A* b! t2 o: B* J, d
   while 1=1 do
- l8 T9 c$ R: p+ \/ h: p4 C$ w7 t% U   begin
: N& c+ H/ u2 U5 d# X  n   wait for 90 min; I$ ~) C* Q1 `2 ~' b, b
   take down R_mB# D! _5 ^# b% L" L( f# o- P
   wait for 5 min
0 R- o1 Q( A; A/ D! ^   bring up R_mB# r' m7 H( }/ r4 O4 M: }7 v. r
   end
: _- g' p; ~, M5 Vend
3 ^0 X: M4 w4 R" f

0 b  X0 M3 ]+ s, t* g8 Wbegin P_mC_clean arriving
- M: D* k4 v7 E. M   while 1=1 do' K4 J2 w- v2 {
   begin5 `9 }6 ]* U. }& y( q& X/ M  Y" ?
   wait for 90 min
: N0 d" G' o- }0 J+ u; B# v* l6 [   take down R_mC
# N( d9 D& v8 p+ o   wait for 10 min, |4 |6 `, Q2 e' r
   bring up R_mC/ Q6 G" S8 R: R5 V
   end4 y" u' U2 I% q3 @. Y1 M
end
) l; B: W8 v; L, `  `
----------------------------------------
9 _% l& h9 n2 ~& Q( M; r
5 h' W: s% ?; f6 |Exercise 5.9
4 n. z0 g4 ?5 N$ Q: \1 s7 t$ g" F
6 t, p( i  E& k% t5 u' m9 C
Create a new model to simulate the following system:5 O  I* V+ D5 P+ u1 O! b6 D
Loads are created with an interarrival time that is exponentially / w: n( D" D; r* F5 |+ i. a- J8 G
distributed with a mean of 20 minutes. Loads wait in an infinite-
; r! |4 Y; U7 c- Scapacity queue to be processed by one of three single-capacity,
; k' B0 {5 L/ t( _5 M  h# D. y$ _1 ]arrayed machines. Each machine has its own single-capacity queue
: R* h* }9 W! y. B9 y8 |where loads are processed. Waiting loads move into one of the three ) _& ^8 a; w/ j* M: T
queues in round-robin order. Each machine has a normally , u6 ]1 V$ [1 \$ {2 ]! G" X! e
distributed processing time with a mean of 48 minutes and a standard
$ y; G$ q$ ~* W3 x; ~deviation of 5 minutes.
1 G# M/ u% |+ h$ W9 F- hThe three machines were purchased at different times and have * G2 i  k& V; k6 n
different failure rates. The failure and repair times are exponentially 0 M. o/ v9 j% m( q, l
distributed with means as shown in the following table: 4 v. R. S3 s% x/ t: A$ q
Note The solution for this assignment is required to complete + w& W: G& S, Y8 u% C
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of ) Q: p) h4 Y9 {  B0 q
your model.
! D  J8 l& t5 X* A2 p
, g8 r( ^! |* @3 C. nMachineMean time to failMean time to repair
2 t$ c7 {8 q2 B& C. W5 B3 {A110 minutes      5 minutes
7 u) C! ^; @' WB 170 minutes     10 minutes: c, V) v' l- V0 U; R/ y
C230 minutes      10 minutes
& J0 l6 H+ n& y/ t8 @
" R; m* W: k& f4 K0 R2 v% T  _The machines also must be cleaned according to the following ( v8 G0 {6 o6 L5 R) ^0 ^/ e
schedule. All times are constant:
* Y! G; m3 S: j5 K8 z( R; P7 l" [3 Z5 V3 J, Z
MachineTime between cleanings Time to clean  z0 Q8 k" U  @
A90 minutes        5 minutes
; `' r: L8 L+ Z# c' H, p! E* }6 qB 90 minutes       5 minutes
* B0 P/ ]& X2 P2 U2 }" s+ kC90 minutes        10 minutes
( Q1 q" T1 [/ O( |# e' T5 ?8 U, u& @2 j7 V0 @% Q
Place the graphics for the queues and the resources.
) i+ M" z2 J7 i) ]9 c+ m+ WRun the simulation for 100 days.
! H' O2 B, N3 z4 m2 cDefine all failure and cleaning times using logic (rather than resource
2 q: m# g# t5 ~, f4 dcycles). Answer the following questions:; e& ?" L  J  Z' }( [4 Y7 ?9 W7 l
a.What was the average number of loads in the waiting queue?1 R, ?- M" c4 u' g5 Y, j5 ?
b.What were the current and average number of loads in Space? 8 K0 Y5 z+ ^% P! _
How do you explain these values?
; v. d) L3 _) E2 {) E9 Q1 l2 d+ o

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
% Z2 D) q5 ]) W; n( x' ~5 `send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)0 k' e. c0 N8 a' b' [  b4 g$ u
这行好像也不太对,各位先进觉得如何呢?
. l1 p( ]( C) F! o- F6 v9 \
' r+ g+ z- v& r5 M* S3 xbegin P_something arriving
! X9 j, K6 _+ O+ l% V' D% j   move into Q_wait8 C. E2 D0 C( U% l2 @9 n+ O
   move into nextof(Q_mA,Q_mB,Q_mC) & x7 X0 r2 `0 X. V
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min3 E9 Q8 F; u( P+ E
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
+ V2 V9 j3 |1 ]& L$ U- Oend
) E9 B: h+ t3 {! Z6 m. h2 O& A
, t) E. u: e) ?9 ~" R) @- G& l2 ibegin P_mA_down arriving: e8 J8 o5 o' `# c$ q) z
   wait for e 110 min
# h* y4 P" _' P3 P: h; W  e. r   take down R_mA1 d: T/ r- M5 O1 `' G. C' P
   wait for e 5 min
+ Y9 @1 `1 s' ^! E0 v   bring up R_mA
$ z! i3 t9 ~4 D0 wend
  D$ ~3 U  X( V8 ^+ C0 t+ b! ~4 s+ T$ X
begin P_mB_down arriving1 c- i4 v7 ~& d3 y
   wait for e 170 min
. R( j# K0 I% P# U, g( G( d   take down R_mB0 W- L/ t$ L. n
   wait for e 10 min3 d; o9 y+ A" W' |* @
   bring up R_mB
7 {2 B+ e8 `9 \9 ?" l6 oend: g6 N) Y: ?" c* _* p6 O( x. Y) Z

8 W  B% Y1 l  c* A- abegin P_mC_down arriving1 X& w* _, w9 T* S
   wait for e 230 min
* b' x  ?* K) a7 ]8 m! u. r- b   take down R_mC
' o; ~' V1 Y" `3 U   wait for e 10 min
# `: ]- K! K& n! X8 O. a   bring up R_mC
' B% N9 E$ w# ?2 O' B' z7 W( Jend
8 u  i% e7 g$ O1 I6 O9 c3 t' a0 F: f" P8 y
begin P_mA_clean arriving
0 y7 r: U* F0 |+ Z4 z$ T' E0 S   wait for 90 min
! a) D( ]- F/ ^$ t1 e1 w) Y0 }" D   take down R_mA* O, I" b& \& x; E- d
   wait for 5 min
7 W, U4 E* i+ D1 s   bring up R_mA
9 N8 T" L' n( J3 S* M6 @" Cend
7 Z+ U) y8 `" x" c4 H* J- K8 W3 M0 B# B" O  F
begin P_mB_clean arriving
/ x" |  o* @9 l9 Q   wait for 90 min
3 Q  T( j: _4 ?5 ~9 p: ^2 h   take down R_mB; V' Y4 `. {& {4 m: {9 o) ~$ S
   wait for 5 min
/ C& B* W; s2 ^& a) y5 k4 m   bring up R_mB
1 |) }9 `9 d0 ~. _end2 w$ ]4 {0 o  o

1 L6 _3 I, Q8 |9 D: r- s' o& Q( Tbegin P_mC_clean arriving7 x4 d3 B, a. ~1 p# g
   wait for 90 min+ w( S' }* C& X& D
   take down R_mC
4 J/ Z% [8 s/ N+ {/ k9 @  n   wait for 10 min
' z. M+ f! [- q9 s   bring up R_mC7 n4 F  f/ A8 }2 J& ~
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving$ j$ q/ \. \1 H! _+ v
   move into Q_wait1 t9 e7 {5 g! ]+ F* Z8 ^) ^  q' p
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
/ r+ k3 _( o$ U0 ~- @   move into A_w) q0 G/ G& r# j
   if A_w=Q_m1 then use R_m1 for u 48,5 min
& S, c' }6 `, B# s" h- h# C   else if .....then use ....for u 48,5 min1 a7 P4 f( g: g2 @$ ]" ?% |8 \
   else if .....then use ....for u 48,5 min  - Z, P/ o" W! i& b
   send to die% G2 Q2 W% s' L# J; C. o3 f+ ~
end
$ f" C7 t2 I" w( O. @: b: R
- I& I/ U* K& v" N6 k0 Q/ h6 F; V供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-3-13 19:00 , Processed in 0.013135 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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