设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7290|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 ( s3 q8 k5 q$ Z6 W+ ^; z+ q2 w1 `, C) Z

+ U$ e% i0 |* C底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
) o9 s. ]  S1 L8 A; C. Z0 M
5 L4 X& ~7 y1 t2 G5 s不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
$ `" \" P* J( M4 q1 Y$ k
* A, d) D) `5 R5 H
--------------------------------------------
" ~% C  }  m# P0 Ibegin P_something arriving
) c. b5 t; F7 p+ _5 _9 _7 _% M$ C   move into Q_wait+ ^7 _7 f1 a& l8 X) {# A
   move into nextof(Q_mA,Q_mB,Q_mC)
9 n6 F6 K0 k6 t& m* O   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min# L, b2 O+ o2 h9 y- q
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
9 B) ^0 ?7 m* [   send to die. l( e: Z9 i0 C. I$ e# o5 h$ X
end

+ p( `! M( T+ Y# T$ Q6 S 0 b& ]& q/ |' n+ M
begin P_mA_down arriving5 D! e0 q$ C8 {) r8 E
   while 1=1 do
/ @* T. `7 k) n6 f   begin' g" n" b8 `6 J$ M* ~+ V
   wait for e 110 min4 _& L7 `- j. M2 v' U
   take down R_mA& B5 V' p8 l& F  U
   wait for e 5 min
: j( S, e# q8 ]  j; J' y   bring up R_mA, L- X; ~+ b  I& M8 ^! z% U
   end6 I% U! i+ [( ^  u) S  s  [5 v
end

% {0 L# g" H) n% `' S
7 Q" f! S/ g5 K& B& Y7 j0 cbegin P_mB_down arriving4 @% q$ z+ m* t
   while 1=1 do5 T4 G( A9 Y: z+ {2 s# Z
   begin* w( m2 @5 H; O- `4 r! R
   wait for e 170 min  p& h/ V+ j& a3 C! O
   take down R_mB
; D7 _, {5 J8 [5 i0 N1 W+ K/ h   wait for e 10 min2 O* X  X8 ^8 G& p( S
   bring up R_mB9 ^/ I; l* Z$ p9 V. ^$ _3 _
   end
- x9 w7 N6 S! ~! P! j! L0 \9 @end
( z, y4 r4 j# b% Z5 K0 J

& z# q7 h+ T9 J0 f& G; ^. ?begin P_mC_down arriving+ V) G. ?% d3 \' x! R8 `$ j
   while 1=1 do ( ]; t% }6 e& _7 q3 a$ R, f
   begin9 L* S) B$ q5 N8 J! N. N
   wait for e 230 min
3 g8 y8 K3 F5 S   take down R_mC& h- O6 Z: M6 w( P9 t+ x
   wait for e 10 min
  v$ D# Y* f$ Z6 y0 z6 Z$ B$ v   bring up R_mC) Z: O! V$ f* ?4 p# d( T' f) _) I4 K
   end) h/ q, e) z3 o- ~  c3 T, _8 f! M
end
" {+ o5 M4 z, n- R% R
1 A0 Y2 p! ^' j2 I. p0 ~: O
begin P_mA_clean arriving+ B: v# r; L2 U( v- Z6 W. P' l
   while 1=1 do
0 k5 I  u2 H; ^6 F' v; Q0 y   begin4 X8 V- ?& m9 N! X% \1 N
   wait for 90 min
# D8 V9 v6 X: ]1 B   take down R_mA
% N8 `. O5 |9 q9 O, Q6 H. u, a: W   wait for 5 min
0 t* L6 _: j3 F4 D; d   bring up R_mA
3 i9 H& H, a- \   end; J9 I& @1 |( a# h8 S7 a; Z
end

+ K! `5 c  \) y3 g   k& m% S" }7 _$ S6 m
begin P_mB_clean arriving7 Z& d4 D4 R  D# q0 [9 |' O: a# w1 o9 q
   while 1=1 do
) }2 K* c0 f* }9 m1 k- h   begin8 B: o! E4 _$ ~! F0 b# b4 T; o
   wait for 90 min
+ k; ?# e& E8 k' y   take down R_mB6 y5 y- c8 ?5 x: p* g# R6 k1 _( Y
   wait for 5 min
" C* @) M. v' y; X" b" V, Z   bring up R_mB9 O! T: n( Y8 E: S' f
   end( X3 @4 ^* u& `* h+ c( p
end
) n) H$ e  @4 T- k+ f

, \+ U  Q* H, \/ u* |begin P_mC_clean arriving
% L3 R: V3 R; z/ e   while 1=1 do
! D. f5 r; K5 a   begin
* |7 i  Z5 l: ^; D. v; ?   wait for 90 min. Q5 ^, X" ?1 V. ?5 K% ~
   take down R_mC
. A0 e$ [# F/ _3 y5 p/ N* h   wait for 10 min
+ q* x2 t1 Z/ A8 P/ m( P   bring up R_mC" Y' V9 T) Z5 Q6 {% ~
   end7 o6 Z2 m+ G" A% o& Y& J4 S# J' X7 S
end

7 _3 ?6 X0 ?+ i----------------------------------------0 c. D' r$ M& d6 R) G1 Z

5 h& n6 }% f8 p) o, \" KExercise 5.9. o0 K. C- k: {9 d: u

# U+ M3 i" B; B6 a+ F& ?9 x* f2 ~0 x: F' j# k2 s4 T! I- c
Create a new model to simulate the following system:( I8 o/ H6 v) X% B& X
Loads are created with an interarrival time that is exponentially
2 C) a3 c# T4 ~4 M- sdistributed with a mean of 20 minutes. Loads wait in an infinite-
4 P" o: ]) p% z5 i7 [capacity queue to be processed by one of three single-capacity, 8 ~! ^; {, S2 P; V3 I
arrayed machines. Each machine has its own single-capacity queue 4 P8 d' d0 P$ K5 Z( x+ t5 K
where loads are processed. Waiting loads move into one of the three
" U! e, j/ S6 ^queues in round-robin order. Each machine has a normally
+ C( I. ?# @7 z. Z$ P& D4 ldistributed processing time with a mean of 48 minutes and a standard
! Q0 c; l  S1 E1 B4 |: Ddeviation of 5 minutes.. g. t- k4 l( F* o' x8 M  U5 K
The three machines were purchased at different times and have
- N+ @. f& e  |+ u1 {" Ydifferent failure rates. The failure and repair times are exponentially : U/ M4 S1 ?& x3 p2 Q& x
distributed with means as shown in the following table: " o  [% C& U: e7 a2 w/ O5 Y$ t
Note The solution for this assignment is required to complete * y- Y* P% G) X* m+ j
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
8 T) i; ]; q9 ?8 U) x, K% qyour model.   w. A: L( ?2 P: ^
2 k4 F( v' E, J& S
MachineMean time to failMean time to repair  ?' L- i$ K: Z, p5 {: b" |) G
A110 minutes      5 minutes
4 E1 \! [' J6 x2 c& _7 t- `: X/ ]2 tB 170 minutes     10 minutes! f5 f$ D, n) K5 l4 q
C230 minutes      10 minutes
4 d# E/ x" X  v% A" Q) \7 a9 l, _5 `& T
The machines also must be cleaned according to the following
- u' b. l) S6 j3 ~; l) I: ^- Xschedule. All times are constant:
* Q6 K$ u2 v  G; I/ _8 e
% V; s* a( E% K7 R& F: nMachineTime between cleanings Time to clean* u3 h. b, g  }- }7 u. U
A90 minutes        5 minutes6 S1 V/ w- E8 V4 b- J$ G
B 90 minutes       5 minutes( o% X/ [9 C# C3 u  @; ^# r
C90 minutes        10 minutes
/ a; [8 ]4 ~( i8 R5 H% G' i8 h6 O3 [8 h% F1 R$ J  h9 f1 I: D
Place the graphics for the queues and the resources. ! O: [2 B  ?8 K: u% d
Run the simulation for 100 days.1 f9 f8 s1 ~% ], J, R/ ~
Define all failure and cleaning times using logic (rather than resource $ u* S- B; m$ }
cycles). Answer the following questions:
2 p7 i8 ^' n8 O; P: a6 pa.What was the average number of loads in the waiting queue?; B1 B( ?9 h, p  {5 i+ f" r
b.What were the current and average number of loads in Space?
* x# ]* W/ N) N2 T# a- uHow do you explain these values? & d9 t2 D4 n  P5 h+ b  t9 M) t

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉+ o3 {) r) S- ~. F
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)6 k/ z/ U6 u' E$ M
这行好像也不太对,各位先进觉得如何呢?! \. T" V1 M4 G
5 S1 x; s+ d' V# f8 p% n8 A
begin P_something arriving/ c/ L9 h( E  P3 N7 X# I
   move into Q_wait
* x6 r7 z! X0 }0 o   move into nextof(Q_mA,Q_mB,Q_mC)
2 l/ C$ P1 j% P   use nextof(R_mA,R_mB,R_mC) for n 48,5 min; F' \2 K. O" |' N
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) # n& O% K  M7 Z8 i. a( T7 o
end; E2 A* O1 {  A- K  [5 T

. @* |! [! X6 T: X3 _begin P_mA_down arriving: A7 }' q9 M. o& k$ {# `  T3 b# p
   wait for e 110 min8 d( Z& {( h8 X- j1 d
   take down R_mA
) D* u2 R# ~% ?; F' M; L   wait for e 5 min
# c' J, d0 F# m) N. {3 C, U   bring up R_mA' L  E( G; |# Z
end
) x# B7 O) \7 b6 C9 x
6 F6 }+ q0 m% @: l  D* N; k2 _begin P_mB_down arriving$ c7 u; l6 J' `+ b5 W3 K; I) X& e
   wait for e 170 min
* h( N% |! V' j: a5 q' B: }   take down R_mB" S" N  o0 G5 e/ C9 k: q
   wait for e 10 min9 R4 P- l4 X# @+ ~  ?6 ~- R
   bring up R_mB
* Z3 b% z7 ]9 e+ X6 t5 E9 gend2 o8 @% _; a+ e8 H- K+ T1 ^2 N

; y" T8 q9 P' n* j5 K3 p5 z, Q6 Pbegin P_mC_down arriving
3 v7 {% T9 `; n' P0 D   wait for e 230 min- K" x7 w1 h- v+ Z6 d! q: k3 B
   take down R_mC
. x! M/ Y9 w! b3 X7 e; o   wait for e 10 min7 l1 x4 m. A4 u- ^4 i
   bring up R_mC2 K, J2 q$ {- H
end
0 q) I+ L  g3 c! V% K, A" [+ V6 s
begin P_mA_clean arriving
$ A* K& M' d. w# K. M- S   wait for 90 min
0 M9 S6 Q7 J$ K5 T/ z  B   take down R_mA( U, z' z/ t6 u4 f$ z/ ^( y: c
   wait for 5 min) K% c! \' [; K' h6 {
   bring up R_mA) c2 Z/ \. C" z9 A! u' V) Q; d
end
3 n5 {- N1 t  z& b( Q: d* W" |6 S* t- t' O* `% r
begin P_mB_clean arriving
) n, b7 t2 o' L* P5 R/ N- m/ o/ x- S  s   wait for 90 min
+ c. {: b$ }5 o4 h/ z0 D! a   take down R_mB6 F, }, ^1 M, a0 G) h4 W
   wait for 5 min" {" O4 c( ^$ \% s7 F6 O+ A# |
   bring up R_mB
2 _7 Q8 x! {+ @# S$ E! Z/ V* Oend
* Q. S# |6 E' h" i/ V1 r' e% a
begin P_mC_clean arriving: m: [/ O$ A/ l% L0 \6 P
   wait for 90 min
" p& Z% B8 _4 t   take down R_mC
$ P- x- I) ?) S. l$ A   wait for 10 min
: V1 Y0 x, J1 d* o) t   bring up R_mC; x) j' T  H6 B+ W; a1 d2 E
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
; p# O' z6 H; {( F2 i) z   move into Q_wait- o$ K; T8 N; R0 ]2 K5 I) ~" D& ~  {
   set A_q to nextof(Q_m1,Q_m2,Q_m3)0 O; O7 N3 K8 n: W' g# H
   move into A_w; Y( \1 ~, v7 S" e( X
   if A_w=Q_m1 then use R_m1 for u 48,5 min
$ k7 G6 E- _; }   else if .....then use ....for u 48,5 min
" u. Z( _$ z; c9 E% {  b3 C; g   else if .....then use ....for u 48,5 min  
- N" p* X# `/ q+ [1 r1 N. X   send to die
( U( B( e* a; P9 j4 L, ?end
7 m/ D" c; D/ r9 c& O. t6 S7 f7 [8 d& \  ^7 z
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-26 04:43 , Processed in 0.013854 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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