谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);' T: s v: o% @
begin model initialization function
7 F+ Q% e! a" X4 g7 W# j( u create 1 load of load type L_null to P_Creation28 }, h; V' I7 M3 F# T
create 1 load of load type L_null to P_Creation3! l0 j8 [# t8 k+ h; l' [' ^5 _. ?
create 1 load of load type L_null to P_Creation4
2 k6 _" S. X& I; i; ~+ L& F return true
% z5 U2 x, S8 z( y" f3 }3 Tend
, v$ S+ T1 v9 M" z# r3 ~5 ?8 I8 ]
begin P_Creation2 arriving procedure
$ a, F3 {/ c/ Awhile 1=1 do+ E A- T. w K1 a) S* Q9 E4 {
begin# A5 Y5 d4 a7 K/ A
wait for 1 sec, c' h$ T. o8 a% f/ K' R5 @& y7 B
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)- V9 j; G2 f& A, s
end8 w! x/ M7 g4 t/ p5 v& }
end
1 e4 O9 P+ L- q. {+ \2 g I# }0 h5 r9 ]5 ?4 @' q0 R( z
begin P_Creation3 arriving procedure8 ` S- _# j. j
while 1=1 do4 {( a2 W' N7 W5 ?* U# P$ I
begin& w) z$ P& U0 \! p
wait for 1 sec
* s& w8 j1 R* y0 T' M9 W; H( U% R c' ^ create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
( g" y) p% x5 _% l8 n7 N end
% g6 ?8 |) h7 y% j' |end
% x! Z: D* b# T3 y+ P d P
+ x' v" ?' T2 i$ G: qbegin P_Creation4 arriving procedure
% y2 @, s, |: D" W, E8 A( Qwhile 1=1 do
0 ~' m% w: X& ?) J3 z( k, g; g* k begin2 M+ g. p% B6 ], {* n/ M
wait for 1 sec
$ p# A- X/ B8 j; M create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
# t3 d" B! R* J3 Q/ }4 a end
. c& @7 ^7 s6 B! O% yend
% x- N5 @. v w4 J+ e1 I- y- c P
0 `& P+ S: v' Q3 Z8 N; u1 T但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |