设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7786|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 0 k/ _0 t* f) x0 T2 ^
6 m$ e* W+ H, i5 F  J
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去0 k8 |2 x) P* g* N5 N  ^( W* u

) C5 I' n% K  d; z不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
" \8 H- D' {9 m& q' ]1 \
# C3 u# L1 C* M  w
--------------------------------------------
7 F1 @- {" P- x+ o' kbegin P_something arriving
: Y% W. Y$ ]: z! X1 U/ l: u   move into Q_wait
2 }$ q, y! p1 k9 M   move into nextof(Q_mA,Q_mB,Q_mC)- L8 K3 E' l& W: e, G/ W
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
0 L, V: x$ @2 O' P% ~8 C- T( K   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)- y1 U7 ]$ @% |' e
   send to die: c) B# M" W* s
end

) X: ~$ E2 a: ?4 z8 S* A
! b* v" S' ~2 o1 n+ Rbegin P_mA_down arriving* F+ O' D  g. t3 A$ B
   while 1=1 do . A" l* M$ u: c- |. g1 Q
   begin: v1 t. z! v: _8 l
   wait for e 110 min5 h" M; H( u8 S* z: r2 k0 m& L5 W. l
   take down R_mA8 P. C4 o+ i$ q( u4 z
   wait for e 5 min" p; [: i2 d+ q  |' x" s" G
   bring up R_mA2 J8 s. h7 @$ b5 g$ u  r
   end
' u, o& p9 f8 o1 p  [end
" E9 u) O4 O' V* ?
5 L$ a, o9 v$ c$ t
begin P_mB_down arriving
* |, X6 J* J8 x1 `* y   while 1=1 do
% _; b9 i; {9 b* v* V0 I   begin
9 A+ r! U( [+ C4 ]   wait for e 170 min
% V9 [% V0 v, @/ `' Q6 G0 S   take down R_mB
1 v+ ]& n3 l1 W" P   wait for e 10 min
3 W# G) \) R  _" @% f: g   bring up R_mB
/ Z( {2 _2 }) l: H6 V8 e; b) J   end
) Z+ i& n: c) R# G8 Send
0 G5 Y3 |  O: T9 x7 ?
$ x3 B5 M" m2 `- C8 t6 q
begin P_mC_down arriving: G# ?0 A" F+ A- N
   while 1=1 do
8 o) o% L' E) z1 }5 z0 W. F   begin  J1 b1 U( q& w' y9 x
   wait for e 230 min9 L# U" m: _! n
   take down R_mC+ @7 r: [* Q/ p2 d$ ?6 ?0 n+ t
   wait for e 10 min
7 S, n$ O" K* Y7 a: ]7 \: l   bring up R_mC8 P- a4 ~6 V- p5 K: Y& Q
   end
2 z& M5 j' p7 Rend

' i! t7 g! ?0 U$ F1 N: { : @$ o8 V) N, e1 ?2 B* w
begin P_mA_clean arriving
/ I  Y- b; n* O' b   while 1=1 do
8 V3 g* N& F5 r) \& F8 ~   begin
" x% ?, l& H2 X4 I   wait for 90 min( [0 k0 K: |0 _. q8 z7 B8 j! [
   take down R_mA3 D" z8 A: [- b/ E" h% t" e
   wait for 5 min& ~5 C" a% T* h. Z& [  A+ b
   bring up R_mA
! ]$ ~0 Z( G/ y   end
, {8 u  U: T9 Y8 P0 s+ |% |end

: \' K/ L5 s4 K0 b% E 6 d) l* i1 J7 \  G3 D9 E
begin P_mB_clean arriving0 O  Y2 y2 t* J& o
   while 1=1 do
; W. R7 s  c' m   begin) N; M% C: k7 l; T9 K
   wait for 90 min
( i! v( {! \# N! B   take down R_mB
/ e8 z: ?, E. P1 N   wait for 5 min
9 `. o& u) }( \3 E3 o  y   bring up R_mB
4 u: m* a: f: `5 |+ [, ?   end
, v# O. c. }2 s' A" G+ iend
1 {+ Q' r8 p$ Z( ~- _$ E

+ K& x3 D$ p! X4 B5 A" Lbegin P_mC_clean arriving+ N& O4 f5 i: i" ]9 p  o
   while 1=1 do! w% n# }  Y5 ]' w
   begin. I& s/ _0 Q% ^
   wait for 90 min4 J" ^# z: w0 n) I
   take down R_mC
; r4 I3 w% y' [* r   wait for 10 min8 `" s0 d+ X2 p  t: Z9 c- H
   bring up R_mC
; ~6 H" N# x+ S6 O   end* L" u- r- I3 m8 _1 @5 X! a
end
' x8 \' B6 `, c( R) C! d& M) Z
----------------------------------------
" r/ H7 s8 e5 _; m& q0 M" U5 M/ u / \" Z+ F; ^8 K) |; C
Exercise 5.9
0 M$ [8 I' b' O) @& E8 Z7 G! U2 X) k8 V9 m& ?. `5 N) F4 k

& ^$ F! \$ Z' V5 vCreate a new model to simulate the following system:( M5 A& Y4 M5 g/ q0 {) G7 E/ h+ q/ h
Loads are created with an interarrival time that is exponentially ' ?9 A0 Z8 j: X
distributed with a mean of 20 minutes. Loads wait in an infinite-
. `  B7 P( ^- [capacity queue to be processed by one of three single-capacity, ( u. W* m' y; f) B( {
arrayed machines. Each machine has its own single-capacity queue
4 R; w5 n5 k) {7 E, @4 g  Cwhere loads are processed. Waiting loads move into one of the three 0 v& p4 F3 _( P; `1 ^5 v/ n- S
queues in round-robin order. Each machine has a normally ( W  F2 m3 g+ `) W
distributed processing time with a mean of 48 minutes and a standard 4 J( c) V; v$ `5 N; ~
deviation of 5 minutes.6 k4 b( d( h  p  M$ _
The three machines were purchased at different times and have
9 P  ~; A# ~7 X  R% O( Fdifferent failure rates. The failure and repair times are exponentially + q$ J% D1 e) Z: V
distributed with means as shown in the following table: ; o' C: _7 M9 N  M3 E
Note The solution for this assignment is required to complete # H, m/ ~: y( T$ ]# N1 e
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of % f7 C) @- w& v. v( u7 I( J3 p
your model. $ N- A" i: B8 X" H' ~0 I
( C! P& q& _- |! m1 l! }- [
MachineMean time to failMean time to repair
9 Y# @1 N6 x6 Q2 l( HA110 minutes      5 minutes9 x* _( D, @4 a
B 170 minutes     10 minutes
% ^9 l! N$ }% z$ f/ f/ [7 ^5 |C230 minutes      10 minutes
, a2 k& t# K; W2 y
0 Z+ X: l8 D. J* IThe machines also must be cleaned according to the following
/ w+ f' ~3 D; A# |5 P. g9 ?; }schedule. All times are constant: / [) M8 o0 a- `5 a9 X

7 r: V/ d/ I* L9 r+ Y! UMachineTime between cleanings Time to clean
  I% m0 h( [* |$ x+ Q4 Y- sA90 minutes        5 minutes+ B/ z' F; {4 U; F- ?: J7 H  K
B 90 minutes       5 minutes# p9 o1 |, t& @, e, B! |5 e
C90 minutes        10 minutes3 m, O4 K- }6 l  C
6 c$ e9 ?( L+ v0 i
Place the graphics for the queues and the resources.
1 s" j" L! h9 Z+ zRun the simulation for 100 days.) ^8 s/ ^7 N/ Z# B
Define all failure and cleaning times using logic (rather than resource 1 @4 e) B# D1 a- A5 c
cycles). Answer the following questions:. K0 i& `6 M+ U3 n  ]
a.What was the average number of loads in the waiting queue?2 i% h/ u% [! ?# l
b.What were the current and average number of loads in Space? 0 p# M' e4 A' k8 m; \7 m& _
How do you explain these values? 6 `1 G+ a9 \! `* s( F7 c" }) d

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉! F: q* _3 G* M5 W2 D" Z( b
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)3 \9 T, Y2 j  G2 p2 A0 {
这行好像也不太对,各位先进觉得如何呢?
4 z& e7 D6 \' z" V( r5 [7 F  F+ l& D, ^1 h6 d2 b' J
begin P_something arriving
6 [1 p: G* f5 v! U' {   move into Q_wait
+ r8 s' p6 J: _  h" z$ a) A   move into nextof(Q_mA,Q_mB,Q_mC)
: y7 h$ S& [9 m" J( O& _/ e1 Q- e   use nextof(R_mA,R_mB,R_mC) for n 48,5 min; _1 I  F) j6 j" L8 _9 j! j
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) ' B2 B; f, [% d0 i
end: q, q$ s6 p+ x) K! \
3 n5 Y2 x! O  C; D% T2 s
begin P_mA_down arriving
5 P5 z3 p2 i2 S8 J   wait for e 110 min. A; x8 H; j$ @3 c3 ?. u6 f- }
   take down R_mA% P6 ^4 |9 m% a
   wait for e 5 min
, T, T* }( e7 E1 K+ K* t   bring up R_mA
- B0 Y5 n& O5 ~  v- lend( W! v+ R# K# }2 e% D* [% _

( D$ b) ]3 X9 B9 |begin P_mB_down arriving
6 f8 |/ }3 C! Q# L0 x   wait for e 170 min
1 T" a6 X( }$ W8 K/ F   take down R_mB
9 y  J4 s& j& M5 z5 K5 W; V* ]   wait for e 10 min: ^: o( S6 z$ }
   bring up R_mB
5 O: Z. z# s4 h$ I% Oend
1 z9 I0 T/ q4 q( @# L/ G( W) I
- R2 y) H0 U  J6 gbegin P_mC_down arriving
3 c5 w( i: l) h$ Z5 W   wait for e 230 min
; N# l0 ^# O5 |! y1 l   take down R_mC
( C1 e; z1 S4 \( i* s& x. o   wait for e 10 min' f. m1 f4 r. e
   bring up R_mC
0 j  a! X; B) ]9 `end+ z5 b  @5 E/ S, N3 o& a

2 j; i; _0 r4 p: L: X' r' @2 Sbegin P_mA_clean arriving( E( Z- D1 x0 V5 z: P7 k
   wait for 90 min, D. D, o  `; G; |9 e/ C' X
   take down R_mA! d; u+ q! q% m9 s3 }& v* ]
   wait for 5 min
" I/ D  s) e' w3 x4 P   bring up R_mA
1 L( p( [" ?4 |end" n! y% S/ R2 c; `+ @2 V
/ s5 Z: p; V+ p6 A6 D( b
begin P_mB_clean arriving
9 w& ^3 ?/ R) ]   wait for 90 min
) A* D( `7 H2 k0 A, ^/ H" i   take down R_mB
8 s4 x# G0 Z. j" B8 ?2 l   wait for 5 min; p" j9 B# V9 I1 u
   bring up R_mB
3 i7 C) z2 I* f! u" x3 I( Iend
+ S, e5 F% s; W. ]$ Z3 d" I3 Q, s- Y0 _$ E! z9 F
begin P_mC_clean arriving% b$ L, I( O" q2 |2 b# R
   wait for 90 min- B$ ~7 v, X4 v9 n
   take down R_mC) v0 F8 O3 X% k& w) C! w
   wait for 10 min/ ]8 l6 P' y  j& f( Z2 w8 H' F& `/ a
   bring up R_mC2 ]4 C5 _, d0 b6 H2 o* N! \" Z% n
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving6 G; z4 c" [- `
   move into Q_wait
* ^  p2 V8 J2 _  q6 B   set A_q to nextof(Q_m1,Q_m2,Q_m3)
: a  H. f2 f  G2 k' \# L" V4 a; D   move into A_w
8 g+ D/ p" U* {) R: x0 K   if A_w=Q_m1 then use R_m1 for u 48,5 min
, j5 w+ `5 d4 f) j# g' m! y/ m   else if .....then use ....for u 48,5 min
& B0 ^8 S  r  m  D   else if .....then use ....for u 48,5 min  6 S1 t% u  p- i5 |) D
   send to die% X% j: c& q  |
end( d' G+ q1 G0 L* v/ Y4 W5 ?! i
; Y$ q# E9 T4 J; G0 w% X
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-4-17 19:02 , Processed in 0.016728 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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