谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);3 N. Q9 ?6 Y1 a$ o& \
begin model initialization function
+ B7 p N: V$ m, \8 r5 Q( |' C1 ^% Z create 1 load of load type L_null to P_Creation2- { Z- L& s2 F+ @4 J C
create 1 load of load type L_null to P_Creation3: R6 t1 q+ J* [; j o) E
create 1 load of load type L_null to P_Creation4
* t0 z7 }% b: y9 k0 O5 N return true
$ g9 D! U S0 X; s7 _3 |end
# {/ e: j, q x% `5 K
" N) H& Z4 g6 C3 n) U- Vbegin P_Creation2 arriving procedure
3 |: s7 R) c. `5 o6 G C' B1 y8 N& Zwhile 1=1 do
* P1 B, Q+ [% p2 n1 R5 F7 v begin0 F; T3 w; K A$ O, Q6 O# C
wait for 1 sec
+ }6 ?9 ]9 J% P# W create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)1 ]. E" ^& n6 O: r z
end( D+ C0 j |" u3 m) x7 n$ T! z
end5 K3 E+ x/ `+ g1 t1 O) Q
0 R4 R8 Y2 `- s4 w9 w
begin P_Creation3 arriving procedure1 x+ A7 Y* R5 i6 ^1 a9 k2 t$ |
while 1=1 do' W* M3 Z C3 Z& ]0 s
begin/ }. F) G% }$ h9 l; D- C9 M0 E) i) Q0 H
wait for 1 sec
& r# N# u, T3 K create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
+ F: A' ]% \, y) b, _* m: ~' Z end* y; F3 e- N- p( s6 ^/ m
end 2 f, H* Y0 d9 D" m) P& H, o8 I( B
- j. z" h0 x/ V, M4 h* c9 k+ z7 }begin P_Creation4 arriving procedure
8 {9 Y6 J2 s: s& @5 H" @" owhile 1=1 do
6 r6 l" g( U% G: b9 n5 ] begin3 k( P* J$ w, D! A# I3 `4 C" e# R
wait for 1 sec
' i. y8 T9 s: g" }7 @ create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die). J: N e8 {. T2 y6 j
end
t6 T* I" n: j% U0 Iend
* C Z& m3 O+ n+ Y+ ^
- v( s4 W9 ]+ ]1 |+ J' v4 k但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |