谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);# ?! X5 h, T) d$ i: \& ]) E/ Y2 Y
begin model initialization function$ C" I# Z) x$ d G2 e+ t' `) p
create 1 load of load type L_null to P_Creation2, L+ o8 h9 a1 K8 V9 s- l4 M( I
create 1 load of load type L_null to P_Creation3+ ~$ N( g$ ^4 w
create 1 load of load type L_null to P_Creation4
' ?2 t7 m. l6 k! y( ^6 _6 r$ j return true
# z4 A( A' u/ @; p% J6 H7 ^end
' c5 x$ x% O: @4 B2 q6 R9 T. F- i, f1 g- X! e' f5 H
begin P_Creation2 arriving procedure |5 ~; ?5 ~- U+ F
while 1=1 do
7 `$ B, u+ z+ F2 e4 v begin
$ U( \7 y- ~2 [* M; N wait for 1 sec
! |, {9 R9 f8 g# ~$ E create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
8 h/ X: M) r8 B$ _! H/ K/ a end
" B; K% X% x& {3 p" Cend
* u+ E6 D" d; I% S5 d X: ]" V; @3 D$ {7 k9 i
begin P_Creation3 arriving procedure$ |- x# L' S( c/ o
while 1=1 do, d7 ~$ \0 m0 t, H% h
begin
/ _, W0 Y( C' V9 r( Z2 [ wait for 1 sec
& y9 c5 W- @# b6 `' r2 U create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
$ d- Z0 G& \0 z7 W( S- q) d end
% U. M, J$ l/ J% x! Aend
, e* @, ^1 j% X8 Q
( [" K2 C. D/ S1 X2 xbegin P_Creation4 arriving procedure
0 B, x0 l6 Z! Zwhile 1=1 do# l. J7 M" e" z" ?
begin
$ R6 s, p0 j& G6 `' |3 \ wait for 1 sec, d. u& k, |" X$ N# \$ ^: [
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)6 b' z) t4 f% d3 g3 J- D
end
7 F0 V+ ?7 n- ?* C9 E, C6 Tend i8 `" N4 [! @7 l
* d v" h% |' p/ A# A但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |