谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);& n. N4 L5 M5 [# I6 R/ J. Y
begin model initialization function* W$ x/ n# M( k% u/ O; U
create 1 load of load type L_null to P_Creation2
! |9 ?+ r" O4 q5 T7 O2 E4 E3 [- y create 1 load of load type L_null to P_Creation3
& r+ |$ j$ I* D$ I- t/ f) | create 1 load of load type L_null to P_Creation4
8 G. _& K7 a' y e return true
4 \4 C$ |- y% G$ b/ F/ Fend7 Z1 G5 `6 r6 F1 s
. y+ b& M1 H4 R K6 r- X
begin P_Creation2 arriving procedure& `0 p$ [) V! h1 {7 k- j( d# \
while 1=1 do1 O( t/ f6 V. v) h/ a4 I
begin, @8 ^8 Z- e V: q/ h9 f; e
wait for 1 sec$ b+ T* k& C& _9 c) x
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
4 v( _+ Q, r: Q0 e8 K' ~$ J end b6 U5 P. x$ c+ v
end% W. q: Z) M" ]7 O) B- h
1 B" U9 x( e# \+ I' P
begin P_Creation3 arriving procedure
2 T5 L& S! E3 |# h$ P% Z) S, {while 1=1 do
: h# ~# X% |; S, b+ y begin/ L( x9 S9 T- N4 `4 r
wait for 1 sec0 ?/ C3 \* `# P2 _* t [
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)& l" E, V. e/ ?
end i# w4 z+ C# |' g, b9 }8 y/ z8 m* u
end " u; O; q H- z. e! E/ M
& V. F! e, _4 V7 F7 ebegin P_Creation4 arriving procedure
6 s7 v* X4 J; ~8 R8 [while 1=1 do
6 g! \( K# B( U: M( J" k begin
8 Z. r' T5 w( t+ }8 h% U& u! k wait for 1 sec
# @4 N- |% ^4 l/ N" y- z; e create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)& w. g, o8 x9 U
end
% G& s; g5 o; B! I8 Qend& i) L) w% f% N7 V: }# a- X
% v A3 g. z/ v2 n但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |