谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
& [, u9 N: `" H2 Z" sbegin model initialization function
* o r7 w0 J/ R% [8 ?5 N% m7 j create 1 load of load type L_null to P_Creation2
: H8 {# g" }6 s) B create 1 load of load type L_null to P_Creation3$ A; e( N1 G+ q6 e# T; X! [
create 1 load of load type L_null to P_Creation4* A1 D3 E5 L0 R9 e
return true ( K2 o A6 _/ R0 S; H* B) J
end
/ f, e7 b' N: q! S( H, d+ N8 u+ `3 ]0 z
7 o" s F2 a- t. x! d; m$ Qbegin P_Creation2 arriving procedure
5 o8 i, R2 O. K8 Q4 N) i/ Pwhile 1=1 do
' m {- h3 ~+ T6 J0 r J begin
* `$ K; h0 M; |/ g wait for 1 sec% h" { Z! S2 {' D( a/ d
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
1 a# c% y9 [) S2 D1 h! d/ r# B& y end
! H* m6 N2 ~( V' F" Zend3 A8 h& Q( I1 c; a
' t, ~* K2 y% Z/ `; P0 fbegin P_Creation3 arriving procedure
; Z) X( ~0 J( s- R) X! @$ k9 |while 1=1 do" ], M# M6 v% @4 f- q9 d
begin" m/ n5 {' o3 ]3 h( e
wait for 1 sec
: K) j* p# R/ h4 g7 B) v create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
2 N4 [- ^: D, j" e end
% F( ^4 X" d7 v6 Oend " e- G; F W4 y. h! f/ R$ [
( g7 H2 y# n& b+ F0 j9 E
begin P_Creation4 arriving procedure
3 U& l% _& X* N0 A& _while 1=1 do
( Q; Z i9 f0 f begin; a" \; q3 p* C6 u |
wait for 1 sec8 h) o! C! c3 w) H$ P' \( n
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die) V) S" N, t: v4 E& L
end5 S, @ m: ]# ?0 x" d
end" M4 S4 ~% R* y+ _
2 F1 Z3 u; N$ ^
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |