设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7203|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
, r$ w$ _0 p. F0 {) q, x" k2 ~/ y1 X8 Z- T, @( x& A6 O
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
+ B* A0 R& X+ L# [, w
) y1 N! F) X# ~/ Z3 D0 x; ]不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!  ^& x  T3 Q' t9 t$ @0 B

( n0 H5 h3 i, \5 L' m# e  t  z
--------------------------------------------
! \1 K5 m. ^  R8 Ybegin P_something arriving, x; I7 f) l" P1 s& ?* o
   move into Q_wait2 m. o# _, j# l/ K/ d  P+ @/ `8 [
   move into nextof(Q_mA,Q_mB,Q_mC): J! E8 U' m5 s
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
4 p% O! @2 n8 L; ?7 u6 H3 w+ L   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
; c# S9 e4 a- j! W5 F   send to die
8 l- H) x) z  }0 D- eend

" N& _# H4 w0 d: q1 Y+ U $ N5 d  M: m6 S. {9 i' P
begin P_mA_down arriving
6 q9 c* y" ?3 G! V& P   while 1=1 do 3 U' ?" |" F# A, ?+ R
   begin- i5 x: |+ G! L
   wait for e 110 min- M/ V- X* x% [% I, A$ _
   take down R_mA
! y9 G7 ~+ N( R: ]8 y6 y   wait for e 5 min
. c9 G0 \" H1 f" B! T& y2 |1 T   bring up R_mA
- U* {! Z3 {4 D  y- ]/ v' l9 ~   end. e5 c6 I) S( T, u
end

7 C4 O1 q- F$ e5 o! C: ]. V8 r
/ q+ E% ]8 f' ?2 l. _begin P_mB_down arriving5 }% z1 I+ ]. g5 \# q2 l% ]5 q; I' |
   while 1=1 do
: Y  ~3 t( J6 P1 a+ F; L   begin6 ~* l* E' G# b* O( c1 O
   wait for e 170 min
. Y8 B* Y; w$ ]4 D! p/ n   take down R_mB
1 N; V- V6 m8 G   wait for e 10 min
0 }' L5 Z/ S3 y5 v   bring up R_mB
& f/ n' b0 m4 @* `   end; s0 t  W6 H: ]- B5 o& ?1 H7 y* x
end

, Y7 X0 ^* X4 o7 R/ e. K ) d, ]/ E/ T/ N2 W
begin P_mC_down arriving
6 T; b( O3 h/ s& D   while 1=1 do 2 F$ v9 s5 Q5 m+ H$ K4 Y
   begin& O. T1 c( ?+ ?9 z7 N
   wait for e 230 min
) v* T4 Q3 B7 C9 C5 U4 L- ^   take down R_mC
# `1 M+ o' i: C4 ^  |# L   wait for e 10 min4 u5 {, u& l' a: Q! A) \& j9 m
   bring up R_mC
6 \, a* F% W' a0 ^" t* w0 F   end
4 E% a6 g8 j+ H! [; bend
( @( a* A- g7 z7 k+ D: _* F; ?
6 l$ c! r5 C- P9 t& K
begin P_mA_clean arriving, h5 P! o' F" V' I4 O
   while 1=1 do
5 L: y5 v5 V- T   begin* _3 r$ }6 b4 {/ p' P
   wait for 90 min
1 I( o, L4 J  @- S   take down R_mA
- ^% E3 d, b) D+ v; `* L& N' x   wait for 5 min* P6 h( S4 \- w# o
   bring up R_mA4 G4 O" S' ^; _) h# }
   end$ M' X- T% y5 ~- r  g( M. D
end
9 I7 ~: w9 O! N# y* _3 p, M

1 ~8 d5 [! w5 d* O# a2 L  fbegin P_mB_clean arriving
1 ?) ^$ M/ b0 h* N3 j   while 1=1 do
- G6 d2 ~0 Y# J7 ~) P/ a   begin# j* H) E+ d, i
   wait for 90 min8 ]: `+ c* S7 k8 H
   take down R_mB# p! B# ^) B2 w: I* ^, _$ s( i( z
   wait for 5 min
* T0 _, j3 c$ w" g   bring up R_mB# f, W5 F6 a  D; h: Z
   end
; y2 R( }- _% ]3 p$ Y1 Nend

' \' L* h! f9 [& @  o4 a
" T5 f; _2 W9 g8 i+ E0 N6 ~begin P_mC_clean arriving
% E$ E4 |7 e4 u0 e5 v2 S   while 1=1 do
1 s' O/ D6 T8 v2 _   begin! K  ~: n4 C7 B+ V, E% {/ E
   wait for 90 min
+ M" }; }& U9 z$ \9 T9 v+ G) ~7 j   take down R_mC: t/ t) i% ^: y$ k5 F
   wait for 10 min% }8 m* c9 U7 U( |
   bring up R_mC
; T% g, f4 W: n( j# h) q! J2 k   end
, H; t% y9 x# S, }! E$ Hend
# ~* A( S, ]# v2 }/ F4 E+ Z' f5 w
----------------------------------------  p& O1 Z8 j, {

5 R2 _& ~" w3 v6 n( c( S! \7 @Exercise 5.92 O6 p+ R- R, o6 r) ^6 L

# a) b3 y/ P9 h+ I( {1 P+ i* v' |' `1 x/ h% ?1 |
Create a new model to simulate the following system:
/ `4 U# y9 o' [: t6 ~# }Loads are created with an interarrival time that is exponentially $ g6 j" i2 C  H  V
distributed with a mean of 20 minutes. Loads wait in an infinite-6 Z: o3 C: @# ^7 Y4 A: y' b
capacity queue to be processed by one of three single-capacity, % J2 `" e$ E; X# O
arrayed machines. Each machine has its own single-capacity queue ! {4 u+ I% _# |3 Z
where loads are processed. Waiting loads move into one of the three , @, L7 S& L' b* P
queues in round-robin order. Each machine has a normally 1 v) s& |, x# E$ r8 c
distributed processing time with a mean of 48 minutes and a standard 4 W* h9 n( q! M8 k2 M
deviation of 5 minutes.3 ]* i7 B5 [7 L- K- K) @
The three machines were purchased at different times and have
, T* e& t. o7 R+ k5 L: Kdifferent failure rates. The failure and repair times are exponentially # n9 A& q# g/ u6 P% E
distributed with means as shown in the following table: 3 X) @  V" o0 `, z
Note The solution for this assignment is required to complete 5 ~5 `3 z% k) a3 n
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
) s* b8 D' k8 }' uyour model.
# }9 L* ?; M" y& v; t. I
  I; h5 V( @( S# b2 ]2 bMachineMean time to failMean time to repair
% p+ Y# M0 G9 V5 {- P9 IA110 minutes      5 minutes
, ]/ d0 i/ F; A! ]4 X( D+ J2 l: UB 170 minutes     10 minutes# o8 G* L! C, i  X5 }" }% o
C230 minutes      10 minutes
) K% M& t9 p* q6 B
% S8 m4 P! M. F5 _The machines also must be cleaned according to the following 2 h) _* E& r& h( }. d8 w
schedule. All times are constant: ' m3 a8 p% g. O% [
4 n. U& G6 z" H7 }
MachineTime between cleanings Time to clean/ o7 n$ h! U1 c0 G3 O6 T2 Y
A90 minutes        5 minutes
( L* R! E) g7 ^- H/ h6 m+ PB 90 minutes       5 minutes
$ D: `$ f6 _+ uC90 minutes        10 minutes
, s7 N6 j( ?( \- ~3 d% Z( `6 k! i, y8 @5 @6 Y- c6 f. C: Z3 x9 y0 k
Place the graphics for the queues and the resources.
: I- u) ?" c  v0 k2 X7 X* U5 u, CRun the simulation for 100 days.
8 F$ {: q. J& J' j$ z3 K( d7 [Define all failure and cleaning times using logic (rather than resource
0 s8 r& X# u2 @# w1 hcycles). Answer the following questions:
) P# L& [5 z7 x# A6 _# |9 b& _: Ka.What was the average number of loads in the waiting queue?
: w1 c% U/ [3 m8 w) @b.What were the current and average number of loads in Space?
2 i! t4 \: _4 E' r  y: s+ mHow do you explain these values?
1 t. T/ X; v$ z" T# ]. o

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉: \, {  Q+ D9 a/ w0 i
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)$ x" t  Q/ A/ f6 y6 Z; f
这行好像也不太对,各位先进觉得如何呢?
& w* K" i! Q/ ]( ?, E3 b
% V' A" s- L: N* Q+ T: `begin P_something arriving  @' a1 B/ D6 H# [1 z2 {
   move into Q_wait6 ]# F- P+ n% u  X2 W+ k2 Y
   move into nextof(Q_mA,Q_mB,Q_mC) . L! {5 I3 a# g) i& w: ?. m# c0 [
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min0 n4 a6 ^1 _) d) a
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
) i& s! d, \. B) B  jend
& F0 z4 A9 d  w' h
- ?) B8 a3 v/ Z1 Z' R  Obegin P_mA_down arriving. h% |$ R; ?: p4 M& t; ]
   wait for e 110 min
# ^- w( Z$ v- S8 G7 K   take down R_mA
/ h' H! G) w2 R+ Q+ l   wait for e 5 min1 q2 P: m) ?' n
   bring up R_mA
  U: h' F! O& ]end
# v3 I+ [3 f2 L* U/ y! P) w( e1 o! S$ L) f
begin P_mB_down arriving
" q1 \) B  _/ j2 E) ~8 V+ L: p   wait for e 170 min, O7 v1 L3 {5 w
   take down R_mB
) @% c6 U1 J' _   wait for e 10 min
! J' m( n7 V8 u3 r6 \( ~- i   bring up R_mB
( B& j# t4 _  q( E. P; R" Qend4 H  p. @$ F* k
7 ?2 w0 |* M% T8 s# D
begin P_mC_down arriving
* l4 T% p: Z. M8 F  X- I+ w8 B   wait for e 230 min
5 @( [1 F4 K' r/ A$ g( u   take down R_mC. {6 |2 y! f7 m
   wait for e 10 min
9 |( c# b( R' A; S# H  {   bring up R_mC$ F% ^& ?* x/ p; Z; F1 n( ^
end
- c: I( y+ h3 J) a0 Z
& C2 K2 |6 f" }6 Z" pbegin P_mA_clean arriving. q+ |- I' w; B3 G
   wait for 90 min
# A+ f' b3 w8 b+ w1 r% T   take down R_mA9 C- W" }+ Q$ E, v+ D% u
   wait for 5 min
9 J. T. b2 [8 [+ c   bring up R_mA+ Z  `* G: }# M8 `
end
8 S; x: n; j) t6 [9 {% I  v! A
" b4 l: p, `3 _- Zbegin P_mB_clean arriving
% R0 Y3 `1 F  e& l6 y& O8 n+ p   wait for 90 min: C2 ?4 q: e1 K# o5 }. l+ l( }9 g
   take down R_mB2 Z/ o, `4 n( f0 M
   wait for 5 min7 \; M+ t( L9 \/ l6 K& U
   bring up R_mB7 p8 Q7 ?+ ~1 L: z9 J
end/ ?: y% R# Y) `; g+ g

$ z$ e5 U4 d9 ibegin P_mC_clean arriving0 Q/ t3 m$ p9 y5 z' I8 f" h* y
   wait for 90 min' P+ K' p6 ~! x( Z" S& ]
   take down R_mC( G8 n) M; m# R# I
   wait for 10 min
; }0 X4 f* x+ u5 ^   bring up R_mC9 L- I0 F: [% q% P
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
3 C2 T- s# m% j8 \7 V6 e   move into Q_wait
" ~: X3 l6 v% S' f   set A_q to nextof(Q_m1,Q_m2,Q_m3)
9 `8 p: B# m: S6 B. b; J   move into A_w
  K+ x6 {& O7 ]! F' B5 y   if A_w=Q_m1 then use R_m1 for u 48,5 min& L1 b2 }- Z3 X0 x( a4 U1 ^  A
   else if .....then use ....for u 48,5 min: x- \$ d: @5 D) A/ V
   else if .....then use ....for u 48,5 min  7 `2 O6 o2 j1 r- G4 T
   send to die
0 W8 Y/ r+ a" E8 a4 Qend
" g4 K' n  F9 q$ c, K  _1 U' J. R/ x8 G. a" ?, t  @  S6 Z
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-15 00:29 , Processed in 0.014378 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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