设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7282|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 3 x/ V$ u1 j' B" Y0 ?' P6 P  h
4 `5 d; H3 j* S2 O; U* y
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去3 Z) H" M# g; s- J1 ?6 t
3 ?5 l0 [1 Y5 K3 N
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
& y: v+ Q) `% i- v; q* o' Q
' r/ P. ?+ Q: E3 r
--------------------------------------------
) _# N, c6 D) D) gbegin P_something arriving
* f0 L  F- H9 W) [8 ]; P% m   move into Q_wait
4 l2 L# i+ V# R! \: i- u+ L) J   move into nextof(Q_mA,Q_mB,Q_mC)- |# i! q9 W: Q5 N! ]1 L
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min2 V# B( a) c  w7 c! O' a
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
/ @8 Z# y( n- S) c4 D# h   send to die
/ ~+ i9 _: d* qend

4 i/ V  J! T9 ~' z
! l! ]) _. H/ S( T' dbegin P_mA_down arriving
& G- I, @7 f6 {5 a   while 1=1 do
0 D$ e" {: M' v% U   begin( i# ]/ C8 J' d3 r
   wait for e 110 min8 l  m6 r6 Q3 W7 v  @
   take down R_mA; f. N5 g  }  V+ Z: m
   wait for e 5 min
; W5 N( p8 z3 h0 x5 i   bring up R_mA
& y2 S8 v3 f, }5 W. {# {1 S   end
& ~( ]: n9 X% ^end
' k2 }6 X5 h- w( @0 g7 F& I
7 P( {1 V/ ?( S( K7 K# @
begin P_mB_down arriving
& n" U  J/ u1 c. o' }& o   while 1=1 do
! t% A0 D, `7 t5 ^% g# @$ n   begin
8 L$ Z2 \  s# q% O; z   wait for e 170 min- F5 ~, K& X! D! U9 L7 D; W
   take down R_mB
. K1 `' t/ x1 l1 ~- g   wait for e 10 min/ h2 Q; d- u  @' i" H; ]
   bring up R_mB
4 S: N' L$ O) p: i& {9 d* T2 f   end% J3 B2 M& y% N+ Y' p
end

% Q6 G8 r! X8 O ) b- c/ `9 F9 I
begin P_mC_down arriving" E! }8 p/ O( `2 m
   while 1=1 do
. M. G/ V/ B' z1 j   begin2 V1 X) W& h  w- z7 h# A2 W" H
   wait for e 230 min& B4 B* ?' y7 N9 a3 _
   take down R_mC
4 O3 i8 N7 F% w# m6 H   wait for e 10 min
# b' m) n  D4 `2 R' P, ]   bring up R_mC% m: ]" Q/ _7 T8 ^% \) ?% ]
   end; s, U( p5 _3 c0 W1 j/ v0 B1 y' R" O
end

- {0 M' B" }6 s$ N+ M* |2 u3 x 3 `# C+ E. c' `  @2 }
begin P_mA_clean arriving' p  F( t5 V$ |/ e. J
   while 1=1 do3 `2 d* G$ x: N3 q
   begin% l" [* y" J# E. C0 d+ {3 a/ |
   wait for 90 min2 U& m: u! v/ _) s5 ?# K7 w' W+ C
   take down R_mA( J1 @; U! d) {: ]  `! k" P) D" V
   wait for 5 min, |) U4 s+ U9 Z
   bring up R_mA. k4 {) L3 A+ n. `/ m
   end
8 M/ z4 r7 c* P' t- a+ P% \, rend

' ~+ U8 S1 ?" a  |0 N$ x! N6 i * i: h2 V6 P5 L" `, O4 L+ ^7 {* J
begin P_mB_clean arriving
! x0 g- S% n, @. O% T2 @   while 1=1 do- D) m/ J* W; n8 F1 |+ f4 a. {
   begin( j; z5 ?: E( H, O  ~7 C/ Q4 ?
   wait for 90 min; i2 [+ M  F/ s- |" {2 m! i
   take down R_mB$ h0 S! B4 r5 f2 i
   wait for 5 min5 a9 q7 u% k' q- O$ `0 M9 p3 C% i
   bring up R_mB2 P3 F$ v0 ~0 m+ p. A/ F- Z
   end5 [. ~) y2 j! O! u" [! B
end

4 r7 p! j9 f0 I3 c6 K. _ / ]) g. U- r2 U5 Z+ Y! N5 ^
begin P_mC_clean arriving# N& Y9 Z) y% }# P; r
   while 1=1 do
$ O) m: w  {" E0 {   begin
* B" L: s7 t9 O6 V% k* o   wait for 90 min
+ z& R( z, Y5 O% U' b   take down R_mC! [1 |. c+ U+ A3 F& u  j
   wait for 10 min
4 A6 E0 e$ ?, V6 U0 S$ F( o   bring up R_mC
& `# `- o4 e' S" \- N1 ?   end
: M4 G! S3 e& Y  s' r& h, M6 [9 f5 Eend
7 S! {  {4 Y' s" m
----------------------------------------
0 V( s4 E' p3 R- a0 r) L" o3 A
9 P$ v* H/ W' S" @$ i4 KExercise 5.9
" k6 o+ L9 J1 c4 g7 I1 f. _
' x$ p( E& q2 T3 t1 U$ ]& F$ v- ^8 B$ G
Create a new model to simulate the following system:; H: Q, m. g+ q5 O" Q9 n
Loads are created with an interarrival time that is exponentially
3 B" {. d  W4 _  Y" Wdistributed with a mean of 20 minutes. Loads wait in an infinite-! W2 a  p' P! y0 M2 j
capacity queue to be processed by one of three single-capacity,
9 x3 d: h7 j& |arrayed machines. Each machine has its own single-capacity queue % D" B; B" l4 B
where loads are processed. Waiting loads move into one of the three
7 R( Y, r3 W3 l7 Lqueues in round-robin order. Each machine has a normally ' F+ f: H) D. e* h
distributed processing time with a mean of 48 minutes and a standard ; h. b; o, i! R
deviation of 5 minutes.: [& _' }/ L! v! S
The three machines were purchased at different times and have
  |. V. W% q) \  \+ Mdifferent failure rates. The failure and repair times are exponentially
, y7 r( q. t) F: y( r6 S" cdistributed with means as shown in the following table:
! F) ]- y: A! I- Q0 {' Z6 s, GNote The solution for this assignment is required to complete
2 _- Z6 }; Z* _$ D% I" E2 Z" A8 F( x4 Uexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of % P& n+ E+ q! g+ t9 U8 l/ G
your model.
$ ~/ A7 ?7 ?6 A& |2 J' N
+ N- j2 y5 D) |' B6 D! \5 AMachineMean time to failMean time to repair
  K5 K0 k1 ^) q2 q' C/ B. A: VA110 minutes      5 minutes
' D# r/ @9 q# g4 WB 170 minutes     10 minutes
) H8 x* @0 ?3 I* VC230 minutes      10 minutes8 K1 O2 Q0 U6 Z  U. I9 Y

0 U$ u9 p1 t: E8 f$ k# CThe machines also must be cleaned according to the following + N8 \! u- t# |( C  n
schedule. All times are constant: 9 y0 X2 \3 n, F; u" L) m! n
+ E3 L! R" {4 P( T% `$ X
MachineTime between cleanings Time to clean! y) M* H( J6 G! |6 c
A90 minutes        5 minutes
% j6 @2 N) K5 Z0 X# VB 90 minutes       5 minutes7 O2 T0 Y5 U# R8 U5 [8 A' @4 ?# l
C90 minutes        10 minutes  g2 C+ T3 c+ H

7 N8 t; @8 ^0 `0 V1 oPlace the graphics for the queues and the resources.
- {: u' C  r% o" o' C+ E% m: lRun the simulation for 100 days.3 f, B3 a5 Q! X7 ]7 b7 C* I
Define all failure and cleaning times using logic (rather than resource   E% c/ y. l" M
cycles). Answer the following questions:# K/ E/ z8 k& ?
a.What was the average number of loads in the waiting queue?7 c! K7 v  |% Y  Q
b.What were the current and average number of loads in Space?
, n7 F" Q4 {( f" LHow do you explain these values?
, F. d' L6 B4 o  I7 U

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉$ Q$ d* W" F# s  E
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)! F4 J5 d  r2 A* _* r
这行好像也不太对,各位先进觉得如何呢?* D: n3 N( l5 J, S9 O
, ^- T9 p' H+ J" x. U* k
begin P_something arriving
4 F/ b! A" y; |8 }& K" k   move into Q_wait5 W! |& [' U' n+ |2 K9 n+ W
   move into nextof(Q_mA,Q_mB,Q_mC) 6 z2 d& `( W$ @. y) l. c
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min7 k& m5 @3 W% [  p* \8 L
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
/ {: y- }. X% s  Q( Dend5 j  s, Q+ J: p( _4 O3 ]. a/ ?* q
7 k# M9 `0 i- ?( \% {. V
begin P_mA_down arriving
( D' K" @: p& y" Q7 K   wait for e 110 min: [" E4 o$ o# ?$ Y5 Q" b# {1 c
   take down R_mA
" q+ {" W. b0 r# z( p; @   wait for e 5 min! N; V9 I* d6 b6 p, p3 e1 c- t
   bring up R_mA
, s- X0 e( G7 Iend
8 h: O4 ~% S+ K+ v+ R3 l, Y& G5 D8 C5 z! G
begin P_mB_down arriving$ P. y+ |" n7 A0 w; i
   wait for e 170 min6 z3 _8 W8 [2 T3 ?- J- i  y, Y7 X
   take down R_mB
: G" Q+ I7 w: x9 M' X. d( E: k   wait for e 10 min* q% l* D* x% [8 X$ _% i
   bring up R_mB8 Y: H/ A" W- ^8 \! l
end8 c; {5 m( |" g2 ]9 `7 S( p
; P% S$ `& }" l: }( _
begin P_mC_down arriving
* [1 [. L) W* @; Q5 Q. E* [' }4 O4 O   wait for e 230 min& F; I0 K: p0 M  ~
   take down R_mC' L1 R* R+ q7 r. H* _  I
   wait for e 10 min
' C4 o5 u( ~! s' e- p   bring up R_mC) n  ?$ s9 H: n6 P' t% |
end$ ?) E, U) N' ]; j* \

* J% \; r$ R- R; |6 `begin P_mA_clean arriving" U+ t4 d2 G3 r4 H
   wait for 90 min: P5 h% V$ D! E! ^8 N, W
   take down R_mA
4 {/ Z7 E! Y7 G! A; c6 j6 z   wait for 5 min/ S- b9 t" _( K- S* E
   bring up R_mA
% d, ^) b  f; |6 P4 I5 \end, D6 q2 A4 m  u% |

0 A$ J7 B9 M6 Z1 W; x- Ibegin P_mB_clean arriving8 V9 S$ p) g% A! j) D+ P& B. M% [7 ^
   wait for 90 min
4 p, s! d& I2 n+ `4 }- x   take down R_mB" v. x  g2 b# M; c
   wait for 5 min
; W+ [& d+ `  ]5 ?8 p5 _9 X% Y   bring up R_mB" d# a$ j" U# w+ r
end6 G6 j1 R- ?& U3 v' A' S
: ~; ]6 f4 e6 c
begin P_mC_clean arriving
9 b( J+ E1 Q: L7 b   wait for 90 min: @3 r5 f% W: k1 P& G0 h; o) _
   take down R_mC
& |) P6 D. W; v& p& C   wait for 10 min" s' B; k# K9 U+ k5 t1 V
   bring up R_mC) w, m$ x% b& R+ N4 L
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving0 S0 C; m/ m* P  ]! h0 E* P; I1 L
   move into Q_wait8 @' }7 }! _* Q+ H/ \
   set A_q to nextof(Q_m1,Q_m2,Q_m3)8 Q; p4 A" N9 r( G* W* l) z
   move into A_w( i. o% T% Q, z# q* R2 m8 M
   if A_w=Q_m1 then use R_m1 for u 48,5 min+ j, W( f& j4 V9 Z9 ~' q
   else if .....then use ....for u 48,5 min# [3 C& e* R; z; j! u) L+ p! \+ C3 Z
   else if .....then use ....for u 48,5 min  
9 n4 y+ q9 ]/ k' }. k, x$ B' R8 i% c9 v   send to die
; z3 m8 l/ U2 X' Z( O( X0 w; Kend' B% E. a2 A) ?0 E8 }( o* [* Q5 m  A

  C4 j9 G2 i$ A/ p供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-25 04:13 , Processed in 0.018449 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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