谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
% @% G% H. o9 x$ T& u# C' zbegin model initialization function
& W* P! ~. v3 C4 ~% `- ` create 1 load of load type L_null to P_Creation2" R! ^$ |1 X7 ?. T! _, Y
create 1 load of load type L_null to P_Creation3* ], M+ V" g7 K3 U
create 1 load of load type L_null to P_Creation4
# M9 r- _4 O7 T! k3 v* p' _7 } return true , S. E4 j1 x r/ V
end
H1 k8 y- U7 _ Z2 W9 X: a! B+ g$ `) H2 J! Q1 q! `$ s
begin P_Creation2 arriving procedure) _ l' L, O5 ]! i! a# H/ a+ k
while 1=1 do* R; M- |. M, y# }5 x% X# z
begin
& m3 y8 w* I/ { wait for 1 sec* c1 k+ s; |, g8 _
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
4 H! F6 m+ r ? s1 z3 n end
! w7 Z2 s) L9 t7 `' t; Iend) c, M/ @7 ?" L3 r. Z
( J, u; r! _0 z& Lbegin P_Creation3 arriving procedure
9 V1 `. O6 ~3 Y1 E0 ~( W6 ]while 1=1 do2 O5 A$ f/ ^5 E
begin/ i9 Z+ ^2 Y, Z, c( m( ]+ A. F
wait for 1 sec
z- l( d- y+ c* ? create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
4 s8 s! Q7 B1 _% R end
/ Y |! B: t& R% a) `end + ~: t5 k) \* w" J" k% F3 N0 z
! q9 ?( T% _1 C
begin P_Creation4 arriving procedure( ]& r4 s. j: h9 G1 b4 w4 k
while 1=1 do5 L0 Y r! t/ ^& r. Z
begin% @- q/ j' j& h
wait for 1 sec9 _ y, I" F8 t4 h3 p) C8 B
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
5 x* c: N- w& m l' K6 C end5 G# }; `4 ^% O5 _
end
, h* R" C& z2 ?& Q, r% S5 L8 }% R$ E% ?; t& b) w: Z! U) A
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |