谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
! z8 b! n( o8 M u3 J' Y/ K, dbegin model initialization function h" J! V4 W7 j
create 1 load of load type L_null to P_Creation2- x) q! g2 c" g! |- @6 A- A) Z8 U
create 1 load of load type L_null to P_Creation3/ l+ u7 E0 ^# Q1 E
create 1 load of load type L_null to P_Creation40 D/ I; n) }0 n9 D
return true ) s7 _! y" b) I; Q. W; {$ f; ?
end
! @, l! ]9 V. W" C
1 N6 h9 z! K1 Mbegin P_Creation2 arriving procedure1 }' |4 ~7 p% E% u$ r8 H
while 1=1 do) ^6 E" j0 u& `8 x5 s
begin3 v! P; E. f2 _# z7 Z# I0 A
wait for 1 sec/ J) O7 v7 G$ U b+ G
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)3 @. N+ W' J0 H. V0 C4 x
end2 M9 e( K, B8 C
end
5 y0 j$ N+ X1 }0 g9 _7 s; U- n* d( V. S
begin P_Creation3 arriving procedure* l; z, R* z* s# F
while 1=1 do
* ~% l, V; s$ A+ V begin% u" z% A3 t: Z. z7 \" u
wait for 1 sec
: ?( F1 E/ b5 W8 P create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
, }8 [0 k" V+ n. ?; R, l end6 s; d5 u$ K! S; A
end
0 r, O' S% s) J T" ^3 R* [# a. @- B5 N1 M8 f
begin P_Creation4 arriving procedure
% A* y" {: ]* j M0 iwhile 1=1 do
$ f1 d/ m* s& q+ v! D begin
7 B* ^4 t; n4 ]! K wait for 1 sec
5 `0 X% W O5 Y/ Y: Q create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)9 ]( o( w) D" P, M
end9 O6 g% k0 Q. r# G2 x+ v# \" J4 P0 P
end* k! m$ l' S3 f
8 K; x7 g2 D3 {! a
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |