设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7276|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ( `% _3 D: f5 ?$ u
2 v* r- |) H1 q5 f) j4 S
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去. |- T( ^- j7 r0 h; i

) K+ R3 z) [; ]; S6 o不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!+ ]$ t) r- y. Y! u1 u8 D# v/ }/ w

6 L& G! v/ j' g6 |
--------------------------------------------
8 r" \' i# M* cbegin P_something arriving
6 |, D2 V7 V+ u& _. v   move into Q_wait. N2 x; W8 N1 ], {) s7 ~
   move into nextof(Q_mA,Q_mB,Q_mC)
* L9 L4 Z6 X7 y; L' [   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
. y' w- u0 G0 q. s$ n' F   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)8 J, s6 e- T. G% Z* k; o* v
   send to die# i) r7 h( _( i
end

  c/ W% E' z0 D/ l) S6 Q8 u6 i
! |8 K; V  P4 D! W' Fbegin P_mA_down arriving
( |' R9 X! Y2 A; N) c# y& I  F* Z4 J   while 1=1 do / E: _; @5 i+ Z
   begin
/ L: h: u5 q2 M, N   wait for e 110 min) S. e* g3 Y. U7 e! R( Z
   take down R_mA
' @1 H9 M  D$ R% z. r' E) t( ~% i' G1 M" l   wait for e 5 min8 Y% r' R% S" X1 C$ s) g# K, v2 G
   bring up R_mA& u/ F3 M1 D' P+ u
   end% a6 `* `2 C, U
end

% @' M9 K. L! n. I; p* D6 p
5 i3 v& j% r0 ]0 I3 jbegin P_mB_down arriving
. n8 B- \- \" b  z5 S) E# i3 @   while 1=1 do
9 `! P" R3 o6 x8 K- g# {2 ^9 R   begin7 y3 m# l8 h/ U9 O3 x' l
   wait for e 170 min
+ W  Z# n9 N0 }# M   take down R_mB$ j- \8 _' F+ W, F  l; U
   wait for e 10 min; u1 ^7 ?, m) A8 G! `  h0 y
   bring up R_mB
- Y/ a+ v0 i' h8 i& X   end1 S! [% P1 m& i- C* w
end

/ E* M3 }" P; Q& f3 T
. D7 I0 f5 ?6 wbegin P_mC_down arriving5 r# w, P5 K8 g6 M+ }
   while 1=1 do * W) \  l1 @7 S/ x
   begin
& `4 R; l6 e- r# y+ ?3 }   wait for e 230 min, c/ n  M; u3 D, k! R; V: Q
   take down R_mC2 J# y) u) F$ R; }* q( T8 n
   wait for e 10 min8 ~8 `- K& x& }8 w6 k# P! c
   bring up R_mC6 F" k) ]) h* f% ]
   end
& Z) N6 L) {; J0 d, I, ~end

5 |% c  m- ~3 Q7 O, A% u6 @. z
5 l% |( o/ z4 V9 U/ J. u/ Sbegin P_mA_clean arriving7 R, I- P3 j+ c+ U; H) S
   while 1=1 do
7 L5 l4 M$ s: S7 u( S   begin& k& p8 j7 r& [. x3 F8 A
   wait for 90 min  C+ S8 ]2 R# c& n
   take down R_mA
5 l8 N0 G% ~: l( _  g) [   wait for 5 min" m3 d, p" b  R) M
   bring up R_mA
( r/ h2 `1 D0 o2 w   end
  i2 X0 C" Q" W, p* x6 qend
/ k" w9 C5 }0 l

7 Q5 Z/ ?/ q/ T2 A/ d& H9 F% Ibegin P_mB_clean arriving
% \5 C; ^/ V! Q, O: G1 h   while 1=1 do
& V) s+ K, N8 v2 r2 ~, v4 l; N   begin
$ t3 B- `& `9 R9 N, j+ I4 m% {5 h   wait for 90 min
  T' t6 x6 r6 g$ N6 e/ Y7 D   take down R_mB
/ _; N& v- R- |7 g9 g; ~) {1 ^7 a- W   wait for 5 min: p* u7 s4 V: y1 K5 Y/ A% |
   bring up R_mB! M% M4 i4 E4 }6 i
   end) E. k% B# \9 [6 H+ o
end

2 ^' \& m5 r) I& ^0 V5 c8 e7 z : O) B: C; d3 K: c# ^2 G
begin P_mC_clean arriving6 U( z- D. C& Y) Z
   while 1=1 do
: a- J3 T" @" V0 ~3 Y# W   begin
3 {0 \; P  a8 y- `   wait for 90 min
: B4 E' G+ C* V   take down R_mC
: H6 M; I: `; n( ~: K$ t; P, X   wait for 10 min. ?$ J1 a6 Q' V: ?
   bring up R_mC. h/ U# Q5 ^; {+ x
   end
8 m1 j1 j; C, [1 h) I  I4 }1 O1 zend

: _+ o* j1 _) F/ w; \# p----------------------------------------, d% v/ w  n4 d
5 t0 K- r6 H. {& D9 l" D0 n# [
Exercise 5.91 Y4 i1 S7 z+ k1 W

0 R6 q* Q& ?: ]5 i' ~
4 ^6 g3 m/ M- K1 |+ ZCreate a new model to simulate the following system:
* N" Q1 L: U( L9 I) PLoads are created with an interarrival time that is exponentially
  C1 t' k7 c# @+ _  cdistributed with a mean of 20 minutes. Loads wait in an infinite-
) E5 n1 V: j: U- m. t2 Pcapacity queue to be processed by one of three single-capacity, % x  y( ?# z( h5 y
arrayed machines. Each machine has its own single-capacity queue 7 n4 D) v- P+ q  |6 H& g6 d
where loads are processed. Waiting loads move into one of the three   p) K3 {- h$ [% g
queues in round-robin order. Each machine has a normally
' l/ {% T2 w( ]1 o, M$ ~# s; Fdistributed processing time with a mean of 48 minutes and a standard
( K* j& l: u: zdeviation of 5 minutes.
5 W+ E. x9 Q" `! E  |7 TThe three machines were purchased at different times and have ' o0 ~" F2 P! H3 q5 w' `
different failure rates. The failure and repair times are exponentially - p2 X) B  a% m7 F* s
distributed with means as shown in the following table: 4 d2 X0 x5 j- e* \4 U7 a# ^6 V
Note The solution for this assignment is required to complete - g# H6 H9 A, O8 ~& |
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
9 k2 W( t2 I* }$ A+ ~your model.
# D! a9 E% V& l2 V7 B+ Q! a& `
6 _! z2 s# b% ]' yMachineMean time to failMean time to repair
; V; \, W) s: \7 ?0 PA110 minutes      5 minutes+ E: n6 r" K7 Q. H
B 170 minutes     10 minutes- v8 l+ I$ a( _" B7 Q
C230 minutes      10 minutes$ e, I: y9 a' N1 P5 q

& b  N1 z1 q5 P# K( |( EThe machines also must be cleaned according to the following 2 P4 {0 o0 Q) V' |' C) _- I- N& `
schedule. All times are constant: : |4 |( B& t- ^+ j
8 f& W& y. G3 B! w
MachineTime between cleanings Time to clean
" M% b. Q7 _" ]/ U" [A90 minutes        5 minutes5 ]5 O! {4 b2 @! v! J. u: K
B 90 minutes       5 minutes
# o+ R9 O5 N% g; M6 B7 [2 qC90 minutes        10 minutes
- D) l/ Q* k4 p# g7 C
+ a1 A1 H' a, N2 g! i) |Place the graphics for the queues and the resources.
' O  l: h, }4 A$ p7 }5 U& ?Run the simulation for 100 days.
$ M5 D( R$ J1 ]Define all failure and cleaning times using logic (rather than resource
5 G+ ]) t0 Q* ]6 y+ P! Gcycles). Answer the following questions:
3 K" ~/ y, `( X: I- c# M- B6 ta.What was the average number of loads in the waiting queue?
& U% ?$ i: I9 T( Y4 X3 h, L4 rb.What were the current and average number of loads in Space?
" ~) Y" {  O# K6 DHow do you explain these values?
* p/ ?3 Q) O9 f* |9 F7 r

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
4 E8 A5 `# O" _send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)& @3 v& ^' m+ @8 Q% A0 d" Y
这行好像也不太对,各位先进觉得如何呢?3 t3 j3 }. }3 a; M: ?0 Q9 A
  h- D4 k" [% _
begin P_something arriving
( V# Y* O% n  H" h% I# s   move into Q_wait
0 u! N* Y: ^" ^  h/ [, @$ _   move into nextof(Q_mA,Q_mB,Q_mC) 5 T* `( Q1 w& w/ M& a8 K& P
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
& j- E8 O$ J. F( |+ X   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
2 U, ?8 H+ O, O. a  vend
* u& U5 _  Q  t' u
2 n/ _* ~% \  hbegin P_mA_down arriving4 \4 S) h. |1 g2 [
   wait for e 110 min* y4 s( g# k4 l! j
   take down R_mA% q- h2 r0 Q0 r! D) G4 P
   wait for e 5 min
5 |! [) g4 `; v; |* w: V* Q7 H   bring up R_mA
! e# e+ H. Q' |- H, [) xend
* ~; C0 x/ P; u' V) |8 a+ G, ^8 `* g7 L
begin P_mB_down arriving3 L6 A: K1 r# K1 r2 G
   wait for e 170 min6 i8 U& v8 [- u. }3 w; `
   take down R_mB
* ~# D% R! T9 u' j   wait for e 10 min% m5 C. [. {' q+ g4 A  V
   bring up R_mB
- X7 d+ c6 h  E% |" U& P7 Rend
, ^5 C  O# N8 Y' I7 l! `& `* f  O7 q+ P/ i& w- m& ^/ _' E
begin P_mC_down arriving4 ]+ g  f: ]; f0 [
   wait for e 230 min
* K  y1 G8 ?, s, ^& y0 L& d   take down R_mC
% v. h. t* K/ d' o- e5 O& H   wait for e 10 min
  a# }  K0 n0 I: {3 ~3 Y$ p6 t   bring up R_mC4 a0 X- E" p" S* N) j3 @9 u
end7 x$ X$ _8 _& T- v
1 B6 ?+ d, B  g3 z
begin P_mA_clean arriving
, h3 J. K$ O7 b( {1 E0 ]: f1 T   wait for 90 min
4 C! z- M, b  `' K' |   take down R_mA% \) B  Y3 c: \8 c
   wait for 5 min/ M* I: b/ a  |2 v% P9 l# G. {
   bring up R_mA
' c$ c6 |! g9 ~; e& T7 Y$ Vend
4 }  d' X: C! P
" S  P/ i" K- B% q, t. Ibegin P_mB_clean arriving
; |" P- ~2 _5 B) g2 O& Y   wait for 90 min
. U- U( Y; R  F/ j% J! R   take down R_mB
2 V# ~% S3 ~. y- d4 ]1 W5 ?/ ~   wait for 5 min5 l* W2 E& y* L) a" x, q, ]
   bring up R_mB
' Z; [) d" y& l' Q) c9 pend6 |" i& k0 Q$ ~( s# S

$ t3 z: j! D! I0 vbegin P_mC_clean arriving4 j5 M  r. K) j: R* a
   wait for 90 min$ e1 D! s4 P. {
   take down R_mC
5 z0 }- j4 D6 v* |. {   wait for 10 min- Y1 x) p: ~2 D+ S; X/ L! C1 e
   bring up R_mC
8 E+ R' Q0 s9 A5 J) y6 U1 w% D& v* yend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving; p; h7 e6 ]# A" q' k8 L8 S# I
   move into Q_wait
% d7 \; T4 G" ?! b   set A_q to nextof(Q_m1,Q_m2,Q_m3)
- x" B* s0 J. x: ]' w- d/ m   move into A_w
6 H, N$ `6 W" G; h   if A_w=Q_m1 then use R_m1 for u 48,5 min
% _6 u- y8 x5 l0 a' F   else if .....then use ....for u 48,5 min  F+ _7 O( L$ |% l, p+ `: J1 d
   else if .....then use ....for u 48,5 min  
0 o2 A  o! z; x- C   send to die
& K3 l& ^4 s& v" Oend% `  C9 f! g" S$ l/ m4 U4 r

) b& S, d* R& ?3 R4 Q' n7 N* k. z供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-24 01:39 , Processed in 0.019853 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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