谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
3 z7 |) i4 e$ i- a! kbegin model initialization function
1 p2 B2 }' }1 J r- O( E create 1 load of load type L_null to P_Creation2% M, @8 a% y' n5 `& j. [; u
create 1 load of load type L_null to P_Creation3
S, P8 x0 m* x create 1 load of load type L_null to P_Creation4
9 w- s/ m) r% f" y return true 6 H: h% I# L: Q
end
- {! K9 Q* b9 C( j: ^: u
% N' e/ K) e8 o t# x& t; @begin P_Creation2 arriving procedure' m: v2 S( E* B( `
while 1=1 do; L3 Z( }8 [& R' G u l
begin! D4 u% d) I6 o+ E
wait for 1 sec$ U3 l0 D D" ~7 o
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)' k7 g4 c% ~# ?- ?
end3 E; ]: }* N# R3 {: z6 [/ ~% m
end% @% N" v' s) K0 @
+ b$ u: g K& ], n6 ]# @6 Q* A
begin P_Creation3 arriving procedure1 Y) I4 Z! r" o: ^% O: r, R: b
while 1=1 do
# Y$ q0 H- V. z) H& E8 ^ begin
& _4 Y$ Y l! z6 N wait for 1 sec
/ o, l! A1 s9 r0 F- W create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)) K( c' H' i8 q4 r6 i
end6 \$ k0 Z& B4 |* G
end # P# ]4 E) {: R% O- e
' Y8 S: h7 N* y8 G' K2 Y- _$ }
begin P_Creation4 arriving procedure8 T" u y8 {! {( }, B+ P9 n
while 1=1 do, m3 ?/ w$ ^9 z3 s5 K
begin
2 C6 K* c! ?: z9 T2 \ wait for 1 sec
; F7 m4 ]; ~3 }% N create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)9 u( d3 S3 Y3 Z0 l3 Z8 P8 b0 }
end
}0 b7 l6 G' X, r1 L/ Jend
, c* s" M4 N8 X' Y$ l, ~. }. F7 R M, R. S) I! [) p' C3 s [2 E
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |