谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
2 q! O. ]( W/ i# J# Fbegin model initialization function
. g/ _6 ?" l. ] create 1 load of load type L_null to P_Creation2
6 Z5 r6 m2 \ m+ k5 f! O' b create 1 load of load type L_null to P_Creation3
! R- ?7 o# l0 K" i/ I7 h X: E create 1 load of load type L_null to P_Creation4
4 r( l8 o9 L! c, O" X- y& x return true % g% x8 B* p. e/ p# _
end8 }" n0 z, O, }6 s/ U8 c
9 L+ W! V2 r! H# ]$ _+ h
begin P_Creation2 arriving procedure2 D) z" h, G: A% _: l5 m5 [6 }
while 1=1 do* E. k$ p7 f2 {+ r+ j
begin
R+ ?) |3 A- @: k wait for 1 sec
7 {8 s7 l: X; K. H create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
1 t8 i3 v1 n) I, R end
& k" d3 ]* }3 \$ Send
" U X3 ?0 J$ \7 h6 }, H
) e6 A- C. U: m( obegin P_Creation3 arriving procedure
( l6 ?! e8 y, v5 X) Awhile 1=1 do
! U7 x X% ~ \6 W1 z8 j begin$ H0 i# |0 l B, I! R
wait for 1 sec
' g" W" @6 L6 C1 W m. c k create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
3 i/ I* r P/ E$ x5 e end
: U6 E0 ]: o" s' y0 b* Q( gend m/ j9 l! X# v3 _9 F
4 @% c. d$ K& z nbegin P_Creation4 arriving procedure
& j' K+ Q% C/ P$ Cwhile 1=1 do
% `1 H# U0 D- S4 g( u( L begin
* p2 I7 s, m9 G& \7 d( u- r0 ^( x wait for 1 sec) X0 L9 C0 i9 Y7 @
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)! W5 [2 o% B- {/ m1 g1 R- }
end1 u# A$ `0 y+ m* O) V7 I U
end) k8 _5 m4 d8 Q1 J- T7 K' Z( k
; D# O" u8 v. A, B
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |