谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);/ E7 v5 l7 Q5 n, P/ v
begin model initialization function
4 Q! M6 I" j" a# B5 \6 v* v1 l create 1 load of load type L_null to P_Creation2
t6 d( r" ?3 ]( k l create 1 load of load type L_null to P_Creation3
) E, U9 \5 i) n9 ?3 z0 U- H" n: i2 Y create 1 load of load type L_null to P_Creation4
. ^2 n# K! q$ l1 W# H; h return true " }( x5 l5 {- H! j5 t8 o4 { b
end, c0 R$ o# M9 ]8 y9 n0 A, p, f4 L
8 K* |: c5 q8 O5 K. b) l% |begin P_Creation2 arriving procedure
2 T, P: u1 {0 J' ~+ X# ^while 1=1 do
w* s$ L$ q5 M- U" _ G begin P( F1 Q( K# b0 i
wait for 1 sec
: G, }! N/ N' i' `% A" ?' S create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die) w" \: p' L& D1 Y
end3 @6 S9 B/ _0 [# ?! f: j! E
end3 J0 o) {' r$ K1 w4 X
4 @: n0 Q7 X' _1 _' abegin P_Creation3 arriving procedure6 {) \, W$ Y2 V+ O; D7 P1 \
while 1=1 do0 P; \2 @, [9 H2 I% T2 M
begin- [, B0 `% N/ x5 V% w A
wait for 1 sec
% L+ |: n0 V z6 m$ M create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
5 y7 C5 p5 X) ]6 e9 v. X. ] end
& }# p! z" E3 L9 N3 o, F% _% k3 jend
+ k! W% q/ R2 L5 U3 I& n. U: b+ ^8 G4 u7 R- C! u" P5 l! a
begin P_Creation4 arriving procedure. v6 a0 X" m* g5 }2 W* E
while 1=1 do
1 Y: M a# _' q* f: N& d. @ begin& \ k) A/ c# v, |' R
wait for 1 sec. b: G; D$ N+ r/ w3 Z3 H2 p
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
0 @4 y3 F4 J( P end8 ^! G" i4 U3 R3 [; S& z
end
5 \/ A* d* z" Q( m
8 i% f, a$ @( x+ H但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |