谢谢shakie的耐心解释,我按照你的建议改了代码如下(并在window窗口定义了L_null);
_# W. R- s. Z: _" |$ Ybegin model initialization function
/ f7 G9 B! S: @ ]7 f create 1 load of load type L_null to P_Creation2) T$ `$ f0 x2 d
create 1 load of load type L_null to P_Creation3" S5 y8 F5 @" C
create 1 load of load type L_null to P_Creation4
6 y: G4 S; v4 P7 S: S) w return true
2 M9 [- P# s5 P3 D5 ?end
+ P; O: E! n' o2 Q
$ k1 Q5 {6 ?( F& l; _ gbegin P_Creation2 arriving procedure8 r% R/ v2 w; @+ _
while 1=1 do
2 j. e. G; Z& [5 C8 j begin
1 k9 a" M- p% }2 k8 p. l wait for 1 sec
( d; X; j! P V create 1 load of load type L_C2 to oneof(0.2 _In2,0.8:die)1 d# C7 a( d+ ]: j/ G" G y
end
3 l: K8 K2 [' N/ Z' @end) [: X3 f, W# Y" F' n, ]
- `4 h9 s! q8 R, k6 |& q3 A/ J0 Jbegin P_Creation3 arriving procedure
6 Q, x! z! s+ A4 Awhile 1=1 do2 _5 B5 w J; e1 K, L8 d
begin$ K# O2 N# ~1 K# s; y
wait for 1 sec- m l8 a, [4 v( I
create 1 load of load type L_C3 to oneof(0.2 _In3,0.8:die)
( J9 H; `9 c i end
7 h3 {- r0 I6 Y, `end ; }: n/ m( Q' c0 _1 w
1 F5 K' o8 j& R0 \/ j
begin P_Creation4 arriving procedure
$ h+ |& \8 c4 T. t) Nwhile 1=1 do
- G* z0 n5 }6 L3 U! @3 B begin8 C; S4 ^3 _" n3 l8 f
wait for 1 sec
^2 Y! H2 k$ L7 Y1 Q create 1 load of load type L_C4 to oneof(0.2 _In4,0.8:die)
% y- f6 p6 W& N$ v& J% i end7 I- a7 I# n% d8 R4 x; a& a
end+ H3 N& C, f2 T" p# f% }& g
' C0 ~/ | ^6 v6 a0 |6 ?8 C8 r
但运行时仍然出现相同的问题(提示:ox100f5e09指令引用的“ox00000028"内存。 该内存不能为"read"),无法运行。不知问题出现在哪里,请高手指点,多谢! |