谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
8 N% C. j/ i) a. Nbegin model initialization function% l. c2 b M. ~& R! {7 T, ]
create 1 load of load type L_null to P_Creation2
, D8 o( H% w; N- {2 W4 o0 u create 1 load of load type L_null to P_Creation3
1 m" x h8 n+ V* U9 H* T" F* B3 l create 1 load of load type L_null to P_Creation4
# p2 o4 b n" i8 K$ h7 b return true
, `8 b, t7 @, C4 I& L9 nend7 h7 h# e1 u2 }$ ]. }* N
0 @( s: H- V3 m1 G$ A* e* }/ @
begin P_Creation2 arriving procedure# s% w }" S2 g% Z6 w
while 1=1 do4 ~! ?0 k+ D6 W
begin$ j3 X3 z+ S. P" b! v$ {. }) Z
wait for 1 sec$ w& a4 Y) W' L/ `9 K7 y4 v( L
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
( W! Q c' d, W/ d$ o8 n) O9 L& n end
& X/ U! u. h! i8 n& ~- F/ y( g4 }& pend# G6 }8 O2 J. s& u
! H& `9 W7 Z- U/ t6 D# \
begin P_Creation3 arriving procedure3 f Z, |9 `/ r/ X4 y
while 1=1 do& R% S! r) I* E( i' G
begin
$ h' N1 o) S& C) @5 r" ~, \5 i wait for 1 sec& x0 k6 s+ w, G" l8 y
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
# {3 K5 {" ^! H X, G end( F! O! N6 \: R8 b; b6 p7 {+ Y9 c- a
end 9 d. O# o4 \3 {% A6 s7 h) [# ^
7 a l" a W& A4 ]7 |$ [
begin P_Creation4 arriving procedure' {; q: Q8 E3 a
while 1=1 do
3 @( n* N# L! q1 B) ]4 b begin
1 j# m8 [* v p- r5 U$ i wait for 1 sec/ g& ^; s1 S% q8 g) z+ {9 e
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)2 s6 f0 I# ]* j1 Q: o
end- u; `* R* _9 ^- \/ Z
end+ v# n( U0 j! E
) N( p- I7 [, T* W2 J8 b7 P但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |