设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5077|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 $ T' C) w3 N& I5 X% i! ^% U

3 k7 t0 q( r1 x- ^底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
9 q: Y0 u4 F- }* O4 {1 a% B3 [$ t8 E7 K9 o3 a: ?( F' P' A( B
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!/ ~$ c, k! [4 t8 p( ?: D

% Y5 U3 y' Y0 E0 U* B& \
--------------------------------------------
/ x: b2 J5 i0 [  vbegin P_something arriving. y& {* a* Q+ \8 W7 W. l  r
   move into Q_wait- e. l$ ^- ]1 c- G1 {4 e$ g+ k* O
   move into nextof(Q_mA,Q_mB,Q_mC)
) x7 T3 o; \3 M5 d3 W9 M( }, @   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min( ?+ p$ [7 I  O7 A. r( |
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)4 E! c9 r3 P$ j% ~/ x
   send to die7 W; @, Y( m6 ?! p9 ~( e6 v( H3 D& C/ A
end

$ ~' k, h) ?3 v' ]6 Q" x
0 G+ b! j/ t9 ?! W9 Cbegin P_mA_down arriving- U! e% Q1 _% v# z' `
   while 1=1 do
" `! j6 Z: K" ^- `: O   begin+ M; B7 f& z6 ]' ]8 e% `+ @
   wait for e 110 min5 Z+ F6 W) k! P! P
   take down R_mA
3 Z3 r9 \6 }3 N; t# y( [( v   wait for e 5 min9 f3 v2 k5 Y/ |+ i& V1 W' p; o
   bring up R_mA
4 W# S$ w/ N( \7 Q' X   end% x4 b$ v7 l# ^- s( g- ?  ~
end
' j# W( |- z  E: T4 ]7 w

$ d% q3 ?8 O. d% t4 G9 i; S/ bbegin P_mB_down arriving6 x! I3 L0 p6 m0 o- S  ]% t
   while 1=1 do
* [! I3 t: Y3 F0 z/ A6 [3 i   begin0 F+ v8 m( B  q  @
   wait for e 170 min% K0 W3 n, }9 ?3 C; G3 e7 z
   take down R_mB
( }! o+ v* f; [2 g   wait for e 10 min6 |' @, ]1 b# f3 Q
   bring up R_mB- B/ Q) z+ o$ t6 `& O
   end
+ ^/ P* m! F- T: ~* Wend

* \4 }0 E+ m, E! `
0 @! ?" q5 N6 N" mbegin P_mC_down arriving
! M4 P: R+ s' e   while 1=1 do : o5 ~: P" ?# g9 R% y
   begin; j0 b: n: v& Z! E
   wait for e 230 min- J0 `# R1 P5 r4 p$ z
   take down R_mC
9 @5 a7 h; R) u5 Q   wait for e 10 min5 C, S& P' V, g+ M( @; d- ~1 V0 R
   bring up R_mC
; b% _7 ]; U" ]) M9 u. L8 L! B& p   end
4 [' L. C! f  n0 P1 D/ Lend

  d3 M6 O2 h( a' x
8 G0 b/ {, T, \begin P_mA_clean arriving2 b) k3 T' m/ o9 Q& c
   while 1=1 do0 H1 l- F$ Y  Y/ S
   begin- ?' W) J5 [! Y
   wait for 90 min. H- o6 I2 V: H* A& A1 w& n9 L/ W, Q
   take down R_mA
1 ]" H  H% j' D7 X4 S) {+ y9 D& l   wait for 5 min
( B# a0 s( b! \) a   bring up R_mA( v) y# q1 ?/ i* k
   end4 Z$ N# j/ P7 V' p
end

1 e8 c) T6 G; Y; m+ O8 d - {2 {3 r9 K6 n+ B/ C/ k0 l
begin P_mB_clean arriving
6 J* {" Q4 e" {0 L; d   while 1=1 do
# H2 s$ E; f6 D  p( h3 F5 b$ |   begin0 H9 A; f& i1 s7 m5 k4 p% m
   wait for 90 min
# m1 D1 D* s7 q0 c' H% c* z( N   take down R_mB
7 Y' E3 J$ v* ]& C   wait for 5 min: \( ]! k- n+ y2 o
   bring up R_mB3 p/ v% ?3 q7 ?* l: l8 \, q) v8 \
   end1 w, O  N( A6 j; V0 l0 A3 i
end

3 [! o" K% b- } $ f, a' q9 C" R# d6 Q3 a4 U
begin P_mC_clean arriving& ^: w7 y6 I9 S: H# v" V! X/ z, L
   while 1=1 do
1 c+ V9 T$ ]9 g2 g& `. p0 w( V   begin
1 f1 ], j$ A$ _* g   wait for 90 min! x8 |1 C/ R8 ^" W: d
   take down R_mC
3 L/ E/ X, u% `! x5 a  x9 P   wait for 10 min
$ i, }1 P3 m' R+ Z) S4 n/ \" j   bring up R_mC# \  u% D- J! j9 _& a8 I
   end
2 H& i* Q/ }. q( L+ ]! p9 C+ Oend
5 T' I( J: M, P* {4 T4 Q, R; e
----------------------------------------
8 P2 w* h2 a0 Q; S/ b% q- ? # {, n1 ~; S7 D+ N: M
Exercise 5.9; l9 o$ t- s9 K' Z

/ C, l% x- I6 B* B* U
7 Y1 J' n6 ^" O* g. ZCreate a new model to simulate the following system:1 r4 C: A, x/ F. f% {5 d3 n
Loads are created with an interarrival time that is exponentially
5 S2 {: X$ G0 I5 X1 Rdistributed with a mean of 20 minutes. Loads wait in an infinite-3 O' ?5 ?; D3 U1 q) ]. O  R* }
capacity queue to be processed by one of three single-capacity, 4 P. V, c4 K' {( k8 k
arrayed machines. Each machine has its own single-capacity queue 5 b. N5 F1 B( @) u
where loads are processed. Waiting loads move into one of the three
1 U3 {; {2 P$ [% S9 bqueues in round-robin order. Each machine has a normally
, ?# G& n; w- z+ T: Q6 Sdistributed processing time with a mean of 48 minutes and a standard # M4 v' h' w$ u! X
deviation of 5 minutes.
1 c; K7 F% {) h3 F  J5 @0 qThe three machines were purchased at different times and have
* r, y6 K& V! y4 f  _4 }different failure rates. The failure and repair times are exponentially + v- `, ?  z. @! M
distributed with means as shown in the following table: - m# S* H0 n  R+ c4 s* q. r* t
Note The solution for this assignment is required to complete # R1 g9 l% |% L0 {$ P# h. G
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
1 j' R: Y/ _/ L% _  g: Tyour model. ( l9 r  ]9 ^) F; f

1 E5 S; }, p) z' T: E* EMachineMean time to failMean time to repair8 e/ M, ?7 A% D( X/ J
A110 minutes      5 minutes( m6 B, y- S/ y$ F0 z. K& N: e
B 170 minutes     10 minutes
) l2 C1 a  c: T# I# kC230 minutes      10 minutes
$ S* }; r+ T* P
( X2 d" O! p. F! l5 m! `The machines also must be cleaned according to the following
3 q( x9 I: i+ O. T9 Qschedule. All times are constant:
5 l2 O8 u+ V1 G$ i+ W6 p
* E1 q8 `: W& K( k- ~MachineTime between cleanings Time to clean& L1 P" [4 m9 O) I
A90 minutes        5 minutes' F/ e% Q& e- o* b# J3 ]& a  S8 Q
B 90 minutes       5 minutes
, B( M0 _2 n# R- e8 r. K5 JC90 minutes        10 minutes1 h7 s+ l9 _# h1 i& y+ C' R, w6 t1 F
! a& r: ]5 v- |, w9 l+ M& ?
Place the graphics for the queues and the resources.
+ j' l' Q# R& {8 aRun the simulation for 100 days.8 o6 z- |0 i' Q1 ]# k! a# R
Define all failure and cleaning times using logic (rather than resource
+ j% }9 T/ \+ Q0 Hcycles). Answer the following questions:
$ @1 s: m9 g) c) c! E5 Ia.What was the average number of loads in the waiting queue?" Z! D# I/ V6 o) n0 @, h/ b
b.What were the current and average number of loads in Space?
5 r) N" Y% c; p! Q5 yHow do you explain these values? ' F% w) ?: D# c$ h1 ~: k

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉% h  j3 V; ~2 i0 T- Y
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)1 ~8 }# w( T1 M- ?1 }* u
这行好像也不太对,各位先进觉得如何呢?
& }% u% \% S" Q  l- T2 y1 q- h
8 ?2 z' n6 U; u: ]+ m& }  Obegin P_something arriving
) X5 @% Y: x) G. V- n8 F   move into Q_wait
) Y9 Y( @0 w3 d' \2 {4 E   move into nextof(Q_mA,Q_mB,Q_mC) ; l/ y4 l: h2 F" }3 W
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min& }$ l/ n6 m7 P7 P5 u& E
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) $ l& J) B% f* |4 ?0 y8 ~
end  }3 R+ w. i! P, r$ {! Y' B
0 c2 L# O: p- F9 q7 W/ w/ t
begin P_mA_down arriving0 ]& Z) Q3 C0 [4 U. I1 k/ g/ m
   wait for e 110 min
! Z) T. s/ m; B' y) u( f' P   take down R_mA
/ ^2 `6 G& t0 F5 \; V4 `' F$ B   wait for e 5 min
5 n& P5 f7 |( Q* a5 p7 b   bring up R_mA
. z" a1 Z. k! P6 t3 Send
; w" Z+ q; I8 ]4 c
) g6 e( o3 z+ ?- e" z' Sbegin P_mB_down arriving2 ^% ^0 Z4 G4 V7 R' z1 i
   wait for e 170 min
; j. u: {* o8 [7 `   take down R_mB
" d' u% w# V. A- a- `% F   wait for e 10 min
: p6 S$ `# l$ H0 L3 i8 U. {8 r   bring up R_mB
- Q" j# U" G! J/ v, U1 |4 H2 Nend. D) `' ^4 _. s# @# `0 ^6 }& E
# t+ o* I9 }5 e" p0 w2 l: Z" O
begin P_mC_down arriving& H8 t* w8 I) _" n8 o7 H
   wait for e 230 min
: n4 N. U/ d  n2 k3 w8 @   take down R_mC
2 @5 h/ |# ~/ A. A+ f   wait for e 10 min+ {: H: B# b# _. y* U- u, }; ]6 V
   bring up R_mC1 D2 t# I8 y+ t8 _# b: k
end4 g" A$ g" j- n/ v. V( [. r

" u; y, H) g4 mbegin P_mA_clean arriving* D: R, H! T; n
   wait for 90 min1 S, H5 T5 ~2 ~6 R4 r: |2 z6 y
   take down R_mA
1 W$ Q& T0 R! j: Y" B) ^: r# }   wait for 5 min
/ F9 g% R# y4 _3 {0 v6 @1 n) W+ p   bring up R_mA
# p$ s1 f: M5 Z: W' Q: `end0 d$ q# K" L/ }4 v4 E5 d

: w7 R4 L2 m  t3 T7 G+ @begin P_mB_clean arriving# m  F) M8 b6 r0 u5 }) @
   wait for 90 min
3 r. x) N& N* G0 o7 w" j% f   take down R_mB
3 s# l9 a, ], S- r   wait for 5 min
- V1 V0 E8 p2 K! Z0 V9 h0 {   bring up R_mB
& |; B9 X2 K, uend
4 d# c9 m$ G+ d- p! d4 ^7 S$ i2 w
& _9 q" g# P) l; D. jbegin P_mC_clean arriving
( H1 U; j5 k% S+ x) o# c   wait for 90 min! N$ x$ r# s% Z! U& v7 v  a0 w
   take down R_mC
5 J* o: N- V: |0 D   wait for 10 min+ L* I: V2 @, ^; w5 H! t1 b5 h
   bring up R_mC
4 P7 G/ c; U- d- _3 k8 ?/ D# rend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
* q3 |2 A! Q) V& m4 u* u$ M+ a2 s   move into Q_wait
. |+ m; z1 n( f1 X9 Z) L   set A_q to nextof(Q_m1,Q_m2,Q_m3)
/ z/ T/ Y7 M+ ?- c   move into A_w
; E1 k% Z% a* Y" P# [- s5 G   if A_w=Q_m1 then use R_m1 for u 48,5 min
) m" u4 d' c" k9 ]0 ?   else if .....then use ....for u 48,5 min. \& b% a3 O  `
   else if .....then use ....for u 48,5 min  
( S1 e3 u3 ]" I   send to die6 G0 ^* Q3 W6 P2 l
end0 _  i4 l2 ]3 n% r# ^2 H1 L, x
* O7 y8 L+ |2 u# r
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-10 09:44 , Processed in 0.011968 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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