设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7221|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 6 x% G" b; @& N0 `9 k/ H
' t9 Z  e3 q0 ~" \' g$ K
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
$ a, F) I3 O7 w1 D3 X' r# Z+ _/ ]) U. K+ M
不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
. A1 B& k( z% ?4 L+ @4 [* J: Q
! k& w" ~, Z- m$ \. K! d
--------------------------------------------3 p; _/ U" U! C1 U
begin P_something arriving
+ L% f% `6 z( B/ q" P8 C! @   move into Q_wait. H! F, E1 ?+ ?7 q* v/ y
   move into nextof(Q_mA,Q_mB,Q_mC)5 W9 i: [: i* @1 k  O
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min4 M( w0 @3 t6 R4 z( _+ I0 N+ F6 y
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
" D0 P9 A( [5 l   send to die
1 }2 w4 B; |7 E3 iend
# E0 [1 P; N0 a; Q# s) K; F
6 y6 h9 `$ Z" e- F: ^4 {! o
begin P_mA_down arriving
$ w! V+ {8 i5 Z   while 1=1 do
8 v4 \3 ~- u$ m2 p* V, ~   begin9 n5 f& V& N  T- x9 o
   wait for e 110 min* `" t# A9 _3 V
   take down R_mA
/ H2 a4 ~/ y& o9 D   wait for e 5 min, Z& z5 Y' y5 w8 t$ k3 L, j/ b1 Q
   bring up R_mA
' f6 v& r0 S' n7 J0 Q   end
4 @; E! ?2 u+ h( I1 [1 Xend

, h  `# l# q% _# c$ N- q" y. Z
4 ~* k& a& {3 b, j7 vbegin P_mB_down arriving% X- ], k5 c# G! v; c) N5 c
   while 1=1 do# p& U1 [  ?, D$ p# [1 t) M6 k4 F' Z
   begin
# |8 v* Z5 i3 V0 X   wait for e 170 min3 J2 _" t7 k9 d' Q0 T, f8 p
   take down R_mB
/ _# v" p: l: I7 v# O   wait for e 10 min
2 U2 ?+ [% v$ H, q   bring up R_mB
% H* u9 U/ s- [: x: a9 @9 j" x   end! T! d4 q) r  U) z. L( M
end

/ i. N! Q! Q) e/ O* G+ a/ J 6 f- t5 z4 \# k& c
begin P_mC_down arriving/ D1 n6 \6 ^( M+ K2 |# j5 w
   while 1=1 do - |' J) ]! Z( U% R- ?
   begin. v9 c1 t3 F$ H3 W# L' }# s
   wait for e 230 min; N. D. n8 `6 K
   take down R_mC" u8 s' _: a' A& j# ~/ b' B
   wait for e 10 min
3 E) \, [7 Z8 ~: g  S/ E   bring up R_mC
+ @4 v* p- K5 m( I6 y   end
2 c6 y( `+ p1 k3 |' H: g9 ?end

. x. x' m0 e. q6 \. m- E/ Y
" _" \* h' b0 g) ^" {" [begin P_mA_clean arriving4 l/ ^# X" O* F3 q8 e3 L3 N
   while 1=1 do) A5 i8 g) g& \! H" \! F# b
   begin; W& v7 \; [8 e8 K0 h2 S
   wait for 90 min
# _* R  E+ o+ Y% l4 d9 a' o( V) N   take down R_mA
: v6 J- c$ B0 F2 g0 U& Y7 {2 l! U1 p   wait for 5 min; p: s' L1 V& t: e8 B
   bring up R_mA- t9 m6 {' s( t) [4 O# |: G2 _* m
   end
1 K1 J5 J+ w4 m% `  J/ e% fend
( N( T1 V. Z5 i( ^8 k) N
/ P  S3 `5 F/ Z* _2 `
begin P_mB_clean arriving
' k! y3 Z- C: n1 ~9 a" p   while 1=1 do: e9 B7 {* Z" }# k  m; ?
   begin+ k$ {8 I. r& J! `; W+ ~
   wait for 90 min: d4 i4 u9 D8 {5 `2 ~! |
   take down R_mB. u9 p% m4 l4 t/ [& h0 l8 _
   wait for 5 min
6 l) N8 L! P' c0 S- w   bring up R_mB
! s2 X3 ^& C3 p* w3 M0 [   end0 L) }# ]6 D# a
end

8 @( e8 _: p: n0 N. b
8 p" y: r$ }3 N& S- X  @' @begin P_mC_clean arriving4 N" _4 d4 t9 c, V" X
   while 1=1 do
2 |; t9 \4 o& R8 X2 V   begin$ W% ?* @/ u3 L+ N  S
   wait for 90 min8 z; E9 m+ @( _% T
   take down R_mC
9 N7 q  G2 q4 B   wait for 10 min  l1 t# \8 y. K' [
   bring up R_mC- ^, H- r* |1 H) {' I+ ]
   end
* c( r2 I% Q% d+ G) ~) Kend

5 j8 v3 G( g5 P+ T/ j+ S----------------------------------------
+ ?- Y6 o/ k; m; R4 ~) A
# x" [" Q+ U; k2 |+ vExercise 5.98 x  ?$ z# f1 p6 p: V7 Z; k+ Q* ^

0 C1 c$ P2 W& X4 K0 A  E/ x9 E
4 N: f; F6 R: h7 u- t& DCreate a new model to simulate the following system:2 B' @3 O9 C8 F# J  H/ B
Loads are created with an interarrival time that is exponentially 5 e0 Z' R1 u  m/ p! [! A& o$ o; p
distributed with a mean of 20 minutes. Loads wait in an infinite-' J1 J4 B" d/ q# q
capacity queue to be processed by one of three single-capacity, & O2 U- z0 H$ I4 z5 p- M5 u
arrayed machines. Each machine has its own single-capacity queue
/ |9 ?! [6 b- {3 z, G- ?0 O2 t, e0 Kwhere loads are processed. Waiting loads move into one of the three ! K: U- m" b6 G
queues in round-robin order. Each machine has a normally ( `* p( o0 B+ g" `" b7 ~7 y* M- v
distributed processing time with a mean of 48 minutes and a standard
8 f8 Y" \7 H" xdeviation of 5 minutes.
, j9 P* b: J% Y4 f; LThe three machines were purchased at different times and have ; J& |5 _  h2 H& C5 u. K+ M
different failure rates. The failure and repair times are exponentially * |( J6 _- o5 U& G2 I% ?# G
distributed with means as shown in the following table: 0 Z/ }0 Q: Z- Q* b
Note The solution for this assignment is required to complete + J" |+ s0 ^2 B* s3 g
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of $ h& F5 L9 R& c: t' v! b
your model.
# V; l3 B& M# Z- @' w, }, l! T( z5 B8 y9 u, L1 n! @4 e% V. _9 W
MachineMean time to failMean time to repair% t0 Y+ s- \& i) @# L8 _: e
A110 minutes      5 minutes
* F: |; U( o# e% P: u" mB 170 minutes     10 minutes* o0 U) G2 l/ b4 o7 N$ {7 F
C230 minutes      10 minutes
8 _/ {% n' H. x) |7 W4 z! u, `
+ ~* n8 P; Z" I! |/ N( A( AThe machines also must be cleaned according to the following
" Z7 `5 q. ~# f  s6 c" hschedule. All times are constant:
7 {, H2 \  ~8 ~2 U: v+ }) d6 _% j0 ]3 h" O8 \
MachineTime between cleanings Time to clean3 W: d/ \* i$ {/ c' k- G
A90 minutes        5 minutes
/ ?# ~* P+ I( M% \! W2 uB 90 minutes       5 minutes
# }2 p: V' b" x; B  r- jC90 minutes        10 minutes
/ X1 Q( Y! |: A+ ?+ m. V# f
) R  x9 n6 T# R4 W4 gPlace the graphics for the queues and the resources.
9 P0 U7 K( j7 LRun the simulation for 100 days.& T, [, g$ d8 C  x% ]
Define all failure and cleaning times using logic (rather than resource " P9 `8 i7 o  B# ]" y* y% J; U1 g7 V
cycles). Answer the following questions:4 r: T" v3 c/ Y" M; U
a.What was the average number of loads in the waiting queue?
6 r2 }  ]2 C* e, w/ [b.What were the current and average number of loads in Space?
( [* i+ S5 \# l' r& y: z% d$ KHow do you explain these values? ' @7 m$ N) r9 ~9 |( t( s3 i2 j

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
" T) C3 b* F9 ysend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
; w6 m- P! E, \- \7 R这行好像也不太对,各位先进觉得如何呢?
5 h4 v; U5 U% g# ~5 c. x+ U
' ?8 ^, P. Z9 {begin P_something arriving* Z/ t6 G* ?0 O  A3 o
   move into Q_wait, o! b' c% D' y7 ?! C6 {
   move into nextof(Q_mA,Q_mB,Q_mC)
8 I- P. C# s) L% @$ o   use nextof(R_mA,R_mB,R_mC) for n 48,5 min/ A- H- \4 N% L& D
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
- P3 E# ~0 E+ H5 Bend
1 V! C; N0 R# U# g
0 v* i" T# @0 H+ O, y) `9 Nbegin P_mA_down arriving
* Y# d$ A  j% |& F   wait for e 110 min: L" \! ]) B( p8 \' }# f9 x
   take down R_mA
+ [+ `! T$ X4 b& B+ N  R% M2 |   wait for e 5 min
+ ?6 U9 \7 I& m* n  r4 D, E   bring up R_mA
  B7 F  E& C) P8 K' K6 v4 a9 Jend; U* b& x$ f3 @; R

( m5 G& ~$ J; }; }" l* ]# P) Z( kbegin P_mB_down arriving: l. i, c; [, Z0 O' [+ ^7 r- k1 Y
   wait for e 170 min; A+ k6 p/ R+ d1 a" j! w& f3 {2 x$ E
   take down R_mB: x, c# m2 B% s( h# ?( {( T3 R9 ?
   wait for e 10 min* o8 T/ J; n2 T1 }
   bring up R_mB0 w5 }: L" T2 [6 w6 b, y! c0 R: Z
end& l0 l9 x& T- @) H( Z  p5 J: d% @

2 u) Z% p( Z) L9 h) f+ Pbegin P_mC_down arriving
& ?; `  A5 H# ?" q4 A   wait for e 230 min
2 L! F1 y0 M+ C) |4 ?& l   take down R_mC
6 s7 T/ a- @) B% \% J& y   wait for e 10 min
. u/ ^$ ~$ m3 k2 b$ ?. U   bring up R_mC3 q0 C" `, q" a. A" V$ C4 c! x% J/ X
end* X# t& a& i6 m, D

/ t& b3 g# c0 a9 Obegin P_mA_clean arriving* I8 `4 p+ j5 }* q. c' Z/ M
   wait for 90 min
7 }( U6 [/ [7 N( M: A2 \   take down R_mA
( ]/ d$ w6 M# b. \  _   wait for 5 min
4 ]3 D# n9 V& w; |0 I; Q   bring up R_mA
2 I+ ]  s0 B$ ^3 M3 _end
$ d3 A; h2 v0 ]+ [) d: m
" ^! ?2 q' y$ qbegin P_mB_clean arriving" n3 b! j1 h" T9 h! Y; j9 c- G9 _! r
   wait for 90 min
2 ^% z9 b: g- E- h   take down R_mB
& `+ Q+ v- J( H1 D! R0 b   wait for 5 min
! b0 u! Y# \/ O  W3 I   bring up R_mB
  s9 ?+ n2 x* `5 H% Y5 bend  h* \% O2 {( \" S

6 w7 u% p3 ~. g0 Z- K* k2 U1 B& Dbegin P_mC_clean arriving, ]8 A; X" I, h2 p
   wait for 90 min
; T% Z0 `$ [$ h. Y$ X) k   take down R_mC
% e. ~% ]4 k3 d! Q   wait for 10 min
! J+ z) V' u/ z- [1 G/ }4 K# s   bring up R_mC/ I1 y% R$ _% B  x- R& ^( w
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving+ [2 B8 A$ s5 A2 f: m: F
   move into Q_wait9 d: x6 r& X  h3 Z) i
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
5 C9 f2 E% K/ A- H* j- B* N   move into A_w* g8 p% e) O. Q6 n& s. G
   if A_w=Q_m1 then use R_m1 for u 48,5 min( r* f4 b7 ^" M5 k: [4 }
   else if .....then use ....for u 48,5 min
8 w# [3 E0 L/ j; h. W   else if .....then use ....for u 48,5 min  + X$ [* Q3 _! v& a! h0 w- d! }8 E0 S
   send to die
+ H) {! v8 N' E6 e( y' Z" Bend
/ F& Y/ b" b3 S* @( U8 ]% S/ p% i' B( x$ U' L
供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-11-16 03:38 , Processed in 0.018119 second(s), 13 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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