谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);: h3 e$ f0 `9 Y4 [8 N# j
begin model initialization function
: ^! F8 W4 ]6 A# n- K! o create 1 load of load type L_null to P_Creation2
9 ?9 d/ |) W1 o3 r3 [ create 1 load of load type L_null to P_Creation3
# a' D1 Q, I) C8 b2 t! B2 { create 1 load of load type L_null to P_Creation4
9 p+ m9 H2 d! K& y6 c- e }) D return true
d2 a+ }3 u/ E) send0 ~ e# f9 F5 ?% {4 I
% o. n1 l7 g- C/ K/ P! o- p+ \
begin P_Creation2 arriving procedure+ g6 I/ _) s5 _$ w2 q
while 1=1 do
, t, V2 J2 i" D' t% M begin( e0 F/ @& n% J+ _2 d& j
wait for 1 sec5 J* N a$ J& O5 G: G9 D2 m
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
8 W( A* d" e" z- m end B1 ?3 U1 X. G/ U* ~7 R7 [9 Q
end! O# t8 b* Z( @
; t2 k+ k7 o: F; k. l
begin P_Creation3 arriving procedure) Q; f+ C B4 }2 Q
while 1=1 do8 f8 A4 O0 }( z' r, I* u
begin
2 g# i' V2 p# |- J; F1 B wait for 1 sec, K* A8 ]0 H5 s
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)& c6 n A3 L6 P) t. h
end
6 R8 c- ]$ H2 u; t% w+ Jend
, r+ {& `% ]& N3 e9 o& ?: Y g, d( k6 m8 T' I9 N5 F
begin P_Creation4 arriving procedure
% z0 k# E: I6 s" o* d' k0 Cwhile 1=1 do
- B. H; s* F0 `- W begin
b- e. Y6 f) ?( I1 h! x wait for 1 sec4 y6 ~0 R! c( M6 Y" N9 R7 [8 J0 t
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
1 z1 C- u0 t" [. D$ |' [; W# q end M- o Y8 a# G5 a, [
end
6 E! N" { L0 W& J4 T7 Q, b9 M" c6 x+ i2 y+ T I: D
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |