谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
R) b: c7 G; r. `begin model initialization function
& z% I2 l1 J/ h1 c create 1 load of load type L_null to P_Creation21 e4 l3 Q% o5 o* n' d4 l5 s
create 1 load of load type L_null to P_Creation31 o4 u( r: A: \4 d7 f# f+ g
create 1 load of load type L_null to P_Creation4
2 ~- F- Z0 r0 v return true
2 `) v# ^0 c: w4 n7 N s! Aend3 {5 a) }, y8 U. s N
, |3 _4 H3 d5 z, S; m
begin P_Creation2 arriving procedure
3 U# V. r, |! m) ewhile 1=1 do
! I) T/ t P2 X7 k k begin
: i7 i) ~; n( F5 V* m2 U wait for 1 sec& g, I7 d" o" |5 b
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
K, G8 C- H2 o/ s; X2 ^ end e) M9 d! K. ]) F2 t
end: |) b/ q$ l; s; e/ r5 Q
* \% Q( @" a' s) d4 B. L/ N% n' F
begin P_Creation3 arriving procedure! V% X9 F4 s. V& O1 o
while 1=1 do
2 w( R" N% @: A1 e( O( I begin
- w3 V6 K- ?& r' Y wait for 1 sec! J3 g9 M/ H* p. |
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
( C4 P O0 k+ T k% |, W* S end
8 m. p/ s, z6 `5 I" d3 {end 0 m, W/ k& @9 e* l! j
# ?- R) U, |+ J% [: B! zbegin P_Creation4 arriving procedure8 ^, X, ?$ f; z2 _
while 1=1 do* p" _! O4 I5 q
begin
% E" q, ^4 G1 w! A/ w, x" o wait for 1 sec" L8 ^- U& h7 W: g' H1 S K
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)( J. l/ V) O3 ^: [9 d2 W
end' q* @! l7 [3 M! T n6 `' F
end' R. E+ F. m$ Q
6 U+ ]9 o3 N4 P& R3 o. i% @: ^, i0 Y但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |