谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);6 M* Q" b7 X$ r6 V2 R
begin model initialization function- T4 Y+ S$ |- O! B- ]9 m
create 1 load of load type L_null to P_Creation2
& E6 E) G0 \; W, {$ P' l# s" i create 1 load of load type L_null to P_Creation3
, J6 s: W( p1 w5 [) M& |. x/ a" [* K create 1 load of load type L_null to P_Creation4$ l7 s5 `% }! L! p2 \3 \) U
return true
2 H1 }# `! y' W' ]& t3 cend
; W2 L( t( z, F( m! k$ M% e, ^+ W
) q% T6 n( D) B$ I/ tbegin P_Creation2 arriving procedure8 N1 O* o" J$ M0 B0 ?2 K
while 1=1 do
( ^* T( L* y' E/ n, k begin1 J2 p& G3 p. z0 R: H
wait for 1 sec
2 z5 k: G) j- }# x9 s create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)# \3 m0 d6 V/ d, H! `- T
end1 T1 s+ E; M+ C! r9 M" ?3 E) ~
end1 t' J7 W* u+ t/ w- f0 p
# Q4 i& G% i; C9 k! m1 a; ?( D' |begin P_Creation3 arriving procedure1 Q9 `8 R1 B- V0 z* y1 X
while 1=1 do
, T/ y! t4 ?6 u* e: u begin
9 B+ c6 j" s" ?: D+ |2 e wait for 1 sec
* ?# o) q# W) g, a: m" W: T create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
; d1 A% `& N6 x, B. X4 [; }( S: @ end
/ {) C3 Y' @$ s/ R" p$ E1 K5 Q% Qend : @9 ~8 _2 [8 U6 M9 |' G3 f; D
9 _8 |0 W4 L3 A
begin P_Creation4 arriving procedure
3 ]# [$ w7 x, m. O0 ewhile 1=1 do
- O$ T L) Y$ ]9 @3 C5 g# D begin2 b, Y9 s$ S5 e3 H' Y5 r
wait for 1 sec# i# M* _& N& @$ H, j5 m2 Q
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
1 d/ H5 ~: T* e$ k$ L end3 l; @8 m! P }: E0 W4 c
end3 Q" u7 v& p2 z! V2 L
1 a9 r( @9 `1 u, Z1 K {
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |