谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);( \( \/ G1 e& l1 V
begin model initialization function
1 e& f: y* B3 F9 }% U1 ]& p0 ` create 1 load of load type L_null to P_Creation20 W3 O, ]* n7 [8 R" z. A
create 1 load of load type L_null to P_Creation3- |7 Y4 e c A3 B; D
create 1 load of load type L_null to P_Creation4
/ X4 {0 N6 D& }" I return true
/ g/ m* J/ Q( h6 S' C) ` N+ qend6 y% s8 e# `6 W5 z3 R- ?4 N/ F
6 g) x7 N3 P3 P
begin P_Creation2 arriving procedure- J1 n9 R! S: J8 T& S
while 1=1 do
1 h a7 V# G/ G; F" s begin
) A9 B2 O% E6 i' @& ]3 w( C" s3 ~& e wait for 1 sec' X( i% D/ R/ Z/ I7 i7 N {
create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)) w/ F) a- x# z. E9 Q/ n8 z
end
5 o2 l* H5 o4 O4 X/ Kend
! _8 H, O- m: A, X! u) k, Z: B' T4 T" P6 B6 w! ]
begin P_Creation3 arriving procedure
$ A& ~0 l. V+ Xwhile 1=1 do& d& |, w, h/ p) g8 r: Q/ L0 y6 A
begin4 T: y1 A0 s7 t) E0 V
wait for 1 sec
* p& ?" H, t" n9 N create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
- E2 K- A9 c( f3 M& n end% ]* y1 w T+ }4 i3 ^0 b; v: S
end " N9 S' ~7 G* p2 U) r; X* {
" B. w" z; u/ Vbegin P_Creation4 arriving procedure
2 t- E8 D, }$ @while 1=1 do
$ ]' P9 {7 R" U: r5 d: g( h begin
/ L+ ]5 x ~7 l5 w. h9 D wait for 1 sec- J; W& a$ Z" A$ s& @* c
create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
, d" f0 l R# s2 a end
0 x& m) v: G# N) ]end! x& V, K1 M# B4 `3 K2 T7 ]
* d; m6 B; R4 z1 Z, p* T" E* t
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |