谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
6 I3 w m( `" o) K: cbegin model initialization function
+ C v5 ~/ S8 U! W6 {' H* G' q" h create 1 load of load type L_null to P_Creation2: U- j' f, T9 I1 j8 _
create 1 load of load type L_null to P_Creation3. m; R4 ?; r9 x. }" L& @2 \
create 1 load of load type L_null to P_Creation4& v+ z2 m1 z8 Y8 Y; ], C' ]3 m. x: M4 j
return true % O, b4 O2 P( A" ?0 |( t6 G
end
/ p: m; {5 d% q( {. w6 s, t9 H2 g! w) h
begin P_Creation2 arriving procedure
; m9 K5 U6 K7 Z+ B9 gwhile 1=1 do2 ]/ ]4 H, z2 u5 `
begin
& D0 O" n) ^% _9 E+ `: C ]+ \; Q$ N wait for 1 sec
# }* O) ]2 R) x, N create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
! R0 ~ I, I( g9 e) h4 l$ d end
3 Y$ X, o; r+ Pend, u4 d8 h9 x$ M0 l5 A3 C
! e- F$ p9 u* I- y# V6 b
begin P_Creation3 arriving procedure
. a0 p1 S. |& _ uwhile 1=1 do
+ G" i2 F) w% v/ } begin
+ _0 h+ d9 U. U% h5 P: {) v% P wait for 1 sec
7 v8 f$ _8 |& R: K create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)* r1 f; h' b8 w# P1 ~
end& j$ @6 F) H2 l, c0 ~9 F7 k
end
% Q7 ` L3 S& e, W/ t
# W/ u- w: `! o+ }begin P_Creation4 arriving procedure
# i* _8 q# U$ |& J* Q8 \; pwhile 1=1 do- d* a) O8 n- t5 B
begin7 w4 j( f% }9 }/ P
wait for 1 sec
+ [3 V. N C, g# ?) @$ c/ L/ V create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)4 S9 U a1 w* v1 f
end
6 S6 _- q/ N0 h- c# M3 yend
% U3 N4 p2 ? u% X% ?( Z' {9 Q3 E1 v; K* z/ K2 J$ B
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |