设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5123|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
( n4 [$ ^6 V( U) N
5 D* Z! T2 l6 O- @0 \底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去6 g6 ^! U% e8 Q6 {1 N' }

% f4 n, Z) x5 i' ?1 S# ]: |不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
  m; W9 e+ l' U) Q# g3 {- `! I% f6 l8 _
--------------------------------------------7 ]0 ~" }4 w; l2 C8 Z% j
begin P_something arriving  O; ]3 m0 ]1 r8 ^' P% ]
   move into Q_wait
- E3 ]) N1 R  |  f5 J1 h6 ~7 S   move into nextof(Q_mA,Q_mB,Q_mC)
4 E( j3 i  E5 }) s. S, {   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
+ O( u3 P4 X* T1 Z" i  f   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
3 F' c, E( n3 B9 h; N, T$ J   send to die! \) |& v  C: d! N
end
3 }! ?$ i8 r4 o, H6 _3 f

, f+ e% R& H4 |/ q. X4 |8 [: ubegin P_mA_down arriving) ~6 L! y/ S! R
   while 1=1 do
% Y. L% H: Z! }1 G0 ~' V   begin
/ X; j6 C" |9 A% J' w) X   wait for e 110 min
# `4 U, [  C  D+ E   take down R_mA
# _/ p2 j! y+ p   wait for e 5 min+ \/ e" q" [0 W1 D+ @% {# k
   bring up R_mA
2 U8 f9 ~" R/ E5 M3 d   end
" Z. ~8 ^$ r/ a  Uend

$ ^% O0 `7 V  m% r" ~$ d2 {
/ q' \0 F$ ?' L$ bbegin P_mB_down arriving1 \: A) \( U# C. ~* q$ w) ?1 R
   while 1=1 do' Q' L, [$ c, C$ w
   begin
6 d$ V+ A9 j; ]; R   wait for e 170 min. J* `: X( w- f( |  V) \# q
   take down R_mB8 B- E8 w1 i2 A8 W
   wait for e 10 min  o! b/ Y) \! O
   bring up R_mB) o  ^% T3 A: ~, s
   end: v; p, `3 N: g9 H+ i
end
5 O/ \3 z; F0 k- h( }1 B+ p- j
* E0 o$ j$ ?/ O7 N1 q: N
begin P_mC_down arriving
/ v6 ?6 p( l1 v+ Y8 y: h  F   while 1=1 do : Y  G8 o7 Y% J$ T+ t% R
   begin% `6 C3 G$ ?7 }+ G, N% s/ F/ E
   wait for e 230 min
# P+ h5 C8 y% ?' r# Z   take down R_mC
* ?; r9 n, F" c  y; O3 Z   wait for e 10 min' i5 `/ G" b/ r& T, o8 I; v
   bring up R_mC3 A- }$ n9 M+ U& o8 V; P
   end
- Z' i9 h( n! s; iend

! o7 G9 R+ D$ t1 o% {) n- A
" ~4 X0 M7 g. T: u& T8 o8 [, |- sbegin P_mA_clean arriving
# {- j" c" o4 P# V: y0 p   while 1=1 do) X# E! x5 a. \0 L  `
   begin
* {/ c; {: [# o. [4 L/ V   wait for 90 min& n0 h- D( u( u7 w/ @" h9 B
   take down R_mA
; M+ X2 }, M4 u4 H   wait for 5 min; l5 u4 i! S/ l# |
   bring up R_mA
! P' x" u: j- z! i: M   end& U! E& C# {' m
end

. v5 s* ~3 F  S" r
, @8 d, l* z; rbegin P_mB_clean arriving/ a* S6 M: Q  k2 t
   while 1=1 do5 y9 v) e4 c. Z7 U; [) X+ H" W% A
   begin
4 \8 j1 J# Y" A5 f* Q; H   wait for 90 min/ c( ^; ~7 m8 f6 S, J
   take down R_mB
. S, {; B* p5 W6 \  W   wait for 5 min! c6 X" b, M+ q9 {7 `3 v& r
   bring up R_mB
( H# f! ?* k+ n0 h! f   end$ Z* c" n1 ~1 y) E
end

6 j1 B1 S  J4 s0 ]/ S" j 1 Y6 o0 q4 f5 L: H
begin P_mC_clean arriving
) s' N2 ]' b* S: \( ?+ M0 M   while 1=1 do
% |! x1 s1 C# J% t) J8 ~7 q- H6 m   begin
5 w* F; `$ M4 r# o5 n: H   wait for 90 min
7 A5 `! k% P# |  f$ S   take down R_mC, o  U; Q' {- m
   wait for 10 min
6 M8 \& K/ M+ u9 Z: e   bring up R_mC
  p* N( T3 C( ~+ \" h0 l+ C' ]6 {! U   end; ~8 @3 W- v8 w
end
: m3 w' _% y2 _$ z! g, T2 [: K: w
----------------------------------------, z0 D" z# v- L: }
; H! \0 k, F- R
Exercise 5.93 q! g4 K8 D% X6 E3 H

+ \. U. f! s* C: x/ E7 P! s- t: O1 U2 M- O1 a4 x
Create a new model to simulate the following system:
! L& A0 ?. y! `6 o! [; \1 a# [4 Y) j1 PLoads are created with an interarrival time that is exponentially 3 a" ]: I  r3 x: `
distributed with a mean of 20 minutes. Loads wait in an infinite-1 U' `  q7 |. \2 h" w
capacity queue to be processed by one of three single-capacity, 0 Q7 O5 ?+ }9 e& k+ u5 G
arrayed machines. Each machine has its own single-capacity queue
) h$ z- ]( X2 D7 A& Q! r0 R% h) Bwhere loads are processed. Waiting loads move into one of the three
* R- u; N! J% L& ~3 k9 d9 u0 |3 v/ zqueues in round-robin order. Each machine has a normally
# |$ o2 _8 {, S7 {distributed processing time with a mean of 48 minutes and a standard 2 }% C0 t- ?' n" l* V
deviation of 5 minutes.
( N: ~$ s# N# t1 nThe three machines were purchased at different times and have * J; e2 _4 c. C! f
different failure rates. The failure and repair times are exponentially 1 B" F* e( B. j9 H$ ], ]3 g' W4 _
distributed with means as shown in the following table: . n6 J2 w' Y8 e# h" J. c
Note The solution for this assignment is required to complete
, v# Z+ I5 f( _" E" z! b: eexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 1 w5 b* }/ f+ G$ I: ~$ u
your model.
/ }% A& ^+ W- ]& `$ }5 H/ u2 O% U# i  m+ ^+ ~' B
MachineMean time to failMean time to repair
# }4 U4 z' Q' g8 |5 ?A110 minutes      5 minutes6 ]- U: E6 ^! T6 @
B 170 minutes     10 minutes% _6 b5 q1 a6 @6 w, V: B; T1 F* e
C230 minutes      10 minutes
8 a* E/ z. `6 n5 ~  P  A! U" ~* f# }
The machines also must be cleaned according to the following
+ J: _4 q4 @3 H: w. q4 u( pschedule. All times are constant: " x' t+ h8 M% b' B: V6 J
1 j% v: `: u& o& r5 ]; y- D' `
MachineTime between cleanings Time to clean
% J& ]. H$ [3 B2 {A90 minutes        5 minutes$ I3 C/ O; Y1 w: Q: [
B 90 minutes       5 minutes
* C' B5 F$ s2 K1 GC90 minutes        10 minutes+ ~9 {  S2 }# x) F9 ?
# r' m6 w4 u% P; R8 s
Place the graphics for the queues and the resources. + t. b( Q" Z) g$ y: m1 ^
Run the simulation for 100 days.( R( M0 Z- }) N& F
Define all failure and cleaning times using logic (rather than resource # {9 ]- J9 H) u* B) b8 C
cycles). Answer the following questions:6 E! c' L+ n2 y5 p
a.What was the average number of loads in the waiting queue?: i6 j/ A3 d9 ]+ [
b.What were the current and average number of loads in Space?
) {" y5 E, f3 m( DHow do you explain these values? ) W5 j' G1 x6 h' }7 H) t. Q2 c

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉' N% Q( A# d! [& L% |
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean); P8 t/ R# L4 C* l- q" n$ A  q) G
这行好像也不太对,各位先进觉得如何呢?
1 x1 {/ u! O! C% s2 U4 g: j" {2 y- p
1 i/ s8 {) P  K6 X& z+ }& @begin P_something arriving
, K3 v8 N* I$ {" ]9 q   move into Q_wait
6 m: _# p2 i, E0 M; R   move into nextof(Q_mA,Q_mB,Q_mC)
; I1 ?6 K& c& i( ]( x+ ^$ j   use nextof(R_mA,R_mB,R_mC) for n 48,5 min9 ^; u2 Z4 U% S; S/ |. y
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) ) i, R) H% E. z2 @, l% A+ S
end
1 X+ f  g8 `; M8 @$ l7 [+ d9 n6 d: W, P1 t1 S% O
begin P_mA_down arriving5 J: j7 ^4 f/ B( M! ]8 g
   wait for e 110 min
* s) U; s/ Z5 w# f& e; W   take down R_mA. n# ?# `! z, x/ d1 C, k9 q
   wait for e 5 min
+ o# H( \5 |0 o( e- {   bring up R_mA9 @$ J, ~/ R& |! E/ `! i" ~- E
end1 j1 Q8 q; g( [9 k4 i- l

$ t% C+ {7 a/ obegin P_mB_down arriving
% y, W, x" I4 D/ S4 o/ ]2 V   wait for e 170 min
" K; E7 f! M1 K5 u$ j3 K# N$ ~   take down R_mB7 g; n) S8 P/ s* T6 L% q/ r" M- r6 g
   wait for e 10 min7 ], V+ W( U2 I& F
   bring up R_mB. m: ^1 v0 k. P
end
* e) n0 `9 l$ j/ x& ]" @. H7 B4 s9 p4 t* L, C0 z( k0 X  `
begin P_mC_down arriving* f7 r  d% E, f+ U2 [3 o+ S
   wait for e 230 min
& Z4 v# B8 f( c   take down R_mC
: `# x' l; n; M   wait for e 10 min+ A, w1 q! w  Y3 U' }( ?6 @
   bring up R_mC1 n7 |+ a( p% g9 j
end* A2 I6 d: J1 o2 H; l9 G8 e, J6 N. I  S

% {, a! |8 P  j+ x3 c/ Y9 Xbegin P_mA_clean arriving
! Z' k/ ], `+ m# k+ F   wait for 90 min0 m/ a9 V8 W6 o, r
   take down R_mA' V3 B0 S5 Y6 \, Q% ]* F
   wait for 5 min7 r6 {' z4 Q1 f- e. _
   bring up R_mA' ?' `6 ^" ~; v6 g0 j% E& M- r
end( d) ^- ]& K6 M( U5 m

. l# T+ ^" f  K# q+ l( A$ g, P4 Nbegin P_mB_clean arriving- H6 {; O2 i$ Y; H$ W  ]( G# q
   wait for 90 min
( v6 j. f: g/ I1 L& q: a: g' Y* F   take down R_mB5 E% Z5 c: h5 ]& A( b
   wait for 5 min  H7 Z5 F( P3 [  Y; Y
   bring up R_mB
# g) [/ K: S" N  H+ X" Wend
# h+ ^7 ~0 W5 z
$ d8 _- }$ E5 y: x+ F% W/ rbegin P_mC_clean arriving
: k9 a. q3 a8 }+ o8 R3 F   wait for 90 min
$ j" Z, {3 p! b   take down R_mC
. ?) o6 e2 p8 S+ t8 V. a   wait for 10 min
1 R( b  r" c- O' [/ m& L: Z   bring up R_mC
/ c- O5 Z4 B- Y! fend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
4 @# L3 U5 v/ s: z2 ]/ K   move into Q_wait+ X( s& ~; g5 k
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
3 l9 C: P* N% s* T: f   move into A_w
% y3 b2 u7 s: `4 ]  u$ I( \) Y   if A_w=Q_m1 then use R_m1 for u 48,5 min
' t2 z8 L# N, }( N   else if .....then use ....for u 48,5 min
0 }; I) {' N  f" W% y7 D9 R4 m   else if .....then use ....for u 48,5 min  2 Y: a% I- o# z* m  h& B0 L
   send to die/ D" d# m2 a. Y. m, v7 Y
end
6 G9 R& d9 k* d# r' [5 v9 B, G9 E6 I, G6 m
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-23 17:21 , Processed in 0.011295 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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