设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7256|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
! ?" g- ?7 W1 z8 }+ i5 l5 \; v8 J" p4 F" J/ \$ ]
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去! [) i0 X8 Q- f" A
0 j5 F' m' {* B: g
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
9 k: ]/ d5 M5 c/ z1 z  I$ }. m% h8 P) B, O# J- U
--------------------------------------------
, M' n5 h9 B9 `3 b4 ]- dbegin P_something arriving9 Z7 v9 |7 b- x( x
   move into Q_wait. P, {9 f3 t% y; O; _
   move into nextof(Q_mA,Q_mB,Q_mC)
: b$ D% R  w5 }! D   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min, X) N0 J. |& J! e: k! A
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)$ c4 [: g" A4 M5 k& \( v3 j  f, p
   send to die
" L% W; o+ z* Q: V7 N- D# |end

/ A8 q! u- P; _$ @ # Y, ]6 u9 h/ F  _  R9 K
begin P_mA_down arriving- i& w6 [9 P& ], m9 n. I+ X
   while 1=1 do
. C# W2 k" s6 ~+ p   begin! y* |$ v0 V% b7 ^0 b) Y
   wait for e 110 min" U- u* W! N# |$ X( h& U3 t5 q
   take down R_mA
5 O1 ~& Z% k8 E: M4 t   wait for e 5 min
0 ~8 G- q% v& p! c: {% f" y   bring up R_mA
. E( g; @2 ~7 e   end/ m# l3 p  V: ^9 h+ ^
end
# ?3 n1 I/ C) m+ A$ s+ ?) F# D

9 A( T8 k3 X( \; wbegin P_mB_down arriving  y- p$ A# b* y* g$ Z! Z
   while 1=1 do
# q. ~- S+ W. b" j; g2 O$ Z   begin! }$ B' }2 m8 m' a- v% ?+ o
   wait for e 170 min8 A' b  ?9 D& ]+ C( `
   take down R_mB
2 X  K4 b2 H& {+ ~   wait for e 10 min
, O- N# J% w# d& Z  a* e   bring up R_mB
! u. T: n; d9 U" A   end/ e& l4 s% j3 p- h
end

7 _( L" i0 H% p; R9 u& {# C ' C0 x# e" p" A& }6 H1 j/ _
begin P_mC_down arriving
6 ^2 S, p+ Z- n   while 1=1 do 7 v* b2 Q, j( z2 R. `9 E
   begin
, F- V4 w9 \2 a1 E% J   wait for e 230 min% l# S  H7 B( k8 {1 V
   take down R_mC
1 y$ |2 h% F/ _6 @* M8 j   wait for e 10 min
$ z% a; H! r/ b9 Z0 r   bring up R_mC
5 Q( G  u: N9 K; z   end
  K9 J8 t2 s% ~! D' Tend
6 N6 `# S7 b6 `6 x
, v$ c2 V/ c2 c" ~1 C
begin P_mA_clean arriving2 D0 M' J) n, h
   while 1=1 do
; f2 S2 D  ]7 Z/ n3 S2 [! V   begin
( Z3 M5 a6 _) L- s2 v( [   wait for 90 min; `- Z- C' `  R& [1 C! B
   take down R_mA  ^5 Y# ^. }  I; G- f
   wait for 5 min0 U1 g+ _, c, T6 g3 s0 l
   bring up R_mA
& x6 C9 z  H$ K% O$ n   end
' p6 _* d9 n" @$ B- S& Xend

2 a& ^/ F6 s7 U. h7 w
4 Z+ V6 D4 k! R2 q4 [( }% d, s1 k+ }1 r9 zbegin P_mB_clean arriving
/ c$ l+ A2 }' Z8 ?: c% R   while 1=1 do
" K, L/ r' t6 ~! r) u   begin2 z, q' y7 ?6 p( ^% k
   wait for 90 min
" x9 B+ y3 r9 t# X" `, n; ~' z$ ^: a   take down R_mB
7 [* |: L+ F! F* p, f* @   wait for 5 min
* k  f/ R9 E; t; i3 x   bring up R_mB* g; Y7 M2 ^1 C# r& _9 U
   end! h* l2 _0 W8 a# k
end
5 Y- M9 l# b1 c8 `
3 m1 b" z. s# q- T  J( O
begin P_mC_clean arriving
8 M1 q8 o. l. C) l: i   while 1=1 do
- _& g* ?0 p1 N* W8 s   begin
8 |2 z: @  z. m! n+ o" ~, ~   wait for 90 min
7 d! y/ Z' }0 c. u2 l   take down R_mC0 V: k( P9 M& U% j4 l" X% |
   wait for 10 min1 a! b3 I1 Q, ~- G: ~. k5 n. F+ X
   bring up R_mC7 l" R1 S6 M* z% P8 G
   end
! F" ?/ D8 b& s/ r  u7 U1 |! s7 w7 t4 a- Cend

2 U1 J2 a0 z! D% {9 m- S: ~) A----------------------------------------
0 Y) a0 L  ?0 g9 i2 l
5 Q; ?, p) Y% c* g5 ?  M, S6 y- rExercise 5.9" |% \, a+ Q# u9 h" ]2 U8 R9 y7 \
( o" Z; ~# ?; K$ s' I% X+ S5 V3 X
2 D# s0 o, p  G: p; H
Create a new model to simulate the following system:
' I' z6 `8 U# ~2 }Loads are created with an interarrival time that is exponentially
8 C9 u0 ]/ A+ S$ w! X9 Qdistributed with a mean of 20 minutes. Loads wait in an infinite-
; b* M7 Y8 [- V! gcapacity queue to be processed by one of three single-capacity,
  M. a0 o9 |/ Barrayed machines. Each machine has its own single-capacity queue 9 q  _8 [) p8 S6 k
where loads are processed. Waiting loads move into one of the three $ N" I7 z2 h/ f' ^
queues in round-robin order. Each machine has a normally 0 o7 P1 [) [6 o- e7 G1 }
distributed processing time with a mean of 48 minutes and a standard
1 q  F" {; w4 z$ O0 U2 Gdeviation of 5 minutes.3 H% r: i- o' N
The three machines were purchased at different times and have 2 ]- N, p, l5 N  F
different failure rates. The failure and repair times are exponentially # O4 |/ M7 ]1 S# Z+ R) w' _
distributed with means as shown in the following table:
- P& b4 h& I' P! y, ?5 W. z( J; ^4 V1 YNote The solution for this assignment is required to complete ) o. h( t  N; C" j' e9 F
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 5 A. o# F! B2 U# x1 Q
your model.
9 E6 B' d2 W7 G* u3 A" x$ h5 T/ o& q2 x1 F# J3 b) c. a5 B, a
MachineMean time to failMean time to repair7 D/ D  v/ a) V0 k' H& L
A110 minutes      5 minutes% d* h, b' l* ~3 ~- a; l/ p
B 170 minutes     10 minutes+ ?8 i0 x, n" F, B
C230 minutes      10 minutes' I+ q0 \; K  a) K
9 z4 ~1 z( T: T# f% Y: _9 n
The machines also must be cleaned according to the following . A1 X$ Y" v6 F6 p# t3 Q3 X
schedule. All times are constant: ' p! Z3 `' I5 d1 Y8 K& V1 j$ a
' p! `- _8 n4 G2 i2 R' K
MachineTime between cleanings Time to clean( Q. c+ o5 t! o5 Q. T1 D
A90 minutes        5 minutes- s, U8 ]# q" L$ t. f3 `
B 90 minutes       5 minutes
. y1 W3 W' R/ Z- DC90 minutes        10 minutes
- F2 h0 O: @5 z# p4 V$ O2 P* T  f# y9 ^% H
Place the graphics for the queues and the resources.
! ~4 A& d3 N5 n! u$ k9 ?Run the simulation for 100 days.
2 v" C) P/ P6 ^& H6 A" c. R% `2 ~Define all failure and cleaning times using logic (rather than resource / F; {% N2 Z& T$ s0 f6 ~0 _! I
cycles). Answer the following questions:
& Q2 X; ~. r8 i: |! c8 Z3 R* `/ Fa.What was the average number of loads in the waiting queue?
. d. `9 ~; `0 E8 R! e8 cb.What were the current and average number of loads in Space? # ~7 O+ f8 F& E3 b& Z! f! x( ]" V
How do you explain these values?
8 F# u% `0 }: q) w

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
! U% G$ r: F- F# @" D- k6 G( Bsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)/ D& j2 S5 U: v" z
这行好像也不太对,各位先进觉得如何呢?6 b) Z" ~# f; u( I% J# o: Z
$ U$ a& U) A3 W# Q1 k$ u
begin P_something arriving5 i# {5 Z4 t! r( u2 l
   move into Q_wait# M/ J' d; `/ A7 Q
   move into nextof(Q_mA,Q_mB,Q_mC) 4 C' C4 `! z8 ?6 L
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min6 w( l7 i0 y8 a5 A4 J
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 7 {2 r- a3 O1 b6 X) ?& q& z
end
1 Y/ d% O/ c. [. C" N5 ~: f5 e- t/ T) k$ A
begin P_mA_down arriving+ @6 Q0 p7 j: f  K: A4 m. e+ n
   wait for e 110 min& u  W' G& z9 o8 B, k8 l) i* e
   take down R_mA: F6 Y+ i; q; p* |
   wait for e 5 min1 N$ i  v# n2 {7 m! X
   bring up R_mA
- c: K9 A$ ~, vend8 m9 u6 L8 w' c  o5 ?
: `" ^* _* r* @( }* a( U; K8 u6 }
begin P_mB_down arriving0 v/ {4 d- J  p5 J% v) U
   wait for e 170 min, F% E. i8 w7 J
   take down R_mB  u  |$ Z2 u. o8 C+ K/ y- [2 A
   wait for e 10 min
" I2 I5 R$ d9 Q6 c   bring up R_mB1 N7 Z1 p3 v& m3 |: r
end
4 r, U  U4 h: @+ }! T7 k; q" c% @, s+ I% s" q" Z0 s9 f
begin P_mC_down arriving
( s/ ~, }# y4 g   wait for e 230 min* {/ s3 a1 h" I& D
   take down R_mC& K7 @+ ~7 b# {# [
   wait for e 10 min
% t1 b& _5 G$ j& L   bring up R_mC) d8 ]& E7 {9 A, `5 r
end7 d; a' F# Z2 H  R

6 \# F; P' P  X# Y) a0 _+ f( I* `+ ibegin P_mA_clean arriving- o3 K( |5 o+ A8 Y% M
   wait for 90 min9 r5 v( \5 @7 D/ Y0 v2 d
   take down R_mA
+ c1 P, o4 P$ b: K- }  j   wait for 5 min
3 J' P% P2 e6 d: }. o! W- o   bring up R_mA# W8 O$ r3 U% y) j" h
end
. U/ }8 V" C4 P% S* |' z5 i! C- Q9 `$ N  [: ]# m3 f& W
begin P_mB_clean arriving4 `9 {/ P- w* @; p& x) s1 ~) p
   wait for 90 min
! ~9 l# }5 \1 y+ z0 G: i" T   take down R_mB; S4 f$ ~& B8 |8 z
   wait for 5 min. n& L1 q# b9 y6 q8 v) H' P6 P
   bring up R_mB
+ D; s' Z, _6 R0 h: C7 Xend) C( E* S2 N% q$ R, a

% ]$ U% s" L0 h7 Q  zbegin P_mC_clean arriving
+ i/ C" a6 Z% J* K0 f* e7 ^   wait for 90 min
1 ^3 W7 B  O$ U   take down R_mC
7 j) `* A1 w" m4 F1 b   wait for 10 min( L+ O4 S" Y8 ^2 f: D
   bring up R_mC
4 I% C8 C! N/ s, ~end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving6 ]9 X& ]& E, L) j+ C, ~- h, g
   move into Q_wait6 \  N& S% ~- T+ i" M, q
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
. h5 z  ]: r3 p, n: S6 e6 m: P' E   move into A_w8 O, e+ L0 s+ \3 R/ c
   if A_w=Q_m1 then use R_m1 for u 48,5 min  r3 c# S3 x8 \% d" T2 b4 e% b
   else if .....then use ....for u 48,5 min
" D# p# |; E) W* H8 W5 Y, j   else if .....then use ....for u 48,5 min  0 |- T$ ^9 X4 [
   send to die3 T3 `$ ~9 \# v, w3 q* n  E8 W& W
end
' v! M$ D2 z. q; H8 u, o9 o% ?+ {* ?
1 a; l4 j6 a: u( {2 K供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-20 18:37 , Processed in 0.018861 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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