谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
% k4 S: R# z# Bbegin model initialization function
1 t& B U! d' `- o* A9 f create 1 load of load type L_null to P_Creation2+ h# s( A3 a, F+ S
create 1 load of load type L_null to P_Creation3
0 j9 E# T; i5 O0 ]% k create 1 load of load type L_null to P_Creation4
) D- f4 U$ q5 _# l# `, U. f+ v return true
6 J5 M; b/ |& l3 `2 ~7 R& O8 Wend
7 n6 M9 A6 F- h, T. m+ E7 J
' }# ~) N# O# v4 {, ibegin P_Creation2 arriving procedure
0 a8 q, Q; j2 H }while 1=1 do" b3 O; M4 s3 \+ n X
begin: q3 s* u0 _2 C, c% {1 k
wait for 1 sec
! X) W. ?. A* X! \$ F" l create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)3 A; f% J, R! ]/ j6 @# x) ?. e1 g3 Y r/ D2 ^
end+ a$ T1 r( P# P- u6 v# L, Z
end; |4 G: O. \" A6 u
* a' @5 L9 a) y$ Hbegin P_Creation3 arriving procedure
' k! E4 v, s4 U/ Mwhile 1=1 do3 d1 }$ w. r- U* x. j
begin
/ e% k* k; |+ t; s wait for 1 sec
4 h* Z7 Y0 \+ f1 d6 N2 Y create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die), n, V \" e5 l, l, [
end; e3 s$ }* y& F9 [" Y$ c
end
) t% l% m# d( L" R' ?9 p9 y( s
: c/ |" J: `; ]' Zbegin P_Creation4 arriving procedure
7 \! {! q3 g8 Z5 R# Vwhile 1=1 do$ j1 r0 y* p! p Z1 I
begin A1 u' h! h; {0 y0 T
wait for 1 sec
: t- Z4 G( K! X: F create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)9 G' U0 ^3 W) S" }6 ~8 {
end0 H7 S5 M# k. X h' t
end1 I6 q/ R: p9 a1 r! S; B
9 M! \/ Y' p2 U! o$ W, d- {( t
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |