设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 8293|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
2 B7 W9 X0 m. B# \, i" K% \& h
1 D. X* G& B2 H& [$ y' {3 a3 F底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去7 `1 V$ ?/ h/ A) O

% H! L; a$ j! ~. n2 F8 k# T% K: `不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
1 s4 Z+ I8 U2 V% m# w
6 }: @1 s5 A# ^! t6 s7 [# P. t- ^9 C
--------------------------------------------; \& J9 B, p' y" m
begin P_something arriving7 w7 o% P9 {5 g" W" \" i$ A
   move into Q_wait
+ Z& k$ Y: t, @) g) P9 ~8 S   move into nextof(Q_mA,Q_mB,Q_mC)
! d2 D0 k! M' i4 g" o   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
/ J* Y' T4 {+ v& J   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)1 }6 H6 m  n* L$ A- g) s5 S* z
   send to die2 m, C$ ~8 S5 M6 w: M
end
4 t: R+ B  \3 C1 @
6 F& y: o/ o: j$ y' k: v" s8 Z
begin P_mA_down arriving  R% h2 L6 D& F2 B% a: u
   while 1=1 do
& o( L" u) n, G% ?4 K   begin
" U1 C) l% l) U: w   wait for e 110 min
1 k9 b* @2 q! ?4 H3 _* m$ g   take down R_mA) [5 s: ^/ z1 a, b8 _5 D. ^3 S3 S* v
   wait for e 5 min
0 g5 U# L( \- U5 m   bring up R_mA
% G) @, v2 g) X+ E# G3 w   end
- g) |2 h6 Y& j+ Vend

* E( G6 c5 {( [; J$ D
5 K; c# }  \; O( A3 C9 d6 obegin P_mB_down arriving
" R+ r" n8 I/ j% R' e5 h! C0 I' K# A   while 1=1 do- ~% ~$ q  p. d( g1 f3 a
   begin
% Y9 Y4 P; M5 s$ V9 ^  {" B   wait for e 170 min4 t! ]4 V* [/ b3 W
   take down R_mB
1 Z' ]5 n* f. B3 y* `( j/ L   wait for e 10 min
2 a: s+ t% n% o8 I1 n; @   bring up R_mB
1 g; }# B. z' b. G  `& `' P   end: c9 m/ F- ^, _( `% b# M) E2 k
end

7 {( o+ F* @* ~- z$ g
  H0 R$ f  G' F/ ?begin P_mC_down arriving' g, I6 O- {0 |1 L3 @3 _
   while 1=1 do
2 h  q% M; {; e+ l' G   begin3 Y& q5 k" `& k* P/ J! O# z
   wait for e 230 min
8 J3 p* i3 _$ v+ l( X   take down R_mC0 B. w6 k+ l. i* G$ `
   wait for e 10 min
+ N& h& ?: _" \( A   bring up R_mC0 N% k7 I  g: E& i% y  f# R
   end
$ @% u+ {/ r; tend

! {% \% h$ W  `0 L* K( P8 T 7 Q: t4 b0 I$ c& ?* F( n' o: k2 K$ _1 A
begin P_mA_clean arriving) L5 [% A3 T. G" l- j- `, I
   while 1=1 do6 b/ z- u5 U6 ?. l, z, B
   begin
9 f/ w8 g1 A7 D+ s$ ^   wait for 90 min" ?& C. a. J3 L( a- t  n' l, `/ _# s
   take down R_mA1 Z4 @0 a/ E( U6 w' e8 k; n) Q
   wait for 5 min6 D. Z8 g* V7 @, Y6 E+ j; J
   bring up R_mA5 c" `8 i2 a- N! r& i- A
   end
# Z2 J5 z9 X9 @) ]: }end
3 ~3 b2 S% M6 g( [% ~' O

: X; g4 [5 q: Q3 I7 b+ abegin P_mB_clean arriving. T7 A8 N3 j4 W" o
   while 1=1 do
& x, h/ ]/ w! X  @   begin( H" t( x  R; r
   wait for 90 min7 U+ B" W1 t  g! V8 ?# e) I
   take down R_mB+ M2 x" _4 ~) K/ j6 p
   wait for 5 min0 t, O1 O( x! Z3 j7 i: P7 Q
   bring up R_mB
5 E) I( S* v* _: e! @   end
# m5 W/ S1 Z' u1 j! T% V$ x1 Oend
% y0 f; {4 K5 x) m) m" A$ g3 C

& w/ F/ @$ U1 f- i( x3 pbegin P_mC_clean arriving
8 z6 T( }, n( w0 v   while 1=1 do% b1 _; c# t8 ~$ w
   begin9 ~1 F5 d# X8 O
   wait for 90 min
3 H0 T" _- P% ~+ h1 G: p4 k   take down R_mC
0 s) h- m% x3 r   wait for 10 min
/ n. O2 _' G% k   bring up R_mC) s. a8 `+ P/ P5 N, g
   end' H( ]$ O2 ^3 X5 m6 U' @' R
end
) m, U2 Z7 A+ \1 ~: H' k1 `
----------------------------------------
9 \# U1 ~) A6 M. `$ \ $ _% n5 f2 Z+ i; s
Exercise 5.90 s! s4 L! H; @7 d+ o
: F4 L6 c, d# o+ l+ y1 J. U
; r% x* B) C4 A: |
Create a new model to simulate the following system:, y1 i* U! z4 w9 ~6 M9 G' y
Loads are created with an interarrival time that is exponentially
( X1 O2 z2 m1 P) Y% ndistributed with a mean of 20 minutes. Loads wait in an infinite-
9 p5 m6 S* G# X4 c/ v. w) z9 Ucapacity queue to be processed by one of three single-capacity,
. d6 O! `" A- _4 Larrayed machines. Each machine has its own single-capacity queue
" j! U% B$ b8 E/ u9 lwhere loads are processed. Waiting loads move into one of the three
3 o9 D8 h: j8 n( Q1 J- }8 ~7 cqueues in round-robin order. Each machine has a normally
% S" D9 X$ N1 \. h6 `5 bdistributed processing time with a mean of 48 minutes and a standard
) c" B. j* ?1 W( u7 Qdeviation of 5 minutes.+ ^% p* E  g& x
The three machines were purchased at different times and have   v* w6 X) j( H7 w
different failure rates. The failure and repair times are exponentially " ^6 e& e  V* z/ }
distributed with means as shown in the following table: ' H4 G' t$ B8 _9 U8 F6 r
Note The solution for this assignment is required to complete
* f7 i0 O0 m- ^( ~# t; Dexercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 1 e) |$ g/ {+ M3 ~0 m1 M! x
your model.
+ n* Z( {( N( }# Y7 r: c9 W' I; N8 r2 Z. c
MachineMean time to failMean time to repair
+ C' G- Q* H( k* `5 {) QA110 minutes      5 minutes
+ t3 u4 I  w1 R2 oB 170 minutes     10 minutes# d) [' d3 v, t. Y& X1 r
C230 minutes      10 minutes
$ D: `) z# Y: E
* B4 s$ N1 d1 EThe machines also must be cleaned according to the following
7 U+ W/ y7 d, X* Zschedule. All times are constant:
  m! D/ N- w6 G5 h1 \2 k) X+ l
; e( s" Q8 \* h# MMachineTime between cleanings Time to clean/ ~0 C9 Y1 s- I
A90 minutes        5 minutes
5 m; \& b! f6 [1 [B 90 minutes       5 minutes
  p8 I3 }; W# W3 N0 aC90 minutes        10 minutes
7 \8 J6 k' Q( s7 N
! M* j' |) w! n, c" n4 Z- HPlace the graphics for the queues and the resources.
# P* K5 t- G; h+ Y# T$ KRun the simulation for 100 days.
  A- o- [" }7 LDefine all failure and cleaning times using logic (rather than resource ' y7 l4 p8 t8 N
cycles). Answer the following questions:
! E0 L" s6 k( v- \a.What was the average number of loads in the waiting queue?
9 k: e$ Q9 e0 d* K  Xb.What were the current and average number of loads in Space? 8 J) |+ i: M! b
How do you explain these values?
$ P6 W0 c& i$ e: u. a7 P

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉+ L. p' C% Y3 i6 c, K7 q" n9 v
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
' j' S2 Y; w" J& q9 O2 d这行好像也不太对,各位先进觉得如何呢?5 s6 Y" I% \( U

: z; l+ G0 M; Qbegin P_something arriving+ p$ n8 P/ h& w4 [: f0 ?* C
   move into Q_wait2 C: C4 ^$ v9 N
   move into nextof(Q_mA,Q_mB,Q_mC)
% q7 M( k/ w+ f6 \3 K   use nextof(R_mA,R_mB,R_mC) for n 48,5 min+ X8 N$ C4 g5 g6 q
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean) 0 j( ~4 ^4 u7 ^4 g2 v# k
end/ A2 z. I& x2 u' }2 r

# n+ o" ]! ?: q5 C7 _  k4 lbegin P_mA_down arriving
" m; c0 w; P% |0 H" a, V1 E3 N- y   wait for e 110 min
6 h( Y. R; `( p4 V3 w9 ^   take down R_mA9 Q  M6 `1 r! r
   wait for e 5 min, F6 c+ E1 y+ E# G. R. V
   bring up R_mA9 _, h' }9 B5 k# \2 x2 C/ L
end
5 ^! M. b. r' o- S4 q# u0 w$ ^  V* v' N* N/ g" |/ g  B
begin P_mB_down arriving; v3 W& J, a8 a
   wait for e 170 min
1 T$ _0 m, y3 D  D) g8 x   take down R_mB3 f9 l  p5 e: |* J& f
   wait for e 10 min" p  Q8 P6 W$ Q' {: }7 X+ L1 L& J) O2 s
   bring up R_mB4 D0 m4 \7 S; z$ [" @- K
end1 H$ ?: K5 J4 |; ?0 B9 a' r. ?" @
* b# U: s- L+ j, B0 C
begin P_mC_down arriving2 d3 l6 X( `' P, E+ C0 e
   wait for e 230 min2 L- p9 P1 ?3 @* d2 a1 y( J0 Y
   take down R_mC& P5 x/ L6 Y9 n: ?4 H: F; x2 i
   wait for e 10 min
1 p7 |/ ?  i' m0 H   bring up R_mC% j7 \2 L& v% h8 }0 ^# m
end
: H; r! x3 b& z# [0 C
- S0 w7 o6 S( `8 Y4 y' ^& Tbegin P_mA_clean arriving8 J# K: i% o% {0 G- J6 g& e
   wait for 90 min: }5 q! B, O0 {: |
   take down R_mA
. v7 x) {1 a( o3 N, `* o& W   wait for 5 min
9 W; u# \# }- n1 R- b- X   bring up R_mA
" G0 ?/ R) a  v! Send
. k) h: ]/ w. E3 I% _1 k3 y& D- H  F* B& V
begin P_mB_clean arriving
5 c4 V# f, N) r# [   wait for 90 min% R, `1 C7 \% J9 \
   take down R_mB+ N1 n6 p( i! k5 G; U% A$ p
   wait for 5 min, \% N& `+ V4 A6 p4 @  }& t( K/ H
   bring up R_mB3 z8 d& b) o( y2 i! u1 Y
end
5 A: L. }% f: [2 s2 {7 M  w+ _: \* O
9 S* v' t4 ?) b6 Rbegin P_mC_clean arriving. U1 F/ O+ e7 c1 i
   wait for 90 min
: e) V- E" V4 k, Y) m   take down R_mC' N* ]# ^* a# s: j9 x; T6 \
   wait for 10 min
. {9 f1 Q  H4 u2 |/ M   bring up R_mC' w4 T* v  p+ S6 y3 ]
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving6 E9 [3 K; \! O: K
   move into Q_wait
! ]% d' @( G. m: n3 E1 e- Q3 Q   set A_q to nextof(Q_m1,Q_m2,Q_m3)
* k( K, k+ F; P: D   move into A_w
7 L6 z9 ?+ _$ w   if A_w=Q_m1 then use R_m1 for u 48,5 min
% H6 T7 N* `2 C# x3 x- A% T: @$ B# h   else if .....then use ....for u 48,5 min
1 I0 f1 u1 Z: K9 P9 C3 ~# y   else if .....then use ....for u 48,5 min  
- U, k5 k9 f4 p: r: w. F; B6 ]   send to die5 ]7 T5 R0 Y! ~6 ?! u
end
: W+ R+ D) ?& h" G9 ]0 T( [6 @
" |' y1 `, }5 g% m* e7 K供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-8-7 00:21 , Processed in 4.897199 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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