谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
- I# ` r2 U, j/ H- p# Ybegin model initialization function8 O# v; a; Q- z
create 1 load of load type L_null to P_Creation2
& t. u8 u9 L# k5 Y9 J$ K! T/ O create 1 load of load type L_null to P_Creation3, F; q; j7 d$ Z
create 1 load of load type L_null to P_Creation4: w" U8 r0 ^+ e9 @, ^: z
return true
' {0 m1 w, Z, m% G+ Q9 Wend! S: |: l# |* x4 q2 h3 U; {+ C0 b8 v
$ w8 B3 k4 A( Q( U3 ]
begin P_Creation2 arriving procedure0 _! X4 o1 r; K. P' k" n* |
while 1=1 do
6 K" p% G5 K/ Q8 F( x/ A begin
) I4 E9 W! p' d5 R" ^ wait for 1 sec5 `/ R; F( N6 ]' h6 t
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)
, h7 }( A9 j/ |- ^ end
, { F( s) g2 |3 w! Nend3 J$ {- Q/ K; ?& s* e
# w6 E+ x9 Q5 Q' \. `begin P_Creation3 arriving procedure3 Y# o$ H3 B3 D: F$ Q
while 1=1 do
$ h5 p4 x, \: U/ G( U& [+ P begin. a2 u# N F$ O h# d$ z% t
wait for 1 sec
: C/ |4 `$ g. Z7 q! C, y- E create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
$ @" S" ^9 e5 D- `* s end
: D! J1 B# Y9 @end 1 o# L% f' u$ M: c
' z+ Q) f- d1 b- v) m, c
begin P_Creation4 arriving procedure
5 Z: S4 X3 c" }( F# y5 m" A9 |while 1=1 do
1 Q& R/ O: i; _9 }4 J" S& h8 a begin) R0 I5 L6 l% x1 I; O+ a% Z
wait for 1 sec& S/ Q4 ^% [; D2 ]/ u
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)- O) w. N5 E3 j. D. S
end& h* E+ k( s. z, z
end
. t, ]$ E% N8 f( K: X' X2 Y, r: e2 j# e# u, D/ p; |- y" I
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |