设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8069|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
5 ?3 V$ ^% n  j0 J, D9 R; v, [* `) r* N$ q
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去/ n) o; F% b3 _4 W" ~

6 l  l- a+ D% c- g8 G+ g0 \不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!% ?4 n" r7 i2 t$ q) r

9 p* W  p/ |* A+ x) ]4 n, R) L  K
--------------------------------------------
6 F5 ?, o' H/ T0 u: p# ybegin P_something arriving
. O' v' K7 O% t  W1 D   move into Q_wait8 x9 S4 ?% v! b
   move into nextof(Q_mA,Q_mB,Q_mC)
; Z- C! C! Y% |! M/ ]" X   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
" C, T4 _* j; o4 `+ M; F7 {   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)% \3 ^. v4 Q' S  b- M; r6 Y5 ]
   send to die3 Y4 P4 D% a! G  J. s7 \
end

6 _* x% \3 ^2 x/ h
; N" c; r: Z9 Kbegin P_mA_down arriving1 A, {& x0 K( ]
   while 1=1 do
+ s% H0 M7 s$ d) X   begin" m& \& `8 A; E/ v  E  Q6 h) J
   wait for e 110 min$ o  ~6 v- m, n* W
   take down R_mA7 \. a7 ]8 b; o( O
   wait for e 5 min+ c* C$ B; Y  [
   bring up R_mA( K+ K1 I: j8 I$ E: n% l  l9 ?
   end2 z, i1 X2 E( l
end

: }$ y& s4 T6 k
7 F( b# O: F0 s" J- [5 }+ Obegin P_mB_down arriving2 O0 p5 m( x; ~) Q- ^' \
   while 1=1 do
1 B. }8 A- x; h6 I1 e! f% a" X1 B" H   begin( @- U/ k2 p0 N4 f7 |
   wait for e 170 min
) L4 h  I$ M  P* t* P  ?; R6 s& c  h   take down R_mB
! A7 A. u/ \, h: q  a2 D- X) Y   wait for e 10 min5 k$ [3 T1 p* I. k) [
   bring up R_mB
# D8 }5 W6 ^# `8 S/ g$ @) s   end
3 q) V& y0 E! [3 ~' Nend
) j( d( G' O" e; c5 X% A/ v

4 e$ Z& P) L3 O+ _begin P_mC_down arriving4 v* V% C2 j4 g: n5 @  I, \
   while 1=1 do
  c5 @& K; w5 n5 ~   begin  J6 m' ]& ~3 W5 w1 q/ u! R: Q
   wait for e 230 min- Q! d: j2 {& C  V# v- C/ h2 g4 G
   take down R_mC4 A' ^7 V6 x+ H7 X) X6 m7 g
   wait for e 10 min
+ d2 j: z2 t$ n  W; ?* O' X5 N0 J   bring up R_mC, z& D# U0 b1 l1 T( }; _. ]
   end
3 F! u) d4 E9 K, a1 P" h8 iend
) ^: e& ^) k. |; X4 E2 N
- ]  e9 z$ p& Z
begin P_mA_clean arriving
' F" q: \; y" W+ E8 }6 V   while 1=1 do% c, W6 W% T" v1 u
   begin
# E- e, L: o4 D# B- a+ w7 T   wait for 90 min  t3 }: o) R8 Y% o8 \
   take down R_mA
1 R  r7 k4 ^& \* G7 ]   wait for 5 min+ ]% q1 {* Z/ r' }( |
   bring up R_mA
; ~1 S# S1 @/ ~  _& c7 r- D   end' ^7 a2 j2 c- W! \
end
+ O' r2 ^( b# `# Q

' q! r2 l, M0 I5 v$ a- v6 H1 P+ ]begin P_mB_clean arriving
1 _8 `& K( c* \- z; N) F' g   while 1=1 do4 w* O2 s0 A8 V
   begin
6 r0 H- u/ A+ D  f2 _   wait for 90 min
! a$ K4 ]7 v( `! Z- F, s% P8 Z   take down R_mB8 w; @% q" I+ s7 ~/ U
   wait for 5 min
3 Q# {# J0 U0 [" W   bring up R_mB0 n; F$ s3 k/ [; F1 ]
   end9 n- Y! r, D6 v1 Z+ G3 H1 J& b+ K
end

& ?7 `8 A/ e9 a& Z: ?
* D" J2 A+ q* _# C( mbegin P_mC_clean arriving
+ V# G: p1 T9 S; n5 X; [8 O   while 1=1 do
9 {5 U" B! w' B5 D. f, D- [; `   begin$ M) ?, z) C# Z9 A6 v5 n
   wait for 90 min- e; E7 J. d  J5 r& \
   take down R_mC
3 I/ N5 Y# @7 E) |; \   wait for 10 min  O" `. y" q* m8 ^. x8 N1 G  q
   bring up R_mC' W$ u1 y# Y" [2 K
   end" k" [# a4 S4 F9 X8 G" y% U$ u
end

0 R5 w/ m  V. q) W----------------------------------------
) c% |7 r- v; F - {1 b$ [  x5 u- d5 _" Z
Exercise 5.9, D* \2 v, N  f' d, L" G

; W& S( [: K) s4 L2 V0 a* O9 _3 k, D! V& i
Create a new model to simulate the following system:
. ^& \; I9 r) n4 KLoads are created with an interarrival time that is exponentially 0 J0 i( O, ~3 l# {% j7 J8 Q1 i
distributed with a mean of 20 minutes. Loads wait in an infinite-; D' A; o6 Z1 d! g
capacity queue to be processed by one of three single-capacity, ' U; S3 X/ o1 D! ^4 w
arrayed machines. Each machine has its own single-capacity queue
+ {7 x) p4 }) v  M% fwhere loads are processed. Waiting loads move into one of the three
" k4 k" K" C+ c$ equeues in round-robin order. Each machine has a normally ) w5 c4 Y3 }, P; I
distributed processing time with a mean of 48 minutes and a standard 3 \  m3 ^  K; Z. R& `1 P
deviation of 5 minutes.1 t. p1 J  C2 p
The three machines were purchased at different times and have 1 i7 V1 G; v% G2 g
different failure rates. The failure and repair times are exponentially
) P! X' z4 a% Qdistributed with means as shown in the following table: 6 N/ j! q& W  U( i* f' ~* L
Note The solution for this assignment is required to complete
9 h3 a1 v! l$ L: T9 F( M) E  nexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
' ?  Z& ~8 @( Z  A  B9 q4 w. I0 P  @' ]3 Dyour model.
( Q, T! W$ G# L
" w0 J4 N% i+ a. B9 HMachineMean time to failMean time to repair
( }  v" Q, T( U1 c- BA110 minutes      5 minutes% z0 A  @- S, b0 h
B 170 minutes     10 minutes
0 r6 Z  g0 P5 D+ _2 q+ cC230 minutes      10 minutes0 `, h$ K9 _- \9 P& t
  o" V( f6 z( v1 b- {! N4 V
The machines also must be cleaned according to the following - G; I) a: N5 Q8 b& d. c. }# A
schedule. All times are constant: / b3 B- z+ T& }2 q5 R" L3 i
' f5 Z* }. G7 ]+ y& ~0 p2 i; ?
MachineTime between cleanings Time to clean' N* V1 r' x; a
A90 minutes        5 minutes- D6 W: f# |! F/ x
B 90 minutes       5 minutes5 `1 y# i  m5 e
C90 minutes        10 minutes
. S/ `0 p! T1 `% c0 U" s$ `: ~2 g9 R7 q) g$ w6 U5 _( U: G; `4 f$ ^
Place the graphics for the queues and the resources. * w* R# v+ d/ H$ m8 Z" {
Run the simulation for 100 days.
! I" b& d6 h! f( [7 sDefine all failure and cleaning times using logic (rather than resource 2 h( t5 S* V, K4 w2 R6 P) ?
cycles). Answer the following questions:+ w. O3 R7 f9 {# s8 s" S
a.What was the average number of loads in the waiting queue?
9 t- P1 [, }) @5 \: gb.What were the current and average number of loads in Space?
, Q* c' d3 s, p; ?2 [% WHow do you explain these values?
: n4 j" J# J  \; C

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉  O, A& i6 E; H7 H1 i" c8 o' d" F6 S
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
' c; \" p: n  ~! D7 ^+ h1 Z. ?这行好像也不太对,各位先进觉得如何呢?7 M1 ?0 Q( {) h2 i
' c) s0 y$ W' w2 o3 W. p
begin P_something arriving
: }8 j1 Q) A4 d+ J   move into Q_wait
7 C9 m) ]' H; V" \   move into nextof(Q_mA,Q_mB,Q_mC)
' r/ y# x! S- J+ G/ y+ F( F   use nextof(R_mA,R_mB,R_mC) for n 48,5 min+ U- A( `# X. j
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
: p7 X8 b; \" |6 L; t. D8 Xend
1 H, \1 Z& p$ ?
, k8 i  @- U" W" T0 g2 ?0 U. i+ e; ?begin P_mA_down arriving
. c/ p' S& Y/ b3 N; q0 u   wait for e 110 min
3 V1 t! b3 r" m# k$ [: i) S( N   take down R_mA
1 ~+ B- a3 o) N% E) k/ ^   wait for e 5 min+ F" e* b8 ~, n" P* I: S/ X6 |9 {( ], l
   bring up R_mA' B. l) W4 K  a- }" R; M3 q
end* L8 O" q9 i# s) Z

7 J, L) ]! @" f% A( L) \# N  Gbegin P_mB_down arriving
. }, T* c/ i: N   wait for e 170 min
, t  \4 N% D( k1 ~+ n& J   take down R_mB0 e$ [- N2 L  q
   wait for e 10 min
3 Z& `' @* m2 S. [# N   bring up R_mB
; p1 s6 a% ~) W0 Gend
% g9 {6 ]/ B3 o1 Y5 L& v! |$ ?+ k
$ B! k! H  u4 h6 p: g. b8 S( h4 ~begin P_mC_down arriving
# _/ a9 M0 [( S; p# L   wait for e 230 min
/ i: B* d- |( q8 C; w8 ?   take down R_mC
4 D( i9 v: z9 \   wait for e 10 min
& {! Y* W. V. R- `( I' R   bring up R_mC% i. f) k6 y6 i( {0 H
end
! l; h- [& E  d/ Q2 O+ L) [4 y* T# t6 Q
begin P_mA_clean arriving
+ V5 N8 l5 L* i$ m+ [5 F8 q& D   wait for 90 min8 ^. m/ P  Z& s% e' F; C: D( P
   take down R_mA4 e) P4 l4 Z; _5 h* g: H
   wait for 5 min( v6 L+ e2 c- r/ d
   bring up R_mA! J$ M# W7 I* [- i8 `- W
end1 b' t- X: a2 O/ l. L$ ^8 w) l
& D  O* i( @8 k, Z5 ^
begin P_mB_clean arriving
/ Y% j! D; R# k/ _  [2 V) v   wait for 90 min5 k3 N; V" Z; U2 p- [
   take down R_mB; t. M$ f  s* C% ^0 E% n
   wait for 5 min
/ ^- l2 K- Q4 _0 |& _   bring up R_mB& T0 `. l9 M7 x$ _
end; V, y* ^! D6 N! p: D5 A( }
, z/ c0 Z; T' k9 q
begin P_mC_clean arriving
+ F( `+ ^8 N' i! u3 e, g% ~   wait for 90 min+ A" j, L8 {. u# H
   take down R_mC
. P3 S7 p( V6 E, H) J8 X6 T+ i3 g   wait for 10 min
8 F/ @( ?0 R0 O/ o% [5 j* O8 G   bring up R_mC
2 M3 G: D+ c( p8 Y+ m0 Z0 P; @) A5 Oend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving6 e7 D) W) C; `, M% Q7 L8 b
   move into Q_wait0 q- p: @7 G1 [% @9 q# p
   set A_q to nextof(Q_m1,Q_m2,Q_m3), s. e+ I# V- g# U9 c! w% a. A; G
   move into A_w
* V8 Q4 l8 a6 h6 @$ R/ i$ |   if A_w=Q_m1 then use R_m1 for u 48,5 min, B; ^8 d. O% D  ]
   else if .....then use ....for u 48,5 min
: l% N* }* a+ y! K   else if .....then use ....for u 48,5 min  ( U8 o2 t5 ~, c; o+ [% L
   send to die! E$ ~! l8 y, J7 F2 X6 k7 c0 l" R
end
6 t3 J8 R6 v2 ~& I2 A0 x: n- _+ I! u. l1 \
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-6-28 06:05 , Processed in 4.698624 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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