谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
: X' v- H; y1 Ybegin model initialization function
+ L/ u7 y8 J, `* U+ `) y create 1 load of load type L_null to P_Creation2
. m1 B: _, b3 V5 }* ` create 1 load of load type L_null to P_Creation3
# Y7 G* z/ p, I% J create 1 load of load type L_null to P_Creation4/ O9 x( ^0 y5 w& g( H1 e
return true : \& C- a4 _+ F( H4 H
end7 @/ J- j. W! O% i. n* {0 l8 {% j; I
% _# X3 {9 V$ V8 k5 Zbegin P_Creation2 arriving procedure$ d9 G! w$ F+ c# o4 R ?4 C
while 1=1 do4 w& \! _, ~- X' a
begin
/ K; q! I. |7 D$ H! Z4 g2 Z- j wait for 1 sec
) V. l7 I5 A4 T0 C create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)- g( k- K) A" Z8 v$ u
end
% H0 `& E1 @: u& }6 g3 s5 r- _end
F7 D+ E9 ?5 H4 b! i. y2 h
) c1 D1 Q& D" q% P+ B" m2 c; ebegin P_Creation3 arriving procedure
- ^; Z, b3 x, }0 y. ?/ vwhile 1=1 do
6 v0 ?$ u s1 \% K9 g, [/ v begin/ l8 H$ F' c! p% T/ @6 z
wait for 1 sec1 T( c1 s; h) q9 U: g
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
- A2 B8 |7 d, P end
3 e! U/ T' m" O& X" A4 t7 h7 iend 0 W5 U. R; S' n8 a- b T* R
1 S& Q* C$ r( T4 X5 m. F8 k& `) z
begin P_Creation4 arriving procedure
7 u$ w' k% u; ?4 i: |* O @6 Nwhile 1=1 do {, J+ p6 L+ W
begin
- n1 K# y8 C0 L/ N wait for 1 sec+ T4 g- A& j9 i, ~" z+ d
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
7 b0 l0 T* j5 O" C- ]4 {5 x end
5 f" }/ H* g) [, A, w: cend4 b; t4 k$ P6 } N- ?3 b
5 R- |! y4 f( ?
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |