设为首页收藏本站

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

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 6598|回复: 2

AutoMOD内附练习问题

[复制链接]
发表于 2009-12-5 15:47:37 | 显示全部楼层 |阅读模式
50仿真币
本帖最后由 GJM 于 2009-12-5 21:43 编辑 * ?9 Y' J, @- N- N

% u  g! I9 z, N5 a8 Q6 ^$ W& M底下是小弟做AutoMOD里面PDF练习的(Exercise 5.9)逻辑文件但问题是,程序只RunMachine AMachine B就没继续下去
; u/ _' w& h/ [: J7 U% V! ~
' q% d9 i7 \! E6 q! h不知道是哪里出错,另外这题和Exercise7.1的题型类似,请问若要符合Exercise7.1的题意又该如何修改呢?请各位先进指导,谢谢!; c7 A9 S" Z. i8 R- d

& L; G, y; ?7 c7 a
--------------------------------------------+ Q+ v. y# v; [' T7 s9 z5 _. `
begin P_something arriving, c5 _* K) n. d% |$ \& D
   move into Q_wait: ~1 n) ]4 n+ ~- F2 `8 ]+ G5 U
   move into nextof(Q_mA,Q_mB,Q_mC)- `  r( \, m' j% S, O4 y
   use nextof(R_mA,R_mB,R_mC) for normal 48, 5 min
* Q& ^" e# k% a3 V* N   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
/ d* z" i, c' ^( {- r! X# s" M   send to die# U  x0 |: u. `1 C& M6 D8 t3 W
end
' W6 H  Q' h, B5 _% B) y

( I5 u2 y2 D9 U3 Jbegin P_mA_down arriving1 a" R: D9 R5 w- n& Q
   while 1=1 do
3 w* q% T: f: S& v5 x   begin- U: c  ~# f, K
   wait for e 110 min
7 w) v; t  `4 y& o8 o5 x, g   take down R_mA
. w5 s$ Q/ P# u, v7 [* P   wait for e 5 min) Y) j7 P4 s* R+ I" W- S
   bring up R_mA
5 L0 H- Z7 x# \  N   end
( B+ q" F  [' J6 s! [end
* j* B3 J- O4 ~

2 Q" ?! L( }; }; K& i& @, p" W3 Y1 }begin P_mB_down arriving
& U% U" e0 E- }4 i9 u! y   while 1=1 do9 l! p- q- y$ g3 x
   begin
7 B* P5 E% }4 S" y   wait for e 170 min
5 T8 U: P: g8 v   take down R_mB/ u& U* K. u5 M- z, {; W: a
   wait for e 10 min
# n  E; |' Z1 J# r   bring up R_mB9 ]" `. g7 h) M, ?$ a/ d
   end
8 M2 C  S( Y. |) ?" V; Mend
6 B+ N7 z  T& m- e- b  Q

6 X5 q1 M$ E+ s9 E$ {* l7 Dbegin P_mC_down arriving
% s0 e2 P5 w* v4 a   while 1=1 do 4 O6 I9 L* O& V7 ^% c2 h& _
   begin
& w2 _$ y3 |2 E$ ^, e* T   wait for e 230 min0 |% u% V2 O$ Y# p. L
   take down R_mC
6 _% q- W6 ~  x1 J/ e   wait for e 10 min6 Y& u! ~0 Y& \: W( i( O7 M* B
   bring up R_mC1 h# l8 _; d) U5 N/ J1 Z6 t' L
   end
0 V1 v+ k$ a' kend
. J( r1 ]2 h, A! M; r# R
* U: Y, P% Z1 h7 U, L. |
begin P_mA_clean arriving1 {  I6 P" @0 H. D  |
   while 1=1 do" R$ V5 A5 h; A9 R
   begin
0 s" L5 v- b) c  C   wait for 90 min
# n/ x0 n1 k9 V, a5 l) Y   take down R_mA
1 b( C. _: u! G+ T( q7 m   wait for 5 min
& f- k. @8 H) r/ g& C   bring up R_mA( a1 o) M7 a) |7 B  M
   end$ g4 ?6 B$ y: E2 R0 }
end
: d9 X4 j6 R3 q- J

2 Q% u, \( y6 N0 F5 R& nbegin P_mB_clean arriving9 Q& q: b' S/ j  |* R- s  f) b: e! N
   while 1=1 do
- M  k& k" c4 Q* v. y  d   begin  M9 v! u: V& b9 j- F: E) r, Q
   wait for 90 min) b# j$ P* i/ Q" y
   take down R_mB
4 n; B/ x& E/ m2 @# L$ f  j   wait for 5 min* Y4 Q3 Q- M! L1 P
   bring up R_mB
) o3 H0 V/ x1 p6 o  @2 V   end3 W4 n/ J' L6 o
end
1 W, X# @" q0 v+ m, F; x

* r7 X' @) v* A! xbegin P_mC_clean arriving
7 L, p+ V, a, c& ?1 K) k   while 1=1 do) ]; v: X, B- z' Y6 ?
   begin
7 s9 I7 O! ^8 R9 ^6 z2 f   wait for 90 min
5 f3 v4 C3 p8 s/ f! ]   take down R_mC
0 g; ?  e) A- K4 X  z; S   wait for 10 min# Q' i6 ~( _4 p4 ^# u" S4 {
   bring up R_mC+ u- R/ ^; p4 T- x
   end
; O7 I" A0 l$ g, n9 N( bend

7 Z, U' v! s+ `0 J& T! {; r----------------------------------------
( A0 f1 Z, O6 ^1 H
- @/ O! ]8 y: r2 z4 J" \/ eExercise 5.9
2 s5 G% T4 J; _4 f8 y; ~
- L3 F9 n3 r, V3 A1 D, ~; q4 Q- H( q% Y
Create a new model to simulate the following system:
% U( u' f% V5 `% m4 ]+ Z0 ^Loads are created with an interarrival time that is exponentially
  `- z5 `6 Q+ q! ]' n5 Odistributed with a mean of 20 minutes. Loads wait in an infinite-
" l% F7 o( J4 `! R+ ~capacity queue to be processed by one of three single-capacity,
2 `- Q- p& Q$ K6 E/ t5 {arrayed machines. Each machine has its own single-capacity queue
5 F5 e0 Y1 f* ^. lwhere loads are processed. Waiting loads move into one of the three
' ^  n; g* _* s3 N' Cqueues in round-robin order. Each machine has a normally
9 p# ^* j3 d8 F' j4 j6 h1 Cdistributed processing time with a mean of 48 minutes and a standard
7 P- ^" o( N$ S6 x% }! n$ i6 i( Odeviation of 5 minutes.
1 C" A$ ^" t) A7 p  L% }6 KThe three machines were purchased at different times and have 2 z8 v% D8 [) C
different failure rates. The failure and repair times are exponentially " G9 W0 ^% R  l# O4 i8 r0 I
distributed with means as shown in the following table:
* P/ h: [  Z: |5 KNote The solution for this assignment is required to complete 9 M: x# H4 F, b( P
exercise 7.1 (see “Exercise 7.1” on page263); be sure to save a copy of
' R' U4 ]! K3 p) y1 o  h8 yyour model. 3 u. C8 h$ Z8 T+ o

: U' T- i+ R) ?% c) Y) {MachineMean time to failMean time to repair% ]' B& W% J3 V9 ^, W( }
A110 minutes      5 minutes
+ B" E3 ^  a8 c3 c0 Q1 v8 ~B 170 minutes     10 minutes1 ~9 _! R" Z1 V# Y  x6 C5 |
C230 minutes      10 minutes6 }6 c6 R% T0 c5 C: V% C! s0 f9 ^

: y$ i! t* P9 H: kThe machines also must be cleaned according to the following
  [5 N1 d/ X0 C9 O6 y3 Vschedule. All times are constant:
: F3 r& p+ S# `" T* e3 P$ `6 ^$ x: _# e
MachineTime between cleanings Time to clean
7 I" x  h0 k9 x0 Y+ k+ iA90 minutes        5 minutes
7 |  J! _& b$ u+ b" S; ?( r/ HB 90 minutes       5 minutes
4 b  G* f9 \* Q4 X! ?& PC90 minutes        10 minutes
2 |$ r( h* _+ \. N4 n: F: K" {  s! {, A9 q( {
Place the graphics for the queues and the resources.
; c/ S. Y* O/ R2 T9 E( h' g$ U4 WRun the simulation for 100 days.
' x) k3 ?: F8 G' n- w( UDefine all failure and cleaning times using logic (rather than resource
7 N( @" h5 S9 W- L5 v5 f3 kcycles). Answer the following questions:
5 f1 k; W/ W8 a! o( Ka.What was the average number of loads in the waiting queue?8 m% j, z" |2 |1 C5 A
b.What were the current and average number of loads in Space?
! N0 O2 [$ y9 L9 x3 }" j2 E$ tHow do you explain these values?
" S' H+ p8 w% z/ B$ t8 d6 Y7 m

 楼主| 发表于 2009-12-6 00:53:23 | 显示全部楼层
如果把逻辑改成底下这样,直觉
" i8 B" J# x" `7 M. B+ V: N, Z% Lsend to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
6 f6 s4 h- H% d# i0 h# j* r# i这行好像也不太对,各位先进觉得如何呢?7 n* I- \" _* {

* W- `# |9 H! d! _. c6 G: s$ v* Cbegin P_something arriving: J( P0 z8 O# P% W1 H2 U* S0 P
   move into Q_wait- Y: t# Y, N" x; H- D8 L7 q
   move into nextof(Q_mA,Q_mB,Q_mC)
0 g8 \3 z' s/ k7 Y! Z   use nextof(R_mA,R_mB,R_mC) for n 48,5 min+ h# a0 Y2 e9 x# v; T) y! h8 h
   send to nextof(P_mA_down,P_mB_down,P_mC_down,P_mA_clean,P_mB_clean,P_mC_clean)
& y: g. Q& @' W! k' g5 }' Eend6 s9 J' c/ j9 j/ l
" {* r% v! `7 v2 ?4 S* ?9 n
begin P_mA_down arriving5 h5 [" e. n; L3 d
   wait for e 110 min7 I; o( b" l) T- ]" m% @4 u5 e
   take down R_mA4 g" `7 F: n8 k8 B
   wait for e 5 min
# _0 D3 R" m8 w; e   bring up R_mA# z4 l6 g9 M6 \- m
end$ g1 O2 o. i: R1 i
+ y* S5 R  }2 X0 v6 v6 B
begin P_mB_down arriving
+ r1 m  S6 M+ e" s; o" s8 K   wait for e 170 min1 q# U+ V# u9 J1 M1 a7 M  B
   take down R_mB
, i% n  q* Z: k* V. f" F* J   wait for e 10 min
& @8 w7 D' t- i% b   bring up R_mB
: E! X* r' z5 ]5 q( J( hend
& @4 N9 x0 r/ Y7 ]0 \
" C( c/ H/ D! A/ wbegin P_mC_down arriving
0 l* X! {1 M9 y6 @   wait for e 230 min, v0 ~, d: m/ f3 n( }9 z
   take down R_mC
1 G+ N& |. K9 I3 [   wait for e 10 min% t; j, _6 {# S, X9 C
   bring up R_mC
6 I( X0 _$ B5 g0 Z- ]9 W& vend
4 G7 |9 D8 W2 I- y6 Z
( |2 {; ~7 W' a+ I) Zbegin P_mA_clean arriving
/ C4 a; v- G7 v- ?" L   wait for 90 min
# o& ?, T. Y" T& n/ X: x. D   take down R_mA. p2 C2 C# O. H' o. E1 Z+ D
   wait for 5 min& R0 F5 h) B. S5 L2 n1 F
   bring up R_mA& w# C5 V+ R% O' U. T* s+ |/ S9 a+ `
end
4 E2 Z& R8 h! m' ]7 A' o8 |# ~! ^6 S( a# `- f
begin P_mB_clean arriving1 y- e8 i& H' b" k- H
   wait for 90 min6 `6 \% _2 u8 ]' W, c/ ?
   take down R_mB
8 Q0 a4 ?1 O4 a2 Z. \) H   wait for 5 min) x) w: G$ Z, \6 n
   bring up R_mB
4 p5 Z+ v" z6 y  f# R0 W2 ^# _end0 s6 ~% x# L8 [& V# a9 k

/ g2 P5 ^# K; \% h: G7 R" w& U8 Abegin P_mC_clean arriving
# q) ]5 L- R0 }, \! q3 {5 d9 G" K   wait for 90 min; B1 p4 {$ g& G  x
   take down R_mC" M: Q& R: P6 G* y
   wait for 10 min
6 e/ q7 W* |" s7 S' p   bring up R_mC+ N6 [% P3 `5 d3 Q4 \
end
发表于 2009-12-9 15:46:38 | 显示全部楼层
begin P_something arriving1 w( O8 T  t8 {" ]  ~) ~
   move into Q_wait% v4 g7 G! Q8 L+ m( x  g9 v
   set A_q to nextof(Q_m1,Q_m2,Q_m3)
3 e, x. f2 o! B5 B- j: S6 h   move into A_w
, h  ^( z3 ^7 ~' m" @   if A_w=Q_m1 then use R_m1 for u 48,5 min, v2 I" S7 ^7 @- F. ^9 V. V' P
   else if .....then use ....for u 48,5 min0 t+ s1 d6 j: Y/ K0 Y" q
   else if .....then use ....for u 48,5 min  
. }# R, \) S6 H% s$ @; ]$ r4 {   send to die1 A6 O- H6 c* }: p$ L" t. @$ q
end
  q! a3 D$ t1 P
5 z, Z* |5 ?  Q, T* P& x: \, T供您參考看看~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-6-27 04:06 , Processed in 0.017753 second(s), 12 queries .

Powered by Discuz! X3.4 Licensed

© 2001-2017 Comsenz Inc.

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