谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);' Y+ Z) E8 A% A+ A: A( F
begin model initialization function* F3 I" m/ X a
create 1 load of load type L_null to P_Creation2" P2 j, }, N7 e' U D$ X
create 1 load of load type L_null to P_Creation39 g6 G( c* L" T1 R0 j- V( ?
create 1 load of load type L_null to P_Creation4 n% Z: w2 e' ]% D1 \# z7 C# I8 Z X4 k
return true
4 {5 R1 d8 I/ ~* F% mend
R, B& h* L9 U6 g7 {. V. c# E2 C, L' n% T
begin P_Creation2 arriving procedure3 n1 P/ c& m* y+ t* U
while 1=1 do
3 p7 w* A; o0 r+ D# y begin9 G+ B4 p& V4 O! }: K4 o
wait for 1 sec
1 Q/ L+ N: \1 [4 b) w create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die), h9 \# @! ~) F g. {
end9 a8 L9 ]4 Y6 Z; \4 R: Q
end
, `7 }* ^/ n! M" U
0 ]) @+ d# w6 k. u* qbegin P_Creation3 arriving procedure% _; t+ N/ ^# i
while 1=1 do
2 l" L ~* b4 S begin$ O& ^6 v! V8 e6 H# ~; b0 z( ~
wait for 1 sec
- z7 e& F+ D* C create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
4 o+ A& n' U/ x8 L H. C; B" j4 z end
- F! s5 m# l7 I! F6 [1 ~% Xend
, N/ h3 l8 G7 f) i c# Q9 ^6 Q4 c/ P) J2 G& o( L/ ]
begin P_Creation4 arriving procedure
& W& f' x% Q5 Z0 d! }while 1=1 do
: }; G% ]- @: W# F begin
% ?! U! y4 [2 ]& |0 i wait for 1 sec
" l, s, a# M% m: J0 Z+ c create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
1 y5 K% s' M' B0 Y! G end
4 h% k) Y s& u3 O2 t0 j. N. H) K1 Pend
" E0 s2 ]% b" V
9 o5 Z+ `9 r' d: u3 M7 Z4 Z但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |