谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
, s- v4 a5 h" dbegin model initialization function5 t( o* [) z* V
create 1 load of load type L_null to P_Creation2, P/ T- g. w8 |/ y/ h- q
create 1 load of load type L_null to P_Creation3
6 A& A) A4 L1 p! ^ create 1 load of load type L_null to P_Creation45 U% w/ Z, o1 }2 j% H, g
return true 8 d1 f- c' `8 {) ^% I- Z
end9 R% B( l( c9 u) O) C" a1 t
, K" j2 u& {3 V1 d# [/ z! a
begin P_Creation2 arriving procedure
: i. E Z$ }0 {2 O9 lwhile 1=1 do8 C5 T- L, `8 T! x$ T' Z8 y
begin) B% Q' }3 M# ^
wait for 1 sec: @" f9 F4 c) L& {9 Y1 r5 P
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)) |8 D9 B! X# U
end# i% R! R4 W6 k0 A- H" v
end5 p% y& O3 Z, O0 h* u6 b
/ ^0 C' D1 t, Y: {begin P_Creation3 arriving procedure+ ]( `; Q; q: _4 |6 N. k
while 1=1 do
3 \: \' ~: H1 x8 |/ {. y$ L begin
& B1 Q& }( b! t6 |6 Z wait for 1 sec
$ ]5 Q$ _* t$ p2 |6 _ create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)6 D2 h+ J6 L+ J0 M6 O
end( t2 E. ?' U# t6 N2 Y+ C! _; \
end & n' y, D5 x1 o9 Z( e( U% H
" h9 b9 n1 B4 h6 R/ ?begin P_Creation4 arriving procedure
1 D+ C& T) ~% O0 Iwhile 1=1 do3 U* w+ v0 ~. j, R K% a
begin n. C3 i ^% u( z% W
wait for 1 sec
3 P, e3 f3 F" z3 w create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)! j- w9 J: w+ G+ s. m* h7 u$ p
end
$ j" ?% o4 Z6 H) m# `end
( _3 z- |9 \; x
) A6 @4 P/ s* @" b8 _但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |