谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);, Z0 ~3 P( ^- T; Q' f4 |5 b- c! g
begin model initialization function" E2 O t/ v* i9 }: ^! I
create 1 load of load type L_null to P_Creation2
% A! h4 H3 C8 T create 1 load of load type L_null to P_Creation3% M- U. X- K/ c, D+ d# R' w
create 1 load of load type L_null to P_Creation4. c; m \9 D& L! d/ [& Y
return true
2 D0 D- n3 B6 I5 dend6 m3 _" J. R( q3 T0 D' [: C5 z
4 c$ u! j/ [- @) y' J) fbegin P_Creation2 arriving procedure; f; a/ {! u4 N7 e
while 1=1 do& R* r5 s3 T5 r s! r8 W1 D$ |
begin/ f, d* n0 C4 K7 w6 f
wait for 1 sec
3 K. Q- r- X1 `6 h+ P create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
/ j$ o; U! Q# D" r, b* X- T& Q end% h; o5 c/ L2 F0 n; l2 V) @
end3 z6 t8 x% H" M% ^# N5 z6 f
( S; ?. w" L+ P8 |6 J* R! p) C
begin P_Creation3 arriving procedure4 U$ S# V& s. U: J( S6 `% W# m$ e
while 1=1 do
0 u! z& V/ ]+ z. n, H# J begin1 I- v( E, P0 R( F0 @
wait for 1 sec- Q; @; e% V" [* ?5 l
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)" E4 ]) Z( H( J3 g% `8 o
end U, Y p" M, U
end 9 h% o7 {- Z+ p" u
, W0 h" K( C& a4 U7 \. {9 b4 E
begin P_Creation4 arriving procedure$ U2 P+ c! e5 ~
while 1=1 do
# q |5 ?$ S+ g3 u. E begin
7 }, {3 v& Z5 _6 w& x9 U% ~2 z wait for 1 sec
/ p5 g+ W3 i- _% k create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
0 f+ [3 I; H) Y4 j5 B end+ D5 c8 _/ C) w8 E8 I
end6 H& K. F9 F, g- E/ n2 Q, P! Y
4 Y: f" u- U5 D
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |