设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7260|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
, ^/ D% I" Y9 _3 D/ f9 }/ t& |
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
2 n9 x' r# Q+ R( i  f/ u" [4 Y
6 k2 Y3 \, l2 E( S0 p$ ~不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!- E% u) c) V7 z; h( k9 E2 ?9 k
0 i  F3 S( F5 P) ]/ h) }# y5 [2 C
--------------------------------------------
0 U* {6 q& L$ V) e% ~begin P_something arriving
  I) p; n8 k+ X& ^# |8 j$ Y% u$ {   move into Q_wait# _; y$ e& z5 l* H) w
   move into nextof(Q_mA,Q_mB,Q_mC)5 _, f( Z# W8 q  v; G
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
+ e$ S8 S5 X0 e0 V2 a   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
6 @: a  p( V- e   send to die; m! K! N* s7 n2 B
end
- e  u8 q' ?6 d  {) s# v9 G' N0 c

) b& k& |0 m* t; i2 {: D; u, [/ Ebegin P_mA_down arriving( c* r" B9 O4 H% }9 X  x$ ~3 ~
   while 1=1 do " I% M% i7 N% }4 ]  A) A
   begin
' u% W, }1 w7 W0 e   wait for e 110 min' t, c4 I! Y  S% f5 R
   take down R_mA
+ t9 v. L2 C; t   wait for e 5 min
' c7 r8 Z2 E  |" A- K   bring up R_mA
- p4 g* U/ \2 X   end
% I. s; l$ F8 f, ~3 Gend

+ b8 ]2 f' F; c. l- E7 V7 { # r  S) i8 S0 ^$ q! f  q
begin P_mB_down arriving% `+ D; `& u7 M( M! n8 V
   while 1=1 do  Z/ J) g! j6 m' t
   begin- Y& e# \; ]: h$ t  X
   wait for e 170 min
, {; u8 [2 E1 V   take down R_mB! z( x6 \5 u5 w) ~; J
   wait for e 10 min. _2 S5 V" z- s" s
   bring up R_mB4 c) f3 \4 L" F3 u! z5 }0 `  l
   end7 N* v( m  N& F/ ?" Q; ]
end

& o6 f& n+ P5 _5 u
6 n* ~0 u1 s) i/ }( ibegin P_mC_down arriving
( N5 |" w  s! j  |4 H% S   while 1=1 do
/ ?. e% e1 q- k* |$ }   begin
8 {/ f' n7 g& {3 m" i) X/ _, z   wait for e 230 min5 w, T  o9 ]$ m2 l* S( q
   take down R_mC1 N' {" K, V2 }# p* H
   wait for e 10 min8 A$ t! ]1 e( \3 S% x) S
   bring up R_mC
) z1 U5 }8 c; `. r# Z   end' J+ \6 m  E: T  o: U6 H# _9 `
end

' B. v9 d' S+ Y, v7 S3 S! s ' M6 l5 K7 a8 }, V
begin P_mA_clean arriving% q* W1 c3 S+ L' b
   while 1=1 do9 R4 g. u( Q( `% z1 m  g: d9 Q6 |( J+ ]* {
   begin  Z4 D- a: i: E6 `+ _7 h
   wait for 90 min
6 K- j* Y% Z+ t" _, Y0 ^   take down R_mA
* P* d# W* t% x' V1 }6 {$ ?9 t   wait for 5 min/ ]" v' s0 r7 U; o6 q
   bring up R_mA: Q7 X+ x! d, k; _! c
   end0 ~1 c3 b  c, \( H
end

  s! i2 A, l4 o1 } + ?. \" |( W: i+ I3 F
begin P_mB_clean arriving9 m  m6 z. g7 J' E
   while 1=1 do9 l& v% d( _8 Y$ A, ^
   begin. @9 ~7 W0 E8 B6 V
   wait for 90 min/ I% J) Y4 _* i7 G- {
   take down R_mB
% ]2 L1 ~' u7 d3 w* ~) X) H   wait for 5 min
3 x3 Y* f/ H8 r- X, O* _   bring up R_mB: b+ Y, S) w3 M( }" t+ ^8 V, s3 d( a
   end  p: O% ?/ L. T, w5 d, K1 o0 s
end

# @& R! Q7 F4 { . F8 V7 y/ I2 `
begin P_mC_clean arriving
" M3 `: k4 j% ~6 a1 b  p   while 1=1 do+ W7 D9 {- K0 W: J1 m
   begin; a% p- Q# i7 A
   wait for 90 min
- \0 O/ s. i0 {9 Z5 A% V# o0 {5 }   take down R_mC4 p+ ]& ?' h- F
   wait for 10 min9 s! ~7 j: u  Q9 W6 Y0 g" W. e
   bring up R_mC
# q) R( @. K1 G- O0 Q1 N9 _, q, X. O   end
4 ?" b2 p; ]6 h% I# f. W+ @end

' ~2 ]' ]' w! @----------------------------------------
  ?- T' e) T" y- G+ n
5 D5 ]8 M( u5 g! w7 bExercise 5.9
# o6 Y) e- {" e& o
. D7 C7 _, u* g# d" _$ x$ I6 Q' ^9 S8 a+ u" {) B
Create a new model to simulate the following system:
3 p3 I7 e0 p/ [$ W3 u" ELoads are created with an interarrival time that is exponentially 5 {- J' {$ i( A
distributed with a mean of 20 minutes. Loads wait in an infinite-% K- G, J3 R9 y% W4 {5 I+ g
capacity queue to be processed by one of three single-capacity,
, t0 J' Y+ e* ~. larrayed machines. Each machine has its own single-capacity queue
3 }, L8 j+ O  J, y! ?1 i  M7 c' Iwhere loads are processed. Waiting loads move into one of the three
7 {6 s1 r' w. m( `% X; {queues in round-robin order. Each machine has a normally
% m" c  U2 l3 H3 d0 i5 y( c% j) Jdistributed processing time with a mean of 48 minutes and a standard
9 x/ U$ G+ t; X. m$ \deviation of 5 minutes.; A2 e2 X8 G! L4 f) O
The three machines were purchased at different times and have
; c5 y0 b" W" b3 Qdifferent failure rates. The failure and repair times are exponentially
7 J9 n! E* S  sdistributed with means as shown in the following table: ( Q% E8 t  l2 L  ?! [
Note The solution for this assignment is required to complete . o( ]- Q+ U- e# l) k! v# [! n
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
8 N+ x1 R% H8 }, uyour model.
' f7 b2 f4 W" m' T9 M0 _4 E1 m4 D& N* f0 }' ]. a
MachineMean time to failMean time to repair/ l, n% d/ m0 S& c, r
A110 minutes      5 minutes
2 \0 w1 ?1 r2 B! R- u7 R- HB 170 minutes     10 minutes
  ?4 e: h; e7 `$ L& G$ Y) V# IC230 minutes      10 minutes
5 x& ~1 W5 D" }3 Y* O( j
) f: X, s" z, B+ X% a) ?/ OThe machines also must be cleaned according to the following ) |  c( X$ b3 ]5 F( e0 C
schedule. All times are constant:
8 A$ H9 [) W# E% a2 f& P5 L$ e8 h1 v! w- w4 f( g
MachineTime between cleanings Time to clean( {: _( B; t  c% S2 f: {( F: s
A90 minutes        5 minutes
( [, a# K" s0 z# mB 90 minutes       5 minutes+ L. |2 }$ E% O6 C6 [
C90 minutes        10 minutes& D* W, e5 M# b# c

! r4 A1 e: z4 d1 dPlace the graphics for the queues and the resources. & m, ^1 ~/ G$ Q' [9 G. A% G
Run the simulation for 100 days.; k8 M3 R3 ], {9 O4 X, F- t
Define all failure and cleaning times using logic (rather than resource
% h9 ?8 N" V  \cycles). Answer the following questions:
9 {( S/ P; Y, Z1 I8 J2 @8 I. qa.What was the average number of loads in the waiting queue?: q6 |& Y( N$ i$ [2 A* r& _/ j% F
b.What were the current and average number of loads in Space?
( j& d' \' T0 i  P% k0 |How do you explain these values?
0 T: _! e; A3 f& n% o

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉5 J3 X/ Z, }( m1 ?
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
8 w+ s. g$ J$ R; W2 U. ?# w这行好像也不太对,各位先进觉得如何呢?6 o* H  X8 ~" k* r9 U3 m
* F' V  T, [" r; c( E" p" E
begin P_something arriving
8 v( ?& }6 u* q) D# I   move into Q_wait6 `5 @$ E# l9 ~7 l; c7 F
   move into nextof(Q_mA,Q_mB,Q_mC) % d: P2 s7 [+ P3 t
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min% x; c8 {9 j0 W5 q
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 6 T* `5 z% V0 Z" Q8 q  I  f; o8 i9 Y
end
4 M& P  ~  W/ H# v0 ^: \3 q! _& Z6 T; r0 d6 N, c( E
begin P_mA_down arriving6 A# @5 Y0 W/ x7 T0 E: \
   wait for e 110 min
/ @0 \& @0 g7 W" T   take down R_mA
( ^5 ^3 d  L5 @  h   wait for e 5 min
+ J9 G8 Z7 q* u( Q8 A( L" [% i7 y   bring up R_mA
; i% e5 ?) |2 y6 w2 F  send+ A% \" R+ }! t, H) I! y

. q: J$ G. ?- Y4 B  X  ybegin P_mB_down arriving2 ^6 p$ o0 N! @) |) ?* w2 o% L6 J; N
   wait for e 170 min" K4 F+ {* W7 c
   take down R_mB0 k3 W- ~3 W1 M
   wait for e 10 min' l$ S& o) s/ Z% w
   bring up R_mB
8 I3 _9 N' ?3 J1 s! Z. t/ {+ |end( o5 T* j5 c. ]9 H9 x
& j! h# _1 g* g# N+ J: p
begin P_mC_down arriving9 {2 S3 f0 R5 ?0 U7 ]
   wait for e 230 min
  @. ?& m& _# m* r) ?   take down R_mC
3 v+ l- ~: ]; x/ [! G   wait for e 10 min
( c  a# f5 Y# P2 x% i   bring up R_mC. ^6 {+ y/ d. `  Q0 h
end
+ J1 \3 S1 p; A
/ W; U* {$ z/ V$ ubegin P_mA_clean arriving; s+ ]# F! y8 a& b% A2 g1 l" w
   wait for 90 min8 V4 d& A9 I. p; J7 ^( i- i! _
   take down R_mA
. j3 y" e' t: P6 `5 `8 @   wait for 5 min, t; t0 u3 q4 e& }' x6 ]( Z
   bring up R_mA$ X1 V5 u2 X4 R0 K0 c, n+ y
end/ q) h- y3 c, x9 n+ v
- P* O# f( L8 W! \; Y
begin P_mB_clean arriving% W7 B9 J8 O- O6 O' k
   wait for 90 min
/ y" L$ ]) T! b/ e   take down R_mB
' T3 @% W& I, f; T5 f6 R! o; A   wait for 5 min
$ v+ E8 G# k) {6 X   bring up R_mB
) ]# r; u, b# p+ tend
) ~! a  T1 G/ O* m2 H0 f# v" {7 Y8 J7 k4 y8 {
begin P_mC_clean arriving
; s9 R" H' x( |+ l   wait for 90 min8 d9 e: E+ j& ?3 D; G1 U4 }
   take down R_mC
' Y8 |' Q7 q/ p+ |" G$ f, S   wait for 10 min" d" u/ y- K9 i2 }$ l, \. r; c
   bring up R_mC
9 I% f" _4 @/ u' J2 D4 J$ o. Kend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving3 r" d# p( E! C
   move into Q_wait3 `" E1 r+ ~! l# b2 {
   set A_q to nextof(Q_m1,Q_m2,Q_m3)3 k9 f0 g: K9 [# L/ D
   move into A_w
/ f8 Y5 Q0 i# U3 D2 d   if A_w=Q_m1 then use R_m1 for u 48,5 min! C0 l& z: o$ _; H& x, V! h$ w" n3 b
   else if .....then use ....for u 48,5 min
5 y  \: o- C+ P" U( V* X   else if .....then use ....for u 48,5 min  
2 _  Z- Z1 E2 N: J1 N6 ]   send to die
2 ~$ D, c# j  _( @/ Z* nend
4 L( A* v5 B) g  E: v7 g# |6 C7 _4 m+ \+ I5 O( l7 Z: F
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-21 09:34 , Processed in 0.017348 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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