设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 5042|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 & W' }4 a" L# E9 H, T" l4 @5 L
, M8 d* d1 @- B: D- o8 a3 e4 o
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去$ m8 H! _$ E% |7 p3 U8 \

5 e5 |1 B' N0 d! U" K) M: X& Y* c+ H不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!& F8 U; g( `# p# Y

' N, \. f" d+ h) a
--------------------------------------------3 V, }8 H7 Q, X; ~; _
begin P_something arriving
1 a( M+ ^2 S5 O; p6 P+ |   move into Q_wait
. B3 a! R9 w, X6 _5 B* A9 f. M* S   move into nextof(Q_mA,Q_mB,Q_mC)3 \$ J8 ]" T, L* \* v
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min8 L/ |+ F. B( L# K
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
% Q# N+ P9 G  K6 o  k- a   send to die) n# o3 n( E  {/ O$ |& v, t$ p! q
end

; S; |1 {  w9 x4 A5 [ 7 @. ]# ^8 p: p' H, K  b+ O3 Y+ `7 L
begin P_mA_down arriving5 O$ ^+ w. A; f8 x
   while 1=1 do
' O' T4 p# p( P+ D1 F   begin& ^( @; q! _) b: _* j
   wait for e 110 min' ~' f( B( ?0 r, g7 B
   take down R_mA- p8 e. |: s( j# j9 l3 `% }7 ?$ f
   wait for e 5 min2 J, i" N; A/ ^9 z( a
   bring up R_mA# |. z" q# A% m, Y2 E( n4 Q4 D8 F
   end
+ g" I5 q8 e- A( U* }% P* Hend

9 ?8 a" N! u$ B6 E' \
+ ]& V1 k& i% p9 a1 i. l5 Mbegin P_mB_down arriving3 H+ T# \$ E) i# i/ p9 J+ j8 e& N
   while 1=1 do" Y8 P6 V7 ]" X- p2 c
   begin
: R0 h; H# z  F   wait for e 170 min
# _1 P: |* V1 ?, U7 X0 |   take down R_mB; g; }' @% D8 E' v  D; q
   wait for e 10 min
0 i- O/ j9 |; g+ r% X+ x   bring up R_mB
+ ?2 y3 d3 ?8 [; l) X4 b   end
6 `8 M% f1 @- L. g9 y- R. E5 Jend

, w5 E" s2 z" v. X6 X, P3 {
% r8 R% X) u6 N) vbegin P_mC_down arriving
, L) s& t; s' N% S# x   while 1=1 do
3 T& w5 N  D- }. H% Y4 `" m  H   begin( b; l: V9 b+ G, I8 ]8 F
   wait for e 230 min# ~5 O( ?6 I# m+ \0 I3 D8 k
   take down R_mC) h3 |' l( f0 i  E
   wait for e 10 min+ W0 H' q2 n# [1 ]5 T
   bring up R_mC$ E9 f' o% d! I" ]( ?3 [- y5 R
   end
  ?! ]! y- n0 U' b+ c+ hend
. R% Y) G9 G/ |, s! C7 o
( g5 k2 Y. }- L9 }
begin P_mA_clean arriving5 }+ P1 G5 L+ W" X* Y: P
   while 1=1 do
  x* D/ Q6 B, |! B   begin
% X& K. c9 V# O/ {# t0 d) h( J   wait for 90 min; d2 ?8 G2 L7 z: a1 Y
   take down R_mA
2 O7 b+ |1 l+ p2 w   wait for 5 min
# z& t8 z( q5 ]6 j( M7 M   bring up R_mA$ L2 x9 T2 M3 v6 s" Q
   end
, j' c2 u2 }0 D! Pend
/ j9 j0 o2 |  D" R$ u9 s
0 h9 z+ l$ W2 B" _( A& z0 m3 K
begin P_mB_clean arriving/ O: p/ t! g( B: e4 }. r, u$ f
   while 1=1 do
' m# j- M7 O, y  Q  m! m+ d2 U   begin
3 l% W+ _4 J! f1 L   wait for 90 min
2 J8 Z! n/ k8 i6 t( ]/ W' ?; n2 O   take down R_mB; ~6 |9 Y6 o% `6 K6 ?
   wait for 5 min
# Y  M9 }( }" g$ v/ h. N! y& U   bring up R_mB" u+ f8 y* K& Z) J, x% E& g# T) @
   end- Q% I* g/ B0 C
end

0 {& Z% s+ u* o
; w1 ?3 o: S+ L/ X1 j# j% C' y1 m9 Gbegin P_mC_clean arriving  w% r! J3 w$ p# y
   while 1=1 do4 S% C) h* J5 j! ^+ q
   begin9 M. y5 v$ h# ?. R) f4 d4 g
   wait for 90 min( E& a; L+ [' F* I) z  Y. f8 S
   take down R_mC' M& D: z  }& M0 m
   wait for 10 min
% x9 x3 ~' B( \2 Q7 {! @   bring up R_mC( c% U! c, u  z8 X  k
   end
, X- O9 E' @/ q& d, a: U- Q: P5 o* Gend

2 q1 ]. @; W: J2 I8 W; b5 I----------------------------------------
6 d- }  L  p" Z: j5 Q/ r& m
' G* X* U/ z3 [2 f; ]% m# W$ HExercise 5.9; C3 X* k8 W6 G; X

4 d' S; u7 C* W1 k7 D  C4 k% H
. o7 p( r6 ~- B6 S3 UCreate a new model to simulate the following system:% x' x0 F, W. b3 R; B* V- c
Loads are created with an interarrival time that is exponentially
( ^$ V7 e' A- Q: gdistributed with a mean of 20 minutes. Loads wait in an infinite-
8 e2 }& u& g5 W$ T3 \capacity queue to be processed by one of three single-capacity,
! o! E. Z2 B- O; ~arrayed machines. Each machine has its own single-capacity queue
: B8 ~, M. G7 F/ fwhere loads are processed. Waiting loads move into one of the three
, ?  y! e2 I8 P) E% F9 h$ v1 dqueues in round-robin order. Each machine has a normally
3 a  [+ P7 l. b( D+ }, ydistributed processing time with a mean of 48 minutes and a standard : z/ L9 ^# y. I2 Z6 E
deviation of 5 minutes.$ \4 J8 \8 C% R) ]% D$ a
The three machines were purchased at different times and have
! c( k4 s  P2 J) _3 I, Ndifferent failure rates. The failure and repair times are exponentially / X! R! O4 u6 t( Q7 J) y
distributed with means as shown in the following table:
1 ^/ C, @& f) R1 ?1 C$ u& LNote The solution for this assignment is required to complete : n) [* W! _! H9 f
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 6 J- Z% m! {" y! j2 b/ _
your model.
, H" q/ N2 D/ @0 W9 G5 N5 u1 n. M3 U
8 K- B; o$ U5 d. t% L; I; w2 K/ A! ZMachineMean time to failMean time to repair0 \% s  Z9 Z, F
A110 minutes      5 minutes
$ b3 Q! H4 E, NB 170 minutes     10 minutes2 M8 Y2 S$ Q4 c# `$ Q) G+ x+ R+ h2 J
C230 minutes      10 minutes/ x9 P- y) w* o3 m7 u' X8 N+ ?

4 `% m2 M7 S! Q( k2 i: @& PThe machines also must be cleaned according to the following
9 ]+ J) [8 ?* t- X8 f5 ^( w$ U4 lschedule. All times are constant: " r; ?1 l% i" g1 c

: y5 o; R, ?+ ?2 b2 EMachineTime between cleanings Time to clean
" f0 ~) W" U$ W5 O- \( f4 A: _' fA90 minutes        5 minutes5 S  x0 `6 T# u
B 90 minutes       5 minutes
7 @* [* [9 S9 c9 ~7 g# R7 F8 IC90 minutes        10 minutes
3 B' J/ |1 z8 b# N6 s- A3 z5 ], `1 Y! g4 }' y3 W1 c: l
Place the graphics for the queues and the resources. - l- i  w" \4 N0 w3 W' Q; \( v
Run the simulation for 100 days.
8 t1 C5 ~7 ?# U% j9 d! p9 JDefine all failure and cleaning times using logic (rather than resource 3 b# b6 ~6 ^. I7 A, N% ~- n/ }: p" V. p
cycles). Answer the following questions:* k0 k4 t& D* n- r+ h% W0 A5 C: x# o
a.What was the average number of loads in the waiting queue?4 z) ]: _/ q% R; }: y
b.What were the current and average number of loads in Space? ) H8 g3 i! h# N  o! w9 ^
How do you explain these values?
, C6 i" @5 Y' q( X0 S

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
' c# \" Q; _% @8 U+ x, |send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)+ p$ D; w! C$ d. T* p& n' u5 M& H
这行好像也不太对,各位先进觉得如何呢?0 \! V( y- e" E; c8 a4 H

( `; r$ {! ?  f9 ?begin P_something arriving
1 c4 l9 K- t, R& `! R   move into Q_wait& v- O* B2 O, t/ ]* T
   move into nextof(Q_mA,Q_mB,Q_mC)
& q$ e0 |0 \( o' J; [8 A   use nextof(R_mA,R_mB,R_mC) for n 48,5 min
0 D+ X! _: B4 A7 `; g   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 0 M5 q! Y  A# E) d8 h
end/ i- y" l( d+ E9 }9 J
8 i% }, `1 q& ^- Z& A* V; @$ s
begin P_mA_down arriving
; y# t* |. x2 a1 W. l8 L# T   wait for e 110 min. m( p" G9 N) }  M
   take down R_mA% m, J# W# l) F4 Q$ M/ i' a  E
   wait for e 5 min
, n8 p. r, K3 ^# U0 ]   bring up R_mA6 ^) N6 s) F+ h4 A
end- x) w3 {. p" O$ \3 Z
. s! r8 N: p+ T( y8 f
begin P_mB_down arriving
7 [( l7 Q: e: I" ^0 D4 ~* i   wait for e 170 min+ ]' O" `, m- n
   take down R_mB$ y7 w$ h! Q. Z5 r
   wait for e 10 min
  u" K4 F, f( Y/ a1 Z7 }% S- E3 Q/ l   bring up R_mB/ \1 ~' y1 t) H3 C+ N7 c1 ~- t4 t+ p
end
$ O  X% X: o  c# d( O( N  V
* Q* z2 S' E8 X& h6 mbegin P_mC_down arriving) V+ J& M' Y* r0 d4 d
   wait for e 230 min! g8 j  W/ M9 Q2 u5 ^, l1 l2 b: Q: Q
   take down R_mC' i+ o! ~5 K' a! b
   wait for e 10 min% p3 c+ Z$ [# I6 e* L) s
   bring up R_mC7 P* `3 y/ F! y+ S0 ?7 N$ {6 J3 p
end
) w% s' i. K! \4 T+ w/ b% v( _) @
& |% N1 ]! y* X! R- rbegin P_mA_clean arriving  m9 G% m% z1 S
   wait for 90 min
& M& I- O# E- `' J   take down R_mA! c1 o! K0 v, [* O
   wait for 5 min2 Q) Y9 n+ \4 C; K! I& F
   bring up R_mA5 W4 S3 v% X# m) s
end
1 Y4 u$ C# W; ]$ r9 l6 w
3 \: d8 ~) ^4 i2 V6 hbegin P_mB_clean arriving
' S+ Z! Y2 N2 B1 x# ~0 T   wait for 90 min/ c0 K4 K, c& I6 G6 U7 o7 A
   take down R_mB. f/ K& [+ U8 ]7 S5 D' I: h
   wait for 5 min5 d; L- `, x8 }4 U) k& ?
   bring up R_mB. Q8 o0 H5 U) F5 u- A- _0 A
end
6 ]$ _6 L4 D: |0 a
% A- c9 F# Q$ _begin P_mC_clean arriving. D  C- b& L2 @, n3 b5 J
   wait for 90 min  Q) _6 e- \' O$ H: p2 N/ r# V; N
   take down R_mC
5 g3 g" N1 j/ @4 A9 g. G3 N   wait for 10 min
- w/ [; ?# p; p4 R0 i   bring up R_mC9 q1 s3 _; A: u, z  w$ a+ \
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
5 M5 I5 h' z: A# X   move into Q_wait
0 _- O1 Q2 l1 ?+ n+ [# X' t   set A_q to nextof(Q_m1,Q_m2,Q_m3)
5 t0 T5 i; q4 Z7 E   move into A_w
' _  P+ X' [  g! j3 i, R4 [   if A_w=Q_m1 then use R_m1 for u 48,5 min
1 P6 _% ]+ r, m$ i8 X. \7 T: m   else if .....then use ....for u 48,5 min
/ t* J) D0 L$ |   else if .....then use ....for u 48,5 min  ; V% c0 n8 B' ^2 ^, {
   send to die$ C8 a/ x6 w9 {- s/ l! U
end
' ]! c5 ]% U& {3 i) @% g: K+ Q/ C& w* i: c* g' T  \% s# d
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-4 12:08 , Processed in 0.014575 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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