谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);8 C' g3 o, Z, Q: s$ O3 r6 Y3 m
begin model initialization function
9 L# l* T8 ~, g; u4 @8 T7 v9 u# {* c" L create 1 load of load type L_null to P_Creation2
5 v0 s- ^, u B% v3 Q create 1 load of load type L_null to P_Creation3
( u G4 J \. d) [* ]$ ` create 1 load of load type L_null to P_Creation4
: I9 H& b' R, h5 v return true ! ^& J5 F* E/ z" |7 o$ H" n F5 G' M& d" N
end
2 j1 O) X0 u* k1 E. [0 ~8 c* {) I# \0 B- j1 [
begin P_Creation2 arriving procedure2 x4 J" F- w) h* H9 e) Q
while 1=1 do
8 ~# H+ [, o" p* B. o begin
( m' V/ `& C. L8 N | wait for 1 sec6 n. q! y8 t t
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
. s* Z% @0 F0 {. Y; B% E, b end* [: Z8 S& q/ [
end7 i+ k) q6 H0 t7 ]1 G9 w6 ?
1 w5 |9 k/ X# F0 ^# T5 h
begin P_Creation3 arriving procedure
2 K2 s' M' u, R% g# R$ pwhile 1=1 do# C8 Z% @ ?3 a7 n/ u" ?
begin
* n1 J& T6 L0 B wait for 1 sec
5 J4 p# J3 F5 ? create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)# f, C2 r2 X& N; A
end& u1 F& |, \+ S3 }1 b
end 7 D& T# O/ v- e' s3 G4 U
/ P3 Y. v M0 ]7 B4 dbegin P_Creation4 arriving procedure8 x0 f$ V& a$ D
while 1=1 do
% u. F) `% j! S# I begin
5 X6 f7 u7 c6 a9 }" @+ X; g wait for 1 sec, [* h. U9 u- M
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
2 q3 E! ~) x$ G! c1 u% D end
2 G! i4 M0 ~; L+ l. W& s' G3 }end: B' K6 x$ c. f2 O" i
( R, ~( l3 R. z7 V5 o
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |