谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);* @2 Z7 f9 f; b0 |( C1 q
begin model initialization function
" }* V6 u# C2 i; B1 [: U# m create 1 load of load type L_null to P_Creation20 G' ~8 K" `- m0 C; ?
create 1 load of load type L_null to P_Creation3
% s( p$ _; S/ m; i( V% @- n create 1 load of load type L_null to P_Creation43 Z% j' X. K( _% K, A( p, i; ~
return true
" K, Q' N# Q4 z2 m) L- bend3 r7 O, k: O; Q" r
& b5 K. q1 b! ^* |6 _begin P_Creation2 arriving procedure
. P! g' m. s( J( _while 1=1 do
; f7 ?- x0 ]/ c. I! w7 ]$ M begin
! ^$ r+ g1 v1 C' ` wait for 1 sec. P. N+ m5 E* A
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)+ J0 Q' L K+ P! d
end
5 l q! x% u) A4 h+ Lend" ]8 f' u+ X0 {
* B/ J6 _+ c# Z5 J {2 Y- o
begin P_Creation3 arriving procedure. q* K5 G; ~4 E) l1 P
while 1=1 do
& F, t0 K) \7 A3 `+ u! I begin+ y) x; x1 T o
wait for 1 sec% ]/ u7 M2 Q/ c, U7 @& b: u$ }
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die) P- H, `2 E% G' c
end- p: R- i2 V: B( \7 Y
end
$ j$ j5 l7 O. F1 `% Z& U- p0 [/ x8 y' ~! G( u; M% d
begin P_Creation4 arriving procedure
% u% c% j+ X; K, V% Y' gwhile 1=1 do
1 {/ @4 Y9 e+ A( \0 o9 M8 P begin
2 K1 @ ]' S8 A* p' I5 [# I) w0 U7 i& g wait for 1 sec2 J5 K% j: q1 n+ h: v" F V8 P4 Z
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die); d: V0 d) y+ J, N9 ~
end
2 { X X! l- Z5 tend% r: i. E+ B2 o
5 S4 X; C, F5 `/ |5 Z% E但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |