谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);0 [1 ~8 o0 B5 n( {! u- ~
begin model initialization function
. \8 A1 z7 j( l5 A create 1 load of load type L_null to P_Creation2! a7 T& t b; Q+ E$ @0 w1 Y- q- |$ J
create 1 load of load type L_null to P_Creation3
" \6 U- P, z s8 z/ N3 R) L5 [ create 1 load of load type L_null to P_Creation4
! p' t" Y- s0 L; t# D; | return true
, ~3 @# B- z! _- Z1 uend
# n2 U( K" x% F
1 m0 r z4 ?7 Fbegin P_Creation2 arriving procedure
; k* `% s, j; o2 @2 N! h1 A! T. bwhile 1=1 do8 z6 m8 k9 A% `: |1 P D, N
begin! J/ F! Y. x. m$ t% A1 Y
wait for 1 sec: q2 @! R) S7 o) l% H5 f& v z% b+ t
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)6 M9 _( Q) x5 d5 V+ ]/ ^5 m
end
5 n7 D2 y4 p6 V5 @8 l" F1 tend& Z* v& O/ K0 o7 [# R5 E/ h
3 j7 U. w7 k8 e
begin P_Creation3 arriving procedure, W, Q5 O( Q) w3 Q" t& c1 [; {
while 1=1 do
% r2 [2 F! E& R begin
* \& b4 T9 \6 P+ n( w wait for 1 sec- ]) M& k. J0 A7 \5 u# S1 K
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
# k. I. \, @- J5 l& j( f end
" k; B: E6 H. U7 Y. o0 Lend
1 \* E. P1 u7 o/ z. A% v3 H
/ i3 o! p$ |: O @0 ?! P7 Xbegin P_Creation4 arriving procedure6 Q8 b' A C- Z. t
while 1=1 do' K1 p9 I3 M) b6 \; d6 {
begin
' R# M4 b/ S, K. L5 I9 Q wait for 1 sec0 s; Y U/ p" h$ g
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
4 b/ B, X! H2 e1 X2 x4 J end
' j. k8 A' v: m* D5 }end2 H5 G( c! z( t) q
/ R- T5 z: T( |" U: e
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |