谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
# U) }+ q' o G7 |$ K7 A9 N, Hbegin model initialization function
u/ _* }# w; N3 G, M create 1 load of load type L_null to P_Creation2
4 R; A7 ?3 g/ f' B create 1 load of load type L_null to P_Creation3
) c5 G1 z P4 y! V x& x& ^ create 1 load of load type L_null to P_Creation4
( I0 |' U7 a# | |" b" v return true
8 x G( |4 o4 t: N$ W% Pend
% f* I# ?; _ x: z# U9 B, v& Z$ q5 ]" ?* a) _
begin P_Creation2 arriving procedure
7 b7 K7 d+ d+ J( l Gwhile 1=1 do
: F& C& u- Z$ c" }7 w K# N begin
d' s$ G- w3 n+ H; m8 m7 ^& m: ] wait for 1 sec/ Q. Y7 j" D2 L$ M1 L6 i8 h- ?1 F
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)- y+ V1 @1 z3 s# X* V. z8 f9 q7 O' p
end
1 q- u3 d* c- g0 \) N V* Mend" k( t: p$ G6 B) i5 b
8 z) ?9 c" @ x+ v+ T2 lbegin P_Creation3 arriving procedure
$ N9 o# ^/ o B7 ~5 I* Iwhile 1=1 do
( ]; B3 r) b/ {. N, i begin
, a& c0 H" I2 c* u- R, l' B6 e wait for 1 sec
, g0 T" f9 }; Y, o, V2 P create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)4 T" u- c9 W2 X' Y$ x
end
$ [" M" ^& f/ h. n4 k- y& Q4 I! @9 M/ uend - g$ M: u4 C9 |+ {* @
8 f4 Y2 G0 d* P% n+ E. Y8 D5 [begin P_Creation4 arriving procedure
6 s$ I% G' t4 z7 d/ f+ Kwhile 1=1 do
, W) R1 x7 R+ W- [8 ^, G0 R begin# p2 p( ?' D# S1 L7 a
wait for 1 sec
9 F) w$ h2 U" r8 V5 ?" z create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)5 D# W) C1 |% A$ h5 m' `5 m
end
$ O2 e9 w1 r% @$ Q% ]* r" xend
7 v( N; P! U# [, j
2 h3 J% b+ C i7 o但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |