设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7268|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
0 N  I7 }& I, ~. b+ j, s$ Z  u# q4 f4 N  A& Q
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
. ?2 I) _% P# K, [9 ~( q! F
- }% b5 y, ^$ G' d4 F. I2 t8 w不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!8 t3 d: M7 i1 c# m& Y: v& E

5 p* z7 O/ E; |. f2 o9 L1 E4 E
--------------------------------------------
' O7 _  C, \, d' U) i7 Qbegin P_something arriving
! o; s3 d5 x- y$ _9 X) x   move into Q_wait6 s" b3 }! _! L0 x) A- L( g- `1 B6 M, O7 r
   move into nextof(Q_mA,Q_mB,Q_mC)( M4 z- }- F& }- b: M: w4 s
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
: W- X" U& I& o   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
; }  _7 N) z; V   send to die9 r5 W$ C$ z- Y( M3 Z3 o
end
* _+ ?4 \9 x( o: s! l5 q
" A9 A- p+ p/ k0 I# _
begin P_mA_down arriving
0 z: {' l4 o% C, P  ~6 }   while 1=1 do
7 q  L/ |- i  g6 j" ]1 X9 O6 F   begin0 n. y1 j9 L8 w; K8 e
   wait for e 110 min
4 r% ^, ]3 t! @$ J7 {: f1 P. X   take down R_mA
) ~2 L. o9 H. n8 D7 X" {/ n1 t   wait for e 5 min
: s. ]# H  t0 R/ N5 w% j  F, I   bring up R_mA
$ h1 x/ I& |  z3 `) i5 `& q3 C0 b   end3 r& z  n' o  K3 V: K
end

4 i$ F4 E1 k8 r$ {& z1 F . B1 n4 M; q% x7 m  `4 C
begin P_mB_down arriving) e2 I. f' t& M* D- |' ~6 Z
   while 1=1 do
1 Q, Z9 K! _- k* r# K- W. h+ }4 k   begin, h3 D0 y, O1 P/ L% h3 ^
   wait for e 170 min
: ~. ~; H2 d. ^5 R, _( |$ W! H   take down R_mB* a% i! @1 c$ j/ K+ ?
   wait for e 10 min
) l" N+ E" K8 Y6 i! T   bring up R_mB
3 q5 `- n9 b2 m& V1 o# t   end* ?+ [2 c' V1 r# F! B  C7 v( C
end

9 b( m: p. d/ S& D- A
3 E, J2 T+ ~& [6 Ubegin P_mC_down arriving
6 g2 R* E  ]$ y; v' U$ G/ Y  f9 I   while 1=1 do 7 e# F% R, f+ O6 [
   begin
7 h5 d+ F* C5 F. B   wait for e 230 min2 j. L+ D& A% f( `+ O
   take down R_mC
* ~$ m- R. |5 ]   wait for e 10 min
! w( u8 S+ @% z- n. e5 R   bring up R_mC
5 p" l7 b- R+ o9 p8 F  J, l; J   end; Z* i9 ~; {+ P9 d4 j7 F  a
end

! g+ Z7 C  P& d6 k. A, q! h$ U3 V ; {% |) R# u2 |  H* y
begin P_mA_clean arriving
3 S6 j0 J: e1 [0 @: l, ~' J* F" Q3 X   while 1=1 do* n0 c' }( ?1 W1 U$ ^
   begin* c- w1 e" D1 J% m  C  \1 k
   wait for 90 min
$ B4 @5 g! |8 _   take down R_mA5 J+ Q, y0 x7 i! @* _
   wait for 5 min
* u  E' A7 O" K& D   bring up R_mA
9 M1 c0 `% `; v- C7 h  T7 i   end% ]1 e3 b& G! p0 g6 a3 E
end
& Z  M  N! T) W. I

& L6 P8 j( o$ Bbegin P_mB_clean arriving: X" f" A( r- @! R; G1 w
   while 1=1 do$ d* D) ~% N6 ~+ p4 V& G& J$ z
   begin
% Z* ?5 A  |3 U0 D; n( m, ~   wait for 90 min! \. P$ A1 G1 I, v7 K8 `# m2 R+ n1 m
   take down R_mB
0 [& x4 R$ C& E6 _1 m   wait for 5 min$ e! s" }* o% g$ w6 ?
   bring up R_mB9 V( F% G6 L" _7 T
   end
* u* N' D3 `9 _4 r3 Cend
8 w8 M4 _' O4 b& m/ l) C1 `7 u( H
/ a/ Z# b2 \# w5 e: G. y: y
begin P_mC_clean arriving- \8 [, Y3 Z; p8 M0 \# X. i( Z7 a
   while 1=1 do
5 _5 h9 X5 y# r2 n& k   begin  `0 c" A! f. J1 z, m0 x, O
   wait for 90 min
2 p$ O! r3 j0 b( z$ I   take down R_mC2 |; Z4 W9 g" w6 X; Z- s* T& A/ m% ~
   wait for 10 min( D1 B1 v: @7 }, j: v3 `- ?, {( Q
   bring up R_mC$ `* |- Z3 L* S
   end
8 t( u* A( t( P& m, c- \end
  I( B0 G) X+ H. T
----------------------------------------) P: u  `9 h4 w7 s! l4 M9 c+ Z

0 m2 ]/ Y& ~: E0 ~: UExercise 5.9
4 b! ^' I5 c! x9 ~
: f' f& [# Z8 x& i+ }8 ?' ^4 ?6 a
Create a new model to simulate the following system:
3 g. a, }, K0 {3 B  \Loads are created with an interarrival time that is exponentially
' K6 J! i1 z6 L: c; {distributed with a mean of 20 minutes. Loads wait in an infinite-" }6 p8 L! }" w% {" Y
capacity queue to be processed by one of three single-capacity,
2 j- z, b' J2 w3 R8 `arrayed machines. Each machine has its own single-capacity queue
  E7 W5 O* L9 Lwhere loads are processed. Waiting loads move into one of the three
3 n0 Z5 m% j* `! A: b, Dqueues in round-robin order. Each machine has a normally - }( U) W/ Q7 T6 h. }& }0 d, [
distributed processing time with a mean of 48 minutes and a standard
# j7 T1 A& Y6 k$ x0 j1 @deviation of 5 minutes.
" z% y# R- {8 EThe three machines were purchased at different times and have   z2 Q4 m. e" t! G+ [2 b
different failure rates. The failure and repair times are exponentially
' \& R/ {( F- _. Zdistributed with means as shown in the following table:
. \* U5 A4 I! S5 H1 J5 cNote The solution for this assignment is required to complete
/ n- x( z; {# t" W% lexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
$ ^, r- c% N; Z5 F0 t! _& Y; ayour model. 1 b: `5 @: X1 J8 b& }
, [/ ?, G3 d. _. }/ j6 j- U
MachineMean time to failMean time to repair
% J; e' y9 u4 k! k$ \, q) ^A110 minutes      5 minutes( D! W3 k4 T* p* f
B 170 minutes     10 minutes
0 R& F6 R, S6 Y( i4 ^C230 minutes      10 minutes( K' o& Z) r8 y
+ G& J& X8 c1 g" I" y  i8 |
The machines also must be cleaned according to the following * [1 q" p& i. p2 y$ Y- T" t
schedule. All times are constant:
& r; l3 o+ d* ?, o
* G; g7 \! P; K  CMachineTime between cleanings Time to clean3 {- B' F4 P/ o  J0 }6 k% x! Y
A90 minutes        5 minutes2 ], Z2 s/ P( i$ b- Z. t
B 90 minutes       5 minutes. ~4 u- l7 T* V6 u
C90 minutes        10 minutes
- \" p' Y3 D5 T' u( a& i+ V" S# V9 }3 X9 e8 v# W+ H
Place the graphics for the queues and the resources. 9 V, Z$ N; B# |$ A( c$ L( y
Run the simulation for 100 days." U, t+ n4 A2 _  ]6 y% A/ n
Define all failure and cleaning times using logic (rather than resource 7 B# Q* o$ H9 i! L3 M
cycles). Answer the following questions:
& X$ L8 y0 b( |; k* a  _4 k, ma.What was the average number of loads in the waiting queue?, G( S  \$ |2 ]! Y' n% w6 g
b.What were the current and average number of loads in Space?
' I0 V/ A  X1 G/ u% F7 A8 X( R; BHow do you explain these values? , C  {. I% j5 y/ D7 p& M

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
' t3 w% I: U& e8 wsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)) v+ n& z  F7 `, w
这行好像也不太对,各位先进觉得如何呢?* R0 q0 d% D* I7 r

, O% J- {' U# q! k" ~% D% C9 ~5 abegin P_something arriving9 U4 G: G$ s3 n, P) I
   move into Q_wait
1 E% l# G+ }$ ]8 ^/ j1 X8 y   move into nextof(Q_mA,Q_mB,Q_mC) $ {; E2 }+ _6 c- ?. e1 ~+ Z5 I
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min* r" Y: ]! r' d! ]$ r. M8 ~
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 6 x3 ~8 A5 r# a# u! [9 n
end3 j/ b0 r6 X+ L8 U$ u/ u" D

/ o% V: I6 v. B4 pbegin P_mA_down arriving% O3 w2 t! H, o; ?
   wait for e 110 min5 q8 r, S3 T( N
   take down R_mA
! {0 e( ?2 O) D" v4 ]. }   wait for e 5 min
' h' S$ a# O" k* a. S+ p4 P   bring up R_mA
  ~. k  z% ^$ f- Y5 }2 t% tend
  r) X, o' j0 A  m- a
" m# q, I$ x# S  }$ ebegin P_mB_down arriving
! N1 A5 c' U% O- ~3 }- N   wait for e 170 min8 V7 U  u3 _! G9 A8 h
   take down R_mB9 k7 f6 W+ Y) [2 M; j6 u" e5 e
   wait for e 10 min% o0 u, r0 |+ H5 I
   bring up R_mB
& b$ \5 E5 N; Y1 x8 J) Oend! G8 s; E4 X4 `

* |0 F2 R; A; r2 W* P& mbegin P_mC_down arriving; a  h6 F* ^% G( h: D" q) k
   wait for e 230 min: _+ `' @" `# q, z; f4 O: [
   take down R_mC4 R( d+ K) Z. m% @5 y# V( X7 ?" ?
   wait for e 10 min( P" q, P, G( ]$ N
   bring up R_mC
' G( T+ Y; X9 w, v: j' Uend
" ~# e4 s6 z9 e1 M7 }1 W
, M) t. A* i1 Ebegin P_mA_clean arriving, R3 ^2 E+ u, _5 s2 I' T6 E. E% g2 H
   wait for 90 min
  F2 H( n8 V0 B9 C$ Y! {" T   take down R_mA
* Y0 a0 t' ?# l+ z   wait for 5 min/ ~5 y1 \6 T+ O, ~: b# H5 p
   bring up R_mA5 S5 {; L( D9 N5 e, S
end3 z$ `3 n, V& o

$ b* m6 F6 ?  R" @7 Zbegin P_mB_clean arriving$ O9 r, A( X- l( D' v
   wait for 90 min
9 `' T8 @/ m5 V! X; A   take down R_mB
7 l' d6 R, ^" i, E   wait for 5 min7 W! V6 N$ n3 D% M
   bring up R_mB
/ f3 U0 K  w7 R: dend
9 [# R8 s6 V( `8 S+ i/ K, b( P9 K) P! j9 l) o
begin P_mC_clean arriving: }. u( b2 J) `, u( V- V+ G0 e+ L
   wait for 90 min
. `8 O3 N# ]2 q* P, L* g   take down R_mC1 z7 w, k# P) n3 P/ P
   wait for 10 min4 t! t% l/ U7 d
   bring up R_mC
: F7 C( |( M6 b9 r9 }5 H0 ~4 jend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving6 Q  u1 {$ ?- h
   move into Q_wait
' n  q/ x& G) ~, s8 |   set A_q to nextof(Q_m1,Q_m2,Q_m3)
, M1 s2 C' @9 v/ M. q: }6 j   move into A_w* z" n* ~( r* T. C  H
   if A_w=Q_m1 then use R_m1 for u 48,5 min
& {5 D" P" W$ P4 c# z/ r, s   else if .....then use ....for u 48,5 min
0 B$ ^' M" @2 R7 D  A   else if .....then use ....for u 48,5 min  # m5 \* |! `7 ?! ?4 A0 s
   send to die
! i, G0 c/ L1 r# Nend4 s% C- M/ ?* M1 W! r/ }
8 B9 x5 w. r) }: a
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-22 11:40 , Processed in 0.013038 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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