谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
4 ?) j. Y3 H9 x. }% a; G: }begin model initialization function8 T/ y1 p) Q8 `
create 1 load of load type L_null to P_Creation2& h2 U0 G" {0 n4 c& r' v) E
create 1 load of load type L_null to P_Creation3: H' \* `" U% @. j) b3 A! b: G
create 1 load of load type L_null to P_Creation4
! V& C' i$ x& Q1 g6 y! K1 q return true
5 K2 X- I) h u/ Qend$ S3 x% R" o' K; I( J) E! z" r" J% w
! Y& A1 x' v! O0 B5 b
begin P_Creation2 arriving procedure
+ f) a; K* p9 @! pwhile 1=1 do& N7 n1 J# m% x& |2 _/ ]
begin! [6 _+ f# P+ P T" J0 V
wait for 1 sec
" J. ~4 q) l. x" O1 S. e+ M create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)1 ]! n1 k5 p+ f/ t/ k. }/ }8 T' K
end2 ?0 [* ~& S- A
end
, x6 A+ Q& E3 Y* j8 N' _% A2 z, s* M* C
begin P_Creation3 arriving procedure
8 f# G! j- n* {1 swhile 1=1 do
! a# |$ D) |% x$ W7 E! I( ~ begin) N2 j0 b3 `& J0 s; h! T, X
wait for 1 sec& q5 z4 S0 I% v! z) P- J, C
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
1 C8 V, J, _, ?4 x end% Z; e/ o7 C: Q' }
end i" R+ e. d0 D0 ]
) b9 D* c0 t% ?. P# D
begin P_Creation4 arriving procedure
! g) C9 ]3 Y! }0 Cwhile 1=1 do8 d! Y8 m: y# _0 f
begin2 C" s8 |5 `8 A$ R* }6 I
wait for 1 sec
( p# m b) t! e+ q: z/ E" H create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)' Y. p/ n& b2 @, {' t% a3 T
end! b# p& `4 l9 _: r
end
/ x% L9 Y2 t/ c7 B# c! S/ T' A5 ?4 c3 y, a( Z! R
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |