谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
- P% N6 d5 n+ j, I ]begin model initialization function
p! V% P+ ~: I+ a create 1 load of load type L_null to P_Creation20 z( G9 i- ]; ?9 n9 A# @$ X
create 1 load of load type L_null to P_Creation3- @. j" h- e" \& D+ R: U7 }2 z
create 1 load of load type L_null to P_Creation4
9 F1 c& C/ o5 }. {# ~ return true
/ l2 Q' S0 w# g Y$ cend
% W- V" t$ f( v: w) W8 j" W
0 Z5 y' A. Q, p6 b- g) |! xbegin P_Creation2 arriving procedure. P* D: h" `+ E. b' w
while 1=1 do$ u5 U- Y! v4 Q" a
begin- ?2 d' d& R$ |1 R X, l
wait for 1 sec5 M, A, v, \. N
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)$ n( |* s9 U$ p
end8 ?3 Q9 g- }, I x
end& D; {6 a6 a2 D* t$ L2 H( t0 s
- X. h: w/ q+ [( B% J- x- J1 H
begin P_Creation3 arriving procedure
. v8 v, o6 {+ o- P, vwhile 1=1 do
* [4 G1 V. w) B. c, G begin2 v6 Q2 f0 {1 f! ~" d* T; V- y; S
wait for 1 sec
- I: f3 Q% P( L& }& Q create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)5 Y- c7 l4 H, a! j; n' p
end
, @% r0 V: ?; O6 x6 M/ cend
) ] @* |! {: B8 `8 L# Q3 E# P
begin P_Creation4 arriving procedure( z) R# p o# C
while 1=1 do& @$ S; \" y7 T
begin
! X* d# B1 I' V- j" ^7 f wait for 1 sec
& L4 Z! ]0 n! }9 F create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)4 W9 U; `6 h I* X% T- r. c- G
end
# w2 O3 k+ @: \7 c8 @end8 h: ]9 |% ], t3 i5 G
+ U) M- l7 D" m% X7 w但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |