设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7321|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 : o5 u3 h5 }# r
* c! B# N4 l0 r1 X
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
2 E; r( }- M, q" I5 y
1 f, v4 @- ]* h$ m; y# ]  J不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
- J$ h! y7 O9 s; H
' L+ s1 |+ P# p% b' m
--------------------------------------------! b4 Y1 F" u$ f& H
begin P_something arriving
8 E: q' C, |+ L   move into Q_wait2 |( F- l; Y& }7 I# p7 P# j
   move into nextof(Q_mA,Q_mB,Q_mC)
- A7 s; n$ g9 N2 U; o: N, U8 d$ o" i   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
5 J- k! k( [9 }4 p- ~  E7 i   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean). T; _8 n" ]$ ~4 G: Q* Y
   send to die5 Z/ g+ [% E3 D. ]9 u( P; y3 y0 e
end

" L! K; k/ i- \1 e6 J( j' L
8 m2 g) ]9 Z  O6 l5 Q' _begin P_mA_down arriving
: s( ^& V* ~$ U( N1 y# _; o& }   while 1=1 do 2 i1 r. C: _7 z/ n5 P3 f3 A
   begin+ m/ b7 i3 c# `% ]
   wait for e 110 min" b, F( i) c, w1 U( N
   take down R_mA
1 _# N% W) k9 E9 S   wait for e 5 min
6 Z; H: @6 k" n  X1 a, u/ z   bring up R_mA  x! y6 l$ g- A9 M, `& `7 `
   end( j* t0 C' _2 i5 p* G
end

* ?% x  X+ K9 i" ~- _: @8 z
2 |  L; q1 y! P3 C$ g3 a9 _5 Wbegin P_mB_down arriving
  |; |$ s) N6 S5 d# {   while 1=1 do
: H9 [' n: [; r/ A   begin, d; L2 F) A) e) T. R3 v# C
   wait for e 170 min
1 `) B( K8 ?$ z$ G" t4 O   take down R_mB
( M5 ]( J8 K6 K6 `1 L& s  p- D   wait for e 10 min1 Z/ v/ P5 B6 E2 U9 j. l
   bring up R_mB
* d& ~  B4 O( D$ V( ^  D+ b   end
6 q+ f* D" G( f( n! Jend
1 e% K, ]7 J7 B  U

) o, n& G( C; s4 D& ^8 ^; Zbegin P_mC_down arriving
: F) S% p  h/ P9 I   while 1=1 do : z* N  @2 L3 e3 \; K: Z
   begin
+ i& }. @& U2 Q6 t   wait for e 230 min- k2 x/ M0 z+ _
   take down R_mC
0 A7 _$ e9 v' E1 Y" t4 F   wait for e 10 min0 a5 Z' ~0 Q$ D6 c+ }( Q7 \
   bring up R_mC: U: Q$ j( u2 ~& B: i
   end
4 g" f7 q# f$ h, }5 {' Xend
6 l$ f5 U5 b/ n) \
6 M) V3 G* v$ q! |
begin P_mA_clean arriving% F- Y# P+ k3 i! m* h' a
   while 1=1 do& [3 s2 s' `0 F6 V' S) k# L
   begin
3 i" J- B: u' ^! b9 ^: i' H   wait for 90 min
  d6 i! c% U0 b( H: |# ^, ^   take down R_mA1 Z- ?9 f* j) L
   wait for 5 min( `$ ]5 ]; v& S4 c8 Q- R
   bring up R_mA
  c$ ~% O% `9 O5 C% v0 F   end- |  V! I/ E" F& v, p
end

* {' n+ @0 J2 x/ ]) L
* T# ~9 F9 C( Z; abegin P_mB_clean arriving
- B7 W: a8 R7 g. o, H( a   while 1=1 do
5 L% }) M9 V" p% T2 W6 z   begin9 O# R* R; d! `6 o$ ?
   wait for 90 min8 x+ F2 z" d% ~. J4 C8 N: i
   take down R_mB
; v, t0 |6 w0 K  `   wait for 5 min' Q7 z% y- g* B1 V2 m6 A) F" q. q
   bring up R_mB
/ Q1 j' [( n+ q   end
  F$ y# O/ t4 e, E& C) g+ Xend
+ N" @  @# e/ `1 m

( h* x5 w6 W8 J" obegin P_mC_clean arriving! u. |6 ]) }; A7 _
   while 1=1 do; ^) o) m' C8 [6 W" G
   begin/ a2 z1 {5 V/ A4 {% A
   wait for 90 min
) w8 m$ n- S: l+ e1 S   take down R_mC
, k' ^( j# i; r# j4 S   wait for 10 min
( l1 S! ?7 W4 W9 ]6 J4 i$ F   bring up R_mC: H$ @: B. z4 t3 H5 ^
   end
* L/ |, F7 q, Z1 Z, cend
' @7 K6 w, d( K" M
----------------------------------------
6 ?" U$ P- \8 _2 p
% F2 T! H1 _: B5 B- sExercise 5.95 g* @$ y6 R4 A" M; [: a
2 O3 N1 L- |' r' {

+ g2 y8 x' I$ a* O3 f- f5 k. D/ LCreate a new model to simulate the following system:
. |! a3 a. C2 d. _( }# b: KLoads are created with an interarrival time that is exponentially
# y0 z* y) P. U  R" l9 Ydistributed with a mean of 20 minutes. Loads wait in an infinite-8 P* a1 f! i. f4 u3 m! r1 C4 f+ L( h
capacity queue to be processed by one of three single-capacity, $ S3 b, ^' w  g
arrayed machines. Each machine has its own single-capacity queue * D+ B" \9 p6 Z/ J
where loads are processed. Waiting loads move into one of the three
$ l1 [% z4 m8 d0 ?+ _queues in round-robin order. Each machine has a normally
0 b' `! {3 q. }" V  T9 k6 ~3 W4 \distributed processing time with a mean of 48 minutes and a standard
# A$ V% I5 _0 u& }9 Kdeviation of 5 minutes.- C: _' g- k+ z6 a9 v
The three machines were purchased at different times and have ) B: g0 b' ~0 U3 @
different failure rates. The failure and repair times are exponentially 0 [" G* y; _9 J# w. b
distributed with means as shown in the following table: * x. j& ~. ^2 n% n0 F6 Y: t4 @7 P
Note The solution for this assignment is required to complete
5 o' R: l6 D( hexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
0 j+ A( E3 ]" f2 U" K3 @your model. ; a2 ]4 F& C  J% M
  c: L, G; F0 c6 S9 i% f
MachineMean time to failMean time to repair
% ?! W" K0 T# I0 C' c0 }+ C' F6 aA110 minutes      5 minutes. X, H/ \5 c) [
B 170 minutes     10 minutes' d. p( F, Y: a+ ^" U
C230 minutes      10 minutes, W! }4 G- u6 Q9 X

1 _5 Z, x+ `& G4 `7 `8 {) H1 NThe machines also must be cleaned according to the following 1 _: X, F, E, d' N+ {
schedule. All times are constant: : J$ d: j  F6 b) M

2 p9 X  C, n+ h1 X& yMachineTime between cleanings Time to clean
# s/ M. J3 U" r& C6 X/ w0 C/ TA90 minutes        5 minutes
) h) j  u; Y1 b  k, \5 P. `B 90 minutes       5 minutes8 g, l$ a: Q( r
C90 minutes        10 minutes* C5 B( m) D4 E6 T# ], A
; H9 E0 m5 b* h2 d) j- ^0 h
Place the graphics for the queues and the resources.
8 J$ a) V) G  W6 S# u& {+ nRun the simulation for 100 days.+ Y- F! u6 q0 f# p) S0 o
Define all failure and cleaning times using logic (rather than resource
) O% K4 W, T: q8 m5 Fcycles). Answer the following questions:5 |8 X) [' V/ o3 c
a.What was the average number of loads in the waiting queue?
: t- x1 H* |+ L* a" C1 \4 N8 jb.What were the current and average number of loads in Space? + w4 B/ T$ o+ i* U# [
How do you explain these values? 8 r6 {3 s& z3 L7 O- A9 I. |

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉- J0 v% G6 \) |, W/ p; Y1 C/ |
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
& z7 c6 f% F) d7 P) T这行好像也不太对,各位先进觉得如何呢?3 _  p1 `- X: w- x. m; b6 _
+ L2 I& o1 o6 l
begin P_something arriving( `: `: W% ?9 U8 H
   move into Q_wait
; i( f& _2 _- @8 t6 X! F, W   move into nextof(Q_mA,Q_mB,Q_mC)
( o. L1 M6 N9 J- N   use nextof(R_mA,R_mB,R_mC) for n 48,5 min4 M) D3 F+ Q- f7 ^  x3 w
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
- }7 v9 u: o9 W" d8 k& Bend( d9 I9 ~6 Z! F! s
# X& o9 d9 R. k: C) E3 _  B5 i
begin P_mA_down arriving
& U5 I1 R$ S$ t8 K* n; j; Z   wait for e 110 min. x$ L' W- n7 L4 a
   take down R_mA! z7 n- O7 I+ J& o# ]
   wait for e 5 min' R  {4 T# B) R7 [! U
   bring up R_mA) q1 w2 ~7 @0 H2 Z9 B% b/ M
end$ t$ F- Z/ n  t

' L! B/ e6 W8 k* b! vbegin P_mB_down arriving
/ y7 C" C3 A5 D5 ?   wait for e 170 min4 ?  W! ^; I8 x1 d9 g- e1 l
   take down R_mB
- X* \* Y# J7 r7 r7 j" C2 q! Y   wait for e 10 min& v/ ^& d, i' j& Y
   bring up R_mB
1 [- p5 W5 [# `end
% a/ |6 z3 g* x/ a! A/ W9 [0 j7 n0 U
begin P_mC_down arriving/ B4 m5 N6 u* M* ?
   wait for e 230 min
1 I+ m/ J6 _; M; j   take down R_mC
  Y: I+ l* _2 @, a   wait for e 10 min
/ [" L) m% s$ q' f* h- `+ s* D3 _   bring up R_mC
0 O4 N, l* N: q# K2 p% fend
$ X; J) c* [( w; s! [
! Y: R+ o! g9 N3 u" @7 L2 [begin P_mA_clean arriving
, [, `5 ]( X% l2 [, N   wait for 90 min, `# u9 W" ?0 E8 Z' c
   take down R_mA
/ [7 L- _: H# t: f' t   wait for 5 min
0 g" Y3 e$ A6 C9 u6 y# Y* v   bring up R_mA9 T+ l& B; h9 r2 m
end/ a- v7 P$ s' e+ o" t

# y. t0 ]1 j( A) _. v! F5 ybegin P_mB_clean arriving
( o+ _! q  D* u; i$ `" J   wait for 90 min* l# s6 Y! x6 b# K& g) B* B
   take down R_mB3 V" h- y: Y, z  X
   wait for 5 min( K  v0 q7 U. o# y$ E, ^
   bring up R_mB
* b( j' D1 V: Y) I8 `end
' o) N7 I5 \) @: ]. @3 Q$ B" W2 m' [6 m3 X$ o
begin P_mC_clean arriving6 {& W; H$ t8 D0 P6 G! p2 ]8 ^
   wait for 90 min
7 L4 P. K! y/ f4 U2 M: @   take down R_mC2 Y" u( b) {" v
   wait for 10 min
3 w& q9 r/ Q5 Y" ?3 G% u& A; z   bring up R_mC! y, s* F' p3 k. _% L
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving, o" t0 ?5 z/ j. A
   move into Q_wait
, u: }6 M7 [2 A! K   set A_q to nextof(Q_m1,Q_m2,Q_m3)
: Z% p5 R: H1 i  t& h8 A   move into A_w
  D" v9 t) q: L& C8 v   if A_w=Q_m1 then use R_m1 for u 48,5 min
; p5 \. E- [& Z* n' n1 o( S& A   else if .....then use ....for u 48,5 min
, u! l. b. R2 `; ^   else if .....then use ....for u 48,5 min  * B, @* j3 x! J0 I
   send to die
7 m3 u+ r) I( ^7 N0 p' g2 ?0 ~end
! @+ i5 Y0 w. |, X. T5 ]# Z* |% H
0 c# E8 C& K8 W  C! s0 @供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-12-2 20:20 , Processed in 0.015326 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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