谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
( S; D5 l$ b1 jbegin model initialization function
/ O8 j* N$ ^( T! R/ z, p create 1 load of load type L_null to P_Creation21 D7 \. e( j- X8 [
create 1 load of load type L_null to P_Creation3
5 _+ ?8 E' t8 t create 1 load of load type L_null to P_Creation40 A7 E) M, b/ ?' v% x4 F3 ^
return true
* n6 T0 c- T3 \# [, P7 }end
4 T% u* G/ ]7 R& Q1 d' c: s& @' | `- t W9 B: F$ H! m, c
begin P_Creation2 arriving procedure
% Y: l+ v! z5 g/ ~. b# wwhile 1=1 do" F& Y1 Q8 [, l4 V1 H: y
begin+ Y5 j0 k0 K0 P" J y1 H, d
wait for 1 sec, S8 {1 J( q4 h3 Z$ \' M. O
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
' g# y& \; z; i! `" }& r end+ {/ `9 O" g3 @5 I% ]& u
end
5 w/ ?4 G5 Q: R# l. m
# F) a- k( ]$ M& k7 [$ {begin P_Creation3 arriving procedure
/ }6 v" k4 s. o0 S( zwhile 1=1 do! u1 ?" `0 B$ r( T$ G4 [' X# D
begin
& l. [ b6 E1 A8 r I8 ~! ^ wait for 1 sec
% z6 v- j: |! ~, a& P" q) c create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
/ n9 _" J I- F: C+ l) p+ a+ R end
+ N D# C8 x# R* Dend " ^# D/ O7 l. j! ~
0 z7 l1 s: y; Gbegin P_Creation4 arriving procedure
% @' J8 E, \ p5 J. ^1 awhile 1=1 do
, W# ~; e* u& K7 H begin
8 U+ ]9 N V, Q0 J O wait for 1 sec
2 h, u q6 T- E create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)( p% ?+ [5 D6 K8 A
end! i9 d5 \3 D! \. J
end3 ?) l3 @$ k4 ]# J: l8 w
1 Y. {& _2 L K. l但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |