设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6560|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
' n; j3 s9 k/ a* a
. g9 s5 V% j7 N6 L( p底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
; w" Y0 m3 N0 B: o6 j8 i
6 w8 D' q. f2 x% {不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
1 l5 f; T- p2 ]2 p6 {0 B4 M& _- S& C2 l! o+ x& a* G0 p
--------------------------------------------% a/ ]6 B9 D: m7 Y0 w
begin P_something arriving
- Q6 K7 i8 C1 D. {   move into Q_wait9 q2 Y/ ^$ w8 P" G7 B& G% d$ P
   move into nextof(Q_mA,Q_mB,Q_mC)! U- k. z) \  ^
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min( w$ N# r( ~; X# w
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean): e. @5 @  o5 j
   send to die
0 x+ [" F8 i, e" send
( m6 y# z& v' n# F: y

* o, c5 w& A6 U' {) t6 cbegin P_mA_down arriving6 }( @6 B; B/ U5 W
   while 1=1 do
& s2 ]# i" P$ ^4 C, O8 h/ y' H   begin3 W# M% \4 g5 h& s5 n" i) f
   wait for e 110 min
4 K& s7 J5 Y/ o" X5 E. \   take down R_mA0 j; m  J8 `# K' k! d6 C& f
   wait for e 5 min
( q" U6 l) [) J   bring up R_mA" Y( N+ j" O- t2 x
   end% w# U. @8 f: g, a; S
end

; q- E8 o) a# N+ l # s0 Z: a. u* `. m: R
begin P_mB_down arriving
! v5 |4 }+ o8 y" G  W7 {& a3 j3 d   while 1=1 do
0 K7 s' @" X. M$ ~5 `   begin6 E; {7 f% N, s& ?/ N6 h
   wait for e 170 min
0 }) j% C6 Z2 i) f2 L/ ?& z0 a- F4 ]3 m   take down R_mB3 D" |" w7 G) l$ X) V7 p
   wait for e 10 min' M1 J4 V2 i9 W( U6 u6 O5 ]
   bring up R_mB
: M! Q7 Z( M4 k5 o& _   end
. y: @# d! K: w& o7 `3 Mend
$ T0 J6 g6 c7 ?+ A' H( Z3 ^
' I  u+ I. k3 f% o
begin P_mC_down arriving/ s4 N5 N( G/ W' D: O$ B& }% x
   while 1=1 do % H- @& w7 R6 i; r8 S2 A
   begin/ p- M9 D9 _( L$ U
   wait for e 230 min2 V6 z3 F1 f" E1 O
   take down R_mC% {& J5 [, f$ H3 P3 |
   wait for e 10 min
  G# |$ J# \" \   bring up R_mC3 z7 I" k, [, T* |1 |- U4 A' q
   end
; Y7 H! Q' L" ~' fend
" x$ c  E# Z# i6 l/ b5 \; J, c
8 M  P* \8 H$ ~' U" u& w4 r
begin P_mA_clean arriving8 q. F; G9 I5 x1 k1 }  E
   while 1=1 do  \! f: a0 U+ W5 W
   begin
3 g2 P: g. E: w! x' e& F   wait for 90 min! n9 T# e  Z4 B/ p" o' ], L
   take down R_mA1 D. F' t* d# R5 D
   wait for 5 min  W; Z6 V% F( T7 T& Y
   bring up R_mA
0 p9 d* ]+ }8 X7 a   end. e% J& H; S3 j3 F) r4 C
end

% I7 i9 W0 J* V$ `" X3 a0 @ 2 b  b+ D# e. S# b: Z
begin P_mB_clean arriving" v* V5 l$ C1 ]3 K+ k8 Z' [/ C' a, l
   while 1=1 do; o+ ?4 C, z- A& D- x/ _4 B1 F( d( [
   begin! ^2 Y# g. X" l/ I1 }" P
   wait for 90 min' }: c5 u5 |3 I6 q6 C" ?0 d
   take down R_mB$ q& E8 B: U; V9 N
   wait for 5 min6 s5 t" Y" X7 H& L
   bring up R_mB
+ t+ ]( u& H8 |9 z" m   end
& P4 t& _& Y1 e) C/ }- f' lend
( x7 ]* @0 q% Q4 {1 `% p$ l9 P1 L

/ J/ O7 V3 z% X  N+ {$ M* r# E0 Pbegin P_mC_clean arriving
+ E! t' U/ `7 j8 m   while 1=1 do
% O$ x( y/ O1 [0 i) R% i% h   begin
2 {! E& H! O/ ?. n  L5 G0 E   wait for 90 min
& i3 e! a; z1 ~: N9 @   take down R_mC
9 r& n& h- N9 |- w   wait for 10 min
9 \; `6 ]; M$ y7 f+ t! v. V   bring up R_mC; i, B+ {& v# ~! m! ?% ^; h
   end8 ~' C' m8 p6 \9 Y6 }% z
end
6 E( j8 t) b& |# o$ `* N0 b4 o
----------------------------------------2 K0 k+ \3 C8 x9 ?% W3 w

# W- \- _4 r: p' ^2 |Exercise 5.9
. n' i, J' U, A& [+ Z+ e& i9 d/ N- T" n+ B; `. t. l$ v
5 E9 i1 q+ X6 j1 ^6 }$ M9 }
Create a new model to simulate the following system:5 `/ k# s8 Q: h
Loads are created with an interarrival time that is exponentially
" G4 g0 K: |% f( v$ Edistributed with a mean of 20 minutes. Loads wait in an infinite-" m9 j, b4 T1 [- c1 B( n9 H
capacity queue to be processed by one of three single-capacity, 8 f2 j) m& s* Q& F4 _4 g& P0 n
arrayed machines. Each machine has its own single-capacity queue & R5 B, Q9 {8 V' g$ l* g
where loads are processed. Waiting loads move into one of the three
) ?0 s$ j9 b: k  m4 K7 uqueues in round-robin order. Each machine has a normally 0 z, }6 v+ H/ l/ r
distributed processing time with a mean of 48 minutes and a standard
( K0 j$ B: G$ W: y6 ]) Edeviation of 5 minutes.4 z+ H3 \# I' m  q8 b
The three machines were purchased at different times and have
% Q% p* W5 i8 M2 pdifferent failure rates. The failure and repair times are exponentially - [# e  X0 q1 s% Z/ U% p, |
distributed with means as shown in the following table: + M8 P2 q( _& h
Note The solution for this assignment is required to complete
  I2 A1 w& f" |0 d9 T0 ~0 q4 [exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
$ M8 r. @6 k* ~- m5 H8 k: {your model.
; g  A8 X& T0 R" g/ b& S8 _! B! F
* y$ D  m+ i3 q1 K+ N% j6 _MachineMean time to failMean time to repair0 M7 q/ [0 N+ K1 b
A110 minutes      5 minutes$ K3 i9 ]7 g# Q" P! y/ S+ q
B 170 minutes     10 minutes
9 z: }0 B' H% O2 ^% U" y/ E( fC230 minutes      10 minutes
5 x+ d3 T$ j- t& f1 w/ Q: S- `9 n5 j" L  J& x4 W# V, `
The machines also must be cleaned according to the following $ m6 O& p) O/ ^
schedule. All times are constant:
, U6 J( d6 F9 T8 i( b' V4 L4 l0 t* ]; @! U7 c% T) p
MachineTime between cleanings Time to clean
) S; ^4 F9 b. @A90 minutes        5 minutes) ~0 G+ F% g+ s+ {: }  w
B 90 minutes       5 minutes+ F/ h; G$ g1 i, A
C90 minutes        10 minutes0 j+ o5 D) }* k: B9 G7 R

* e" T! g" V" z: _9 Y9 v; QPlace the graphics for the queues and the resources.
8 e; V' c5 {; J9 T9 `2 Z8 X3 HRun the simulation for 100 days.# C: t: v1 Z2 Z- K, f
Define all failure and cleaning times using logic (rather than resource $ e5 X" y$ `5 d) J
cycles). Answer the following questions:
; u" i$ W& U0 `a.What was the average number of loads in the waiting queue?6 `1 d& C7 H/ V) |+ |$ b
b.What were the current and average number of loads in Space?
7 m* L# I/ a. n& |How do you explain these values?
* w+ h+ f+ e- q* N; j# \- B

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
2 y2 T7 T3 M$ S0 Q) ysend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)2 g) `7 z1 u$ T' J8 Z, E2 P; D) d$ x
这行好像也不太对,各位先进觉得如何呢?
& w; {2 c' W" n4 e+ d7 a/ w! P+ k+ ]+ `& i
begin P_something arriving* {; c5 s+ K2 ]2 M* @' X" c1 K; G
   move into Q_wait$ k6 u9 \( ]. t; U: b
   move into nextof(Q_mA,Q_mB,Q_mC) 3 V7 p2 E$ J; {5 V. _
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
7 u* N7 W* d! i3 l   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 0 U. x9 @) q- B6 j
end, T3 t5 i& l/ Z  d) B2 P

0 e* K$ ^- z0 a* n  r) \3 }4 Mbegin P_mA_down arriving. F4 |5 B0 }- p2 v
   wait for e 110 min! e' Y5 ]. ~$ v
   take down R_mA7 V' I; I3 a1 d
   wait for e 5 min; O! H# }1 {0 l- B; x
   bring up R_mA
, |2 J6 X. I9 m/ W# u- qend
9 s  M5 X, R0 U, O, T
2 L  f( X4 p+ ?: L5 ]3 P; w$ Dbegin P_mB_down arriving
: G  U; w/ Z; ~2 h) @, R   wait for e 170 min- S. `% L& `0 K& {+ K
   take down R_mB
6 f, x9 E  Z1 f  d0 P9 m   wait for e 10 min* E6 ~+ |  e" ?0 B: y7 v
   bring up R_mB
0 b$ D" L; x* j8 C$ k4 rend
) Q" U, q+ C1 X8 J3 z( B: |4 v4 O3 o7 ^" U. x# N  v
begin P_mC_down arriving3 U; M. i* s) h
   wait for e 230 min
/ l) r* t+ W2 E   take down R_mC8 ~# S5 {: z' s# c: }4 S
   wait for e 10 min' ?* d& E! Z: `; @
   bring up R_mC
# t+ `4 a6 f% T* [) wend# k9 v! Y; \/ y) B& @5 b2 @6 ]2 Y
6 |2 U; X& D& q) M& _
begin P_mA_clean arriving
, J! G3 z! o; \   wait for 90 min
" F) f* g4 |" A1 d8 [   take down R_mA
1 T) N, W6 t9 p5 a   wait for 5 min
- Q1 Q) ~$ V" l% V) M   bring up R_mA2 L; _8 g/ Y- Z) _5 R; a
end  o9 g: J' o7 r0 u2 @& o
3 W2 S* p# T3 q/ J3 X- f
begin P_mB_clean arriving
8 C5 }/ @' L  p" e0 M) h3 N' V   wait for 90 min
- ]6 e3 m: y. b- R   take down R_mB
6 C% e$ E" C0 i# u& V# h   wait for 5 min
+ x3 [/ i% m, W- p, w   bring up R_mB
  ]8 R8 k3 G: q, ~% a) x9 q2 Send
% R- _$ [5 v$ z. W- A6 z9 g7 [. }9 |! C  b4 ~7 z$ \# z
begin P_mC_clean arriving
+ F+ V, Z# a# S7 k3 h   wait for 90 min5 u3 w* H  O) f2 b8 o8 W
   take down R_mC
+ F# O- I( A/ R   wait for 10 min
1 f* R( U1 I; S+ f   bring up R_mC( @$ O, x& a) s8 N# I% t
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
! ]- I  x1 j% w: R% q) `, W- {+ N% f   move into Q_wait) B3 H8 i0 f, x
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
- d; c" S+ Q7 n- B" S  p3 t, n   move into A_w
% T% n1 Y1 a9 U4 _   if A_w=Q_m1 then use R_m1 for u 48,5 min
* D6 N5 y9 U7 Z  l2 H, ~   else if .....then use ....for u 48,5 min
/ Q8 J! R/ \) J- J/ b   else if .....then use ....for u 48,5 min  
  R0 e/ a& g4 }" X# j( p( k   send to die3 w% }2 k1 G" ?' X" i2 H" g7 L0 t" M
end( J8 M# ^4 x3 U6 z
7 A# w' }& d. v3 T; H
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-6-18 16:21 , Processed in 5.941945 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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