谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
7 U$ l7 G- K# Wbegin model initialization function. I+ N* E$ V: x0 G$ a
create 1 load of load type L_null to P_Creation2* I+ C& H2 U3 O6 o* P+ p$ @: Q
create 1 load of load type L_null to P_Creation31 z' c2 @8 \; e. c
create 1 load of load type L_null to P_Creation4
5 S! P* s7 c( V return true 7 e9 i3 M$ i7 x+ S- o4 W
end
3 n+ u& G; E3 [0 e- \- I
5 R) d8 B# R' r7 P. Xbegin P_Creation2 arriving procedure
$ W4 l9 r2 }" M, S4 Qwhile 1=1 do
5 z7 ]6 m6 b1 w9 v+ U7 l# p( @ begin
$ x$ U* y& \" x, y6 M: r wait for 1 sec
) F( ~# e, p, y4 X, u create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)8 c. G( G. l, {5 U; k4 d. Y
end+ p; X2 i8 X( @$ j
end- m- a# f E1 ?* q4 _
/ e2 q; s0 c* T" n4 K% Y
begin P_Creation3 arriving procedure# P, C1 S9 u$ x
while 1=1 do6 L3 i' `, S0 K$ X) c9 d( A5 G
begin. O. W6 ^7 s( ^9 L {( Z3 u
wait for 1 sec
/ ]* F9 n! m f J4 a create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)1 H! _2 s8 u9 W- O' n c! n
end4 N/ A" n, \$ N* O5 ~. N' r( I
end 8 s% l' X1 ]" g$ V+ {1 I
8 L2 h9 A. r% u" E5 E3 _begin P_Creation4 arriving procedure
: F; H! U V4 N# x0 cwhile 1=1 do. G2 C0 X* G5 c* R5 J$ h/ O
begin
8 |% N- ]0 _. K- u0 z wait for 1 sec) k7 F! L: c( Z, Q& v1 J4 C+ E
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
, { _, a. k3 N5 K/ b9 d3 E; ` end
7 R. ] ?! X8 z5 A9 V/ p3 J, \& cend4 [0 O2 {" D# q* Q/ ^3 o
3 G2 `( s( c) z; d, S9 U但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |