设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 7887|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑
+ R, u; O7 L5 |" ^$ r8 p% e2 {! W3 C  O$ P
底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
1 |% ?* r; m. F1 ~
: i; r5 u4 G# I/ M# L不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!
* ?" Z4 w$ r' g" N3 T* T0 [1 X
* n& u- m$ |, a8 V0 N
--------------------------------------------
/ h- D, o% j- L$ hbegin P_something arriving
9 m$ O) l7 D4 N* [" [4 Z   move into Q_wait7 d2 \! F, Z2 x
   move into nextof(Q_mA,Q_mB,Q_mC)0 o! Q8 E8 y# g4 P% k
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min8 {+ v) x) e& \6 f1 W
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)2 X; C$ n  l( N' c# O
   send to die
  [* ^6 {0 m# Z# K( ?end

2 u8 |9 }/ Y! G9 t " [) O& h; D; ?
begin P_mA_down arriving  C4 [( k9 Q( d4 O: G! Y
   while 1=1 do % @% U6 P) p" p5 J' V4 o* w
   begin: n& G, }2 Q, e( J1 R. T
   wait for e 110 min
- @' d1 \* C+ k   take down R_mA
1 a- `, V3 _7 H   wait for e 5 min+ l. Q% A: o, Z' ^
   bring up R_mA# g$ J7 `; e, T" a
   end6 \" a, f0 e" s5 c
end

! m. }$ q( D9 I, ]# r
& E: M3 ^& k. E; }4 |: tbegin P_mB_down arriving( c/ _, @  f( T6 T! l
   while 1=1 do
5 e7 u1 B+ H, t   begin
0 |9 r- y& a( T+ p/ C   wait for e 170 min# s: H1 y7 P4 g' H3 v  D. D
   take down R_mB
7 A0 e9 L) Z% b5 j% G& W( P   wait for e 10 min' T. Y, g6 T; d# M0 K) `
   bring up R_mB
$ P( u& y* t4 U   end
9 V: l$ ]% Y) zend
5 o  E% Q* N6 j
* _; y  W$ @  }& H6 b- ^
begin P_mC_down arriving
' O3 m, L+ o- G3 ?* r3 d( |: h   while 1=1 do - R; }! @7 w; l! K6 S
   begin
" i" g, X3 B2 m6 q   wait for e 230 min" i% b! m; J& e3 K
   take down R_mC; B: u0 _/ y" q- H5 A' a
   wait for e 10 min: o. h9 ^& B( T7 J: p! G% {$ `
   bring up R_mC
7 o9 D6 g$ K) T  C   end
: E, K+ d: I; L6 |! Cend

' ^' W: h2 c# z& Z
% X, u; T" {2 L6 z0 Lbegin P_mA_clean arriving
( |; t& j% U) J   while 1=1 do
) d1 j! K/ G2 [, F! I; I   begin/ z: F. _, }  O% W( R* A' p
   wait for 90 min& R* J( ~9 Y9 o. t: j0 H' N
   take down R_mA
# j# o8 t: d  w  t   wait for 5 min
& l, R6 }9 A1 P+ V1 I   bring up R_mA9 z. ]9 x. e& D
   end
0 E1 |  f8 J: B+ qend
/ F6 Q/ @; F/ I0 l& w* v! D
, {* F) n# W) E/ `4 A- ]" P
begin P_mB_clean arriving
3 A, s9 f0 M. u& h/ Z! h# a   while 1=1 do
- |1 [+ Y; ]# r, e  y+ @   begin9 l7 L) s9 ~- H$ r; O; r
   wait for 90 min3 Q* j& Z% I: Q4 u
   take down R_mB
2 D6 }6 E0 j: B, o" n   wait for 5 min
+ j1 C  M# v. _! a, a   bring up R_mB- E% q5 Q' ]0 q
   end
6 [  O  Q: m' F! Nend

4 |3 `4 a. `$ c8 ?# w$ M3 c% O * ~- _! ^0 K* x6 i5 `* o! z& U2 t
begin P_mC_clean arriving( X8 c: Z# T3 {! X$ D- h
   while 1=1 do6 p) B7 L% U! h$ b2 ?4 V# Q5 E
   begin# `  O$ l9 d/ z  W4 p8 I
   wait for 90 min
3 X8 |' @5 L0 R7 D# K3 l! @: H* t- ^   take down R_mC6 i: t9 x& t$ X8 ?
   wait for 10 min9 ?* m4 m' Z: T+ {" Z( H% T
   bring up R_mC$ n$ ?4 i' w# [1 j- N
   end. c/ M; _& l$ v- c+ i
end

6 ~. K+ v- Q+ t  M) y7 W----------------------------------------7 k" t' U1 Z+ F" F7 O

. s4 \# h7 v5 y, F9 P( q: pExercise 5.9
& b1 V. T8 d2 u0 I% n, n4 ]7 ?
) q7 U* Z: L4 _+ D; Y- P0 P
9 G5 x5 c' ~4 P1 cCreate a new model to simulate the following system:
/ o& |8 n/ J8 z0 D5 l" D+ GLoads are created with an interarrival time that is exponentially
% N; H# }, ~# C3 ~# idistributed with a mean of 20 minutes. Loads wait in an infinite-5 q. c, J# ?; D% r; M- L: e$ z
capacity queue to be processed by one of three single-capacity,
3 |, H8 Q5 i7 jarrayed machines. Each machine has its own single-capacity queue ! g% ]  @; P5 d0 k, W  @1 m/ Z
where loads are processed. Waiting loads move into one of the three / |5 Y. U5 U) ~3 e  ]% a$ ~* P3 \
queues in round-robin order. Each machine has a normally
0 y7 Q' C& a' m( X! Xdistributed processing time with a mean of 48 minutes and a standard 9 E+ b" F; ]0 ?6 N
deviation of 5 minutes.) A& Q- A1 O5 ~. t: N# N' m
The three machines were purchased at different times and have
  J; R: ~  W! ^different failure rates. The failure and repair times are exponentially / E6 n# j! b8 I! d8 B7 Q, C
distributed with means as shown in the following table:
$ J- M% U& Q- qNote The solution for this assignment is required to complete
/ |  S1 f+ V0 B1 c7 u$ t! I9 ^exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of 4 p) p0 n, \/ k9 G4 p' M
your model.
) r4 A8 Y) r1 v: o7 {) Y
* w) {3 n  q! M0 o7 j, HMachineMean time to failMean time to repair' u! t7 z5 p( a6 f. ]3 |. i
A110 minutes      5 minutes7 I4 B  ]2 a! L4 x$ G* ~( c2 r0 \# P
B 170 minutes     10 minutes
% @8 x  S0 d9 rC230 minutes      10 minutes  A3 c7 S: A2 \
1 @( r# w( V4 m$ c" g$ E& w7 ?
The machines also must be cleaned according to the following ; P3 L. Z3 O- k  k# F2 c* B3 U
schedule. All times are constant: - r- ~! N" U3 d& ?' P3 Q
" [' g0 ~" J* f
MachineTime between cleanings Time to clean
. i, k/ U( `' T+ s0 }/ d! lA90 minutes        5 minutes1 M. f5 I5 l) E2 s* D: [1 |
B 90 minutes       5 minutes
. O, ~" b! I2 \; _) RC90 minutes        10 minutes; C9 M2 ]/ q. G# {4 t
! W) N5 y. ?6 K9 I9 D) Q
Place the graphics for the queues and the resources. 4 T8 I" b2 d$ T# v  a) T) v
Run the simulation for 100 days.; D5 S4 a4 W. }
Define all failure and cleaning times using logic (rather than resource
7 V% ~, w9 n# |cycles). Answer the following questions:
0 {& x5 G' e, _( @8 J5 M3 \7 R) m: {a.What was the average number of loads in the waiting queue?8 K9 X' e) u6 z# f( A! n
b.What were the current and average number of loads in Space?
, P  n5 W( u+ v5 N0 c% LHow do you explain these values?
. _; @  C) A! R3 a0 ]

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉! F9 h7 l1 ~- q4 O$ P5 n
send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)1 N% D+ n% @) U9 w$ o$ K2 A1 O) U. Y6 X
这行好像也不太对,各位先进觉得如何呢?
% L4 \, B6 P+ X0 @1 H% B8 u! r- T0 G9 |* q* o' P( |
begin P_something arriving
, `; q$ M( l  v* P   move into Q_wait7 d+ b) \+ w& g) Y4 v
   move into nextof(Q_mA,Q_mB,Q_mC)   U+ {5 Q9 Q9 J9 a- E; t  Y
   use nextof(R_mA,R_mB,R_mC) for n 48,5 min/ h  B; F5 _7 T5 ^2 M
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
& o- j7 x* E% H5 c$ Qend7 k2 e9 z  d+ w5 ]! z
9 z2 M7 L7 w+ I+ ^4 S1 B! T
begin P_mA_down arriving8 {. g" z2 ~6 r8 ?7 h6 l
   wait for e 110 min+ |- M) a) m: ?/ D! b' @  J
   take down R_mA
6 w" {8 s' b4 h% F9 c/ Y   wait for e 5 min. r) P! c0 P+ H, Z( i' w2 w/ \
   bring up R_mA6 A, x. Y) q0 p$ [6 J: B
end, G) j1 |5 _! e

9 \$ j1 u' x3 l3 j3 _! n/ q1 n% {! cbegin P_mB_down arriving0 p) r# K: Q, W& u8 }/ W, c
   wait for e 170 min
$ |! p0 z& f' p6 B6 L   take down R_mB8 j$ v9 v; B  o6 h5 x) o/ b; a# N
   wait for e 10 min, L0 a( f* T6 H$ i! s
   bring up R_mB
! b9 W  s4 |7 [end
9 R" R$ ]3 }( {  Y7 E9 ~; A' O5 S$ G! }0 ]( j5 o2 h
begin P_mC_down arriving
5 N3 ^' z7 L3 L6 n   wait for e 230 min
% M% [6 @4 V6 d4 o. v* T/ F, s   take down R_mC1 ?1 \9 X' D4 y
   wait for e 10 min
& |% I. G  K* Q6 S   bring up R_mC- g! [1 y4 d) A, x! [
end
& h( |6 l5 h. m( r" }7 F+ h
4 {# N; V; ^- T8 w# {begin P_mA_clean arriving
3 h8 `5 L0 K7 ?+ Y$ X5 _   wait for 90 min3 y* l! p* e: Z2 E
   take down R_mA
) [/ Q5 p% Z$ s   wait for 5 min/ w. D  H6 }3 r3 i; b9 O
   bring up R_mA) A7 T- c3 v5 b- [) F
end
, u* U1 d) W8 e3 ^2 |, e9 ^9 z) H# P: U* I# l8 M4 u
begin P_mB_clean arriving
$ ~; q/ v) W% r3 b2 J9 J( u) Z   wait for 90 min! ?* D/ U$ ]8 I9 c
   take down R_mB
- R4 [$ s3 E7 R   wait for 5 min
7 v6 w+ f: a! k   bring up R_mB- c% L  y7 S  F/ o( b! v" H  B
end
- n8 _9 k9 [, Z  X4 S5 {0 l' V) J/ s9 t; O- f" f
begin P_mC_clean arriving
" [8 C. W  n8 r, b0 H   wait for 90 min
" H5 ~' N& E) N2 Q$ ^   take down R_mC: U- V2 j5 |8 j
   wait for 10 min
; l. o4 m: Y2 q5 Z( h2 X  y   bring up R_mC
' y6 T1 Z+ q' ^% P; O, Cend
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving
2 f8 |2 F) w5 U/ J8 R   move into Q_wait
1 G$ k! }+ h' \0 J; E* O5 ]) k   set A_q to nextof(Q_m1,Q_m2,Q_m3)) q4 C; {, J% ?% c# i6 E" v
   move into A_w
8 s( \6 g) x* n. i/ w   if A_w=Q_m1 then use R_m1 for u 48,5 min: o$ ?: @) y9 \3 ~; L3 R
   else if .....then use ....for u 48,5 min0 L* J& }! O, S" b
   else if .....then use ....for u 48,5 min  
8 O3 b3 k! G1 q+ c6 E0 c# y6 n   send to die" E9 V* A+ U6 G- \& G" s
end  i, j' E( N4 _3 w

" `" p$ }8 i- Q! E1 f供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2026-5-8 15:40 , Processed in 0.015825 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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