设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6728|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 , A2 M$ o' ?1 R, i$ P' k- [! m4 O

( h' J9 ?& w, g. W* o8 S1 i/ q底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
" m9 @* p( T  ], N( T9 H
  O: D* q$ g4 j; _! b2 f不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!3 c0 v) x# q/ r, F7 S- }6 W6 w

% w3 c( F- r  H% r8 F2 R6 h, E
--------------------------------------------8 v& G1 U# O1 r3 J; C2 h4 C
begin P_something arriving
  p4 h1 [- V) A  Z: C( s7 B   move into Q_wait4 G4 \7 u, ]! b
   move into nextof(Q_mA,Q_mB,Q_mC)
& d0 u4 e+ o, X4 m) \1 I9 h   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min7 ^4 I( V4 W6 h* {0 V. L# g; d
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
) \( ~4 q1 c  O$ ]$ {$ K   send to die
; @8 |1 ^+ B3 t4 tend
9 g% U* }# \  j9 |0 A8 S. q

* E2 ]  |9 v* n- w% N; c, |5 w3 Pbegin P_mA_down arriving
( q/ D) |7 N4 m6 X7 C9 D   while 1=1 do 0 |+ ?7 ~- y3 d- l$ `* o: M0 H+ r1 c
   begin6 e4 [# d3 [+ S6 H
   wait for e 110 min9 \8 v: D# K8 k6 K, D! n7 g1 Q
   take down R_mA
# {$ k* k& [* v! T3 }, q   wait for e 5 min/ G) j% }* J5 w( ^) u+ }
   bring up R_mA
; W: x0 X+ g" x3 @9 |   end
* B0 y# k$ ?8 ~5 Y" [end

  A, V) {( P- s5 m: b  ^& ^3 x
6 P( R+ U6 c8 Nbegin P_mB_down arriving$ F: V% o5 _+ t' n$ w6 C0 P
   while 1=1 do  r! n5 C* ^4 w" W- p' T
   begin$ F  o1 S; M- N& b
   wait for e 170 min
; P- m9 u. x! `  D" P   take down R_mB
4 G$ G3 o- w' |" V   wait for e 10 min/ I, L7 s. ~* w4 @' X
   bring up R_mB
1 o7 b, A) z$ s# B   end$ k2 V. f) c) x
end

! S: d9 Z3 [. X- j4 |
$ n8 ]9 V8 X  o! |2 G% P4 pbegin P_mC_down arriving+ C$ m  I2 B% S; I
   while 1=1 do 0 @7 R$ G, {3 Q
   begin" G9 Z4 n8 ]4 k2 s/ S$ k9 w# \9 o# G
   wait for e 230 min4 [( i* X) j1 R6 Z$ i3 _4 B2 }
   take down R_mC+ s3 j9 r; }; V" x
   wait for e 10 min4 s& m! |% f+ }, q3 f
   bring up R_mC
7 o5 d# a* \0 U+ D) P   end( z  \) j' C; g) B) {
end
2 H" l/ X6 x- b, {6 J
, b* i5 H& C3 ^7 p/ y
begin P_mA_clean arriving
+ Y' }! |% w: @" L   while 1=1 do
0 ^$ {( z8 y/ Y( G- G* o- u   begin" J3 ]9 X, H3 k% R6 Z7 a
   wait for 90 min$ m6 A/ b5 v2 O- g6 K# A
   take down R_mA
1 v  z0 D1 `, o   wait for 5 min" ^  u  F( M0 ?+ `# y) x- j" }7 Z
   bring up R_mA
4 M/ x5 p0 f5 T. ^, H# ~   end$ u7 r' o* T4 [/ g8 u- @" `
end
: C/ l! f3 P- y1 Z5 H# c. ^

4 v" @. c$ H7 f5 [6 }6 I% Q( \5 ^begin P_mB_clean arriving* |0 {; J$ {- ^/ i0 K
   while 1=1 do
$ G) T: s7 h6 p   begin$ ]8 }! \! |2 l6 s4 a1 U- k) t
   wait for 90 min
+ Z3 x9 s( W( I# G7 b% @   take down R_mB: W: M% Q  I! m! ~/ D. |
   wait for 5 min3 s# i6 A, g" y; Y4 z4 g4 r
   bring up R_mB7 U1 Y+ I8 U1 k
   end4 B( B8 L0 m3 l1 J' F; [
end
0 U. O: A! }2 F  X) k$ m& }

. [7 ~3 Q" ?$ z: ^* u; s2 lbegin P_mC_clean arriving
( I$ C9 p' y& T* h2 b9 U  [   while 1=1 do- A7 F4 u: J) P7 g9 Z
   begin2 s$ Y: o- J( Q
   wait for 90 min
8 O& Z8 s* F) W9 Z1 v   take down R_mC+ I& h+ _. ~$ l# _; A( R( R
   wait for 10 min
: e; c! w/ ?$ K% {& t& L8 _0 O   bring up R_mC
- L" G$ e0 f' M* ^8 S3 g   end
3 y# P& y8 \! o- y) Rend
) _/ @1 t8 _8 y' q0 [" V: A, ^4 d5 V
----------------------------------------. c/ s- d1 y! \. Z& R( S' B  V

# g$ r0 b; ^* BExercise 5.9
9 Q3 ?. W. G. q: l+ L; h2 T+ h+ v5 H, I4 i, W5 \6 i$ ], }
" I( ~! z  m$ Z2 x5 L' V5 Q. j; T
Create a new model to simulate the following system:* `( ]- k6 a8 Y4 P$ l/ h% M5 c
Loads are created with an interarrival time that is exponentially ( L* q& W7 G/ D( }
distributed with a mean of 20 minutes. Loads wait in an infinite-
# l& C' ~! M; S% ]capacity queue to be processed by one of three single-capacity,
& w: p2 m6 H2 e- x3 J1 [arrayed machines. Each machine has its own single-capacity queue
' z9 |5 q2 [* bwhere loads are processed. Waiting loads move into one of the three & J" Z" {' x  f6 ~, U7 U6 V
queues in round-robin order. Each machine has a normally
2 y! i5 d$ Q* ]6 y/ Udistributed processing time with a mean of 48 minutes and a standard $ s# [- ^# u8 f" W2 ]1 U
deviation of 5 minutes.
7 p9 R% J  E* P  }The three machines were purchased at different times and have
+ L3 m* y+ d: H5 v& @different failure rates. The failure and repair times are exponentially 7 Y. e' Q' p/ O8 _# i
distributed with means as shown in the following table:
' Q$ V! T% H. pNote The solution for this assignment is required to complete . v/ O$ i5 G! f  d
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
. S$ Y* Z* P! l: \9 p2 _your model.
$ I. O4 w5 ^! n1 h( d! N
$ U( l( M* W0 f2 g" ~MachineMean time to failMean time to repair9 @& X) k6 [6 @1 |6 d. ^& ]& f) W
A110 minutes      5 minutes6 }9 w+ z$ b( Q2 y, u% f0 @
B 170 minutes     10 minutes" v) C; C/ b( |* |- r+ G# Q
C230 minutes      10 minutes8 p: b' I, Y2 y4 x1 l

- m& a* G+ E* d  X3 }The machines also must be cleaned according to the following . v; |* Y+ B) |" n5 Z' D# y
schedule. All times are constant:
. O* M2 [/ p  J4 I+ x4 [, }$ m  }$ p8 C! q) h$ z% A
MachineTime between cleanings Time to clean0 m% Y/ m! |; a) c7 q+ P0 y, A
A90 minutes        5 minutes
3 x: m: ^$ L/ T! j3 q0 R" R  ZB 90 minutes       5 minutes! Z5 \0 r, b5 N7 ]! J' ~  S
C90 minutes        10 minutes/ A/ Z" U* e$ V5 d7 W, \
' y. u/ Q" O$ [' ^% ^- g
Place the graphics for the queues and the resources.
2 _' S. ^) W. q+ l9 X( rRun the simulation for 100 days.
" e9 O( H0 O' S' _1 q. hDefine all failure and cleaning times using logic (rather than resource
9 n9 y: G) k* B6 I) v& q, ucycles). Answer the following questions:
5 ]4 z. A! I8 _. I! Ca.What was the average number of loads in the waiting queue?
5 c# J% T9 U4 i, e% Q7 O0 p: ]9 Wb.What were the current and average number of loads in Space?
4 ~* [  [% W7 D/ qHow do you explain these values? ! b/ C  _' D6 s4 U

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉( L6 s# J, w" v0 e5 j" j  B
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)9 G1 @( {, o: R0 Y$ ~8 H
这行好像也不太对,各位先进觉得如何呢?
6 w7 A9 e, V1 u& H7 r+ N# p. i4 I: {% f1 \' O0 H
begin P_something arriving: U1 z/ Q' T; M$ s0 s
   move into Q_wait
; Q0 I5 x6 ]# b   move into nextof(Q_mA,Q_mB,Q_mC) 8 T7 \8 I3 [9 ^: Y0 f8 d0 G
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
9 z1 ~& z% i& T; G   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 3 |+ w& s. y) D6 c! y2 r
end6 T% O1 G! R6 I2 R6 ^

3 A5 C" R3 n+ P3 H) K) Obegin P_mA_down arriving* B" B4 e  T) J) d/ Z
   wait for e 110 min8 Y  O7 S* L) E
   take down R_mA
8 V/ M/ P0 Z, G3 M0 E   wait for e 5 min
7 o% U: |/ W2 I' u7 T   bring up R_mA
6 t0 q) t" B" G( M/ w  aend
( p1 B) ^; [" L3 N7 X3 T- j' g, h# t4 H5 ~4 j
begin P_mB_down arriving. J/ U, [- u6 x5 d
   wait for e 170 min
) X# O8 C; P% V* [. y5 T   take down R_mB
. }# k7 L. m4 V. G* L# x   wait for e 10 min
: f7 u' h9 b: ~& {5 i3 N5 F   bring up R_mB2 i& F. N* F5 |( b3 ]  j4 M7 v
end( W( I7 w% E, \, f2 H$ K5 K

( t5 d) S6 C5 bbegin P_mC_down arriving
9 A& }5 C6 W$ ^; u   wait for e 230 min
, ?, m: ^0 D& I- ?( c" w9 Y9 m   take down R_mC
% z# L3 ?# o6 z0 R" D6 D& n; W   wait for e 10 min! G3 M" @* t( d0 E3 ?) Y
   bring up R_mC3 \% O  s& J) w; O
end7 Q! G. G8 J4 h

; e( d- }& }( J! @! d8 b2 z1 gbegin P_mA_clean arriving& A6 e# O5 _' g
   wait for 90 min
  [: R8 b/ c! i3 @5 n2 Y   take down R_mA
7 R  d  d! o! _6 T$ Z   wait for 5 min1 T/ z$ _: i5 z  Y) k9 }( Z
   bring up R_mA5 a4 n# Q: D. p: Y8 \8 ~. z' D
end
/ R' p3 Z# t1 S7 j7 B: K3 O- `2 \, R" d8 I- b
begin P_mB_clean arriving
7 C5 l' x! ?7 F% T9 B# M   wait for 90 min
/ f$ \3 ]* H2 b, l) F   take down R_mB( y2 h& S7 S1 j
   wait for 5 min5 G3 O* M: r) m( {) y& e
   bring up R_mB/ I! M/ r  Q  N" [$ \
end
) z( z" Z2 w( i1 K9 O' \: K( p( ]4 I
begin P_mC_clean arriving
  Q% k" s2 D) e" Q   wait for 90 min
& P9 h! y. _6 h+ y) P8 G' G% ?   take down R_mC
! e+ H8 F5 F1 H1 N. Z1 K# j   wait for 10 min
+ W1 Y0 i  t, w5 n! ^+ U* V   bring up R_mC
1 N" M+ b6 g4 J8 send
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving; C" @( F, j! w& C- P5 F2 q, Z
   move into Q_wait
( w) m. E: E7 R0 I   set A_q to nextof(Q_m1,Q_m2,Q_m3)2 E% M" |7 J4 b
   move into A_w
8 p  w; @  J( I   if A_w=Q_m1 then use R_m1 for u 48,5 min) I6 x8 h9 O! r
   else if .....then use ....for u 48,5 min/ X$ T' R0 ?3 \) z% B
   else if .....then use ....for u 48,5 min  
+ F! f3 Y, j$ S1 n9 ^4 \   send to die
% F1 P, i+ V9 P7 B# n  z+ A. fend
; @: @' `$ {( M  ]' Z1 I# j& s
0 G' a/ p. o* E4 D供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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