谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);$ B; ~; {5 t+ B7 U1 d
begin model initialization function* Z0 s) _; X& I) p
create 1 load of load type L_null to P_Creation2& j* a+ ~! K6 @& l: @1 @
create 1 load of load type L_null to P_Creation32 |1 x* q& ?& J5 r! T
create 1 load of load type L_null to P_Creation4
/ i$ U3 N( `( Z return true ) O9 e" D+ Z, G2 \* G, X. l
end% y6 j2 x3 ]; k ], S9 U
: W/ h2 F! n! c1 U
begin P_Creation2 arriving procedure2 j4 e$ D' Y9 ]2 d; l6 y# s
while 1=1 do
+ j6 G( c8 H2 ~! q begin2 S2 Y0 r/ g; }" ?0 G, ~2 x
wait for 1 sec) Y6 c* g' I/ d; t9 r
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
, B/ V, J- {3 G end1 w. Y8 M2 ^3 E+ ?; T* o8 `
end
% p" P( r' m* q# `8 y3 L/ {% P" u5 `; m) x' ?, }' E0 |
begin P_Creation3 arriving procedure
0 E9 @( i" z1 e& jwhile 1=1 do
0 U% V0 K) I+ H, ]+ ^ begin
/ L) C! j; ]! r V, K% R# g. M. L wait for 1 sec
9 b5 O: G% s# q create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)0 ]: T1 B l2 s$ `
end
/ l `. X2 x$ _5 f. Mend
' ?* j* o- e9 j- x) T8 Z7 D4 [8 n# w; v3 U O
begin P_Creation4 arriving procedure# a5 n; ^3 H; F2 X
while 1=1 do
% J! ~+ h3 D2 F' `6 `+ B0 N begin
/ h, ]+ h& g' I wait for 1 sec+ E2 Y' R/ [, Y7 \7 V$ T; ^ R, j
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
% y1 `6 [! H- e$ x end
/ G8 Q# h b, `7 W& mend
3 w5 `$ G" l) p; w- ^2 w' B* g& K4 j% p8 v- P6 ?& O& Z
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |