谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
( n7 [7 Q2 C6 [$ U m" D" } wbegin model initialization function h6 U/ Y ~( S4 T+ s* y
create 1 load of load type L_null to P_Creation2
) h: F) d* P$ m8 e, t: | create 1 load of load type L_null to P_Creation39 g7 e: I2 n8 T0 d9 ]
create 1 load of load type L_null to P_Creation4
) X- {# ~. p7 j# C) i9 ]' y, _- J return true
, S! S; e$ N+ b$ K- Mend5 h: |9 t4 g! }2 B( r, k: }# i" z
9 I) S; R' u) g. a5 `: G
begin P_Creation2 arriving procedure9 c6 s+ P8 h$ P
while 1=1 do9 O$ W& V8 J4 u9 @( H
begin
* t+ L \( b' F8 P2 ^ wait for 1 sec% x p% b! Q2 C1 M# s4 L7 N" ~( U
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)& H! _9 y! B8 G# K# R; u# I
end
. u% H7 S' O. f0 |; @* ~end
: l! @8 E& i2 o; c) ^$ A1 ~8 n, O) \& q* W7 o; V
begin P_Creation3 arriving procedure
' v2 g% {/ ?: ?6 _while 1=1 do E' d8 N0 F, e3 O
begin
+ l& Q6 q9 h$ C! n. y5 r wait for 1 sec
' b% v9 E& k. P0 D9 s# k create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)7 F- n" {; ]* K: B0 v) h' {
end
4 w7 C' W/ o; L a9 Q& oend
# b/ r/ @* P3 N9 ~, f2 d1 ^: x$ N _7 T, N$ L
begin P_Creation4 arriving procedure7 M( w' q7 J- k# H* Y2 o) U
while 1=1 do, o) t+ P \/ x. a+ g5 j- B
begin# r" {) O- i8 m: Q6 E
wait for 1 sec; B0 F0 K0 \+ B% d2 V3 w
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)- J% d4 J( f; T: q! Y
end
7 f1 o# y& b; }* T+ fend: V& D a$ \ C; G+ J6 v7 r/ l# W
# w- U' R8 y, c* S
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |