设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6764|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 3 @, f+ |7 D: z9 e# @* L
- a  o" V4 B9 z/ D8 e( w( s" i+ Q
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
% H6 ?1 j+ g5 S2 I# h; x* ~: U7 K3 w. b& p9 S0 }6 }1 m. U: `+ I  l7 G
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
  I( Z' O. F  b% x; z$ Y; {( R4 e% Z! L2 m7 o
--------------------------------------------
! N7 _' X; W, c0 s7 }( Gbegin P_something arriving9 e9 @7 T. r) c) C- E
   move into Q_wait6 p$ _5 Z3 g* @( ~9 A
   move into nextof(Q_mA,Q_mB,Q_mC)" h1 D( x3 J: _+ A/ ]
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
/ u" @, C/ O5 R; G+ ?8 [2 X   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
- L/ G9 u$ {$ R  l% _0 t/ B- _   send to die! _& ^8 `1 _8 z1 |% p
end

. n( Z. N# E$ y" [/ G, G7 H
" Z7 [6 ?' L8 [- ]( Ibegin P_mA_down arriving
- q5 N8 I, C/ R9 U- y2 Y# z   while 1=1 do 2 I0 K" ^7 x/ w( }& n
   begin
: X7 U/ g! I( k& F   wait for e 110 min: M. f2 o, v; b: X3 A7 z4 J2 p0 s  G4 e
   take down R_mA
+ V! H* O* w$ ]# c0 Q: y: X   wait for e 5 min8 L" o6 K3 R' X; C
   bring up R_mA5 y) H. D7 {) |1 g8 N. R6 v
   end$ M# J: s: v2 ~' [2 C/ Y# `
end

& s% e2 [7 s! L, ] $ i4 l4 e* x1 F- m% J
begin P_mB_down arriving
) S* t8 V# b* ]8 F   while 1=1 do- C& \$ Q# s5 }; J/ X& R5 ^
   begin! R& l: m" s: M
   wait for e 170 min" n: F, [' Y+ L
   take down R_mB/ U& u7 F6 R' H. N
   wait for e 10 min
, [  h* l# o" ~4 N, W% g   bring up R_mB
" o, ^! `. Y% f- i& s   end
  [& _# D; t, {2 G% D, u: Hend

' l* }0 w1 k0 x! i 2 g6 S, d  Q' d3 r9 ?: ~
begin P_mC_down arriving9 n- R6 W1 H1 \" G3 i. y7 G
   while 1=1 do
0 J# M" l3 z* i% N2 y   begin8 v1 `  p! D* Z  V: ^
   wait for e 230 min9 p6 M; S$ k( h0 j/ n6 f, V
   take down R_mC+ f  x* }' Z3 _3 b4 j$ h/ x9 Q
   wait for e 10 min
1 d8 X* U: w4 c+ D. V# Q0 y' v# l: e   bring up R_mC: L# s9 p7 ^8 k' ]
   end
, ^- p5 V6 C! J7 j/ rend
- L( `" e' y- Y  `- f; c

- G& U: ]5 R6 I& Fbegin P_mA_clean arriving! v  n4 h! r! }2 F4 k" h
   while 1=1 do
3 H( J1 X( i) f' q. V   begin) d5 Q% p/ q) L& o3 a: }- R
   wait for 90 min
/ g& x' v4 n3 }  }. l   take down R_mA
- a$ N. S  J# [* u+ |/ @   wait for 5 min
0 D; a& l) E8 D0 e5 r- x- x7 I   bring up R_mA
7 |+ m+ b4 N& g0 Q9 D6 G   end
# W, {$ Z2 j1 M. Rend
' o& W0 [7 P0 F. V2 u: g
6 N5 f) J5 s) ~
begin P_mB_clean arriving
% j0 ?* ~. \0 T! |$ ?   while 1=1 do0 s1 u4 O( U& a0 x+ A2 G4 }2 }
   begin  ]/ I' a, d# ?9 y4 r5 q) [
   wait for 90 min
  \2 g! B( Y  X   take down R_mB
) f% V: Z0 [# H9 C9 H* g  B   wait for 5 min
: d: R6 d$ _  ~3 B+ m   bring up R_mB
; I& @+ g, U$ U/ q4 O) I   end
) q- \; b" D7 ~3 x- ]! {end
  C& {+ \1 q) b
% q5 ]9 a# ?' U; {
begin P_mC_clean arriving! ~$ T: f& V  t5 z' V1 O2 C
   while 1=1 do- W7 W& G8 M% p5 I, c/ k0 Q
   begin
, m; e. i2 R* D- u" d   wait for 90 min
; I- A0 c; y, ]4 y7 N. V" n+ D" V* A   take down R_mC  L& Y* w- Y- i
   wait for 10 min  y* N1 ]0 k; b  D& y- k- }
   bring up R_mC. `* `2 y* k; o2 A( W) _! M
   end3 A4 Y' Q9 G& T& ~% N; X, Q' }
end
/ B& p: r* Q/ {. R7 f7 U  I
----------------------------------------# \5 O! b9 Y" m, q* p8 D

" J# a; U1 l, K' BExercise 5.9) d% {# H% L% \, b5 d8 g
+ @, R0 r" D4 ^! e
8 f# O8 Q" L" q0 {4 A2 ~7 R
Create a new model to simulate the following system:
- B/ N- r. G, A. a9 dLoads are created with an interarrival time that is exponentially ' C; F) L3 w7 n$ `* X2 O
distributed with a mean of 20 minutes. Loads wait in an infinite-0 P* t* {5 B) e9 V  I! a
capacity queue to be processed by one of three single-capacity, $ n" c7 ~, a* h- \* O+ l" i
arrayed machines. Each machine has its own single-capacity queue
: ~% I7 V2 A$ K: L- j% [where loads are processed. Waiting loads move into one of the three
3 J# h( x2 s9 m# ~queues in round-robin order. Each machine has a normally ( ~3 m$ J9 l5 o4 ^
distributed processing time with a mean of 48 minutes and a standard ! A5 @! f0 d, p
deviation of 5 minutes.
3 o; _2 P) x6 k4 ?7 n& bThe three machines were purchased at different times and have
+ k7 D6 V4 Y) ?; W* Edifferent failure rates. The failure and repair times are exponentially
6 [5 k7 K8 H3 M4 w; L. d/ {distributed with means as shown in the following table:
0 s  o4 [: b" |) ENote The solution for this assignment is required to complete " D# O( G- V: Z% k; @& o0 b" C
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
2 U* C1 b$ O7 _: byour model.
2 S! L3 j- \/ e1 D
/ O# h( g6 \+ B& T* g8 yMachineMean time to failMean time to repair
/ U( {# k4 H8 I: hA110 minutes      5 minutes
4 ~) P: P; ]& p: ^B 170 minutes     10 minutes
" _8 j1 L- R& S. A" _C230 minutes      10 minutes2 ^+ B5 f% K4 P; O* N  E
! B3 a$ l$ J( F
The machines also must be cleaned according to the following / N+ v: x6 X; Y5 c, B1 W
schedule. All times are constant:
" D  k/ L6 N6 N' m! _3 ?! Q2 v- S- `! t2 p
MachineTime between cleanings Time to clean$ p  Z2 x& h9 g
A90 minutes        5 minutes
, F0 p4 s8 q% d/ l! a9 J+ |B 90 minutes       5 minutes
3 r2 W1 G7 y$ ?2 I, U% v" JC90 minutes        10 minutes
+ E6 v7 U6 b" A/ p
/ |$ E; L* |7 x; oPlace the graphics for the queues and the resources. 4 r/ H9 p6 b+ X; N
Run the simulation for 100 days.
% b# y/ U' G* I5 Q( cDefine all failure and cleaning times using logic (rather than resource ( m0 H- _; m/ v# b
cycles). Answer the following questions:' I0 [' n5 j: ^! {4 D$ ?& G# G
a.What was the average number of loads in the waiting queue?( ?! q0 ?/ n8 l! h! L
b.What were the current and average number of loads in Space?
0 y" h$ s# b+ @0 F4 l5 KHow do you explain these values? ' b- q: E0 ?: K5 j8 l. |% o& y1 ]* B

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
9 N3 \( k1 n9 ?+ Rsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
) \$ T4 G, n- M# y' U- d这行好像也不太对,各位先进觉得如何呢?
' t7 G4 b+ |; E+ Z6 M7 ]% V+ n# W, ?1 C9 a2 H+ U* B
begin P_something arriving
: c1 [0 i! ?- U6 k! o5 k7 ]   move into Q_wait
! ~: `9 s# b  J. w% t& O   move into nextof(Q_mA,Q_mB,Q_mC)
- Z# ]4 \( d) _; R   use nextof(R_mA,R_mB,R_mC) for n 48,5 min/ V! o2 T! D' y- @' {
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) " f4 I$ E0 y8 `* [
end- @- N+ S4 O1 x

, P8 I2 q3 Q2 D7 F: U$ C9 qbegin P_mA_down arriving, N9 b% ]: M; F
   wait for e 110 min
, H3 z  A( ]% A, w9 ~5 \( F   take down R_mA
( n# {. k; c) K1 N$ A) Q; W   wait for e 5 min
9 T& d7 e# ?- h- h+ I0 q. M! B$ q   bring up R_mA* |2 }6 X8 ~9 B
end! ]* g4 u5 _5 [( }2 {6 v) t( z

0 q" Q& G8 M  Z5 {2 M) Fbegin P_mB_down arriving
- E. s9 S2 e& w- c& O! A* m   wait for e 170 min
2 u2 z$ m$ K5 a2 I: [   take down R_mB
9 w5 o5 _7 s+ w# t- V   wait for e 10 min) S- d4 R% ]: o; J
   bring up R_mB+ I/ j- ~$ |$ Q
end2 c0 p: m: q, a0 }- `# v
* I; K3 R+ {  @2 I
begin P_mC_down arriving
; \1 U7 \3 c+ W7 a$ c: d) X. k+ |   wait for e 230 min
5 k" U$ U  h# Q   take down R_mC7 c4 X& h& _  @0 S
   wait for e 10 min
" y5 `/ m8 c) l" Z' F+ t   bring up R_mC/ B! R" o" k' D3 H9 T7 @
end
! o9 |1 _) H0 S1 g! A
& w7 _5 H0 B3 j$ {( ^4 o) o. u1 kbegin P_mA_clean arriving: n$ ]) I2 n4 Y& u7 f
   wait for 90 min
4 B  v4 p1 j+ z6 W4 ?5 d   take down R_mA
/ H% b( V! g- x1 ?, B   wait for 5 min8 g) q# R1 M$ b/ x7 v1 {
   bring up R_mA* e# c6 m$ l) C# A# I8 J
end0 j, n4 y, w% T$ M' K) L  R
8 m" R& G2 f2 r
begin P_mB_clean arriving
! Q1 q* ?! w) x9 C) K   wait for 90 min
6 n9 A4 D- ~4 j% d$ J8 d1 ~   take down R_mB5 r7 ?' [/ N4 h4 i" M% `3 {2 J( @
   wait for 5 min
; j, e0 n6 h& D: s   bring up R_mB
+ V0 e3 {9 x: [end
0 R, B) A/ M" {' }8 D+ ^* `  i  r8 C* n6 ^) u9 {: z
begin P_mC_clean arriving& b2 ?8 b! o) M* \1 f/ j
   wait for 90 min% J  m* N' I/ q  ]
   take down R_mC
' g, v& f% u( r9 l   wait for 10 min
* K% c3 H5 T* z! a   bring up R_mC  ]8 J9 S0 k1 `4 e! e# x
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving8 T% X8 N& {0 V) G; L0 z1 K
   move into Q_wait
, h0 N' ~& Q; E9 q. m0 v5 m   set A_q to nextof(Q_m1,Q_m2,Q_m3)
0 K/ F4 Z& M3 v+ m% o2 V+ _- W   move into A_w
/ l8 B' L+ u8 K7 |   if A_w=Q_m1 then use R_m1 for u 48,5 min5 j  L4 e/ \1 N; M8 u5 A/ A. C
   else if .....then use ....for u 48,5 min
7 T8 k9 o% t9 `) O2 y4 G   else if .....then use ....for u 48,5 min  
* y) b; @& ?- y( ^) R7 L0 D1 d   send to die& b. }. G" k# g" w/ L
end" E, u/ C6 G* s4 v

) t+ A3 K2 ^3 S9 o* D- E+ S& |3 t供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-8-27 09:14 , Processed in 0.012975 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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