谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
. |8 J8 A: p- h5 w! g6 {" b Lbegin model initialization function
" h( R; L( }) r# L create 1 load of load type L_null to P_Creation2
, H7 u' V0 A) O4 ` create 1 load of load type L_null to P_Creation3. T8 h% x+ Z- F
create 1 load of load type L_null to P_Creation41 m Y x" b! ?
return true
9 ^6 P# E! q3 Bend
w, V8 l- G" _! o- C+ ?
/ T; M7 l1 x% \3 N' Z5 x( m$ Ubegin P_Creation2 arriving procedure
: f# ~5 O4 h7 ~, W9 ~1 ~/ Twhile 1=1 do* L, `2 y/ N1 l3 O4 @
begin
1 `7 K2 z$ R1 z8 x; Q$ U9 g; { wait for 1 sec. @/ v4 K+ p) K4 \. U
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)/ |3 f! h+ h9 c* m# D: }7 Y/ V
end
3 [5 f( C$ M# Rend
5 r6 Z, d( O7 w: X- n9 l! v# {
3 B; V0 v& u; Q3 S [begin P_Creation3 arriving procedure
9 o$ M+ d7 O( Uwhile 1=1 do
2 w, a4 |6 v9 o% g begin
: E6 [2 X: N% u9 a) h/ w# } wait for 1 sec) h- s% j2 a3 s& d, S# I/ W
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
7 @( C0 B6 |: [: z- T end
1 }* p+ M0 R+ I# W( H1 Eend
! n D; X; ^; V: ?3 a% Y- X. S, v
" F% N5 t$ B: y) {7 P$ i; n( vbegin P_Creation4 arriving procedure
0 q4 B } _+ P0 N+ C( i' [ U& l) Zwhile 1=1 do% Z G# C# E) {& D/ w& [, p5 w
begin
, P$ Q2 z$ s2 z0 c4 t wait for 1 sec7 C. a" s% ~& K" s7 [3 y
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die), m# Y5 S/ J" C3 Q$ m
end9 q4 z# K h+ U8 ^& \" ?7 p
end
0 L0 O3 P9 l- d1 p+ S1 R! N: m+ E# }1 L5 C: o7 Z* W8 ]+ z4 G& t
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |