设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6729|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
' ^$ V5 C* |4 v5 A. c, s, y7 d0 F, e1 h
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去# ~+ `/ K' J: y& Q, o+ M( a/ y
/ V% d, y/ ^/ B" t. I/ b: R, c6 `
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!7 t+ F, z! U" ^0 D

# m# @# T6 x& D4 s! C
--------------------------------------------
) @# U! i. B4 I  {2 L9 g, a' ?* hbegin P_something arriving
3 f* ]6 X$ o- I. u% k) h$ m   move into Q_wait& Q6 K5 @9 u6 x  R5 o9 Q. K1 l# ^
   move into nextof(Q_mA,Q_mB,Q_mC)- q0 A6 }' _: Z
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
6 d. k% C9 K3 r5 T0 K   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
7 |: Z- g9 s& b" w   send to die. S, R/ j: P3 z5 b
end

+ u) o4 |% q& x8 r% u, a( v& o: ] 5 m- y+ I& R2 z6 ~. L1 B
begin P_mA_down arriving' z  d6 r! H6 p4 ^  D2 ~$ F8 x$ B
   while 1=1 do ; H5 G- B# S) k/ \# `
   begin8 l. r5 r5 \2 f( K  V, v
   wait for e 110 min
; ]+ L3 A; R2 V# g/ j   take down R_mA
% s( g9 c$ E8 Y# i: v   wait for e 5 min/ [* h% \6 Y! T3 F, [8 y
   bring up R_mA
; U1 e8 w0 R$ `5 I. n, N   end
2 t* u* T/ T5 A8 pend
( d+ e: d+ o" S: p% G  ~3 r+ ^

+ y1 L, Z+ d: Q* R6 zbegin P_mB_down arriving
$ W$ w7 z* Q! f   while 1=1 do9 q$ B/ G, }' R  R6 p; w
   begin
- b5 Y/ I$ b1 y% y   wait for e 170 min
* Y) z( p$ V, Z   take down R_mB8 B8 ]3 S5 r& I5 x0 m# w
   wait for e 10 min" T5 \* h3 v5 L  \
   bring up R_mB- f; V! z( Y- B- _; m. x% Y- h5 y( q
   end
$ U9 L1 m, S5 o8 Yend

+ r# f( x' w( V- y( Y2 b 5 M& `- h+ g% g
begin P_mC_down arriving
6 m3 D" Y, ~9 |9 T. [( Q   while 1=1 do 9 v+ u0 E1 P2 x2 d, ^$ q/ Y$ ~6 [/ q
   begin% u3 k7 ~5 G$ ^; u6 Q
   wait for e 230 min
7 w. ?7 o/ a4 G7 R   take down R_mC0 q/ u" J& k4 ?; _) D
   wait for e 10 min4 G+ f, m2 R7 @; a
   bring up R_mC
' O- A2 p+ j4 g3 W- R% c) `* U' B   end+ {3 j6 }8 A: P; U; i
end
  I6 X0 M: M" G  p& e; V: Y* q/ U8 s
! R6 q; Q+ ~8 \9 ^# }
begin P_mA_clean arriving
1 H( B7 [0 O# Y   while 1=1 do
$ o( `% a/ X2 Q8 N& C   begin
; X- T) K: E: {1 S! t% h   wait for 90 min
) W% |9 P% l4 t: m" L% E9 N* T% T; V   take down R_mA. c! |# ~: `# {. B2 O. A& n8 Z; o
   wait for 5 min- h' w% v: e! I0 X, A. H
   bring up R_mA
- v8 v* H: M' U1 ^   end
# I" a- ]) f! _& z4 u% J' Fend

0 p, [& y0 i4 e" F5 m( y1 A ( u' w6 e' [% B/ F
begin P_mB_clean arriving
$ G3 Q/ F- w7 P7 @   while 1=1 do
& ?  u3 C! f( Y7 J, k   begin
% ~. a" Z3 [: u. ?2 z" \   wait for 90 min
' `% C9 T# o- I. v   take down R_mB
$ f6 g$ ]" P, S5 V# {! C' E3 j, w! t   wait for 5 min: }7 Z* |% ]- @5 w- G
   bring up R_mB
$ O# L% y( D% t" F  q3 c   end  G  ^- P0 M( }/ `
end

0 j5 v/ B3 l' w4 |2 @ 6 b  ~6 r- h8 p
begin P_mC_clean arriving3 V4 g4 ?* `- |9 [) Y+ V* q( i
   while 1=1 do
' S) Y  x% g& j: _; v   begin- q! \) f# M. V9 b2 O0 u8 z
   wait for 90 min
  R% j- B$ b$ K   take down R_mC
& e$ y4 r2 s% A! \! V   wait for 10 min
* C! W; M+ F& ^! ^   bring up R_mC5 e/ O3 |% Z- i3 m
   end+ H$ I3 Z: {# l/ n  r, h
end
2 v* e& E4 K, ^1 e( R! ]% h
----------------------------------------- B. v7 A3 E4 j: F9 `7 {9 `* a
+ J0 m2 h  o# U$ K1 {( B7 R
Exercise 5.98 B( o( c& j1 L1 M

1 ^$ m: L. q4 s: e/ k/ w
( E( E. V3 b2 M0 UCreate a new model to simulate the following system:- Y" f; Z: \5 o
Loads are created with an interarrival time that is exponentially
' S/ L( P2 A$ s! t4 P2 Gdistributed with a mean of 20 minutes. Loads wait in an infinite-1 ]. b4 {; M6 S& W
capacity queue to be processed by one of three single-capacity,
1 B: t2 }. Y7 S# `3 n  F- I$ z; larrayed machines. Each machine has its own single-capacity queue
, r# S, q+ G7 V' d- y  I: F, zwhere loads are processed. Waiting loads move into one of the three
) D: w7 F# f  squeues in round-robin order. Each machine has a normally
- c$ z+ v) v+ G* |: @+ ]1 Kdistributed processing time with a mean of 48 minutes and a standard
! [, n! H7 H  T( y! Rdeviation of 5 minutes.6 r( Q% @; g* S- u- V. S6 c- Z
The three machines were purchased at different times and have
, q0 Q- K! K: q4 qdifferent failure rates. The failure and repair times are exponentially # _* @1 o: B. ~  M
distributed with means as shown in the following table:
* @2 n: w7 B6 }$ c+ u, GNote The solution for this assignment is required to complete : c" t0 w) |; u+ [) H. k" E$ ?: I
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 0 f1 I% @6 C4 n) D& Q+ W  q# W
your model.
# s1 F: m5 r8 V6 f' l
* Y- `- s0 |0 K5 G8 ?: y- C; lMachineMean time to failMean time to repair5 b5 y1 k7 q! B' ^
A110 minutes      5 minutes
  K/ d6 A; J! r+ {4 qB 170 minutes     10 minutes8 r. B$ x; T( T2 S
C230 minutes      10 minutes
  l) W1 y2 N" g6 ]. K6 R, H
3 d3 p+ b5 R" \9 Q6 K! TThe machines also must be cleaned according to the following 0 `; M- x% e6 E( z0 m. B- @2 E/ R
schedule. All times are constant: 4 P$ C& I8 o$ W' Z1 T  J

* N6 A/ N- C0 ?& u2 ZMachineTime between cleanings Time to clean
! Z! f, \# o2 G" BA90 minutes        5 minutes
6 I* _9 o2 d6 x0 |B 90 minutes       5 minutes* U; F* e7 l3 C5 |
C90 minutes        10 minutes
' ~- ]$ d' {  a7 u) U' [6 Q. B+ _; n( A# t  s
Place the graphics for the queues and the resources. " j$ l7 a3 d! @: d6 S
Run the simulation for 100 days.
3 E& t) T- l% NDefine all failure and cleaning times using logic (rather than resource - g% F$ z6 L8 N
cycles). Answer the following questions:
5 E) D# P6 V$ ^0 K2 S4 p& ]6 `a.What was the average number of loads in the waiting queue?
4 o4 A+ R. I- b" n: Pb.What were the current and average number of loads in Space?
. Z; ~  N8 _: N* LHow do you explain these values?
6 Y+ F3 R+ U4 U1 P" B9 |& O

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉: m5 N; l+ M8 Z4 N- Z& c
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)7 ^6 P9 V( J4 I1 [
这行好像也不太对,各位先进觉得如何呢?8 S% i  J5 [; g4 I( ^4 Q
2 O* m# t3 k- |
begin P_something arriving: R. c( \  f: j7 v6 I' b
   move into Q_wait" J8 Z. h" q$ r; r+ g3 _+ u- D# z8 Y
   move into nextof(Q_mA,Q_mB,Q_mC) 6 N2 x# w# V/ I8 X: r' t3 V  C- @
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
0 F7 t) q% q- |1 b# v  r; L" u   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) / |( e% m  E, ]  ^
end
( b& b( x9 R% g- ]# f
4 h; [( G4 u2 h8 H3 Nbegin P_mA_down arriving" Q8 T+ I) m% O
   wait for e 110 min, j* u0 F; o7 \6 W
   take down R_mA8 N3 F0 k. z" Z% C! x
   wait for e 5 min& |3 s0 z* p+ C9 J9 _
   bring up R_mA
6 m5 J% i- H; r! nend  h2 H3 u4 P8 U) D# g% ?: @

% H1 [8 `& Z0 k' k$ }- K) A9 _begin P_mB_down arriving
- N' y3 `5 |  [9 Y5 D3 F1 C% u   wait for e 170 min
( k7 g) v6 {& M. i   take down R_mB7 F" E6 E5 n5 T* n; u! V4 y, v
   wait for e 10 min
# O4 f+ w+ D+ l5 X& ~5 w   bring up R_mB
1 r( E* W+ ^8 F$ u& yend5 r3 x$ X, u% S% E& q/ Q, {: A* j! H
: u& ^3 l! v% T" |/ Z- h
begin P_mC_down arriving1 S, i+ L1 g' F5 t. l- o
   wait for e 230 min% p* r" {; Z; [
   take down R_mC
. S  p/ X7 ^8 r: z   wait for e 10 min9 _7 X6 X% }' m
   bring up R_mC2 ~# E4 G" k$ K) L, _0 E' M
end5 w6 l3 H1 k" a6 g8 }- q

; W4 A" M  @$ K. Q/ Y$ A% cbegin P_mA_clean arriving, X2 `& S4 S  E) f, D* ?, U3 A
   wait for 90 min
" w6 s' |$ X) v$ v0 f   take down R_mA. ?: [/ P6 y" ^0 W* f' a
   wait for 5 min/ C# z6 d- Y- y, @0 C" R$ r
   bring up R_mA
9 @+ y% \' m9 Pend* z; u  z% U6 I' l7 z

9 U' h+ S. c+ hbegin P_mB_clean arriving
8 J7 K& N0 z. T- {5 Y7 O   wait for 90 min
* }0 E/ E0 B- r1 D4 w8 O2 Q( N0 }% {   take down R_mB( x; a7 j; I( s
   wait for 5 min1 w) F. ?: g3 |! G- X4 `
   bring up R_mB
* M4 H0 T, _& P8 I2 Aend  x9 n0 J/ s4 q" B+ e# p
6 _0 @' ]/ Q+ {) D
begin P_mC_clean arriving
9 H3 h9 q9 F3 G6 f. E) ]$ p5 W   wait for 90 min
; U" p) A2 `. b+ G   take down R_mC
9 Y* x0 l5 }% d; l1 c! {2 H+ T  E( [   wait for 10 min/ n3 A' Y- _2 U+ h' g
   bring up R_mC( G9 q  h9 C3 y0 m- P& M
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
4 F5 f  z1 @, F: i6 g7 p9 N   move into Q_wait5 u! c  L  h! g
   set A_q to nextof(Q_m1,Q_m2,Q_m3)1 ?" I* y% W- b1 C5 J. ?
   move into A_w
7 H+ _4 E: {6 v   if A_w=Q_m1 then use R_m1 for u 48,5 min5 X9 Z0 Z8 B& H( V- S! r& D
   else if .....then use ....for u 48,5 min
" M" n* p3 h7 F% }6 W   else if .....then use ....for u 48,5 min  
* {  E& U8 B; Z# W' f$ v9 D3 M   send to die
2 ~) H; g4 R! S4 D9 w. n7 O$ U8 Cend
' b# u; s3 U4 D% g7 _$ k% w  G5 B; u9 P  h& U
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-8-19 01:12 , Processed in 0.012512 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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