谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
# l0 s" J# A- Obegin model initialization function1 U/ ?, l" z: I
create 1 load of load type L_null to P_Creation29 q9 f! M3 P6 Z! s/ ^$ _" n
create 1 load of load type L_null to P_Creation3- |9 |5 k0 y7 `, h1 H; x- l
create 1 load of load type L_null to P_Creation4! D$ o/ G, Z+ b6 k8 C
return true
( P' T" d, a% s3 m+ Wend B. B9 w3 s' Z& t8 x
! S5 d1 G! r" W/ |1 H. V# g. C u- abegin P_Creation2 arriving procedure* k. ~0 Z! L- p
while 1=1 do# ?/ j1 @9 x( x9 Q
begin- `$ L; g. N5 y! c
wait for 1 sec+ M" z) \5 J9 Q4 Y% G3 j0 E* @
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)* z6 T* }6 q, ^0 [
end/ o* D# D+ p! J) @4 w" {# e
end
, [9 D) J8 R z& F0 {" `
5 }% L; I% }7 V hbegin P_Creation3 arriving procedure8 W7 f; J5 @7 s+ M$ M5 t
while 1=1 do3 e4 }; @0 u1 V% Z4 Q
begin% Q$ G1 G, S7 J0 \& ]/ h+ _) c/ i
wait for 1 sec. h" Q* F! j0 D0 L9 h4 s% Z
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die), ^$ I3 d* r! m( u
end6 \, F, e- g( s" V/ s. T
end 4 v& O: ?' B/ @0 T# y
" p) g" q2 m1 Y7 Q3 p
begin P_Creation4 arriving procedure \: |( z; z3 D/ ?, y8 {
while 1=1 do. m/ M9 f* F, q, ?0 ^( Z G
begin) S# |0 c, ?: J1 K/ u( H
wait for 1 sec
+ E9 l D& g3 ~5 Y/ b$ ?& F3 K/ N create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)- |' {) i$ G0 X/ V, c
end
$ L4 |' E. w' [( r9 K& gend# |+ ~9 q2 i k: M6 o
% y. s% J0 X& G
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |