谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);3 b) i5 `% ]4 ~$ t- B
begin model initialization function
4 q# O- o5 J1 J9 |8 { create 1 load of load type L_null to P_Creation2
) B& ]1 V. o" w create 1 load of load type L_null to P_Creation3
& Q8 L4 |( }2 ~) |$ E create 1 load of load type L_null to P_Creation41 Z6 U; }3 j8 t, V9 g
return true
7 }2 r1 i7 A ^/ bend! ~: ~- i$ Y7 k
9 T5 Y% @4 b5 y; V8 P0 O$ R2 k
begin P_Creation2 arriving procedure
, Q1 u- W0 r# v- ?3 {while 1=1 do6 Y& k% H/ d+ d N, k
begin G2 R* D4 @7 k; J) d& j
wait for 1 sec
6 ]$ Y% K* T5 e4 q: B- P' p create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)2 ~/ F9 F: i" X* L0 \5 A* X
end( q6 o4 G, h5 ~) N5 X
end! Y5 B; C* T0 p v! x
" V. H# r# V/ v Y- kbegin P_Creation3 arriving procedure8 z p+ E7 ^2 S
while 1=1 do
9 p) @, X) G7 x! ~3 K( T4 e% Y begin
0 H, z+ p8 m6 U wait for 1 sec
* [5 p Y2 O/ `/ {( \" o3 A create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
3 ~0 V2 w: E! M) T7 r( P+ B. [# V end
B+ j" k* f, Z3 gend
, B% z) a# H( P# [! O0 x( k
0 D5 N2 z: U4 T% Dbegin P_Creation4 arriving procedure9 |2 |$ W: H% Q. u. H
while 1=1 do3 L0 M' a7 c, o( S' k) ]* w+ z
begin
1 s" Z" N+ @1 z0 c4 l5 W+ \ wait for 1 sec
6 A) v& \2 p' {4 W6 r create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)4 x! l' N. M* b! Y) v( ^; |0 X
end& I: b, k% N# f4 n
end9 T/ a4 z* A, X0 G
4 R7 Y, V0 c* L. f4 }
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |